优化
This commit is contained in:
parent
c93148bc4d
commit
164daf9bf3
@ -46,8 +46,9 @@ export default {
|
|||||||
// await this.handleDingtalkLogin()
|
// await this.handleDingtalkLogin()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
async mounted () {
|
||||||
this.GET_DEPLIST()
|
const a = await this.GET_DEPLIST()
|
||||||
|
console.log('a: ', a)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onCancel () {
|
onCancel () {
|
||||||
|
|||||||
@ -37,13 +37,10 @@ const user = {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
GET_DEPLIST: ({ commit }) => {
|
GET_DEPLIST: async ({ commit }) => {
|
||||||
getDepList({type: 1}).then(response => {
|
let data = getDepList({type: 1})
|
||||||
const data = response.code === 200 ? response.data : []
|
commit('SET_DEPLIST', data.code === 200 ? data.data : [])
|
||||||
commit('SET_DEPLIST', data)
|
return data
|
||||||
}).catch(error => {
|
|
||||||
console.log(error)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ function handleGetDingtalkCode () {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
console.log('dd: ', dd)
|
console.log('dd---: ', dd)
|
||||||
if (!store.getters.userInfo.userNo && !dd.other) {
|
if (!store.getters.userInfo.userNo && !dd.other) {
|
||||||
let res = await handleGetDingtalkCode()
|
let res = await handleGetDingtalkCode()
|
||||||
console.log('res: ', res)
|
console.log('res: ', res)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user