Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common-templete
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
汤强勇
common-templete
Commits
41eb38d7
Commit
41eb38d7
authored
Nov 14, 2018
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:indexpath
parent
c0eceec1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
14 deletions
+22
-14
package-lock.json
package-lock.json
+0
-0
index.vue
src/components/Sidebar/index.vue
+2
-6
index1.vue
src/components/Sidebar/index1.vue
+7
-7
main.js
src/main.js
+12
-0
index.js
src/router/index.js
+0
-1
api.js
src/tool/api.js
+1
-0
No files found.
package-lock.json
View file @
41eb38d7
This diff is collapsed.
Click to expand it.
src/components/Sidebar/index.vue
View file @
41eb38d7
...
@@ -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
()
...
...
src/components/Sidebar/index1.vue
View file @
41eb38d7
...
@@ -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
)
...
...
src/main.js
View file @
41eb38d7
...
@@ -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
...
...
src/router/index.js
View file @
41eb38d7
...
@@ -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'
),
},
},
],
],
...
...
src/tool/api.js
View file @
41eb38d7
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'
,
// 获取图文推送列表
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment