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] 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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