This commit is contained in:
熊成强 2020-11-06 18:00:45 +08:00
parent 744f6e5bc4
commit 036a775272

View File

@ -15,7 +15,9 @@ export default {
active: true, active: true,
fullPage: true, fullPage: true,
dingCode: '', dingCode: '',
dataForm: {} dataForm: {
verify: ''
}
} }
}, },
components: { components: {
@ -59,7 +61,7 @@ export default {
// //
async handleDingtalkLogin (val = this.dingCode) { async handleDingtalkLogin (val = this.dingCode) {
const res = await apiDingtalkLogin(val) const res = await apiDingtalkLogin(val)
console.log('res: ', res) console.log('钉钉免登录res: ', res)
if (res && res.code === 200) { if (res && res.code === 200) {
this.$cookies.set('token', res.token) this.$cookies.set('token', res.token)
await this.handleInfo() await this.handleInfo()
@ -74,6 +76,7 @@ export default {
// //
async handleInfo () { async handleInfo () {
let res = await apiUserInfo() let res = await apiUserInfo()
console.log('获取用户信息res: ', res)
if (res.code === 200) { if (res.code === 200) {
this.SET_USER_INFO(res.user) this.SET_USER_INFO(res.user)
} }