diff --git a/components/shopTabbar.vue b/components/shopTabbar.vue index 20b20c33..d0ced158 100644 --- a/components/shopTabbar.vue +++ b/components/shopTabbar.vue @@ -27,7 +27,9 @@ }">分类
- {{ shopCount }} + {{ shopCount + }} - + @@ -294,7 +295,8 @@ + :src="item.IMAGE_PATH ? item.IMAGE_PATH.split(',') && item.IMAGE_PATH.split(',').length > 1 ? item.IMAGE_PATH.split(',')[0] : item.IMAGE_PATH : '/static/images/home/defultImg.png'" + @click.stop="handleGoShopDetail(item)" /> @@ -312,7 +314,8 @@ + :src="item.IMAGE_PATH ? item.IMAGE_PATH.split(',') && item.IMAGE_PATH.split(',').length > 1 ? item.IMAGE_PATH.split(',')[0] : item.IMAGE_PATH : '/static/images/home/defultImg.png'" + @click.stop="handleGoShopDetail(item)" /> @@ -643,8 +646,12 @@ export default { this.handleGetProductsList(); // 商城的内容 this.handleGetShoppingMall(); - // 景区信息 - this.handleGetScenicData() + + if (this.seat.latitude && this.seat.longitude) { + // 景区信息 + this.handleGetScenicData() + } + // this.handleAes() this.$utils.addUserBehaviorNew({ @@ -761,7 +768,7 @@ export default { }, methods: { // 请求景区信息 - async handleGetScenicData() { + async handleGetScenicData(latitude, longitude) { let SCENICAREA = uni.getStorageSync("SCENICAREAOBJ"); let SCENICAREAOBJ = {} @@ -782,8 +789,8 @@ export default { let req = { ProvinceCode: this.user.PROVINCE_CODE, - latitude: this.seat.latitude || "", - longitude: this.seat.longitude || "", + latitude: latitude || this.seat.latitude || "", + longitude: longitude || this.seat.longitude || "", ServerpartID: this.serviceDetail.SERVERPART_ID || "", type: 'encryption' } @@ -1561,6 +1568,8 @@ export default { let latitude = res.latitude; let longitude = res.longitude; _this.handleGetNearService(latitude, longitude); + // 获得附近的景区数据 + _this.handleGetScenicData(latitude, longitude); }, fail: (err) => { }, @@ -2043,6 +2052,8 @@ export default { } }) } + console.log('everyWeekShopDataeveryWeekShopDataeveryWeekShopData', res); + this.everyWeekShopData = res }) diff --git a/pages/shopMallPage/index/index.vue b/pages/shopMallPage/index/index.vue index 910a36a1..1375e43b 100644 --- a/pages/shopMallPage/index/index.vue +++ b/pages/shopMallPage/index/index.vue @@ -592,7 +592,7 @@
- + 价格区间 @@ -601,11 +601,13 @@ - + - - + @@ -708,7 +710,8 @@ export default { haveActivity: false, // 是否有活动 activityObj: {}, // 活动项的具体内容 activityShopList: [], // 活动商品列表 - priceRangeRefShow: false + priceRangeRefShow: false, + popupBottom: 0 // 键盘高度 }; }, computed: { @@ -831,6 +834,15 @@ export default { }; }, methods: { + handleFocus(e) { + console.log('eee', e); + + // 安卓 / iOS 可能不一样,可以用 e.detail.height 获取键盘高度 + this.popupBottom = 200 // 默认抬高 + }, + handleBlur() { + this.popupBottom = 0 + }, handleMaskClick(e) { this.priceRangeRefShow = false }, @@ -1122,14 +1134,15 @@ export default { }, // 价格筛选的确认 async handleConfirm() { - console.log("minPrice", this.minPrice); - console.log("maxPrice", this.maxPrice); + if (Number(this.minPrice) <= Number(this.maxPrice)) { } else { - let newMax = Number(this.minPrice); - let newMin = Number(this.maxPrice); - this.maxPrice = newMax; - this.minPrice = newMin; + if (this.maxPrice && this.minPrice) { + let newMax = Number(this.minPrice); + let newMin = Number(this.maxPrice); + this.maxPrice = newMax; + this.minPrice = newMin; + } } this.showShopList = []; this.shopMsg = { @@ -1431,6 +1444,8 @@ export default { } }); } + console.log('weeklySpecialOfferweeklySpecialOfferweeklySpecialOfferweeklySpecialOffer', shopList); + this.weeklySpecialOffer = shopList }, // 拿到今日推荐的商品列表 nature 5050 @@ -3286,6 +3301,8 @@ export default { border-radius: 32rpx 32rpx 0 0; box-sizing: border-box; padding: 32rpx; + transition: bottom 0.2s; + position: fixed; .titleBox { width: 100%; diff --git a/pages/shopMallPage/shopCar/index.vue b/pages/shopMallPage/shopCar/index.vue index c47b53b8..d0c15f06 100644 --- a/pages/shopMallPage/shopCar/index.vue +++ b/pages/shopMallPage/shopCar/index.vue @@ -66,12 +66,13 @@
- - - + + + + @@ -146,9 +147,12 @@ 合计 {{ totalPay }} -
立即下单
+
立即下单
-
删除
+
删除
@@ -275,8 +279,6 @@ export default { }); }, onShow() { - console.log("this.bigPageType", this.bigPageType); - console.log("this.$store.state", this.$store.state); // 判断当前的购物车里面是否有东西 let shopCarList = []; if (this.bigPageType === "UnionMall") { @@ -297,6 +299,30 @@ export default { this.handleGetAddressList(); }, + onHide() { + console.log('this.shopListthis.shopListthis.shopList', this.shopList); + + if (this.shopList && this.shopList.length > 0) { + let list = JSON.parse(JSON.stringify(this.shopList)); + list.forEach((item) => { + item.cartItemAoumt = + Number(item.COMMODITY_MEMBERPRICE) * Number(item.count); + }); + console.log("list", list); + // list + if (this.pageType === "UnionMall") { + this.$store.commit("unionMyShopCar", list); + } else { + this.$store.commit("myShopCar", list); + } + } else { + if (this.pageType === "UnionMall") { + this.$store.commit("unionMyShopCar", []); + } else { + this.$store.commit("myShopCar", []); + } + } + }, methods: { // 点击地址 handleClickAddressItem(obj) { @@ -734,8 +760,23 @@ export default { return; } + + + // 判断是不是在工会之家下单 下单的话 就要查询用户余额 余额有的 才能下单 if (this.bigPageType === "UnionMall") { + + // 还要判断有没有工会商城权限 + if (!(this.userInfo && this.userInfo.ACCOUNT_BALANCE > 0)) { + uni.showToast({ + title: "您未被纳入工会会员采购名录,如有疑问,请联系工会咨询", + icon: "none", + }); + return; + } + + + if (!(this.userInfo.ACCOUNT_BALANCE > 0)) { uni.showToast({ title: "工会之家余额为0,无法下单!", diff --git a/pages/shopMallPage/shopType/index.vue b/pages/shopMallPage/shopType/index.vue index d67a6f24..9306d93c 100644 --- a/pages/shopMallPage/shopType/index.vue +++ b/pages/shopMallPage/shopType/index.vue @@ -1,5 +1,5 @@