| | |
| | | export default {
|
| | | data() {
|
| | | return {
|
| | | code: ''
|
| | | code: '111'
|
| | | }
|
| | | }, |
| | | onLoad(option) { |
| | |
| | | that.$store.commit('setMember', res.data.member)
|
| | | }
|
| | | let flag = res.data.member && res.data.member.id
|
| | | setTimeout(() => {
|
| | | if (source == 0) {
|
| | | if (res.data.token) {
|
| | | that.$store.commit('setToken', res.data.token)
|
| | | getUserInfo().then(ress => {
|
| | | that.$store.commit('setDriverInfo', ress.data)
|
| | | })
|
| | | }
|
| | | this.driverLogin(flag)
|
| | | } else if (source == 2) {
|
| | | if (res.data.token) {
|
| | | that.$store.commit('setToken', res.data.token)
|
| | | getUserInfo().then(ress => {
|
| | | that.$store.commit('setUserInfo', ress.data)
|
| | | })
|
| | | }
|
| | | this.staffLogin(flag)
|
| | | } else {
|
| | | this.jump('/pages/index/index')
|
| | | }
|
| | | }, 300)
|
| | | if (source == 0) { |
| | | if (res.data.token) { |
| | | that.$store.commit('setToken', res.data.token) |
| | | getUserInfo().then(ress => { |
| | | that.$store.commit('setDriverInfo', ress.data) |
| | | }) |
| | | } |
| | | this.driverLogin(flag) |
| | | } else if (source == 2) { |
| | | if (res.data.token) { |
| | | that.$store.commit('setToken', res.data.token) |
| | | getUserInfo().then(ress => { |
| | | that.$store.commit('setUserInfo', ress.data) |
| | | }) |
| | | } |
| | | this.staffLogin(flag) |
| | | } else { |
| | | this.jump('/pages/index/index') |
| | | }
|
| | | }
|
| | | })
|
| | | }
|