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