This commit is contained in:
Alex-larget
2026-03-24 18:45:32 +08:00
parent dcb7961945
commit f3d74ce94a
68 changed files with 2461 additions and 2535 deletions

View File

@@ -677,7 +677,7 @@ Page({
wx.navigateTo({ url: '/pages/withdraw-records/withdraw-records' })
},
// 执行提现
// 执行提现success:false 时 app.request 会 reject 并挂 e.response需 catch 里处理 needBindWechat
async doWithdraw(amount) {
wx.showLoading({ title: '提现中...' })
@@ -706,24 +706,23 @@ Page({
// 刷新数据(此时待审核金额会增加,可提现金额会减少)
this.initData()
} else {
if (res.needBind || res.needBindWechat) {
wx.showModal({
title: res.needBindWechat ? '请先绑定微信号' : '需要绑定微信',
content: res.needBindWechat ? '请到「设置」中绑定微信号后再提现,便于到账核对。' : '请先在设置中绑定微信账号后再提现',
confirmText: '去绑定',
success: (modalRes) => {
if (modalRes.confirm) wx.navigateTo({ url: '/pages/settings/settings' })
}
})
} else {
wx.showToast({ title: res.message || res.error || '提现失败', icon: 'none', duration: 3000 })
}
}
} catch (e) {
wx.hideLoading()
console.error('[Referral] 提现失败:', e)
wx.showToast({ title: '提现失败,请重试', icon: 'none' })
const resp = e && e.response
if (resp && (resp.needBind || resp.needBindWechat)) {
wx.showModal({
title: resp.needBindWechat ? '请先绑定微信号' : '需要绑定微信',
content: resp.needBindWechat ? '请到「设置」中绑定微信号后再提现,便于到账核对。' : '请先在设置中绑定微信账号后再提现',
confirmText: '去绑定',
success: (modalRes) => {
if (modalRes.confirm) wx.navigateTo({ url: '/pages/settings/settings' })
}
})
return
}
wx.showToast({ title: (e && e.message) || '提现失败,请重试', icon: 'none' })
}
},