|
|
@@ -67,7 +67,7 @@
|
|
|
<el-button type="primary" @click="doRegist">注册</el-button>
|
|
|
<div class="checks">
|
|
|
<span @click="doSwitch">{{usePhone ? '邮箱' : '手机'}}注册</span>
|
|
|
- <span @click="goLogin">直接登录</span>
|
|
|
+ <span @click="goLogin($event, true)">直接登录</span>
|
|
|
</div>
|
|
|
<div class="logos">
|
|
|
<a
|
|
|
@@ -164,6 +164,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ if(this.$store.getters.isLogin) {
|
|
|
+ this.$message('你已有注册的账号')
|
|
|
+ setTimeout(() => {
|
|
|
+ location.href = '/'
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
chengeVerMobile(val) {
|
|
|
this.ruleFormPhone.ver = val
|
|
|
@@ -226,6 +234,8 @@ export default {
|
|
|
* @params {function} run 闭包函数,用来启动验证码内部脚本
|
|
|
*/
|
|
|
async getVerMobile(run) {
|
|
|
+ // todo 验证手机号是否注册
|
|
|
+ // let checkRes = await this.$post('')
|
|
|
let mobile = this.ruleFormPhone.mobile.split('-')[1] || ''
|
|
|
if(!mobile.trim()) {
|
|
|
this.$message({
|