Commit e5ed37e2 by 王志慧

commit 解决sessionId过期问题

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