|
@ -27,7 +27,8 @@ |
|
|
trigger="click" |
|
|
trigger="click" |
|
|
v-model="loginCode" |
|
|
v-model="loginCode" |
|
|
@show="codeShow"> |
|
|
@show="codeShow"> |
|
|
<imgCodeRole @login="login" ref="imgCodeRole"></imgCodeRole> |
|
|
<!-- <imgCodeRole @login="login" ref="imgCodeRole"></imgCodeRole>--> |
|
|
|
|
|
<verify ref="verify" @login="login"/> |
|
|
<el-button slot="reference" type="primary" class="login-btn" v-loading="loading">登 录</el-button> |
|
|
<el-button slot="reference" type="primary" class="login-btn" v-loading="loading">登 录</el-button> |
|
|
</el-popover> |
|
|
</el-popover> |
|
|
<!--<router-link :to="{name: 'registUser'}" target="_blank" tag="a" class="register fl">个人注册</router-link> |
|
|
<!--<router-link :to="{name: 'registUser'}" target="_blank" tag="a" class="register fl">个人注册</router-link> |
|
@ -63,9 +64,10 @@ import { |
|
|
import user from '@/api/User/login.js' |
|
|
import user from '@/api/User/login.js' |
|
|
import {setToken, getToken, setSession} from '@/utils/auth' |
|
|
import {setToken, getToken, setSession} from '@/utils/auth' |
|
|
import imgCodeRole from '@/components/imgCodeRole/index.vue' |
|
|
import imgCodeRole from '@/components/imgCodeRole/index.vue' |
|
|
|
|
|
import verify from './verify' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: {imgCodeRole}, |
|
|
components: { imgCodeRole, verify }, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
loginForm: { |
|
|
loginForm: { |
|
@ -94,15 +96,16 @@ export default { |
|
|
// }, |
|
|
// }, |
|
|
login(data) { |
|
|
login(data) { |
|
|
this.loading = true |
|
|
this.loading = true |
|
|
this.loginForm.verifyCode = data.verifyCode |
|
|
// this.loginForm.verifyCode = data.verifyCode |
|
|
this.loginForm.uuid = data.uuid |
|
|
// this.loginForm.uuid = data.uuid |
|
|
this.$store.dispatch('user/login', this.loginForm).then((res) => { |
|
|
this.$store.dispatch('user/login', this.loginForm).then((res) => { |
|
|
// this.$store.dispatch('user/getInfo') |
|
|
// this.$store.dispatch('user/getInfo') |
|
|
this.$router.push({ path: '/home' }) |
|
|
this.$router.push({ path: '/home' }) |
|
|
this.loading = false |
|
|
this.loading = false |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
this.loading = false |
|
|
this.loading = false |
|
|
this.$refs.imgCodeRole.getCodeImage() |
|
|
this.$refs.verify.onRefresh() |
|
|
|
|
|
// this.$refs.imgCodeRole.getCodeImage() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
codeShow() { |
|
|
codeShow() { |
|
@ -111,7 +114,7 @@ export default { |
|
|
this.showMsg = true |
|
|
this.showMsg = true |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
this.$refs.imgCodeRole.getCodeImage() |
|
|
// this.$refs.imgCodeRole.getCodeImage() |
|
|
}, |
|
|
}, |
|
|
handleforgetPwd() { |
|
|
handleforgetPwd() { |
|
|
this.forgetPwd = true |
|
|
this.forgetPwd = true |
|
|