|
|
|
@ -9,13 +9,12 @@
|
|
|
|
|
<input placeholder="请设置新密码" v-model="edit_password_form.password">
|
|
|
|
|
</view>
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<!-- <uni-forms-item name="mobile">
|
|
|
|
|
<uni-forms-item name="mobile" v-if="option_mobile">
|
|
|
|
|
<view class="changePwd_form_wrap ">
|
|
|
|
|
<text>手机号:</text>
|
|
|
|
|
<input type="password" placeholder="请输入手机号" v-model="check_mobile">
|
|
|
|
|
|
|
|
|
|
<input placeholder="请输入手机号" v-model="check_mobile">
|
|
|
|
|
</view>
|
|
|
|
|
</uni-forms-item> -->
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<uni-forms-item name="code">
|
|
|
|
|
<view class="changePwd_form_wrap pxl">
|
|
|
|
|
<text>验证码:</text>
|
|
|
|
@ -24,7 +23,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
</uni-forms>
|
|
|
|
|
<text class="tips">密码长度6-12位,由字母数字构成</text>
|
|
|
|
|
<text class="tips">密码长度4-16位,由字母或数字构成</text>
|
|
|
|
|
<view class="btn">
|
|
|
|
|
<button @click="confirm">确定</button>
|
|
|
|
|
</view>
|
|
|
|
@ -54,10 +53,10 @@
|
|
|
|
|
onShow,
|
|
|
|
|
onReachBottom
|
|
|
|
|
} from "@dcloudio/uni-app";
|
|
|
|
|
const option_mobile = ref('')
|
|
|
|
|
const option_mobile = ref(false)
|
|
|
|
|
onLoad((option) => {
|
|
|
|
|
// console.log(option, 'option');
|
|
|
|
|
option_mobile.value = option.mobile
|
|
|
|
|
option_mobile.value = option.ismobile
|
|
|
|
|
})
|
|
|
|
|
const edit_password_form = ref({
|
|
|
|
|
password: '',
|
|
|
|
@ -91,8 +90,8 @@
|
|
|
|
|
title: '正在获取验证码'
|
|
|
|
|
})
|
|
|
|
|
let data = {
|
|
|
|
|
mobile: uni.getStorageSync("mobile"),
|
|
|
|
|
scene: 3
|
|
|
|
|
mobile: option_mobile.value ? check_mobile.value : uni.getStorageSync("mobile"),
|
|
|
|
|
scene: option_mobile.value ? 4 : 3
|
|
|
|
|
}
|
|
|
|
|
await uni.$request({
|
|
|
|
|
url: config.baseUrl + 'app-api/member/auth/send-sms-code',
|
|
|
|
@ -129,8 +128,15 @@
|
|
|
|
|
if (!validate) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let config_url = ''
|
|
|
|
|
if (option_mobile.value) {
|
|
|
|
|
config_url = 'app-api/member/user/reset-password'
|
|
|
|
|
edit_password_form.value.mobile = check_mobile.value
|
|
|
|
|
} else {
|
|
|
|
|
config_url = 'app-api/member/user/update-password'
|
|
|
|
|
}
|
|
|
|
|
await uni.$request({
|
|
|
|
|
url: config.baseUrl + 'app-api/member/user/update-password',
|
|
|
|
|
url: config.baseUrl + config_url,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: edit_password_form.value
|
|
|
|
|
}).then((res) => {
|
|
|
|
|