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 @@ };