Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qahome-diamond
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
QA
qahome-diamond
Commits
b7af5f74
Commit
b7af5f74
authored
Feb 21, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导航页面列表
parent
d31bcb6b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
84 additions
and
3 deletions
+84
-3
dev.env.js
config/dev.env.js
+1
-1
prod.env.js
config/prod.env.js
+1
-1
indexurl.js
src/api/indexurl.js
+8
-0
zh.js
src/lang/zh.js
+3
-0
index.js
src/router/index.js
+13
-0
request.js
src/utils/request.js
+1
-1
index.vue
src/views/index/index.vue
+57
-0
No files found.
config/dev.env.js
View file @
b7af5f74
module
.
exports
=
{
NODE_ENV
:
'
"development"
'
,
ENV_CONFIG
:
'
"dev"
'
,
BASE_API
:
'
"https://api-dev
"
'
QA_API
:
'
"http://172.30.220.22:3003
"
'
}
config/prod.env.js
View file @
b7af5f74
module
.
exports
=
{
NODE_ENV
:
'
"production"
'
,
ENV_CONFIG
:
'
"prod"
'
,
BASE_API
:
'
"https://api-prod
"
'
QA_API
:
'
"http://172.30.220.22:3003
"
'
}
src/api/indexurl.js
0 → 100644
View file @
b7af5f74
import
request
from
'
@/utils/request
'
export
function
getIndexUrl
()
{
return
request
({
url
:
'
/indexurl/get_index_url
'
,
method
:
'
get
'
})
}
src/lang/zh.js
View file @
b7af5f74
export
default
{
route
:
{
indexList
:
'
导航页面列表
'
,
runEnv
:
'
运行中环境
'
,
dashboard
:
'
首页
'
,
introduction
:
'
简述
'
,
documentation
:
'
文档
'
,
...
...
src/router/index.js
View file @
b7af5f74
...
...
@@ -77,6 +77,19 @@ export const constantRouterMap = [
}
]
},
{
path
:
''
,
component
:
Layout
,
redirect
:
'
indexList
'
,
children
:
[
{
path
:
'
indexList
'
,
component
:
()
=>
import
(
'
@/views/index/index
'
),
name
:
'
indexList
'
,
meta
:
{
title
:
'
indexList
'
,
icon
:
'
dashboard
'
,
noCache
:
true
,
affix
:
true
}
}
]
},
{
path
:
'
/documentation
'
,
component
:
Layout
,
...
...
src/utils/request.js
View file @
b7af5f74
...
...
@@ -5,7 +5,7 @@ import { getToken } from '@/utils/auth'
// create an axios instance
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
BASE_API
,
// api 的 base_url
baseURL
:
process
.
env
.
QA_API
,
timeout
:
5000
// request timeout
})
...
...
src/views/index/index.vue
0 → 100644
View file @
b7af5f74
<
template
>
<div
class=
"mixin-components-container"
>
<el-row
v-for=
"item in indexList"
:value=
"item.name"
:key=
"item.name"
style=
"margin-bottom:5px;"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
item
.
name
}}
</span>
</div>
<div
style=
"margin-bottom:30px;"
>
<el-col
v-for=
"data in item.data"
:key=
"data.remark"
:span=
"5"
class=
"text-center"
style=
"margin-bottom:10px;"
>
<Button
:class=
"`pan-btn $
{item.color}-btn`" style="padding:10px;" @click="openNewWindow(data.url)">
{{
data
.
remark
}}
</Button>
</el-col>
</div>
</el-card>
</el-row>
</div>
</
template
>
<
script
>
import
{
getIndexUrl
}
from
'
@/api/indexurl
'
export
default
{
data
()
{
return
{
indexList
:
[],
color
:
[
'
blue
'
,
'
light-blue
'
,
'
pink
'
,
'
green
'
,
'
tiffany
'
,
'
yellow
'
]
}
},
created
()
{
getIndexUrl
().
then
(
res
=>
{
this
.
indexList
=
res
.
data
.
data
for
(
const
i
in
this
.
indexList
)
{
this
.
indexList
[
i
].
color
=
this
.
color
[
i
]
}
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
methods
:
{
openNewWindow
(
l
)
{
l
=
l
.
indexOf
(
'
http
'
)
?
'
http://
'
+
l
:
l
window
.
open
(
l
)
}
}
}
</
script
>
<
style
scoped
>
.mixin-components-container
{
background-color
:
#f0f2f5
;
padding
:
30px
;
min-height
:
calc
(
100vh
-
84px
);
}
.component-item
{
min-height
:
100px
;
}
</
style
>
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