Commit 41eb38d7 by 高淑倩

fix:indexpath

parent c0eceec1
...@@ -96,8 +96,7 @@ export default { ...@@ -96,8 +96,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (this.currentMenus) { if (this.currentMenus) {
this.handleOpen() // this.handleOpen()
// console.log('---', this.currentMenus)
} }
}) })
return currentMenus return currentMenus
...@@ -109,8 +108,7 @@ export default { ...@@ -109,8 +108,7 @@ export default {
handleOpen() { handleOpen() {
const menus = this.$refs.menu const menus = this.$refs.menu
const openIndex = this.currentPath.length === 3 ? this.currentPath[1] : 0 const openIndex = this.currentPath.length === 3 ? this.currentPath[1] : 0
console.log('openIndex', openIndex) // menus.open(openIndex)
menus.open(openIndex)
}, },
// calcRouter(menus) { // calcRouter(menus) {
// const currentRoute = location.href // const currentRoute = location.href
...@@ -120,7 +118,6 @@ export default { ...@@ -120,7 +118,6 @@ export default {
// }, // },
// 隐藏边侧栏,边侧栏最小化 // 隐藏边侧栏,边侧栏最小化
handerNoSidebar() { handerNoSidebar() {
console.log('handerNoSidebar')
this.setSidebarUnfold(false) this.setSidebarUnfold(false)
}, },
/** /**
...@@ -147,7 +144,6 @@ export default { ...@@ -147,7 +144,6 @@ export default {
* @param args * @param args
**/ **/
selectItemMenu(item) { selectItemMenu(item) {
console.log(item)
const currentMenusIndex = this.currentMenusIndex const currentMenusIndex = this.currentMenusIndex
if (currentMenusIndex > -1) { if (currentMenusIndex > -1) {
const [idx1, idx2] = item.split('-').reverse() const [idx1, idx2] = item.split('-').reverse()
......
...@@ -107,12 +107,12 @@ export default { ...@@ -107,12 +107,12 @@ export default {
const openIndex = this.currentPath.length === 3 ? this.currentPath[1] : 0 const openIndex = this.currentPath.length === 3 ? this.currentPath[1] : 0
menus.open(openIndex) menus.open(openIndex)
}, },
calcRouter(menus) { // calcRouter(menus) {
const currentRoute = location.href // const currentRoute = location.href
const indexPath = calcIndexPathByCurrentRouter(menus, currentRoute) // const indexPath = calcIndexPathByCurrentRouter(menus, currentRoute)
this.selectIndexPath = indexPath // this.selectIndexPath = indexPath
console.log(this.selectIndexPath) // console.log(this.selectIndexPath)
}, // },
// 隐藏边侧栏,边侧栏最小化 // 隐藏边侧栏,边侧栏最小化
handerNoSidebar() { handerNoSidebar() {
console.log('handerNoSidebar') console.log('handerNoSidebar')
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
const currentMenusIndex = this.currentMenusIndex const currentMenusIndex = this.currentMenusIndex
if (currentMenusIndex > -1) { if (currentMenusIndex > -1) {
const [idx1, idx2] = item.split('-').reverse() const [idx1, idx2] = item.split('-').reverse()
const historyItemName = this.menus[currentMenusIndex].children[idx1].children[idx2].name const historyItemName = this.menus && this.menus[currentMenusIndex].children[idx1].children[idx2].name
const time = this.$moment().format('YYYY-MM-DD hh:mm:ss') const time = this.$moment().format('YYYY-MM-DD hh:mm:ss')
const storeId = this.project.store_id const storeId = this.project.store_id
const menuHistoryJson = localStorage.getItem('menuHistoryJson' + storeId) const menuHistoryJson = localStorage.getItem('menuHistoryJson' + storeId)
......
...@@ -52,6 +52,18 @@ Axios.interceptors.request.use( ...@@ -52,6 +52,18 @@ Axios.interceptors.request.use(
} }
) )
Axios.interceptors.response.use((response) => {
const data = response.data
// 后台返回 10108 code 表示 session 失效
if (data && data.msgCode === 10108) {
// 这里时根据自己配置的路由返回首页
window.location.href = `http://testcenter.bigaka.net/b/dataCenter/statistics/dataOverview.do`
}
return response
}, (error) => {
return Promise.reject(error)
})
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.axios = Axios Vue.prototype.axios = Axios
......
...@@ -24,7 +24,6 @@ export default new Router({ ...@@ -24,7 +24,6 @@ export default new Router({
{ {
path: 'addmarketing', path: 'addmarketing',
name: 'addmarketing', name: 'addmarketing',
component: () => import(/* webpackChunkName: 'wxlogin' */ '@/pages/addmarketing'), component: () => import(/* webpackChunkName: 'wxlogin' */ '@/pages/addmarketing'),
}, },
], ],
......
export default { export default {
getMenu: 'http://testcenter.bigaka.net/crm/back/menu/getMenu',
// 营销中心 // 营销中心
getMaterialsList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/materials-list', // 获取图文素材列表 getMaterialsList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/materials-list', // 获取图文素材列表
getPushList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/medialist', // 获取图文推送列表 getPushList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/medialist', // 获取图文推送列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment