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/cart/coupon/couponCenter.vue b/pages/cart/coupon/couponCenter.vue index e8806ad..04d99eb 100644 --- a/pages/cart/coupon/couponCenter.vue +++ b/pages/cart/coupon/couponCenter.vue @@ -25,7 +25,7 @@ 全平台 - 仅限品类 + 仅限品类 {{ item.storeName == 'platform' ? '全平台' :item.storeName+'店铺' }}使用 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/order/fillorder.vue b/pages/order/fillorder.vue index 28d96c4..1d5cde0 100644 --- a/pages/order/fillorder.vue +++ b/pages/order/fillorder.vue @@ -181,14 +181,20 @@ - + 优惠券 - - - -¥{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }} + + -¥{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }} diff --git a/pages/product/goods.vue b/pages/product/goods.vue index c084919..0a9a7b8 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -283,6 +283,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, @@ -600,17 +601,23 @@ export default { linkMsgDetail () { // lili 基础客服 +<<<<<<< HEAD uni.navigateTo({ url: `/pages/mine/im/index?userId=${this.goodsDetail.storeId}&goodsid=${this.routerVal.goodsId}&skuid=${this.routerVal.id}` }); +======= + this.$options.filters.talkIm(this.storeDetail.storeId) + +>>>>>>> f84f9ab696c10447c7aa8a27382cfccd3d5729d8 // udesk 代码 // if (this.storeDetail.merchantEuid) { // uni.navigateTo({ // url: `/pages/tabbar/home/web-view?src=${this.IM}`, // }); // } +<<<<<<< HEAD // 客服 云智服代码 @@ -642,6 +649,39 @@ export default { // }); // // #endif +======= + + + // 客服 云智服代码 + // // #ifdef MP-WEIXIN + // const params = { + // storeName: this.storeDetail.storeName, + // goodsName: this.goodsDetail.goodsName, + // goodsId: this.goodsDetail.goodsId, + // goodsImg: this.goodsDetail.thumbnail, + // price: this.goodsDetail.promotionPrice || this.goodsDetail.price, + // // originalPrice: this.goodsDetail.original || this.goodsDetail.price, + // uuid: storage.getUuid(), + // token: storage.getAccessToken(), + // sign: this.storeDetail.yzfSign, + // mpSign: this.storeDetail.yzfMpSign, + // }; + // uni.navigateTo({ + // url: + // "/pages/product/customerservice/index?params=" + + // encodeURIComponent(JSON.stringify(params)), + // }); + // // #endif + // // #ifndef MP-WEIXIN + // const sign = this.storeDetail.yzfSign; + // uni.navigateTo({ + // url: + // "/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" + + // sign, + // }); + // // #endif + +>>>>>>> f84f9ab696c10447c7aa8a27382cfccd3d5729d8 }, /**选择商品 */ changedGoods (val) { 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 + "店铺" }}使用 diff --git a/pages/product/shopPage.vue b/pages/product/shopPage.vue index 01188a8..0ee335f 100644 --- a/pages/product/shopPage.vue +++ b/pages/product/shopPage.vue @@ -49,7 +49,7 @@
-
+
联系客服
@@ -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, @@ -156,7 +185,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"; //获取楼层装修接口 @@ -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, @@ -262,6 +292,9 @@ export default { }, methods: { + talk(){ + this.$options.filters.talkIm(this.storeInfo.storeId) + }, back() { uni.navigateBack(); }, @@ -298,6 +331,7 @@ export default { // 店铺信息 this.getStoreData(); }, +<<<<<<< HEAD /** * 联系客服 */ @@ -331,6 +365,8 @@ export default { // }); // #endif }, +======= +>>>>>>> f84f9ab696c10447c7aa8a27382cfccd3d5729d8 /** 获取店铺分类 */ async getCategoryData() { @@ -375,16 +411,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: "/", diff --git a/utils/filters.js b/utils/filters.js index d1b7fb4..0ec2607 100644 --- a/utils/filters.js +++ b/utils/filters.js @@ -281,6 +281,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")) {