【new】 完成人力发展-个人中心模块接口对接

This commit is contained in:
tian.guangyuan
2020-03-17 13:20:38 +08:00
parent 22927aed46
commit 5b4e332392
7 changed files with 112 additions and 54 deletions

View File

@@ -25,10 +25,18 @@ export default {
methods: {
async getInfo() {
// 获取代理人信息
const res = await getAgentInfo({})
console.log(res)
if (res.result == 0) {
this.userInfo = res
let userInfo = localStorage.getItem('userInfo')
if (userInfo) {
this.userInfo = JSON.parse(userInfo)
} else {
const res = await getAgentInfo({})
if (res.result == 0) {
this.userInfo = res
localStorage.setItem('agentCode', res.jobNo)
localStorage.setItem('userInfo', JSON.stringify(res))
} else {
this.$toast(res.resultMessage)
}
}
}
},