Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
ka-manager-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QG
ka-manager-ui
Commits
fa8cd988
Commit
fa8cd988
authored
Jul 29, 2020
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menu
parent
b6cc16f4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
20 deletions
+28
-20
menu.js
src/config/menu.js
+25
-2
routes.js
src/config/routes.js
+1
-1
main.js
src/main.js
+0
-3
index.vue
src/modules/channels/index.vue
+0
-12
index.vue
src/modules/metabase/index.vue
+0
-0
index.js
src/store/index.js
+1
-1
login.js
src/store/modules/login.js
+1
-1
No files found.
src/config/menu.js
View file @
fa8cd988
import
request
from
'
@/utils/request
'
import
axios
from
'
axios
'
/**
/**
* Created by suntao on 2020/1/24.
* Created by suntao on 2020/1/24.
*/
*/
// console.log("b")
//
// async function getMenu() {
// console.log("rep 1")
// await request('kam/menu').then(rep => {
// console.log("rep " + rep.code)
// if(rep.code === 200000){
// console.log("rep")
// return rep.data
// }else{
// console.log("rep else")
// return []
// }
// })
// console.log("rep 2")
// }
//
// let data = getMenu()
//
// console.log("end")
export
default
[
export
default
[
{
{
name
:
'
菜单
'
,
name
:
'
菜单
'
,
items
:
[
items
:
[
{
{
name
:
'
KA渠道信息配置
'
,
name
:
'
KA渠道信息配置
'
,
path
:
'
/home/channels
'
,
path
:
'
/home/channels
'
,
...
@@ -16,7 +39,7 @@ export default [
...
@@ -16,7 +39,7 @@ export default [
icon
:
'
nested
'
icon
:
'
nested
'
},
{
},
{
name
:
'
统计视图
'
,
name
:
'
统计视图
'
,
path
:
'
/home/m
ate
base
'
,
path
:
'
/home/m
eta
base
'
,
icon
:
'
eye-open
'
icon
:
'
eye-open
'
},
{
},
{
name
:
'
统计视图2
'
,
name
:
'
统计视图2
'
,
...
...
src/config/routes.js
View file @
fa8cd988
...
@@ -35,7 +35,7 @@ export default [
...
@@ -35,7 +35,7 @@ export default [
{
{
path
:
'
matebase
'
,
path
:
'
matebase
'
,
meta
:
{
auth
:
true
},
meta
:
{
auth
:
true
},
component
:
resolve
=>
require
([
'
../modules/m
ate
base/
'
],
resolve
)
component
:
resolve
=>
require
([
'
../modules/m
eta
base/
'
],
resolve
)
},
},
{
{
path
:
'
*
'
,
path
:
'
*
'
,
...
...
src/main.js
View file @
fa8cd988
...
@@ -24,9 +24,6 @@ router.beforeEach(({meta, path}, from, next) => {
...
@@ -24,9 +24,6 @@ router.beforeEach(({meta, path}, from, next) => {
let
{
auth
=
true
}
=
meta
let
{
auth
=
true
}
=
meta
let
isLogin
=
Boolean
(
store
.
state
.
login
.
tokens
!=
''
)
//true用户已登录, false用户未登录
let
isLogin
=
Boolean
(
store
.
state
.
login
.
tokens
!=
''
)
//true用户已登录, false用户未登录
console
.
log
(
routes
)
if
(
auth
&&
!
isLogin
&&
path
!==
'
/login
'
)
{
if
(
auth
&&
!
isLogin
&&
path
!==
'
/login
'
)
{
return
next
({
path
:
'
/login
'
})
return
next
({
path
:
'
/login
'
})
}
}
...
...
src/modules/channels/index.vue
View file @
fa8cd988
<
style
>
<
style
>
@import
"../../css/vars.css"
;
/* 引入预定义变量 */
@import
"../../css/vars.css"
;
/* 引入预定义变量 */
.post-css-test
{
transform
:
rotateY
(
360deg
);
box-shadow
:
0
0
3px
5px
rgba
(
222
,
222
,
222
,
.3
);
display
:
flex
;
color
:
var
(
--color-main
);
}
.navigation-page
{
font-size
:
14px
;
}
.block
—
bodl
{
.block
—
bodl
{
border
:
1px
solid
#f1faf7
;
border
:
1px
solid
#f1faf7
;
border-radius
:
2px
;
border-radius
:
2px
;
...
@@ -20,7 +9,6 @@
...
@@ -20,7 +9,6 @@
width
:
30%
;
width
:
30%
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div>
<div>
...
...
src/modules/m
ate
base/index.vue
→
src/modules/m
eta
base/index.vue
View file @
fa8cd988
File moved
src/store/index.js
View file @
fa8cd988
...
@@ -18,7 +18,7 @@ Vue.use(Vuex)
...
@@ -18,7 +18,7 @@ Vue.use(Vuex)
const
debug
=
process
.
env
.
NODE_ENV
!==
'
production
'
const
debug
=
process
.
env
.
NODE_ENV
!==
'
production
'
let
persistedState
=
{
let
persistedState
=
{
paths
:
[
'
login.tokens
'
,
"
login.username
"
],
paths
:
[
'
login.tokens
'
,
'
login.username
'
],
getState
:
(
key
)
=>
Cookies
.
getJSON
(
key
),
getState
:
(
key
)
=>
Cookies
.
getJSON
(
key
),
setState
:
(
key
,
state
)
=>
Cookies
.
set
(
key
,
state
,
{
expires
:
1
})
//expires->cookie过期时间,单位为天
setState
:
(
key
,
state
)
=>
Cookies
.
set
(
key
,
state
,
{
expires
:
1
})
//expires->cookie过期时间,单位为天
}
}
...
...
src/store/modules/login.js
View file @
fa8cd988
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
import
{
LOGIN_IN
,
LOGIN_OUT
,
USER_INFO
}
from
'
../mutation-types
'
import
{
LOGIN_IN
,
LOGIN_OUT
,
USER_INFO
}
from
'
../mutation-types
'
import
tokens
from
'
@/apis/tokens
'
import
tokens
from
'
@/apis/tokens
'
import
{
getUserLoginInfo
}
from
'
@/apis/user
'
import
{
getUserLoginInfo
}
from
'
@/apis/user
'
// import {getToken, setToken, removeToken} from '@/utils/auth'
const
login
=
{
const
login
=
{
state
:
{
state
:
{
...
...
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