This commit is contained in:
熊成强 2020-11-09 10:17:20 +08:00
parent f2bbc59f8e
commit a9677fb0fc
3 changed files with 6 additions and 2 deletions

View File

@ -26,6 +26,7 @@ export default {
...mapState(['user'])
},
async created () {
console.log('this', this)
if (!dd.other) {
await this.handleGetDingtalkCode()
await this.handleDingtalkLogin()
@ -77,6 +78,7 @@ export default {
let res = await apiUserInfo()
console.log('获取用户信息res: ', res)
if (res.code === 200) {
console.log('this.SET_USER_INFO: ', this.SET_USER_INFO)
this.SET_USER_INFO(res.user)
}
}

View File

@ -36,8 +36,8 @@ export default {
console.log('this.$router: ', this.$router)
console.log('this.$store: ', this.$store)
// history.go(-1)
this.$router.go(-1)
window.history.back()
// this.$router.go(-1)
},
open () {
const obj = {

View File

@ -7,6 +7,8 @@ const user = {
},
mutations: {
SET_USER_INFO: (state, info) => {
console.log('state: ', state)
console.log('info: ', info)
localStorage.setItem('info', JSON.stringify(info))
state.info = info
},