fix(security): 换绑手机移除冗余用户名传参并强制携带登录token

This commit is contained in:
pikachu1995@126.com
2026-11-11 14:59:48 +08:00
parent 0a4db7b6f4
commit 870e9c4db4
3 changed files with 5 additions and 7 deletions

View File

@@ -23,6 +23,7 @@ export function bindMobile(params) {
url: `/passport/member/bindMobile`,
method: "POST",
params,
needToken: true,
});
}

View File

@@ -72,7 +72,7 @@
<up-form-item label="手机号" label-width="180rpx" :border-bottom="false">
<view v-if="form.mobile" class="form-value">{{ form.mobile }}</view>
<view v-else class="bind-mobile" @click="navigateToBindMobile(form.username)">绑定手机号码</view>
<view v-else class="bind-mobile" @click="navigateToBindMobile">绑定手机号码</view>
</up-form-item>
</up-form>
@@ -263,9 +263,9 @@ function closeBirthdayPicker() {
showBirthday.value = false
}
function navigateToBindMobile(username: string) {
function navigateToBindMobile() {
uni.navigateTo({
url: `/pages/mine/set/securityCenter/bindMobile?username=${username}`,
url: '/pages/mine/set/securityCenter/bindMobile',
})
}

View File

@@ -62,7 +62,6 @@ const verificationPassed = ref(false)
const codeForm = reactive({
mobile: '',
code: '',
username: '',
})
const codeTips = ref('')
const seconds = 69
@@ -90,9 +89,7 @@ const codeRules = {
],
}
onLoad((options) => {
codeForm.username = options?.username || ''
})
onLoad(() => {})
onReady(() => {
validateCodeForm.value?.setRules(codeRules)