From 4749269a0997679e0e7b92dee25e6eb968f9c567 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 19 Apr 2024 09:35:35 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E8=BD=A6=E5=A4=9A=E8=A7=84=E6=A0=BCbug,=20=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 4 +- pages/columnGoods/goods_search/index.vue | 49 ++++++++++++++---------- pages/order_addcart/order_addcart.vue | 7 +++- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/manifest.json b/manifest.json index 0eebeee..3b81b26 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "惠农生活", "appid" : "__UNI__3A527D1", "description" : "", - "versionName" : "2.0.34", - "versionCode" : 2034, + "versionName" : "2.0.35", + "versionCode" : 2035, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/columnGoods/goods_search/index.vue b/pages/columnGoods/goods_search/index.vue index b77e85b..6478b9e 100644 --- a/pages/columnGoods/goods_search/index.vue +++ b/pages/columnGoods/goods_search/index.vue @@ -218,22 +218,22 @@ }, methods: { getHistoryList(){ - userLog({ - type: this.isShop ? 2 : 1, // 1是商品搜索记录, 2是店铺搜索记录 - }).then(res=>{ - this.historyList = res.data; - }) - // try { - // this.historyList = [] - // this.tempStorage = [] - // let arr = uni.getStorageSync('historyList') - // if (arr.length > 0) { - // this.historyList = arr - // } else { - // this.historyList = [] - // } - // this.tempStorage = this.historyList - // } catch (e) {} + // userLog({ + // type: this.isShop ? 2 : 1, // 1是商品搜索记录, 2是店铺搜索记录 + // }).then(res=>{ + // this.historyList = res.data; + // }) + try { + this.historyList = [] + this.tempStorage = [] + let arr = uni.getStorageSync('historyList') + if (arr.length > 0) { + this.historyList = arr + } else { + this.historyList = [] + } + this.tempStorage = this.historyList + } catch (e) {} }, // 清空历史记录 remove() { @@ -245,12 +245,13 @@ if (res.confirm) { self.tempStorage = [] try { - userLogDelete({ - type: this.isShop ? 2 : 1, - }).then(res=>{ - console.log(res); - }) + // userLogDelete({ + // type: this.isShop ? 2 : 1, + // }).then(res=>{ + // console.log(res); + // }) self.historyList = [] + uni.setStorageSync('historyList', self.historyList); } catch (e) {} } else if (res.cancel) { console.log('用户点击取消'); @@ -292,6 +293,12 @@ this.$set(this, 'searchValue', event.detail.value); }, searchBut: function() { + if(this.searchValue!='') { + this.historyList.unshift({ + word: this.searchValue + }); + uni.setStorageSync('historyList', this.historyList); + } if (this.back) { return uni.navigateBack({ success: () => { diff --git a/pages/order_addcart/order_addcart.vue b/pages/order_addcart/order_addcart.vue index f1abdf0..1f9487d 100644 --- a/pages/order_addcart/order_addcart.vue +++ b/pages/order_addcart/order_addcart.vue @@ -176,7 +176,7 @@ @ChangCouponsUseState="ChangCouponsUseState"> - @@ -254,6 +254,7 @@ import { Toast } from '../../libs/uniApi'; }], tabsCurr: 1, subsecCurr: 0, + addcartKey: 0, domain: HTTP_REQUEST_URL, loading: false, //是否加载中 loadend: false, //是否加载完毕 @@ -299,6 +300,7 @@ import { Toast } from '../../libs/uniApi'; currSku: '', newData: {}, activeRouter: '', + attrTxt: '', userInfo: {}, mer_info: { mer_settlement_agree_status: 0 @@ -505,7 +507,7 @@ import { Toast } from '../../libs/uniApi'; // that.DefaultSelect(goods) cartProductAttr(id).then(res => { if(res.data.attr.length==0)return Toast('此商品为单规格商品'); - const sku = {} + const sku = {}; res.data.attrValue.forEach((itemn) => { if(this.tabsCurr==2) itemn.price = itemn.wholesale_price; //把价格设置为批发价 sku[itemn.sku] = itemn; @@ -520,6 +522,7 @@ import { Toast } from '../../libs/uniApi'; that.$set(that, 'productValue', sku); let productSelect = sku[that.attrValue]; that.isOpen = that.attr.cartAttr = true; + this.newVal = sku[goods.productAttr.sku] || Object.keys(sku)[0]; that.DefaultSelect(goods) }).catch(err => { return that.$util.Tips({ From 5eff3f8c900c5f3e338b71310bb19ce58ce87cad Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 19 Apr 2024 13:57:55 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/columnGoods/goods_search/index.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/columnGoods/goods_search/index.vue b/pages/columnGoods/goods_search/index.vue index 6478b9e..636cad2 100644 --- a/pages/columnGoods/goods_search/index.vue +++ b/pages/columnGoods/goods_search/index.vue @@ -294,10 +294,13 @@ }, searchBut: function() { if(this.searchValue!='') { - this.historyList.unshift({ + let t = this.historyList.findIndex(item=>item.word==this.searchValue); + let list = [...this.historyList]; + if(t!=-1) list.splice(t, 1); + list.unshift({ word: this.searchValue }); - uni.setStorageSync('historyList', this.historyList); + uni.setStorageSync('historyList', list); } if (this.back) { return uni.navigateBack({ From 5fea00c827d8c7a6015dc2ae2f25ff128d8f8f71 Mon Sep 17 00:00:00 2001 From: "DESKTOP-GMUNQ1B\\k" <1154079537@qq.com> Date: Sat, 20 Apr 2024 14:32:35 +0800 Subject: [PATCH 3/7] 1 --- components/payment/index.vue | 24 +++++++++++++------- pages/index/index.vue | 34 ++++++++++++++++------------ pages/users/order_list/index.vue | 37 ++++++++++++++++--------------- pages/whole_sale/index.vue | 24 +++++++++++++++++++- static/tabbar_icon/back_a.png | Bin 0 -> 3332 bytes 5 files changed, 78 insertions(+), 41 deletions(-) create mode 100644 static/tabbar_icon/back_a.png diff --git a/components/payment/index.vue b/components/payment/index.vue index 4ac99b3..44e3e26 100644 --- a/components/payment/index.vue +++ b/components/payment/index.vue @@ -82,6 +82,10 @@ returnUrl: { type: String, default: '' + }, + sale_type: { + type: String, + default: '' } }, data() { @@ -235,7 +239,7 @@ icon: 'success' }, { tab: 5, - url: goPages + '?status=1' + url: goPages + '?status=1&sale_type=' + that.sale_type }); break; case 'alipay': @@ -267,7 +271,7 @@ icon: 'success' }, { tab: 5, - url: goPages + 'status=1' + url: goPages + 'status=1&sale_type=' + that.saleType }); }).catch(res => { console.log('测试支付数据无效的catch:' + res.data) @@ -281,7 +285,7 @@ title: '取消支付' }, { tab: 5, - url: goPages + '?status=0' + url: goPages + '?status=0&sale_type=' + that.sale_type }); } } @@ -306,7 +310,7 @@ icon: 'success' }, { tab: 5, - url: goPages + 'status=1' + url: goPages + 'status=1&sale_type=' + that.sale_type }); }, fail: (e) => { @@ -319,7 +323,8 @@ title: '取消支付' }, { tab: 5, - url: goPages + '?status=0' + url: goPages + '?status=0&sale_type=' + that + .sale_type }); } }, @@ -354,7 +359,8 @@ icon: 'success' }, { tab: 5, - url: goPages + '?status=1' + url: goPages + '?status=1&sale_type=' + that + .sale_type }); return that.$util.Tips({ @@ -362,7 +368,8 @@ icon: 'success' }, { tab: 5, - url: goPages + '?status=1' + url: goPages + '?status=1&sale_type=' + that + .sale_type }); }, fail: function(e) { @@ -434,7 +441,8 @@ icon: 'success' }, { tab: 5, - url: goPages + 'status=1' + url: goPages + 'status=1&sale_type=' + that + .sale_type }); }, diff --git a/pages/index/index.vue b/pages/index/index.vue index bca8934..8405a05 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -521,27 +521,20 @@ overflow: false, diyId: 0, preview: false, - isSupport: true + isSupport: true, }; }, onTabItemTap(e) { - + uni.pageScrollTo({ + scrollTop: 0, + duration: 300 + }); }, // 滚动监听 onPageScroll(e) { - this.isFixed = e.scrollTop > 40; - - // uni.setTabBarItem({ - // index: 0, - // text: "123", - // selectedIconPath: "/static/tabbar_icon/b-a.png" - // }) - - // this.$forceUpdate(); - if (this.isHeaderSerch) { let isScroll = false isScroll = e.scrollTop > 50 @@ -551,6 +544,21 @@ } // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件 uni.$emit('scroll'); + + + if (e.scrollTop >= 100) { + uni.setTabBarItem({ + index: 0, + text: "首页", + selectedIconPath: "/static/tabbar_icon/back_a.png" + }) + } else { + uni.setTabBarItem({ + index: 0, + text: "首页", + selectedIconPath: "/static/tabbar_icon/a-a.png" + }) + } }, /** @@ -627,9 +635,7 @@ onHide() { uni.setStorageSync('isIntegral', false) }, - onReady() { - }, watch: { globalDatas(nVal, oVal) { // #ifdef H5 diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue index f6121bf..4b3e9e4 100644 --- a/pages/users/order_list/index.vue +++ b/pages/users/order_list/index.vue @@ -73,7 +73,8 @@ {{orderData.noComment || 0}} --> - + 搜索我的订单 @@ -345,7 +346,7 @@ + :totalPrice='totalPrice' :sale_type="sale_type"> @@ -511,21 +512,19 @@ if (options.status) this.orderStatus = options.status; let user = this.$store.state.app.userInfo; if (user.mer_info) this.initMerInfo(user); - if (this.isLogin) { - this.page = 1; - this.loadend = false; - this.loading = false; - this.getOrderData(); - this.getOrderList(); - this.getUserInfo(); - this.getpreSellOrderList(); - } else { - toLogin() - } - }, - onShow() { - + if (this.isLogin) { + this.page = 1; + this.loadend = false; + this.loading = false; + this.getOrderData(); + this.getOrderList(); + this.getUserInfo(); + this.getpreSellOrderList(); + } else { + toLogin() + } }, + onReady: function() { // #ifdef H5 this.$nextTick(() => { @@ -731,11 +730,13 @@ uni.hideLoading(); if (self.orderStatus == 0) { uni.navigateTo({ - url: '/pages/order_details/stay?order_id=' + order_id + '&sale_type=' + this.sale_type + url: '/pages/order_details/stay?order_id=' + order_id + '&sale_type=' + + this.sale_type }) } else { uni.navigateTo({ - url: '/pages/order_details/index?order_id=' + order_id + '&sale_type=' + this.sale_type + url: '/pages/order_details/index?order_id=' + order_id + '&sale_type=' + + this.sale_type }) } }).catch(() => { diff --git a/pages/whole_sale/index.vue b/pages/whole_sale/index.vue index fe31a5b..9049334 100644 --- a/pages/whole_sale/index.vue +++ b/pages/whole_sale/index.vue @@ -571,8 +571,30 @@ this.getNav(); this.initData(); }, - onPageScroll() { + + onTabItemTap(e) { + uni.pageScrollTo({ + scrollTop: 0, + duration: 300 + }); + }, + + onPageScroll(e) { uni.$emit('scroll'); + + if (e.scrollTop >= 100) { + uni.setTabBarItem({ + index: 1, + text: "批发", + selectedIconPath: "/static/tabbar_icon/back_a.png" + }) + } else { + uni.setTabBarItem({ + index: 1, + text: "批发", + selectedIconPath: "/static/tabbar_icon/b-a.png" + }) + } }, onPullDownRefresh() { this.initData(true, true); diff --git a/static/tabbar_icon/back_a.png b/static/tabbar_icon/back_a.png new file mode 100644 index 0000000000000000000000000000000000000000..56faa97ff2c6be99dcd64d9de7863a17f34d9423 GIT binary patch literal 3332 zcmV+f4g2zmP)Px#1am@3R0s$N2z&@+hyVZ#u1Q2eRA@u(S!;}3Wf^|YIdkT|yED5Bh0^V1+r6-9 zOT`Q2qHRPd2$XFl)QAEtjYNrx{17#Spz#OB1b=w>XGrvqF~*_@Do7wEcp)kzh0*}M zP$-ZVN_Tf==W^zp?>r&h41@+~=_+9m&mUk>0r`asO}(d6?Nt^Q$Fc z80z=?=t-xi@QfegD$JwgdC6;eBD~w{QMr^kk#_yHYT5Zo*1P z!b;-hio>VnM7hDn0wX}pY@y3n0Or77LOcNuPmw@;01L&JM$q83s%Isa-@T=9{f|0< zde4A3=S|9 z4B-G!=;_OoniQ=5e;2Z6U%x4{<EMdFK z5*KNOl$#^A9fOE(8!<+e#h@Tj!w!BDC0J?zSOZYJpoX7ysRR|t+PRmv_wHW#z5=@M z=$+HHWoMvsfXPbM$pKJCTu9D^^qfd`woQHrE!LNbC-Xk~JKp13#1T`ZaYRso1%~jf zhX4dn)vzKJe_GB=FTMBD{Pyp(f_m2s{rrvZJzWV(8!`egR*pM{S6)(J$+c1t8yIpJ zKa?Afj3Gt`0bt<-L=X`u;{`^VaZC{mWg3JOoiAQk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98=E5=8C=96=E4=BA=86=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E5=8F=B0=E6=93=8D=E4=BD=9C=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/gather/gather.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index f4ea2a0..073ca26 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -130,7 +130,7 @@ }