From 3905beaa9a9b0b60fbd4de94b4a179c4ee9eedc2 Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Sun, 26 Jul 2026 17:30:06 +0800
Subject: [PATCH] 1
---
package2/myCenter/partTimeJobRegister.vue | 81 ++++++++++++++++++++---
package2/myCenter/wallet.vue | 68 ++++++++++++++++---
package2/shop/shopBill.vue | 4 +-
package2/shop/shopSettlementDetail.vue | 8 +--
4 files changed, 136 insertions(+), 25 deletions(-)
diff --git a/package2/myCenter/partTimeJobRegister.vue b/package2/myCenter/partTimeJobRegister.vue
index 669e47f..68f0a6c 100644
--- a/package2/myCenter/partTimeJobRegister.vue
+++ b/package2/myCenter/partTimeJobRegister.vue
@@ -18,6 +18,7 @@
+ {{workerNameAuditTip}}
@@ -198,8 +199,10 @@
关注后可提现佣金,有新订单会及时通知。下线后不再接收通知
-
- {{worker ? '保存规则' : '提交注册'}}
+
+
+ {{worker ? '保存规则' : '提交注册'}}
+
@@ -419,7 +422,8 @@
dispatchPopupVisible: false,
dispatchSaving: false,
zhipaiCheck: false,
- pendingNewDispatchRuleKeys: []
+ pendingNewDispatchRuleKeys: [],
+ workerNameAuditTip: ''
}
},
components: {
@@ -534,8 +538,29 @@
onWorkerNameInput(e) {
const value = this.limitText(e.detail.value, 10)
this.formData.name = value
+ this.workerNameAuditTip = ''
return value
},
+ getResponseMessage(res, fallback) {
+ if (!res) return fallback
+ if (res.message) return res.message
+ if (res.msg) return res.msg
+ if (res.errMsg) return res.errMsg
+ if (res.data && res.data.message) return res.data.message
+ if (res.data && res.data.msg) return res.data.msg
+ return fallback
+ },
+ isWorkerNameAuditMessage(message) {
+ return !!message && (message.indexOf('审核') !== -1 || message.indexOf('不合适') !== -1)
+ },
+ showWorkerNameAuditTip(message) {
+ const tip = message || '姓名内容未通过审核,请修改后再提交'
+ this.workerNameAuditTip = tip
+ uni.showToast({
+ title: tip,
+ icon: 'none'
+ })
+ },
onDefaultRouteRemarkInput(e) {
const value = this.limitText(e.detail.value, 20)
this.defaultRouteRemark = value
@@ -868,6 +893,7 @@
},
submit() {
this.formData.name = this.limitText(this.formData.name, 10)
+ this.workerNameAuditTip = ''
if (!this.formData.name) return uni.showToast({
title: '请填写姓名',
icon: 'none'
@@ -948,14 +974,28 @@
if (hasNewRule) worker1.getPushOrder = 1
uni.setStorageSync('worker', worker1)
this.getWorkerMessage(true, hasNewRule)
+ } else {
+ const message = this.getResponseMessage(res, '提交失败')
+ if (this.isWorkerNameAuditMessage(message)) {
+ this.showWorkerNameAuditTip(message)
+ } else {
+ uni.showToast({
+ title: message,
+ icon: 'none'
+ });
+ }
+ }
+ }).catch(err => {
+ uni.hideLoading();
+ const message = this.getResponseMessage(err, '提交失败,请稍后再试')
+ if (this.isWorkerNameAuditMessage(message)) {
+ this.showWorkerNameAuditTip(message)
} else {
uni.showToast({
- title: res.message,
+ title: message,
icon: 'none'
});
}
- }).catch(err => {
- uni.hideLoading();
});
},
pictureAdd() {
@@ -1054,6 +1094,10 @@
border-radius: 40rpx;
background: #fff;
padding: 16rpx 20rpx;
+ padding-bottom: 220rpx;
+ padding-bottom: calc(220rpx + constant(safe-area-inset-bottom));
+ padding-bottom: calc(220rpx + env(safe-area-inset-bottom));
+ box-sizing: border-box;
}
.reg-name {
@@ -1068,6 +1112,13 @@
margin-top: 10rpx;
}
+ .audit-tip {
+ margin-top: 12rpx;
+ color: #ff3b30;
+ font-size: 24rpx;
+ line-height: 34rpx;
+ }
+
.img-popup-content {
width: 500rpx;
height: 500rpx;
@@ -1433,8 +1484,22 @@
font-weight: 700;
}
+ .bottom-action {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 22rpx 20rpx 32rpx;
+ padding-bottom: calc(32rpx + constant(safe-area-inset-bottom));
+ padding-bottom: calc(32rpx + env(safe-area-inset-bottom));
+ background: #fff;
+ box-shadow: 0 -10rpx 28rpx rgba(0, 35, 28, 0.08);
+ box-sizing: border-box;
+ z-index: 20;
+ }
+
.btn {
- width: 95%;
+ width: 100%;
height: 100rpx;
font-size: 32rpx;
font-weight: 700;
@@ -1442,7 +1507,7 @@
border-radius: 100rpx;
line-height: 100rpx;
text-align: center;
- margin: 40rpx auto;
+ box-shadow: 0 16rpx 36rpx rgba(0, 35, 28, 0.18);
}
.guize-popup-content {
diff --git a/package2/myCenter/wallet.vue b/package2/myCenter/wallet.vue
index 6646345..6031d72 100644
--- a/package2/myCenter/wallet.vue
+++ b/package2/myCenter/wallet.vue
@@ -137,14 +137,14 @@
-
@@ -186,6 +186,8 @@
balanceShop:[],
submittingWithdraw: false,
withdrawRequestId: '',
+ withdrawClickLocked: false,
+ withdrawClickTimer: null,
showBalance: true,
resolvingSettlementOrderId: false,
skipWalletRefreshOnShow: false,
@@ -267,6 +269,11 @@
this.searchForm.pageNum+=1;
this.rewardList();
},
+ beforeDestroy() {
+ if (this.withdrawClickTimer) {
+ clearTimeout(this.withdrawClickTimer)
+ }
+ },
methods: {
beginData(){
this.tui.request("/worker/getAllDepo/", "GET", {userId:uni.getStorageSync('id')}, false, true).then((res) => {
@@ -295,6 +302,7 @@
})
},
userCommion(type,commion,item){
+ if (!this.lockWithdrawClick()) return
const withdrawAmount = Number(commion) || 0
if(type=='user'){
this.commionUrl = '/app/returnCommission/handleReturnUser'
@@ -314,6 +322,18 @@
createWithdrawRequestId(){
return `${Date.now()}${Math.floor(Math.random() * 1000000)}`
},
+ lockWithdrawClick(){
+ if (this.withdrawClickLocked) return false
+ this.withdrawClickLocked = true
+ if (this.withdrawClickTimer) {
+ clearTimeout(this.withdrawClickTimer)
+ }
+ this.withdrawClickTimer = setTimeout(() => {
+ this.withdrawClickLocked = false
+ this.withdrawClickTimer = null
+ }, 800)
+ return true
+ },
syncActiveWallet(){
if (this.targetWalletType) {
const targetIndex = this.walletTabs.findIndex(tab => tab.key === this.targetWalletType)
@@ -375,6 +395,7 @@
},
wxPayment(){
let that = this
+ if (!this.lockWithdrawClick()) return
if (this.submittingWithdraw) {
that.tui.toast('提现处理中,请勿重复提交')
return
@@ -393,20 +414,26 @@
that.tui.toast('提现金额不能超过可提现金额')
return
}
- if(!this.aliName){
+ const aliName = (this.aliName || '').trim()
+ const aliAccount = (this.aliAccount || '').trim()
+ if(!aliName){
that.tui.toast('支付宝实名名称不能为空')
return
}
- if(!this.aliAccount){
- that.tui.toast('支付宝手机号不能为空')
+ if(!aliAccount){
+ that.tui.toast('支付宝账号不能为空')
+ return
+ }
+ if(!this.isValidAliAccount(aliAccount)){
+ that.tui.toast('支付宝账号需为手机号或邮箱')
return
}
this.submittingWithdraw = true
let data = {
id:this.withdrawRequestId || this.createWithdrawRequestId(),
commission:amount,
- aliName:this.aliName,
- aliAccount:this.aliAccount
+ aliName:aliName,
+ aliAccount:aliAccount
}
if(this.commionType == 'user'){
data.userId = this.balanceUser.id
@@ -417,12 +444,13 @@
}
that.tui.request(this.commionUrl, "POST", data, false, false).then((res) => {
that.loadStatus = 'nomore';
- if (res.code == 200) {
+ const failMessage = that.getWithdrawErrorMessage(res)
+ if (res.code == 200 && !failMessage) {
this.$refs.payPopup.close();
this.withdrawRequestId = ''
this.beginData();
} else {
- that.tui.toast(res.message)
+ that.tui.toast(failMessage || '提现失败,请稍后再试')
that.submittingWithdraw = false
return
}
@@ -430,9 +458,23 @@
uni.hideLoading()
}).catch((res) => {
that.submittingWithdraw = false
- that.tui.toast(res.message)
+ that.tui.toast(that.getWithdrawErrorMessage(res) || '提现失败,请稍后再试')
})
},
+ isValidAliAccount(account){
+ const value = (account || '').trim()
+ const phoneReg = /^1[3-9]\d{9}$/
+ const emailReg = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
+ return phoneReg.test(value) || emailReg.test(value)
+ },
+ getWithdrawErrorMessage(res){
+ if (!res) return ''
+ const message = res.message || res.msg || ''
+ const result = res.result || {}
+ const reason = result.failMessage || result.remark || message
+ if (res.code != 200 || res.success === false) return reason
+ return /失败|异常/.test(message) ? reason : ''
+ },
chooseLinkId(type,item){
if(type == 'user'){
this.linkId = this.balanceUser.id
@@ -1375,6 +1417,10 @@
transition: transform 0.16s ease;
}
+ .popup-btn.disabled {
+ pointer-events: none;
+ }
+
/* ---------- 动画 ---------- */
.enter-card {
animation: cardIn 0.46s ease both;
diff --git a/package2/shop/shopBill.vue b/package2/shop/shopBill.vue
index dddd329..a0902eb 100644
--- a/package2/shop/shopBill.vue
+++ b/package2/shop/shopBill.vue
@@ -30,11 +30,11 @@
-
+
diff --git a/package2/shop/shopSettlementDetail.vue b/package2/shop/shopSettlementDetail.vue
index 46d8f5f..8a28149 100644
--- a/package2/shop/shopSettlementDetail.vue
+++ b/package2/shop/shopSettlementDetail.vue
@@ -15,7 +15,7 @@
{{query.billTime || '-'}}
-
+
@@ -43,11 +43,11 @@
-
+
结算基数
¥{{formatMoney(item.baseAmount)}}
-
+
平台抽佣
¥{{formatMoney(item.commissionAmount)}}