|
@@ -47,11 +47,45 @@
|
|
|
<u-button type="primary" shape="circle" color="linear-gradient(90deg, #1989FA, #19C2FA)" @click="bindLogin" text="立即登录"></u-button>
|
|
|
</view>
|
|
|
<view class="fot">
|
|
|
- <!--<text @tap="reg_ok">免费注册</text>
|
|
|
- <text style="display: inline-block;width: 10vw;"></text>-->
|
|
|
- <!--<text @tap="openForgetPassword" style="color: #1989FA;">忘记密码</text>-->
|
|
|
+ <text @tap="loginOnPassword" style="color: #1989FA;">账号密码登陆</text>
|
|
|
+ <text style="display: inline-block;width: 10vw;"></text>
|
|
|
+ <text @tap="openForgetPassword" style="color: #1989FA;">忘记密码</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view id="box" v-else-if="whichPage === '3'">
|
|
|
+
|
|
|
+ <view id="top" class="">
|
|
|
+ <view class="top_le"></view>
|
|
|
+ <view class="top_ri"></view>
|
|
|
+ </view>
|
|
|
+ <view class="title">
|
|
|
+ <view>账号密码登陆</view>
|
|
|
+ <!--<view>使用账号绑定的手机号找回密码</view>-->
|
|
|
+ </view>
|
|
|
+ <view class="login-form">
|
|
|
+ <u--form :model="inputForm" labelWidth="100px" labelPosition="left" :rules="rules" ref="uForm">
|
|
|
+ <u-form-item label="用户名" borderBottom prop="username">
|
|
|
+ <u-input border="none" v-model="inputForm.username" />
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item label="密码" borderBottom prop="password">
|
|
|
+ <u-input border="none" password v-model="inputForm.password" />
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item label="验证码" borderBottom prop="code">
|
|
|
+ <u-input border="none" v-model="inputForm.code" />
|
|
|
+ <u--image :showLoading="true" :src="captchaImg" width="140px" height="40px" @click="getCaptcha"></u--image>
|
|
|
+ </u-form-item>
|
|
|
+ </u--form>
|
|
|
+ </view>
|
|
|
+ <view class="but">
|
|
|
+ <u-button type="primary" shape="circle" color="linear-gradient(90deg, #1989FA, #19C2FA)" @click="bindLogin" text="欢迎登录"></u-button>
|
|
|
+ </view>
|
|
|
+ <view class="fot">
|
|
|
+ <!-- <text @tap="reg_ok">免费注册</text>-->
|
|
|
+ <!-- <text style="display: inline-block;width: 10vw;"></text>-->
|
|
|
+ <text @tap="backLogin" style="color: #1989FA;">返回登陆页面</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view id="box" v-else-if="whichPage === '2'">
|
|
|
|
|
|
<view id="top" class="">
|
|
@@ -60,7 +94,7 @@
|
|
|
</view>
|
|
|
<view class="title">
|
|
|
<view>修改密码</view>
|
|
|
- <view>使用账号绑定的手机号找回密码</view>
|
|
|
+ <!--<view>使用账号绑定的手机号找回密码</view>-->
|
|
|
</view>
|
|
|
<view class="login-form">
|
|
|
<u--form :model="inputForm" labelWidth="100px" labelPosition="left" :rules="rules" ref="uForm">
|
|
@@ -89,7 +123,7 @@
|
|
|
<view class="fot">
|
|
|
<!-- <text @tap="reg_ok">免费注册</text>-->
|
|
|
<!-- <text style="display: inline-block;width: 10vw;"></text>-->
|
|
|
- <text @tap="backLogin" style="color: #1989FA;">前往登录页面</text>
|
|
|
+ <text @tap="backLogin" style="color: #1989FA;">返回登陆页面</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -234,6 +268,14 @@
|
|
|
this.whichPage = '2' // 打开忘记密码页面
|
|
|
})
|
|
|
},
|
|
|
+ loginOnPassword () {
|
|
|
+ this.inputForm.username = ''
|
|
|
+ this.inputForm.password = ''
|
|
|
+ this.inputForm.code = ''
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.whichPage = '3' // 打开账号密码页面
|
|
|
+ })
|
|
|
+ },
|
|
|
backLogin () {
|
|
|
this.inputForm.phoneNumber = ''
|
|
|
this.inputForm.phoneCode = ''
|
|
@@ -411,14 +453,23 @@
|
|
|
reject('Form validation failed');
|
|
|
} else {
|
|
|
loginService.savePwd(this.inputForm).then((data) => {
|
|
|
+
|
|
|
if (data.success) {
|
|
|
- this.$message.success(data.message)
|
|
|
+ uni.showToast({
|
|
|
+ title: data.message,
|
|
|
+ icon: "success",
|
|
|
+ duration: 1500 // 提示持续时间为1秒(1000毫秒)
|
|
|
+ });
|
|
|
this.inputForm.username = this.inputForm.phoneNumber
|
|
|
this.inputForm.newPassword = this.inputForm.newPassword
|
|
|
this.backLogin() // 修改密码成功后返回登录页面
|
|
|
this.loading = false
|
|
|
} else {
|
|
|
- this.$message.error(data.message)
|
|
|
+ uni.showToast({
|
|
|
+ title: data.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 1500
|
|
|
+ });
|
|
|
this.loading = false
|
|
|
}
|
|
|
}).catch(() => {
|