优化
This commit is contained in:
parent
f2bbc59f8e
commit
a9677fb0fc
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 = {
|
||||
|
||||
@ -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
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user