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