|
|
@@ -134,6 +134,7 @@
|
|
|
v-model="loginForm.phone"
|
|
|
type="tel"
|
|
|
placeholder="请输入手机号"
|
|
|
+
|
|
|
:rules="[
|
|
|
{ required: true, message: '请输入手机号码' },
|
|
|
{
|
|
|
@@ -158,7 +159,10 @@
|
|
|
<van-divider class="login_divider" />
|
|
|
<div class="login_verification">
|
|
|
<div>忘记密码?</div>
|
|
|
- <div class="login_verification_con" @click="(verificationCode = true), (verification = true),(active = 'code')">
|
|
|
+ <div
|
|
|
+ class="login_verification_con"
|
|
|
+ @click="(verificationCode = true), (verification = true), (active = 'code')"
|
|
|
+ >
|
|
|
验证码登录
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -261,7 +265,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <div class="account_password_login" @click="verificationCode = false,active = 'phone'">
|
|
|
+ <div class="account_password_login" @click="(verificationCode = false), (active = 'phone')">
|
|
|
账户密码登录
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -333,7 +337,9 @@
|
|
|
<!-- <div class="register_now_con" @click="registerNow">立即注册</div> -->
|
|
|
</div>
|
|
|
</van-form>
|
|
|
- <div class="register_now_login" @click="loginRegistrationSwitch = true,active = 'phone'">账户密码登录</div>
|
|
|
+ <div class="register_now_login" @click="(loginRegistrationSwitch = true), (active = 'phone')">
|
|
|
+ 账户密码登录
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="login_tip">
|
|
|
登录则代表同意 <span class="login_tip_con">用户协议</span> 和 <span class="login_tip_con">隐私协议</span>
|
|
|
@@ -378,7 +384,7 @@ export default {
|
|
|
},
|
|
|
loginForm: {
|
|
|
phone: '',
|
|
|
- password: ""
|
|
|
+ password: ''
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
@@ -446,19 +452,19 @@ export default {
|
|
|
// console.log("1111111")
|
|
|
// setTimeout(() => {
|
|
|
// this.$router.push("/home")
|
|
|
- // this.$router.replace('/home');
|
|
|
- // if (this.$store.state.loginBackUrl) {
|
|
|
- // this.$router.replace(this.$store.state.loginBackUrl);
|
|
|
- // } else if (
|
|
|
- // !fromRoute ||
|
|
|
- // !fromRoute.name ||
|
|
|
- // fromRoute.name === 'userRegister' ||
|
|
|
- // fromRoute.name === 'userLogin'
|
|
|
- // ) {
|
|
|
- // this.$router.replace('/home');
|
|
|
- // } else {
|
|
|
- // this.$router.back();
|
|
|
- // }
|
|
|
+ // this.$router.replace('/home');
|
|
|
+ // if (this.$store.state.loginBackUrl) {
|
|
|
+ // this.$router.replace(this.$store.state.loginBackUrl);
|
|
|
+ // } else if (
|
|
|
+ // !fromRoute ||
|
|
|
+ // !fromRoute.name ||
|
|
|
+ // fromRoute.name === 'userRegister' ||
|
|
|
+ // fromRoute.name === 'userLogin'
|
|
|
+ // ) {
|
|
|
+ // this.$router.replace('/home');
|
|
|
+ // } else {
|
|
|
+ // this.$router.back();
|
|
|
+ // }
|
|
|
// }, 1500);
|
|
|
// });
|
|
|
// },
|
|
|
@@ -494,7 +500,7 @@ export default {
|
|
|
submitLoginCodeOne() {
|
|
|
this.sendMsg(this.loginForm.phone);
|
|
|
},
|
|
|
- submitLogin(){
|
|
|
+ submitLogin() {
|
|
|
this.check().then(() => {
|
|
|
this.$toast.success('登录成功');
|
|
|
setTimeout(() => {
|
|
|
@@ -511,13 +517,13 @@ export default {
|
|
|
this.$router.back();
|
|
|
}
|
|
|
}, 1500);
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
check() {
|
|
|
if (this.active === 'phone') {
|
|
|
return this.loginByPhone(this.loginForm.phone, this.loginForm.password);
|
|
|
} else {
|
|
|
- console.log("123312221",this.loginForm.phone,this.value)
|
|
|
+ // console.log("123312221",this.loginForm.phone,this.value)
|
|
|
return this.$http
|
|
|
.post('/auth/phoneLogin', {
|
|
|
phone: this.loginForm.phone,
|
|
|
@@ -534,7 +540,7 @@ export default {
|
|
|
return this.$store.dispatch('getUserInfo');
|
|
|
});
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
// checkTwo() {
|
|
|
// return this.$http
|
|
|
// .post('/auth/phoneLogin', {
|
|
|
@@ -686,6 +692,7 @@ export default {
|
|
|
.login_information_con {
|
|
|
width: 250px;
|
|
|
// height: 24px;
|
|
|
+ background: #0f0f27;
|
|
|
}
|
|
|
.send_verification {
|
|
|
background-color: #0f0f27;
|