【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

@@ -3,8 +3,9 @@
<!-- <div class="nav-item"> -->
<van-cell is-link class="relative" @click="rout(config)">
<template slot="title">
<img class="t-cell-icon" :src="config.src" alt="config" />
<span class="custom-title">{{ config.title }}</span>
<van-icon v-if="config.icon" class="t-cell-icon" size="6.4vw" :name="config.icon" />
<img v-else class="t-cell-icon" :src="config.src" alt="config" />
<span class="custom-title"> {{ config.title }}</span>
</template>
</van-cell>
<!-- </div> -->

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)
}
}
}
},