Commit 45822924 by wangyalan-git

tiket登录统一处理

parent 4ee25aa6
......@@ -31,12 +31,22 @@ export default {
mounted () {
this.jobNo = this.$route.query.jobNo
this.ticket = this.$route.query.ticket
// this.getToken()
this.getTicketLogin()
this.init()
},
methods: {
/* eslint-disable */
init () {
if (this.jobNo == '12345') {
this.getToken()
} else {
if (this.jobNo) {
this.ticket = this.$route.query.jobNo
}
this.getTicketLogin()
}
},
getToken () {
this.$store.dispatch('Login', { jobNo: this.$route.query.jobNo }).then(() => {
this.$store.dispatch('Login', { jobNo: this.jobNo }).then(() => {
this.$store.dispatch('GetUserInfo').then(res => {
// res.data.accouuntType = 0
this.userInfo = res.data
......@@ -47,11 +57,11 @@ export default {
})
},
getTicketLogin () {
if (!this.$route.query.ticket) {
if (!this.ticket) {
this.$toast('该用户不存在')
return
}
this.$store.dispatch('getTicketLogin', { ticket: this.$route.query.ticket }).then(() => {
this.$store.dispatch('getTicketLogin', { ticket: this.ticket }).then(() => {
this.$store.dispatch('GetUserInfo').then(res => {
this.userInfo = res.data
console.log('userInof', res.data, this.userInfo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment