fix(wechat): 协议挂起请求仅在离开页面时结算并集中映射错误文案
自动发布开发环境 Nacos 配置 / publish (push) Successful in 18s

This commit is contained in:
2026-11-05 10:51:40 +08:00
parent 3f825682fb
commit 942718b8d9
20 changed files with 141 additions and 70 deletions
@@ -1,6 +1,7 @@
const userApi = require('../../api/user')
const auth = require('../../utils/auth')
const profileCache = require('../../utils/profile-cache')
const { showErrorToast } = require('../../utils/toast')
Page({
data: {
@@ -46,7 +47,7 @@ Page({
this.setData({ closureRequest })
wx.showToast({ title: '注销申请已提交' })
} catch (error) {
wx.showToast({ title: error.message || '申请提交失败', icon: 'none' })
showErrorToast(error, '申请提交失败')
}
},
@@ -58,7 +59,7 @@ Page({
await this.loadClosureRequest()
wx.showToast({ title: '申请已撤回' })
} catch (error) {
wx.showToast({ title: error.message || '撤回失败', icon: 'none' })
showErrorToast(error, '撤回失败')
}
},
@@ -71,7 +72,7 @@ Page({
const session = auth.getSession()
app.setSession({ ...session, userInfo: { ...(session.userInfo || {}), ...profile } })
} catch (error) {
wx.showToast({ title: error.message || '账号信息加载失败', icon: 'none' })
showErrorToast(error, '账号信息加载失败')
} finally {
this.setData({ loading: false })
}
@@ -103,7 +104,7 @@ Page({
await this.loadProfile({ force: true })
wx.showToast({ title: '手机号已绑定' })
} catch (error) {
wx.showToast({ title: error.message || '绑定失败', icon: 'none' })
showErrorToast(error, '绑定失败')
} finally {
this.setData({ binding: false })
}
@@ -122,7 +123,7 @@ Page({
this.startCountdown()
wx.showToast({ title: '验证码已发送' })
} catch (error) {
wx.showToast({ title: error.message || '验证码发送失败', icon: 'none' })
showErrorToast(error, '验证码发送失败')
} finally {
this.setData({ codeLoading: false })
}
@@ -151,7 +152,7 @@ Page({
await this.loadProfile({ force: true })
wx.showToast({ title: '手机号已绑定' })
} catch (error) {
wx.showToast({ title: error.message || '绑定失败', icon: 'none' })
showErrorToast(error, '绑定失败')
} finally {
this.setData({ binding: false })
}
@@ -178,7 +179,7 @@ Page({
await this.loadProfile({ force: true })
wx.showToast({ title: '手机号已解绑' })
} catch (error) {
wx.showToast({ title: error.message || '解绑失败', icon: 'none' })
showErrorToast(error, '解绑失败')
} finally {
this.setData({ binding: false })
}