Commit e5ed37e2 by 王志慧

commit 解决sessionId过期问题

1 parent fe936f0d
......@@ -38,7 +38,7 @@ export default {
util.setLocalStorage('dj_scrm_activityId', payload.activityId)
},
['SET_OVERVIEW_COUNT_INFO'](state, payload) {
state.overviewCountInfo = payload.overviewCountInfo
state.overviewCountInfo = payload.overviewCountInfo
}
},
actions: {
......@@ -50,6 +50,10 @@ export default {
if (payload.success) {
payload.success()
}
} else if (res.code == 21) {
if (payload.fail) {
payload.fail()
}
}
})
},
......
......@@ -48,6 +48,7 @@ import pieChart from '../solicit/components/pie.vue'
import barChart from '../solicit/components/bar.vue'
import { solicitApi } from '@/api'
import { mapState, mapActions } from 'vuex'
import { util } from '../../utils'
import { Notify } from 'vant'
export default {
components: {
......@@ -93,6 +94,10 @@ export default {
this.getStaffId({
success: res => {
this.getTaskOverviewData()
},
fail: () => {
this.hideLoading()
this.reLogin()
}
})
}
......@@ -102,6 +107,10 @@ export default {
this.getStaffId({
success: res => {
this.getTaskOverviewData()
},
fail: () => {
this.hideLoading()
this.reLogin()
}
})
}
......@@ -114,8 +123,15 @@ export default {
methods: {
...mapActions({
getStaffId: 'solicit/getStaffId',
findActivityIdByUUID: 'solicit/findActivityIdByUUID'
findActivityIdByUUID: 'solicit/findActivityIdByUUID',
navigation: 'navigation'
}),
//重新登录
reLogin() {
/**登录过期 重新登录 */
util.clearSessionId()
this.navigation()
},
getTaskOverviewData() {
let params = {
activityId: this.activityId,
......@@ -155,7 +171,7 @@ export default {
]
this.chart.centerData = {
text: '达成率',
rate: overviewInfo.followedUpPercent ? (overviewInfo.followedUpPercent * 100) + '%' : 0
rate: overviewInfo.followedUpPercent ? overviewInfo.followedUpPercent * 100 + '%' : 0
}
overviewInfo.customerGroupList.length > 0 &&
overviewInfo.customerGroupList.forEach(item => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!