fix: 修改从不同入口进入排行榜查询数据不一致问题

This commit is contained in:
mengxiaolong
2021-02-19 09:56:21 +08:00
parent a39719fa2e
commit 14a421b08a
3 changed files with 17 additions and 13 deletions

View File

@@ -29,9 +29,6 @@ export default {
},
singleScore() {
return this.$route.query.single
},
agentCode() {
return this.$route.query.agentCode
}
},
created() {
@@ -64,9 +61,9 @@ export default {
flag: 'h5',
extra: {
forbidSwipeBack: '1',
url: location.origin + `/#/eqiVisit/scoreRanking?agentCode=${this.agentCode}`
url: location.origin + `/#/eqiVisit/scoreRanking`
},
routerInfo: { path: `/eqiVisit/scoreRanking?agentCode=${this.agentCode}` }
routerInfo: { path: `/eqiVisit/scoreRanking` }
})
},
accompanyAgain() {

View File

@@ -43,6 +43,8 @@
import { NoticeBar } from 'vant'
import empty from '@/assets/images/empty.png'
import { getAccompanyRank } from '@/api/ebiz/eqiVisit/eqiVisit'
import { getAgentInfo } from '@/api/ebiz/my/my'
export default {
components: {
[NoticeBar.name]: NoticeBar
@@ -54,7 +56,8 @@ export default {
inRanking: false,
isLoading: false,
theads: ['排名', '姓名', '所在机构', '职级', '积分'],
ranking: []
ranking: [],
agentCode: ''
}
},
computed: {
@@ -64,13 +67,17 @@ export default {
} else {
return '温馨提示:当前暂无最新排名,赶紧去陪访吧!'
}
},
agentCode() {
return this.$route.query.agentCode
}
},
created() {
this.queryRanking()
async created() {
let res = await getAgentInfo({})
if (res.result === '0') {
console.dir(res)
this.agentCode = res.jobNo
} else {
this.$toast(res.resultMessage)
}
await this.queryRanking()
},
methods: {
async queryRanking() {

View File

@@ -279,9 +279,9 @@ export default {
flag: 'h5',
extra: {
forbidSwipeBack: '1',
url: location.origin + `/#/eqiVisit/registerResult?single=${rewardCount}&total=${allRewardCount}&agentCode=${this.agentInfo.jobNo}`
url: location.origin + `/#/eqiVisit/registerResult?single=${rewardCount}&total=${allRewardCount}`
},
routerInfo: { path: `/eqiVisit/registerResult?single=${rewardCount}&total=${allRewardCount}&agentCode=${this.agentInfo.jobNo}` }
routerInfo: { path: `/eqiVisit/registerResult?single=${rewardCount}&total=${allRewardCount}` }
})
} else {
this.$toast(res.resultMessage)