From 6c7efbc45b3149ba7f1388aec10191b95861d754 Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Fri, 9 Aug 2024 15:09:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=99=BE=E4=BA=BF=E8=BF=94?= =?UTF-8?q?=E8=A1=A5=E6=9C=AA=E8=AF=BB=E6=B6=88=E6=81=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../subsidy_shop/components/subsidy-list.vue | 11 ++-- bundle_b/pages/subsidy_shop/subsidy_shop.vue | 61 +++++++++++++++---- pages/user/user.vue | 44 +++++++------ 3 files changed, 81 insertions(+), 35 deletions(-) diff --git a/bundle_b/pages/subsidy_shop/components/subsidy-list.vue b/bundle_b/pages/subsidy_shop/components/subsidy-list.vue index 9362678..3b7f8bc 100644 --- a/bundle_b/pages/subsidy_shop/components/subsidy-list.vue +++ b/bundle_b/pages/subsidy_shop/components/subsidy-list.vue @@ -103,17 +103,18 @@ }).then(({ data }) => { - this.doneOrder = data.doneOrder; - this.highSubsidy = data.highSubsidy; - this.getSubsidy = data.getSubsidy; - this.queuesNumber = data.queuesNumber; - this.queuesMoney = data.queuesMoney; + this.doneOrder = data.doneOrder + this.highSubsidy = data.highSubsidy + this.getSubsidy = data.getSubsidy + this.queuesNumber = data.queuesNumber + this.queuesMoney = data.queuesMoney let curPageData = data.list; let curPageLen = curPageData.length; let hasNext = !!data.more; if (page.num == 1) this.orderList = []; this.orderList = this.orderList.concat(curPageData); this.mescroll.endSuccess(curPageLen, hasNext); + this.$emit('changeUnreadBillions', data.unreadBillions) }) } } diff --git a/bundle_b/pages/subsidy_shop/subsidy_shop.vue b/bundle_b/pages/subsidy_shop/subsidy_shop.vue index 6fdff79..3d10e75 100644 --- a/bundle_b/pages/subsidy_shop/subsidy_shop.vue +++ b/bundle_b/pages/subsidy_shop/subsidy_shop.vue @@ -54,12 +54,18 @@ - - - - - - + + + + + + + + + {{dot > 99 ? '99+' : dot}} + + + @@ -78,6 +84,9 @@ applyBillionsWithdrawl, rechargeBalance } from "@/api/user"; + + import {mapGetters} from 'vuex' + import subsidyList from './components/subsidy-list.vue' export default { components: { @@ -86,11 +95,10 @@ data() { return { tabsList: [ - // {name: '充值到本地余额'}, + {name: '充值到本地余额'}, {name: '补贴提现'} ], - // currentTab: 0, - currentTab: 1, + currentTab: 0, // Tabs滑块样式 styleTabsBarStyle: { bottom: '12rpx', @@ -102,28 +110,38 @@ }, active: -1, order: [{ - name: '排队中', + name: '排队中' }, { - name: '已完成', + name: '已完成' }], + dot: 0, widthDrawConfig: [], form: { recharge_money: '', // 充值金额 withdrawl_money: '', // 提现金额 }, showPopup: false, - tipsText: '' + tipsText: '', + currentTabs: 0 }; }, onLoad(options) { this.changeShow(0); this.getBillionsWithdrawConfigFun(); uni.$on('refreshBillionsWithdrawConfigFun', this.getBillionsWithdrawConfigFun) + + if (options && options.unread) { + this.order[1].dot = options.unread + } }, onUnload() { uni.$off('refreshBillionsWithdrawConfigFun') }, methods: { + changeOrderTab(index) { + this.currentTabs = index; + }, + async getBillionsWithdrawConfigFun() { const { code, @@ -278,6 +296,9 @@ }) } }, + changeUnreadBillions(e) { + this.dot = e + } }, watch: { widthDrawConfig() { @@ -318,6 +339,22 @@ overflow-y: scroll; } + .unreadBlock { + position: relative; + .unreadNum { + position: absolute; + right: 13%; + top: 8rpx; + border: 1rpx solid #ee0a24; + color: $-color-primary; + border-radius: 28rpx; + font-size: 22rpx; + min-width: 28rpx; + height: 28rpx; + padding: 0 6rpx; + } + } + .pay-popup { .content { padding: 40rpx 0; diff --git a/pages/user/user.vue b/pages/user/user.vue index 6003c08..5846ae1 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -73,7 +73,10 @@ - + + + {{userInfo.unread_billions > 99 ? '99+' : userInfo.unread_billions}} + @@ -401,6 +404,20 @@ };