diff --git a/src/App.vue b/src/App.vue index 7589bcf..4962849 100644 --- a/src/App.vue +++ b/src/App.vue @@ -736,6 +736,10 @@ textarea { background-repeat: no-repeat; background-size: .22rem .12rem; background-position: center right; + display: block; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .addr-select>div{ width: 100%; diff --git a/src/main.js b/src/main.js index 437957d..c35d93e 100644 --- a/src/main.js +++ b/src/main.js @@ -10,7 +10,6 @@ Vue.prototype.HOME = '/api' axios.interceptors.request.use(config => { if (config.url!="/api/api/user/login-by-Phone"&&config.url!="/api/api/common/send-sms-captcha") { - if (!localStorage.userData) { window.alert("请登陆") router.replace('/'); diff --git a/src/views/home/expert/ask.vue b/src/views/home/expert/ask.vue index 8f5bc43..63976f4 100644 --- a/src/views/home/expert/ask.vue +++ b/src/views/home/expert/ask.vue @@ -7,7 +7,7 @@
- +

请使用以下两种方式加入钉钉专属服务群,我 在您的专属服务群回答您的问题。

@@ -17,12 +17,12 @@

下载二维码并用钉钉扫一扫进入专属群

- + 点击下载二维码

专属群DingTalk链接(复制此链接,在浏览器地址栏粘贴后打开钉钉, 自动进入专属群)

- + 点击复制此链接
@@ -37,30 +37,49 @@ return { isScrollTop: false, isActive: true, - linkUrl: 'dingtalk://dingtalkclient/page/link?pc_slide=true&url=https%3A%2F%2Fh5.dingtalk.com%2Fservice-group%2Findex.html%3FjoinGroupCode%3Dp3cAnJVnxMMiPvkT1zJLiiup35T4nkdE3uNFJIiiUkGhZSCsiSL0qydvCuolCftWNT7C%23%2Fjoin-group' + id:'', + expertDetail:[], } }, created() { this.isScroll = true; window.addEventListener("scroll", this.eventScrollTop); + this.id = this.$route.query.id; }, mounted() { - + this.getDetailData(); }, computed: { }, methods: { + // 获取专家详情 + getDetailData() { + let that = this; + this.axios + .post(this.HOME + "/api/consumer/expert-info", { + id: that.id + }) + .then(function (res) { + console.log(res,111111); + that.expertDetail = res.data.data; + }); + }, + + // 复制链接 copyUrl(){ - let input = document.createElement("input"); // 直接构建input - input.value = this.linkUrl; // 设置内容 - document.body.appendChild(input); // 添加临时实例 - input.select(); // 选择实例内容 - document.execCommand("Copy"); // 执行复制 - document.body.removeChild(input); // 删除临时实例 - alert("链接复制成功") + if(this.expertDetail.im_group_link != ''){ + let input = document.createElement("input"); // 直接构建input + input.value = this.expertDetail.im_group_link; // 设置内容 + document.body.appendChild(input); // 添加临时实例 + input.select(); // 选择实例内容 + document.execCommand("Copy"); // 执行复制 + document.body.removeChild(input); // 删除临时实例 + alert("链接复制成功") + } }, + // 滚动改变样式 eventScrollTop() { let scrollTop = document.body.scrollTop || document.documentElement.scrollTop; diff --git a/src/views/home/expert/detail.vue b/src/views/home/expert/detail.vue index e7b1ba2..8e70fc9 100644 --- a/src/views/home/expert/detail.vue +++ b/src/views/home/expert/detail.vue @@ -71,7 +71,7 @@ created() { this.isScroll = true; window.addEventListener("scroll", this.eventScrollTop); - this.id = this.$route.params.id; + this.id = this.$route.query.id; }, mounted() { this.getDetailData(); @@ -80,6 +80,19 @@ }, methods: { + // 获取专家详情 + getDetailData() { + let that = this; + this.axios + .post(this.HOME + "/api/consumer/expert-info", { + id: that.id + }) + .then(function (res) { + that.expertDetail = res.data.data; + }); + }, + + // 滚动显示头部 eventScrollTop() { let scrollTop = document.body.scrollTop || document.documentElement.scrollTop; if (scrollTop >= 5) { @@ -94,18 +107,7 @@ } } }, - // 获取专家详情 - getDetailData() { - let that = this; - this.axios - .post(this.HOME + "/api/consumer/expert-info", { - id: that.id - }) - .then(function (res) { - // console.log(res.data.data,111111); - that.expertDetail = res.data.data; - }); - }, + }, destroyed() { window.removeEventListener("scroll", this.eventScrollTop); diff --git a/src/views/home/expert/index.vue b/src/views/home/expert/index.vue index 2626098..b0981e0 100644 --- a/src/views/home/expert/index.vue +++ b/src/views/home/expert/index.vue @@ -1,5 +1,5 @@ \ No newline at end of file + diff --git a/src/views/index/index.vue b/src/views/index/index.vue index 9a4eba6..c5ae941 100644 --- a/src/views/index/index.vue +++ b/src/views/index/index.vue @@ -1,230 +1,219 @@ \ No newline at end of file + diff --git a/src/views/login/verification.vue b/src/views/login/verification.vue index ae39632..7dfc774 100644 --- a/src/views/login/verification.vue +++ b/src/views/login/verification.vue @@ -1,192 +1,179 @@