修改测试问题
This commit is contained in:
@@ -4,33 +4,18 @@
|
||||
<view class="index">
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item name="phone">
|
||||
<uni-easyinput
|
||||
type="number"
|
||||
maxlength="11"
|
||||
v-model="formData.phone"
|
||||
placeholder="请输入手机号"
|
||||
/>
|
||||
<uni-easyinput type="number" maxlength="11" v-model="formData.phone" placeholder="请输入手机号" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item name="code">
|
||||
<view class="login-box-input">
|
||||
<uni-easyinput
|
||||
type="text"
|
||||
v-model="formData.code"
|
||||
placeholder="请输入验证码"
|
||||
maxlength="6"
|
||||
/>
|
||||
<view
|
||||
class="ml40"
|
||||
style="
|
||||
<uni-easyinput type="text" v-model="formData.code" placeholder="请输入验证码" maxlength="6" />
|
||||
<view class="ml40" style="
|
||||
margin-left: 40rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
width: 200rpx;
|
||||
text-align: center;
|
||||
"
|
||||
v-if="waitTime > 0"
|
||||
>{{ waitTime + 's后重新获取' }}</view
|
||||
>
|
||||
" v-if="waitTime > 0">{{ waitTime + 's后重新获取' }}</view>
|
||||
<button class="login-box-input-btn" v-else @click="getCode" size="mini">获取验证码</button>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
@@ -41,7 +26,8 @@
|
||||
<uni-easyinput type="password" v-model="formData.password2" placeholder="请再次确认密码" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<button type="default" class="submit-btn" @click="submit">提交</button>
|
||||
<button type="default" class="submit-btn" :loading="loadingButton" :disabled="loadingButton"
|
||||
@click="submit">提交</button>
|
||||
<view class="login-box-tips">
|
||||
<view style="color: #999">说明:密码长度为6-18位</view>
|
||||
</view>
|
||||
@@ -71,6 +57,7 @@ export default {
|
||||
password: '',
|
||||
password2: '',
|
||||
},
|
||||
loadingButton: false,
|
||||
rules: {
|
||||
phone: {
|
||||
rules: [
|
||||
@@ -107,7 +94,7 @@ export default {
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onLoad() { },
|
||||
methods: {
|
||||
getCode() {
|
||||
if (!this.formData.phone) {
|
||||
@@ -151,6 +138,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
this.loadingButton = true
|
||||
let loginName = encrypt(this.formData.phone)
|
||||
gongkey({ loginName }).then((response) => {
|
||||
let publicKey = response.data
|
||||
@@ -169,9 +157,13 @@ export default {
|
||||
}, 1000)
|
||||
})
|
||||
.catch((err) => {
|
||||
uni.hideLoading()
|
||||
console.log(err)
|
||||
})
|
||||
.finally(() => {
|
||||
this.loadingButton = false
|
||||
})
|
||||
}).finally(() => {
|
||||
this.loadingButton = false
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user