fix: 🐛 修改楼层中热区判断失效问题,优化客服跳转判断

master
lemon橪 2022-12-26 15:07:24 +08:00
parent fa6f571f61
commit fed76499a0
4 changed files with 29 additions and 44 deletions

View File

@ -385,6 +385,7 @@ import popupAddress from "./product/popup/address"; //地址选择模块
import shares from "@/components/m-share/index"; // import shares from "@/components/m-share/index"; //
import popups from "@/components/popups/popups"; // import popups from "@/components/popups/popups"; //
import setup from "./product/popup/popup"; import setup from "./product/popup/popup";
export default { export default {
components: { components: {
popups, popups,
@ -702,17 +703,14 @@ export default {
linkMsgDetail() { linkMsgDetail() {
// lili // lili
this.$options.filters.talkIm(this.storeDetail.storeId)
uni.navigateTo({
url: `/pages/tabbar/home/web-view?IM=${this.storeDetail.storeId}`, // udesk
}); // if (this.storeDetail.merchantEuid) {
// uni.navigateTo({
// udesk // url: `/pages/tabbar/home/web-view?src=${this.IM}`,
// if (this.storeDetail.merchantEuid) { // });
// uni.navigateTo({ // }
// url: `/pages/tabbar/home/web-view?src=${this.IM}`,
// });
// }
// //

View File

@ -49,7 +49,7 @@
</div> </div>
<!-- 联系客服 --> <!-- 联系客服 -->
<div class="kefu" @click="linkKefuDetail"> <div class="kefu" @click="talk">
<u-icon name="kefu-ermai"></u-icon> <u-icon name="kefu-ermai"></u-icon>
联系客服 联系客服
</div> </div>
@ -156,7 +156,7 @@ import {
getGoodsIsCollect, getGoodsIsCollect,
} from "@/api/members.js"; } from "@/api/members.js";
import config from "@/config/config"; import config from "@/config/config";
import storage from "@/utils/storage";
import { getGoodsList } from "@/api/goods.js"; import { getGoodsList } from "@/api/goods.js";
import { getAllCoupons } from "@/api/promotions.js"; import { getAllCoupons } from "@/api/promotions.js";
import { getFloorStoreData } from "@/api/home"; // import { getFloorStoreData } from "@/api/home"; //
@ -262,6 +262,9 @@ export default {
}, },
methods: { methods: {
talk(){
this.$options.filters.talkIm(this.storeInfo.storeId)
},
back() { back() {
uni.navigateBack(); uni.navigateBack();
}, },
@ -298,35 +301,6 @@ export default {
// //
this.getStoreData(); this.getStoreData();
}, },
/**
* 联系客服
*/
linkKefuDetail() {
//
// #ifdef MP-WEIXIN
const params = {
// originalPrice: this.goodsDetail.original || this.goodsDetail.price,
uuid: storage.getUuid(),
token: storage.getAccessToken(),
sign: this.storeInfo.yzfSign,
mpSign: this.storeInfo.yzfMpSign,
};
uni.navigateTo({
url:
"/pages/product/customerservice/index?params=" +
encodeURIComponent(JSON.stringify(params)),
});
// #endif
// #ifndef MP-WEIXIN
const sign = this.storeInfo.yzfSign;
uni.navigateTo({
url:
"/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
sign,
});
// #endif
},
/** 获取店铺分类 */ /** 获取店铺分类 */
async getCategoryData() { async getCategoryData() {

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="layout"> <div class="layout">
<div class="flex-one"> <div class="flex-one">
<u-image v-if="res.list[0].zoneInfo == ''" @click="modelNavigateTo(res.list[0])" width="100%" mode="aspectFit" height="280rpx" :src="res.list[0].img" alt=""></u-image> <u-image v-if="res.list[0] && !res.list[0].zoneInfo" @click="modelNavigateTo(res.list[0])" width="100%" mode="aspectFit" height="280rpx" :src="res.list[0].img" alt=""></u-image>
<hotzone v-else :res="res"></hotzone> <hotzone v-else :res="res"></hotzone>
</div> </div>
</div> </div>
</template> </template>

View File

@ -120,6 +120,19 @@ export function isLogin(val) {
return storage.getUserInfo(); return storage.getUserInfo();
} }
} }
/**
* 跳转im
*/
export function talkIm(storeId){
if(isLogin('auth')){
uni.navigateTo({
url: `/pages/tabbar/home/web-view?IM=${storeId}`,
});
}
else{
tipsToLogin()
}
}
export function tipsToLogin() { export function tipsToLogin() {
if (!isLogin("auth")) { if (!isLogin("auth")) {