diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue
index 7554bb1e..0772fed7 100644
--- a/buyer/src/pages/GoodsDetail.vue
+++ b/buyer/src/pages/GoodsDetail.vue
@@ -21,16 +21,7 @@
{{storeCollected ? '已收藏店铺' : '收藏店铺'}}
-
- 联系客服
-
-
- 联系客服
-
+ 联系客服
@@ -58,6 +49,7 @@ import {
} from "@/api/member";
import { getDetailById } from "@/api/shopentry";
import { getIMDetail } from "@/api/common";
+import Storage from "../plugins/storage";
export default {
name: "GoodsDetail",
beforeRouteEnter(to, from, next) {
@@ -66,7 +58,6 @@ export default {
},
created() {
this.getGoodsDetail();
- // this.getIMDetailMethods();
},
data() {
return {
@@ -80,8 +71,15 @@ export default {
},
methods: {
// 跳转im客服
- IMService() {
- window.open(this.IM);
+ async IMService() {
+ // 获取访问Token
+ let accessToken = Storage.getItem('accessToken');
+ await this.getIMDetailMethods();
+ if (!accessToken) {
+ this.$Message.error("请登录后再联系客服");
+ return;
+ }
+ window.open(this.IMLink + "?token=" + accessToken + "&id=" + this.goodsMsg.data.storeId);
},
// 获取im信息
async getIMDetailMethods() {
@@ -186,11 +184,6 @@ export default {
location.reload();
},
},
- computed: {
- IM() {
- return this.IMLink + this.storeMsg.merchantEuid;
- },
- },
components: {
Search,
ShopHeader,
diff --git a/manager/src/views/sys/setting-manage/setting/IM_SETTING.vue b/manager/src/views/sys/setting-manage/setting/IM_SETTING.vue
index 82372a7b..36a47c8a 100644
--- a/manager/src/views/sys/setting-manage/setting/IM_SETTING.vue
+++ b/manager/src/views/sys/setting-manage/setting/IM_SETTING.vue
@@ -4,9 +4,6 @@
-
-
-
@@ -22,8 +19,7 @@ export default {
return {
ruleValidate: {}, // 验证规则
formValidate: { // 表单数据
- httpUrl: "",
- tenantId: ""
+ httpUrl: ""
},
};
},