- 手机号/账号全场景一律脱敏:SensitiveFieldPolicy 删除完整值分支与 ADMIN_EDIT,SELF_PROFILE 同样脱敏;convertToVO 全调用点统一脱敏 - 联系信息接口不再返回号码:toContact 置空 phone 并给出 phoneAvailable,补齐 ensureUserCanSeeShop 真实可见范围校验 - 新增 POST /contact-info/dial,按 scene(SHOP_MANAGER/ORDER_ARTIST/PRODUCT_ARTIST/PLATFORM) 一次一取;DialTargetProvider 抽象直连/隐私号,未配置隐私号返回 9001 且不回退真实号;/contact-info/** 按用户限流并记录审计 - 验证码与换绑手机号改为服务端按当前登录用户取号,客户端 phone/oldPhone 参数兼容忽略;前端与小程序同步去掉回传 - 消息发布人昵称兜底改为脱敏账号,避免 account 明文写入 publisher_name - 新增 V5 账号加密与账号哈希、V6 协议文本改为全场景脱敏与单次拨号取号
This commit is contained in:
@@ -739,22 +739,9 @@ Page({
|
||||
},
|
||||
|
||||
async handleChangePhoneSubmit() {
|
||||
const userInfo = this.data.userInfo || {}
|
||||
const oldPhone = String(userInfo.phone || '').trim()
|
||||
const newPhone = String(this.data.changePhoneForm.newPhone || '').trim()
|
||||
const verificationCode = String(this.data.changePhoneForm.verificationCode || '').trim()
|
||||
|
||||
/**
|
||||
* `if` page method. Use this from WXML event bindings or lifecycle hooks.
|
||||
* Call guide: read or update page data with `this.setData(...)` inside the method when state changes.
|
||||
*/
|
||||
if (!oldPhone) {
|
||||
wx.showToast({
|
||||
title: '请先绑定手机号',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// 原手机号由服务端按当前登录用户取,页面展示的是脱敏值,不再回传。
|
||||
|
||||
if (!phoneRegex.test(newPhone)) {
|
||||
wx.showToast({
|
||||
@@ -782,7 +769,6 @@ Page({
|
||||
|
||||
try {
|
||||
await runWithLoading(() => userApi.updatePhone({
|
||||
oldPhone,
|
||||
newPhone,
|
||||
verificationCode
|
||||
}))
|
||||
@@ -829,8 +815,8 @@ Page({
|
||||
}
|
||||
|
||||
try {
|
||||
// 号码由服务端按当前登录用户读取,前端只传场景。
|
||||
await runWithLoading(() => authApi.sendVerificationCode({
|
||||
phone,
|
||||
sceneCode: 'USER_CHANGE_PASSWORD_SMS_CODE'
|
||||
}))
|
||||
wx.showToast({
|
||||
|
||||
Reference in New Issue
Block a user