diff --git a/pages/worker/wallet.vue b/pages/worker/wallet.vue index 8b4981f..9e18f13 100644 --- a/pages/worker/wallet.vue +++ b/pages/worker/wallet.vue @@ -269,7 +269,9 @@ }, methods: { beginData(){ - this.tui.request("/worker/getAllDepo/", "GET", {userId:uni.getStorageSync('id')}, false, true).then((res) => { + this.NB.sendRequest("/worker/getAllDepo/", { + userId:uni.getStorageSync('id') + }, false, 'get', 'application/json').then((res) => { if (res.code == 200) { if(res.result.user){ this.balanceUser = res.result.user @@ -286,10 +288,11 @@ uni.showToast({ title: res.message, icon: 'none' - }); + }) + return } uni.hideLoading() - }).catch((res) => {}) + }).catch((res) => {}); }, //提现 withDraw(){ @@ -436,8 +439,7 @@ }else{ data.shopId = this.shopId } - that.tui.request(this.commionUrl, "POST", data, false, false).then((res) => { - that.loadStatus = 'nomore'; + this.NB.sendRequest(this.commionUrl, data, false, 'POST', 'application/json').then((res) => { if (res.code == 200) { this.$refs.payPopup.close(); this.withdrawRequestId = '' @@ -458,7 +460,7 @@ title: res.message, icon: 'none' }); - }) + }); }, chooseLinkId(type,item){ if(type == 'user'){ @@ -539,8 +541,8 @@ if (!this.canOpenShopOrder(item)) return if (this.resolvingSettlementOrderId) return this.resolvingSettlementOrderId = true - this.tui.request("/mall/order/orderIdBySettlementRecord/" + item.linkId, "GET", {}, false, true).then((res) => { - if (res.code == 200 && res.result) { + this.NB.sendRequest("/mall/order/orderIdBySettlementRecord/" + item.linkId, {}, false, 'GET', 'application/json').then((res) => { + if (res.code == 200) { this.skipWalletRefreshOnShow = true uni.navigateTo({ url: '/package2/shop/orderDetail?id=' + res.result, @@ -561,7 +563,7 @@ icon: 'none' }); this.resolvingSettlementOrderId = false - }) + }); }, rewardList(){ this.loadStatus = 'loading' @@ -572,7 +574,7 @@ if (this.activeWalletType === 'user') { params.excludeDealingsWay = '免单奖励' } - that.tui.request("/mall/coupon/selectRewardByRegionId", "POST", params, false, false).then((res) => { + this.NB.sendRequest("/mall/coupon/selectRewardByRegionId", params, false, 'POST', 'application/json').then((res) => { that.loadStatus = 'nomore'; if (res.code == 200) { that.totalPages = res.result.pages @@ -590,7 +592,7 @@ return } uni.hideLoading() - }).catch((res) => {}) + }).catch((res) => {}); }, back() { uni.navigateBack()