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 1/6] =?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")) { From 979a1e6b141484b0e873c125f5dfc9a285eb0181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Mon, 26 Dec 2022 16:28:14 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E6=94=B9=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=95=B0=E9=87=8F=E4=B8=BA0=E6=97=B6=E5=80=99?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=97=E9=93=BA=E6=A5=BC=E5=B1=82=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/m-buy/goods.vue | 36 +++++----- pages/product/shopPage.vue | 137 +++++++++++++++++++++++-------------- 2 files changed, 103 insertions(+), 70 deletions(-) diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue index 76410f0..2dba42d 100644 --- a/components/m-buy/goods.vue +++ b/components/m-buy/goods.vue @@ -71,7 +71,7 @@ 数量 - + @@ -125,7 +125,7 @@ export default { buyType: '', //用于存储促销,拼团等活动类型 parentOrder: '', //父级拼团活动的数据 - 如果是团员则有数据 formatList: [], - currentSelceted: [], + currentSelected: [], skuList: '', isClose: false //是否可以点击遮罩关闭 }; @@ -182,12 +182,15 @@ export default { }, watch: { num(val) { + + val == 0 ? this.num = 1 : '' if (val) { + //超过库存后修改回库存 - if (val > this.goodsDetail.quantity) { - this.$nextTick(function() { - this.num = this.goodsDetail.quantity; - }); + if (val > this.goodsDetail.quantity) { + this.$nextTick(function() { + this.num = this.goodsDetail.quantity; + }); } } }, @@ -223,20 +226,15 @@ export default { closeMask() { this.$emit('closeBuy', false); }, - numChange() { - if (this.num > this.goodsDetail.quantity) { - alert(1); - this.num = this.goodsDetail.quantity; - } - }, + /**点击规格 */ handleClickSpec(val, index, specValue) { - this.currentSelceted[index] = specValue.value; + this.currentSelected[index] = specValue.value; let selectedSkuId = this.goodsSpec.find(i => { let matched = true; let specValues = i.specValues.filter(j => j.specName !== 'images'); for (let n = 0; n < specValues.length; n++) { - if (specValues[n].specValue !== this.currentSelceted[n]) { + if (specValues[n].specValue !== this.currentSelected[n]) { matched = false; return; } @@ -246,7 +244,7 @@ export default { } }); if (selectedSkuId?.skuId) { - this.$set(this.currentSelceted, index, specValue.value); + this.$set(this.currentSelected, index, specValue.value); this.selectSkuList = { spec: { specName: val.name, @@ -381,7 +379,7 @@ export default { item.specValues .filter(i => i.specName !== 'images') .forEach((value, _index) => { - this.currentSelceted[_index] = value.specValue; + this.currentSelected[_index] = value.specValue; this.selectName = value.specValue; @@ -551,4 +549,4 @@ export default { color: #333; } } - + diff --git a/pages/product/shopPage.vue b/pages/product/shopPage.vue index 8bdecc4..6b37161 100644 --- a/pages/product/shopPage.vue +++ b/pages/product/shopPage.vue @@ -79,50 +79,79 @@ - -
- - - - - - - - - - - - - - - - - - + +
+ +
+ + +
+ +
+
+
+
{{item.labelName}}
+
+ +
+
+ +
+
{{child.labelName}} +
+
+
+
+
- + +
+ +
+ + + - - - - + + + + + + + + + + + + + + + + + + + + + + +
@@ -147,7 +176,7 @@ import tpl_menu from "@/pages/tabbar/home/template/tpl_menu"; //五列菜单模 import tpl_search from "@/pages/tabbar/home/template/tpl_search"; //搜索栏 import tpl_group from "@/pages/tabbar/home/template/tpl_group"; // import tpl_goods from "@/pages/tabbar/home/template/tpl_goods"; //商品分类以及分类中的商品 - +import goodsTemplate from '@/components/m-goods-list/list' import { getStoreBaseInfo, getStoreCategory } from "@/api/store.js"; import { receiveCoupons, @@ -192,7 +221,7 @@ export default { }, goodsParams: { pageNumber: 1, - pageSize: 50, + pageSize: 10, storeId: "", }, }; @@ -214,6 +243,7 @@ export default { flexOne: tpl_flex_one, goods: tpl_goods, group: tpl_group, + goodsTemplate // spike: tpl_spike, // joinGroup: tpl_join_group, // integral: tpl_integral, @@ -345,16 +375,21 @@ export default { let res = await getStoreBaseInfo(this.storeId); if (res.data.success) { this.storeInfo = res.data.result; - - // 开启了楼层装修店铺 - this.initPageData(); - // 未开启楼层装修店铺 - // 商品信息 - this.getGoodsData(); // 优惠券信息 this.getCouponsData(); - // 店铺分类 - this.getCategoryData(); + if(res.data.result.pageShow == '1'){ + // 开启了楼层装修店铺 + this.initPageData(); + this.enablePageData = true; + } + else{ + // 商品信息 + this.getGoodsData(); + // 店铺分类 + this.getCategoryData(); + + this.basePageData = true; + } } else { uni.reLaunch({ url: "/", From f7975389353b04049bd620fb7fc9b37efee51ba4 Mon Sep 17 00:00:00 2001 From: yeliang-king <2244255345@qq.com> Date: Thu, 29 Dec 2022 12:02:05 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/fillorder.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/order/fillorder.vue b/pages/order/fillorder.vue index 2ef494b..86e9913 100644 --- a/pages/order/fillorder.vue +++ b/pages/order/fillorder.vue @@ -245,9 +245,8 @@
- + 优惠券 - 全平台 - 仅限品类 + 仅限品类 {{ item.storeName == 'platform' ? '全平台' :item.storeName+'店铺' }}使用 From 8b5f7def93d11e027c34fe7c5a01e036e78f502e Mon Sep 17 00:00:00 2001 From: yeliang-king <2244255345@qq.com> Date: Fri, 30 Dec 2022 14:38:42 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=A5=BC=E5=B1=82=E8=A3=85=E4=BF=AE?= =?UTF-8?q?=E5=8D=95=E4=B8=AA=E5=9B=BE=E7=89=87=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/tabbar/home/template/tpl_flex_one.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/tabbar/home/template/tpl_flex_one.vue b/pages/tabbar/home/template/tpl_flex_one.vue index 7633e4a..67c08cf 100644 --- a/pages/tabbar/home/template/tpl_flex_one.vue +++ b/pages/tabbar/home/template/tpl_flex_one.vue @@ -1,8 +1,8 @@ From f84f9ab696c10447c7aa8a27382cfccd3d5729d8 Mon Sep 17 00:00:00 2001 From: yeliang-king <2244255345@qq.com> Date: Fri, 30 Dec 2022 17:33:05 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E7=A7=8D?= =?UTF-8?q?=E7=B1=BB=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/cart/coupon/index.vue | 2 +- pages/product/product/promotion/-promotion-coupon.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/cart/coupon/index.vue b/pages/cart/coupon/index.vue index f34ce21..97f3662 100644 --- a/pages/cart/coupon/index.vue +++ b/pages/cart/coupon/index.vue @@ -35,7 +35,7 @@ 全平台 - 仅限品类 + 仅限品类 {{ item.storeName == "platform" ? "全平台" : item.storeName + "店铺" diff --git a/pages/product/product/promotion/-promotion-coupon.vue b/pages/product/product/promotion/-promotion-coupon.vue index 6b0936b..5413ebc 100644 --- a/pages/product/product/promotion/-promotion-coupon.vue +++ b/pages/product/product/promotion/-promotion-coupon.vue @@ -12,7 +12,7 @@
全平台 - 仅限品类 + 仅限品类 {{ item.storeName == "platform" ? "全平台" : item.storeName + "店铺" }}使用