mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-11-12 20:08:53 +08:00
fix(security): 换绑手机移除冗余用户名传参并强制携带登录token
This commit is contained in:
@@ -23,6 +23,7 @@ export function bindMobile(params) {
|
|||||||
url: `/passport/member/bindMobile`,
|
url: `/passport/member/bindMobile`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
params,
|
params,
|
||||||
|
needToken: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<up-form-item label="手机号" label-width="180rpx" :border-bottom="false">
|
<up-form-item label="手机号" label-width="180rpx" :border-bottom="false">
|
||||||
<view v-if="form.mobile" class="form-value">{{ form.mobile }}</view>
|
<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-item>
|
||||||
</up-form>
|
</up-form>
|
||||||
|
|
||||||
@@ -263,9 +263,9 @@ function closeBirthdayPicker() {
|
|||||||
showBirthday.value = false
|
showBirthday.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
function navigateToBindMobile(username: string) {
|
function navigateToBindMobile() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/mine/set/securityCenter/bindMobile?username=${username}`,
|
url: '/pages/mine/set/securityCenter/bindMobile',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ const verificationPassed = ref(false)
|
|||||||
const codeForm = reactive({
|
const codeForm = reactive({
|
||||||
mobile: '',
|
mobile: '',
|
||||||
code: '',
|
code: '',
|
||||||
username: '',
|
|
||||||
})
|
})
|
||||||
const codeTips = ref('')
|
const codeTips = ref('')
|
||||||
const seconds = 69
|
const seconds = 69
|
||||||
@@ -90,9 +89,7 @@ const codeRules = {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad(() => {})
|
||||||
codeForm.username = options?.username || ''
|
|
||||||
})
|
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
validateCodeForm.value?.setRules(codeRules)
|
validateCodeForm.value?.setRules(codeRules)
|
||||||
|
|||||||
Reference in New Issue
Block a user