From fed76499a052139c1dfb2ff67f38e0b07c0c9046 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com>
Date: Mon, 26 Dec 2022 15:07:24 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E6=94=B9=E6=A5=BC?=
=?UTF-8?q?=E5=B1=82=E4=B8=AD=E7=83=AD=E5=8C=BA=E5=88=A4=E6=96=AD=E5=A4=B1?=
=?UTF-8?q?=E6=95=88=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BC=98=E5=8C=96=E5=AE=A2?=
=?UTF-8?q?=E6=9C=8D=E8=B7=B3=E8=BD=AC=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/product/goods.vue | 20 ++++++------
pages/product/shopPage.vue | 36 +++------------------
pages/tabbar/home/template/tpl_flex_one.vue | 4 +--
utils/filters.js | 13 ++++++++
4 files changed, 29 insertions(+), 44 deletions(-)
diff --git a/pages/product/goods.vue b/pages/product/goods.vue
index 3447387..1cbf866 100644
--- a/pages/product/goods.vue
+++ b/pages/product/goods.vue
@@ -385,6 +385,7 @@ import popupAddress from "./product/popup/address"; //地址选择模块
import shares from "@/components/m-share/index"; //分享
import popups from "@/components/popups/popups"; //气泡框
import setup from "./product/popup/popup";
+
export default {
components: {
popups,
@@ -702,17 +703,14 @@ export default {
linkMsgDetail() {
// lili 基础客服
-
- uni.navigateTo({
- url: `/pages/tabbar/home/web-view?IM=${this.storeDetail.storeId}`,
- });
-
- // udesk 代码
- // if (this.storeDetail.merchantEuid) {
- // uni.navigateTo({
- // url: `/pages/tabbar/home/web-view?src=${this.IM}`,
- // });
- // }
+ this.$options.filters.talkIm(this.storeDetail.storeId)
+
+ // udesk 代码
+ // if (this.storeDetail.merchantEuid) {
+ // uni.navigateTo({
+ // url: `/pages/tabbar/home/web-view?src=${this.IM}`,
+ // });
+ // }
// 客服 云智服代码
diff --git a/pages/product/shopPage.vue b/pages/product/shopPage.vue
index df5898b..8bdecc4 100644
--- a/pages/product/shopPage.vue
+++ b/pages/product/shopPage.vue
@@ -49,7 +49,7 @@
-
+
联系客服
@@ -156,7 +156,7 @@ import {
getGoodsIsCollect,
} from "@/api/members.js";
import config from "@/config/config";
-import storage from "@/utils/storage";
+
import { getGoodsList } from "@/api/goods.js";
import { getAllCoupons } from "@/api/promotions.js";
import { getFloorStoreData } from "@/api/home"; //获取楼层装修接口
@@ -262,6 +262,9 @@ export default {
},
methods: {
+ talk(){
+ this.$options.filters.talkIm(this.storeInfo.storeId)
+ },
back() {
uni.navigateBack();
},
@@ -298,35 +301,6 @@ export default {
// 店铺信息
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() {
diff --git a/pages/tabbar/home/template/tpl_flex_one.vue b/pages/tabbar/home/template/tpl_flex_one.vue
index 67c08cf..7633e4a 100644
--- a/pages/tabbar/home/template/tpl_flex_one.vue
+++ b/pages/tabbar/home/template/tpl_flex_one.vue
@@ -1,8 +1,8 @@
diff --git a/utils/filters.js b/utils/filters.js
index 0fbb778..29c568d 100644
--- a/utils/filters.js
+++ b/utils/filters.js
@@ -120,6 +120,19 @@ export function isLogin(val) {
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() {
if (!isLogin("auth")) {