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
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
119 additions
and
97 deletions
+119
-97
package-lock.json
package-lock.json
+97
-83
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
...
@@ -4635,21 +4635,23 @@
...
@@ -4635,21 +4635,23 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"delegates"
:
"
^
1.0.0"
,
"delegates"
:
"1.0.0"
,
"readable-stream"
:
"
^2.0
.6"
"readable-stream"
:
"
2.3
.6"
}
}
},
},
"balanced-match"
:
{
"balanced-match"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"brace-expansion"
:
{
"brace-expansion"
:
{
"version"
:
"1.1.11"
,
"version"
:
"1.1.11"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"balanced-match"
:
"
^
1.0.0"
,
"balanced-match"
:
"1.0.0"
,
"concat-map"
:
"0.0.1"
"concat-map"
:
"0.0.1"
}
}
},
},
...
@@ -4662,17 +4664,20 @@
...
@@ -4662,17 +4664,20 @@
"code-point-at"
:
{
"code-point-at"
:
{
"version"
:
"1.1.0"
,
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"concat-map"
:
{
"concat-map"
:
{
"version"
:
"0.0.1"
,
"version"
:
"0.0.1"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"console-control-strings"
:
{
"console-control-strings"
:
{
"version"
:
"1.1.0"
,
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"core-util-is"
:
{
"core-util-is"
:
{
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
...
@@ -4713,7 +4718,7 @@
...
@@ -4713,7 +4718,7 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"minipass"
:
"
^2.2.1
"
"minipass"
:
"
2.2.4
"
}
}
},
},
"fs.realpath"
:
{
"fs.realpath"
:
{
...
@@ -4728,14 +4733,14 @@
...
@@ -4728,14 +4733,14 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"aproba"
:
"
^1.0.3
"
,
"aproba"
:
"
1.2.0
"
,
"console-control-strings"
:
"
^1.0
.0"
,
"console-control-strings"
:
"
1.1
.0"
,
"has-unicode"
:
"
^2.0.0
"
,
"has-unicode"
:
"
2.0.1
"
,
"object-assign"
:
"
^4.1.0
"
,
"object-assign"
:
"
4.1.1
"
,
"signal-exit"
:
"
^3.0.0
"
,
"signal-exit"
:
"
3.0.2
"
,
"string-width"
:
"
^1.0.1
"
,
"string-width"
:
"
1.0.2
"
,
"strip-ansi"
:
"
^
3.0.1"
,
"strip-ansi"
:
"3.0.1"
,
"wide-align"
:
"
^1.1.0
"
"wide-align"
:
"
1.1.2
"
}
}
},
},
"glob"
:
{
"glob"
:
{
...
@@ -4744,12 +4749,12 @@
...
@@ -4744,12 +4749,12 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"fs.realpath"
:
"
^
1.0.0"
,
"fs.realpath"
:
"1.0.0"
,
"inflight"
:
"
^1.0.4
"
,
"inflight"
:
"
1.0.6
"
,
"inherits"
:
"2"
,
"inherits"
:
"2
.0.3
"
,
"minimatch"
:
"
^
3.0.4"
,
"minimatch"
:
"3.0.4"
,
"once"
:
"
^1.3
.0"
,
"once"
:
"
1.4
.0"
,
"path-is-absolute"
:
"
^1.0.0
"
"path-is-absolute"
:
"
1.0.1
"
}
}
},
},
"has-unicode"
:
{
"has-unicode"
:
{
...
@@ -4764,7 +4769,7 @@
...
@@ -4764,7 +4769,7 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"safer-buffer"
:
"
^2.1.0
"
"safer-buffer"
:
"
2.1.2
"
}
}
},
},
"ignore-walk"
:
{
"ignore-walk"
:
{
...
@@ -4773,7 +4778,7 @@
...
@@ -4773,7 +4778,7 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"minimatch"
:
"
^
3.0.4"
"minimatch"
:
"3.0.4"
}
}
},
},
"inflight"
:
{
"inflight"
:
{
...
@@ -4782,14 +4787,15 @@
...
@@ -4782,14 +4787,15 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"once"
:
"
^1.3
.0"
,
"once"
:
"
1.4
.0"
,
"wrappy"
:
"1"
"wrappy"
:
"1
.0.2
"
}
}
},
},
"inherits"
:
{
"inherits"
:
{
"version"
:
"2.0.3"
,
"version"
:
"2.0.3"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"ini"
:
{
"ini"
:
{
"version"
:
"1.3.5"
,
"version"
:
"1.3.5"
,
...
@@ -4801,8 +4807,9 @@
...
@@ -4801,8 +4807,9 @@
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"number-is-nan"
:
"
^1.0.0
"
"number-is-nan"
:
"
1.0.1
"
}
}
},
},
"isarray"
:
{
"isarray"
:
{
...
@@ -4815,22 +4822,25 @@
...
@@ -4815,22 +4822,25 @@
"version"
:
"3.0.4"
,
"version"
:
"3.0.4"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"brace-expansion"
:
"
^1.1.7
"
"brace-expansion"
:
"
1.1.11
"
}
}
},
},
"minimist"
:
{
"minimist"
:
{
"version"
:
"0.0.8"
,
"version"
:
"0.0.8"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"minipass"
:
{
"minipass"
:
{
"version"
:
"2.2.4"
,
"version"
:
"2.2.4"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"safe-buffer"
:
"
^
5.1.1"
,
"safe-buffer"
:
"5.1.1"
,
"yallist"
:
"
^3.0.0
"
"yallist"
:
"
3.0.2
"
}
}
},
},
"minizlib"
:
{
"minizlib"
:
{
...
@@ -4839,13 +4849,14 @@
...
@@ -4839,13 +4849,14 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"minipass"
:
"
^2.2.1
"
"minipass"
:
"
2.2.4
"
}
}
},
},
"mkdirp"
:
{
"mkdirp"
:
{
"version"
:
"0.5.1"
,
"version"
:
"0.5.1"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"minimist"
:
"0.0.8"
"minimist"
:
"0.0.8"
}
}
...
@@ -4862,9 +4873,9 @@
...
@@ -4862,9 +4873,9 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"debug"
:
"
^2.1.2
"
,
"debug"
:
"
2.6.9
"
,
"iconv-lite"
:
"
^0.4.4
"
,
"iconv-lite"
:
"
0.4.21
"
,
"sax"
:
"
^
1.2.4"
"sax"
:
"1.2.4"
}
}
},
},
"node-pre-gyp"
:
{
"node-pre-gyp"
:
{
...
@@ -4873,16 +4884,16 @@
...
@@ -4873,16 +4884,16 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"detect-libc"
:
"
^1.0.2
"
,
"detect-libc"
:
"
1.0.3
"
,
"mkdirp"
:
"
^
0.5.1"
,
"mkdirp"
:
"0.5.1"
,
"needle"
:
"
^
2.2.0"
,
"needle"
:
"2.2.0"
,
"nopt"
:
"
^
4.0.1"
,
"nopt"
:
"4.0.1"
,
"npm-packlist"
:
"
^1.1.6
"
,
"npm-packlist"
:
"
1.1.10
"
,
"npmlog"
:
"
^4.0
.2"
,
"npmlog"
:
"
4.1
.2"
,
"rc"
:
"
^1.1
.7"
,
"rc"
:
"
1.2
.7"
,
"rimraf"
:
"
^2.6.1
"
,
"rimraf"
:
"
2.6.2
"
,
"semver"
:
"
^5.3
.0"
,
"semver"
:
"
5.5
.0"
,
"tar"
:
"
^4
"
"tar"
:
"
4.4.1
"
}
}
},
},
"nopt"
:
{
"nopt"
:
{
...
@@ -4891,8 +4902,8 @@
...
@@ -4891,8 +4902,8 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"abbrev"
:
"1"
,
"abbrev"
:
"1
.1.1
"
,
"osenv"
:
"
^0.1.4
"
"osenv"
:
"
0.1.5
"
}
}
},
},
"npm-bundled"
:
{
"npm-bundled"
:
{
...
@@ -4907,8 +4918,8 @@
...
@@ -4907,8 +4918,8 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"ignore-walk"
:
"
^
3.0.1"
,
"ignore-walk"
:
"3.0.1"
,
"npm-bundled"
:
"
^1.0.1
"
"npm-bundled"
:
"
1.0.3
"
}
}
},
},
"npmlog"
:
{
"npmlog"
:
{
...
@@ -4917,16 +4928,17 @@
...
@@ -4917,16 +4928,17 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"are-we-there-yet"
:
"
~1.1.2
"
,
"are-we-there-yet"
:
"
1.1.4
"
,
"console-control-strings"
:
"
~
1.1.0"
,
"console-control-strings"
:
"1.1.0"
,
"gauge"
:
"
~2.7.3
"
,
"gauge"
:
"
2.7.4
"
,
"set-blocking"
:
"
~
2.0.0"
"set-blocking"
:
"2.0.0"
}
}
},
},
"number-is-nan"
:
{
"number-is-nan"
:
{
"version"
:
"1.0.1"
,
"version"
:
"1.0.1"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"object-assign"
:
{
"object-assign"
:
{
"version"
:
"4.1.1"
,
"version"
:
"4.1.1"
,
...
@@ -4938,8 +4950,9 @@
...
@@ -4938,8 +4950,9 @@
"version"
:
"1.4.0"
,
"version"
:
"1.4.0"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"wrappy"
:
"1"
"wrappy"
:
"1
.0.2
"
}
}
},
},
"os-homedir"
:
{
"os-homedir"
:
{
...
@@ -4960,8 +4973,8 @@
...
@@ -4960,8 +4973,8 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"os-homedir"
:
"
^1.0.0
"
,
"os-homedir"
:
"
1.0.2
"
,
"os-tmpdir"
:
"
^1.0.0
"
"os-tmpdir"
:
"
1.0.2
"
}
}
},
},
"path-is-absolute"
:
{
"path-is-absolute"
:
{
...
@@ -4982,10 +4995,10 @@
...
@@ -4982,10 +4995,10 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"deep-extend"
:
"
^
0.5.1"
,
"deep-extend"
:
"0.5.1"
,
"ini"
:
"
~1.3.0
"
,
"ini"
:
"
1.3.5
"
,
"minimist"
:
"
^
1.2.0"
,
"minimist"
:
"1.2.0"
,
"strip-json-comments"
:
"
~
2.0.1"
"strip-json-comments"
:
"2.0.1"
},
},
"dependencies"
:
{
"dependencies"
:
{
"minimist"
:
{
"minimist"
:
{
...
@@ -5002,13 +5015,13 @@
...
@@ -5002,13 +5015,13 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"core-util-is"
:
"
~1.0.0
"
,
"core-util-is"
:
"
1.0.2
"
,
"inherits"
:
"
~
2.0.3"
,
"inherits"
:
"2.0.3"
,
"isarray"
:
"
~
1.0.0"
,
"isarray"
:
"1.0.0"
,
"process-nextick-args"
:
"
~
2.0.0"
,
"process-nextick-args"
:
"2.0.0"
,
"safe-buffer"
:
"
~
5.1.1"
,
"safe-buffer"
:
"5.1.1"
,
"string_decoder"
:
"
~
1.1.1"
,
"string_decoder"
:
"1.1.1"
,
"util-deprecate"
:
"
~1.0.1
"
"util-deprecate"
:
"
1.0.2
"
}
}
},
},
"rimraf"
:
{
"rimraf"
:
{
...
@@ -5017,7 +5030,7 @@
...
@@ -5017,7 +5030,7 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"glob"
:
"
^7.0.5
"
"glob"
:
"
7.1.2
"
}
}
},
},
"safe-buffer"
:
{
"safe-buffer"
:
{
...
@@ -5059,10 +5072,11 @@
...
@@ -5059,10 +5072,11 @@
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"code-point-at"
:
"
^1.0
.0"
,
"code-point-at"
:
"
1.1
.0"
,
"is-fullwidth-code-point"
:
"
^
1.0.0"
,
"is-fullwidth-code-point"
:
"1.0.0"
,
"strip-ansi"
:
"
^3.0.0
"
"strip-ansi"
:
"
3.0.1
"
}
}
},
},
"string_decoder"
:
{
"string_decoder"
:
{
...
@@ -5071,7 +5085,7 @@
...
@@ -5071,7 +5085,7 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"safe-buffer"
:
"
~5.1.0
"
"safe-buffer"
:
"
5.1.1
"
}
}
},
},
"strip-ansi"
:
{
"strip-ansi"
:
{
...
@@ -5079,7 +5093,7 @@
...
@@ -5079,7 +5093,7 @@
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"ansi-regex"
:
"
^2.0.0
"
"ansi-regex"
:
"
2.1.1
"
}
}
},
},
"strip-json-comments"
:
{
"strip-json-comments"
:
{
...
@@ -5094,13 +5108,13 @@
...
@@ -5094,13 +5108,13 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"chownr"
:
"
^
1.0.1"
,
"chownr"
:
"1.0.1"
,
"fs-minipass"
:
"
^
1.2.5"
,
"fs-minipass"
:
"1.2.5"
,
"minipass"
:
"
^
2.2.4"
,
"minipass"
:
"2.2.4"
,
"minizlib"
:
"
^
1.1.0"
,
"minizlib"
:
"1.1.0"
,
"mkdirp"
:
"
^0.5.0
"
,
"mkdirp"
:
"
0.5.1
"
,
"safe-buffer"
:
"
^
5.1.1"
,
"safe-buffer"
:
"5.1.1"
,
"yallist"
:
"
^
3.0.2"
"yallist"
:
"3.0.2"
}
}
},
},
"util-deprecate"
:
{
"util-deprecate"
:
{
...
@@ -5115,7 +5129,7 @@
...
@@ -5115,7 +5129,7 @@
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"string-width"
:
"
^
1.0.2"
"string-width"
:
"1.0.2"
}
}
},
},
"wrappy"
:
{
"wrappy"
:
{
...
...
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