From 7549b34b181f6487e478212bd598f562635767e7 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Sat, 9 May 2026 16:19:05 +0800 Subject: [PATCH] 1 --- package1/myCenter/wallet.vue | 222 +++++++++++++++++++++++++++++------ 1 file changed, 189 insertions(+), 33 deletions(-) diff --git a/package1/myCenter/wallet.vue b/package1/myCenter/wallet.vue index 37826e6..13e7bb6 100644 --- a/package1/myCenter/wallet.vue +++ b/package1/myCenter/wallet.vue @@ -12,72 +12,82 @@ - + 用户余额(元) - 268.50 + {{balanceUser.depoBal}} 钱包安全保障中 - + 提现 - - 配送兼职佣金(元) - 156.80 - - - 店铺余额(元) - 111.70 - - 筛选 + + 配送今日佣金(元) + {{balanceWorker.depoBal}} + 配送可提现余额) + {{balanceWorker.depoBalRel}} + + 提现 + + + + {{item.shopName}}余额(元) + {{item.balance}} + + 提现 + + + + 余额明细 - - 筛选全部 - - + - 配送兼职收入 - - - 订单号:#8257461 + {{item.dealingsWay}} - -23.50 + {{item.amount}} - 05-20 18:30 + {{item.createTime}} + - - - - - 选择店铺 - - - - 我的店铺一 - 我的店铺二 - + + + 支付宝实名 + + 支付宝认证手机号 + + 提现金额 + + + 确认提现 @@ -88,6 +98,27 @@ data() { return { menuButtonInfo: {}, + balanceUser:{}, + loadStatus: 'more', + balanceWorker:{}, + rewardLists:[], + aliName:'', + aliAccount:'', + commionType:'', + shopId:'', + searchForm:{ + pageNum:1, + pageSize:10 + }, + indicatorDots: false, + interval: 4000, + onlineWorkerInterval:4000, + totalPages: 1, + commionUrl:'', + commionAmount:0, + linkId:'', + autoplay: true, + balanceShop:[], } }, onLoad(option) { @@ -95,14 +126,117 @@ }, onShow() { this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() + this.balanceUser = 0 + this.balanceWorker = 0 + this.balanceShop = 0 + this.beginData(); + }, + onReachBottom() { + + if (this.searchForm.pageNum >= this.totalPages) return; + // this.status = 'loading'; + this.searchForm.pageNum+=1; + this.rewardList(); + }, methods: { + beginData(){ + this.tui.request("/worker/getAllDepo/", "GET", {userId:uni.getStorageSync('id')}, false, true).then((res) => { + if (res.code == 200) { + if(res.result.user){ + this.balanceUser = res.result.user + this.linkId = res.result.user.id + this.rewardList() + } + if(res.result.worker){ + this.balanceWorker = res.result.worker + } + if(res.result.shop){ + this.balanceShop = res.result.shop + } + that.$forceUpdate(); + } else { + this.tui.toast(res.message) + } + uni.hideLoading() + }).catch((res) => {}) + }, //提现 withDraw(){ uni.showToast({ title:'提现成功' }) }, + userCommion(type,commion,item){ + if(type=='user'){ + this.commionUrl = '/app/returnCommission/handleReturnUser' + }else if(type=='worker'){ + this.commionUrl = '/app/returnCommission/handleReturnWorker' + }else{ + this.commionUrl = '/app/returnCommission/handleReturn' + this.shopId = item.id + } + this.commionAmount = commion + this.commionType = type + this.$refs.payPopup.open(); + }, + wxPayment(){ + let that = this + let data = { + commission:this.commionAmount, + aliName:this.aliName, + aliAccount:this.aliAccount + } + if(this.commionType == 'user'){ + data.userId = this.balanceUser.id + }else if(this.commionType == 'worker'){ + data.workerId = this.balanceWorker.id + }else{ + data.shopId = this.shopId + } + that.tui.request(this.commionUrl, "POST", data, false, false).then((res) => { + that.loadStatus = 'nomore'; + if (res.code == 200) { + this.$refs.payPopup.close(); + this.beginData(); + } else { + that.tui.toast(res.message,1000) + return + } + uni.hideLoading() + }).catch((res) => {}) + }, + chooseLinkId(type,item){ + if(type == 'user'){ + this.linkId = this.balanceUser.id + }else if(type == 'worker'){ + this.linkId = this.balanceWorker.workerId + }else{ + this.linkId = item.id + } + this.rewardList(); + }, + rewardList(){ + this.loadStatus = 'loading' + let that = this + this.searchForm.linkUserId = this.linkId; + that.tui.request("/mall/coupon/selectRewardByRegionId", "POST", this.searchForm, false, false).then((res) => { + that.loadStatus = 'nomore'; + if (res.code == 200) { + that.totalPages = res.result.pages + if (that.searchForm.pageNum == 1) { + that.rewardLists = res.result.records + } else { + that.rewardLists = [...that.rewardLists, ...res.result.records] + } + that.$forceUpdate() + } else { + that.tui.toast(res.message,1000) + return + } + uni.hideLoading() + }).catch((res) => {}) + }, back() { uni.navigateBack() } @@ -159,4 +293,26 @@ flex: 1; text-align: center; } + .swiper-container { + + width: 100%; + height: 100%; + } + + .swiper-page { + width: 100%; + height: 100%; + } + + .swiper { + width: 100%; + height: 500rpx; + z-index: 99 !important; + } + + .swiper img { + width: 100%; + height: 100%; + z-index: 99 !important; + } \ No newline at end of file