fix: 🐛 买家端buyer im传值优化

master
学习很差啦 2023-03-01 15:25:00 +08:00
parent 2aa7b67b7a
commit 40ccbf3edb
3 changed files with 8 additions and 4 deletions

View File

@ -15,14 +15,15 @@ export default {
},
methods: {
// im
async IMService() {
async IMService(id) {
// 访Token
let accessToken = Storage.getItem("accessToken");
await this.getIMDetailMethods();
const userInfo = await getMemberMsg();
if (userInfo.success) {
window.open(
this.IMLink + "?token=" + accessToken + "&id=" + this.storeMsg.storeId
this.IMLink + "?token=" + accessToken + "&id=" + id || this.storeMsg.storeId
);
} else {
this.$Message.error("请登录后再联系客服");

View File

@ -22,7 +22,7 @@
<Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" />
{{ storeCollected? "已收藏店铺": "收藏店铺" }}
</span>
<span class="ml_10" @click="IMService()"></span>
<span class="ml_10" @click="IMService(goodsMsg.data.storeId)"></span>
</div>
</div>
</div>
@ -127,11 +127,13 @@ export default {
}
});
}
if (!this.storeMsg) {
//
getDetailById(this.goodsMsg.data.storeId).then((res) => {
if (res.success) {
this.storeMsg = res.result;
}
});
}

View File

@ -14,7 +14,7 @@
:color="storeCollected ? '#ed3f14' : '#fff'"/>{{
storeCollected ? '已收藏店铺' : '收藏店铺'
}}</span>
<span style="width:80px" class="hover-pointer ml_10" @click="IMService()"><Icon
<span style="width:80px" class="hover-pointer ml_10" @click="IMService(storeMsg.storeId)"><Icon
custom="icomoon icon-customer-service"/>联系客服</span>
</div>
</div>
@ -220,6 +220,7 @@ export default {
if (res.success) {
this.storeMsg = res.result;
console.log(this.storeMsg)
//
if (this.storeMsg.pageShow && this.storeMsg.pageShow === '1') {