This commit is contained in:
熊成强 2020-11-20 14:23:07 +08:00
parent c93148bc4d
commit 164daf9bf3
3 changed files with 8 additions and 10 deletions

View File

@ -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 () {

View File

@ -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
}
}
}

View File

@ -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)