Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
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
new-sing
admin-base
Commits
4f71768e
Commit
4f71768e
authored
Aug 22, 2018
by
wangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面编写
parent
a39ba6ee
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
473 additions
and
494 deletions
+473
-494
README.md
README.md
+3
-0
index.html
index.html
+1
-1
HelloWorld.vue
src/components/HelloWorld.vue
+0
-113
index.vue
src/components/box/index.vue
+15
-0
index.vue
src/components/class/index.vue
+1
-0
index.vue
src/components/consignment/index.vue
+15
-0
index.vue
src/components/entity/index.vue
+0
-131
list.vue
src/components/entity/list.vue
+0
-116
leftMenu.vue
src/components/framework/leftMenu.vue
+10
-9
tab.vue
src/components/framework/tab.vue
+2
-4
index.vue
src/components/help/index.vue
+2
-3
index.vue
src/components/notice/index.vue
+13
-0
index.vue
src/components/periods/index.vue
+13
-0
index.vue
src/components/shop/index.vue
+13
-0
dialog.vue
src/components/single/dialog.vue
+188
-0
index.vue
src/components/single/index.vue
+105
-0
index.vue
src/components/system/index.vue
+0
-74
index.vue
src/components/weChat/index.vue
+13
-0
index.js
src/router/index.js
+58
-26
api.js
src/service/api.js
+8
-10
menuList.js
src/util/menuList.js
+6
-6
public.less
src/util/public.less
+7
-1
No files found.
README.md
View file @
4f71768e
...
@@ -14,6 +14,9 @@ npm run dev
...
@@ -14,6 +14,9 @@ npm run dev
# build for production with minification
# build for production with minification
npm run build
npm run build
# build for production with minification
npm run build-test
# build for production and view the bundle analyzer report
# build for production and view the bundle analyzer report
npm run build
--report
npm run build
--report
```
```
...
...
index.html
View file @
4f71768e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<link
rel=
"stylesheet"
href=
"http://at.alicdn.com/t/font_746649_
38wf4o8u4cv
.css"
>
<link
rel=
"stylesheet"
href=
"http://at.alicdn.com/t/font_746649_
7dsnjecwkpg
.css"
>
<title>
singsing-new-admin
</title>
<title>
singsing-new-admin
</title>
</head>
</head>
<body>
<body>
...
...
src/components/HelloWorld.vue
deleted
100644 → 0
View file @
a39ba6ee
<
template
>
<div
class=
"hello"
>
<h1>
{{
msg
}}
</h1>
<h2>
Essential Links
</h2>
<ul>
<li>
<a
href=
"https://vuejs.org"
target=
"_blank"
>
Core Docs
</a>
</li>
<li>
<a
href=
"https://forum.vuejs.org"
target=
"_blank"
>
Forum
</a>
</li>
<li>
<a
href=
"https://chat.vuejs.org"
target=
"_blank"
>
Community Chat
</a>
</li>
<li>
<a
href=
"https://twitter.com/vuejs"
target=
"_blank"
>
Twitter
</a>
</li>
<br>
<li>
<a
href=
"http://vuejs-templates.github.io/webpack/"
target=
"_blank"
>
Docs for This Template
</a>
</li>
</ul>
<h2>
Ecosystem
</h2>
<ul>
<li>
<a
href=
"http://router.vuejs.org/"
target=
"_blank"
>
vue-router
</a>
</li>
<li>
<a
href=
"http://vuex.vuejs.org/"
target=
"_blank"
>
vuex
</a>
</li>
<li>
<a
href=
"http://vue-loader.vuejs.org/"
target=
"_blank"
>
vue-loader
</a>
</li>
<li>
<a
href=
"https://github.com/vuejs/awesome-vue"
target=
"_blank"
>
awesome-vue
</a>
</li>
</ul>
</div>
</
template
>
<
script
>
export
default
{
name
:
'HelloWorld'
,
data
()
{
return
{
msg
:
'Welcome to Your Vue.js App'
}
}
}
</
script
>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<
style
scoped
>
h1
,
h2
{
font-weight
:
normal
;
}
ul
{
list-style-type
:
none
;
padding
:
0
;
}
li
{
display
:
inline-block
;
margin
:
0
10px
;
}
a
{
color
:
#42b983
;
}
</
style
>
src/components/box/index.vue
0 → 100644
View file @
4f71768e
<
template
>
<div>
盒子列表
</div>
</
template
>
<
script
>
export
default
{
name
:
"index"
}
</
script
>
<
style
scoped
>
</
style
>
src/components/class/index.vue
View file @
4f71768e
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/components/consignment/index.vue
0 → 100644
View file @
4f71768e
<
template
>
<div>
发货列表
</div>
</
template
>
<
script
>
export
default
{
name
:
"index"
}
</
script
>
<
style
scoped
>
</
style
>
src/components/entity/index.vue
deleted
100644 → 0
View file @
a39ba6ee
<
template
>
<el-container>
<el-aside
width=
"250px"
>
<el-menu
:default-active=
"index"
>
<el-submenu
v-for=
"data in leftList"
:key=
"data.id"
:index=
"data.name"
>
<template
slot=
"title"
>
<span>
{{
data
.
name
}}
(
{{
data
.
children
|
lengthNum
}}
)
</span>
</
template
>
<el-submenu
class=
"list2"
:index=
"item.name"
v-for=
"item in data.children"
:key=
"item.id"
>
<span
slot=
"title"
>
{{item.name}}
</span>
<div
@
click=
"chooseId(i)"
v-for=
"i in item.children"
:key=
"i.name"
>
<el-menu-item
class=
"list3"
:index=
"i.name"
>
{{i.name}}
</el-menu-item>
</div>
</el-submenu>
</el-submenu>
</el-menu>
</el-aside>
<el-main>
<that-list
:id=
"id"
></that-list>
</el-main>
</el-container>
</template>
<
script
>
import
{
getEntityMenuApi
,
sortCategoryApi
}
from
"../../service/api"
;
import
thatList
from
'./list'
export
default
{
data
(){
return
{
leftList
:[],
index
:
''
,
id
:
''
}
},
components
:{
thatList
},
filters
:{
lengthNum
:
function
(
value
)
{
if
(
value
){
return
value
.
length
}
else
{
return
'0'
}
}
},
methods
:{
getList
(){
getEntityMenuApi
(
''
).
then
(
res
=>
{
this
.
leftList
=
res
;
this
.
$store
.
commit
(
'mainCanShow'
)
})
},
upIndex
(
data
,
item
){
let
i
=
item
.
indexOf
(
data
);
if
(
i
>
0
){
let
json
=
{
category_up_id
:
data
.
id
,
category_down_id
:
item
[
i
-
1
].
id
};
sortCategoryApi
(
json
).
then
(
res
=>
{
this
.
getList
()
})
}
},
downIndex
(
data
,
item
){
let
i
=
item
.
indexOf
(
data
);
let
lth
=
item
.
length
-
1
;
if
(
i
<
lth
){
let
json
=
{
category_up_id
:
item
[
i
+
1
].
id
,
category_down_id
:
data
.
id
};
sortCategoryApi
(
json
).
then
(
res
=>
{
this
.
getList
()
})
}
},
editIndex
(
data
){
alert
(
21
)
},
delIndex
(
data
){
alert
(
21
)
},
chooseId
(
data
){
this
.
id
=
data
.
id
console
.
log
(
this
.
id
)
}
},
mounted
(){
this
.
getList
()
}
}
</
script
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.el-container{
height: 100%;
.el-menu{
height: 100%;
.el-submenu{
.btn-block{
margin-left: 10px;
transition: all 1s;
display: none;
i{
color: #aaaaaa;
font-size: 14px;
&:hover{
color: #3a8ee6;
}
}
}
.list2:hover .list2-btn{
display: inline-block;
}
.list3:hover .list3-btn{
display: inline-block;
}
}
}
}
</
style
>
src/components/entity/list.vue
deleted
100644 → 0
View file @
a39ba6ee
<
template
>
<div>
<div
class=
"add-block"
>
<el-button
class=
"add-btn"
>
+新增课时
</el-button>
</div>
<el-card
v-for=
"data in list"
:key=
"data.id"
class=
"box-card"
>
<div
class=
"id"
>
<img
:src=
"data.cover"
>
</div>
<div
class=
"btn"
>
<el-button
type=
""
icon=
"el-icon-arrow-down"
circle
size=
"mini"
@
click=
"downLesson()"
>
</el-button>
<el-button
type=
""
icon=
"el-icon-arrow-up"
circle
size=
"mini"
@
click=
"upLesson()"
>
</el-button>
<el-button
type=
""
icon=
"el-icon-edit"
circle
size=
"mini"
@
click=
"editLesson()"
>
</el-button>
<el-button
type=
""
icon=
"el-icon-delete"
circle
size=
"mini"
@
click=
"delLseeon()"
>
</el-button>
</div>
<div
class=
"name"
>
{{
data
.
title
}}
<el-tag
size=
"mini"
>
level
{{
data
.
min_level
}}
-level
{{
data
.
max_level
}}
</el-tag>
<el-tag
type=
"success"
size=
"mini"
>
{{
data
.
min_age
}}
-
{{
data
.
max_age
}}
岁
</el-tag>
</div>
</el-card>
</div>
</
template
>
<
script
>
import
{
getEntityApi
}
from
"../../service/api"
;
export
default
{
name
:
"list"
,
props
:[
'id'
],
data
(){
return
{
list
:[]
}
},
created
(){
if
(
this
.
id
!==
''
&&
this
.
id
!==
null
)
this
.
getList
()
},
methods
:{
getList
(){
console
.
log
(
this
.
id
);
getEntityApi
(
this
.
id
).
then
(
res
=>
{
this
.
list
=
res
.
list
})
},
delLseeon
(){
},
},
watch
:{
id
(
value
){
if
(
value
!==
''
&&
value
!==
null
)
this
.
getList
()
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.box-card{
margin: 10px 0;
cursor: pointer;
padding: 0;
&:hover{
background: #3a8ee6;
color: white;
}
.id{
margin-right: 20px;
width: 4em;
text-align: center;
float: left;
img{
width: 100%;
}
}
.btn{
float: right;
}
.name{
span{
display: inline-block;
text-align: center;
}
}
}
.add-block{
.clear-both;
.add-btn{
float: right;
}
}
</
style
>
src/components/framework/leftMenu.vue
View file @
4f71768e
...
@@ -10,14 +10,15 @@
...
@@ -10,14 +10,15 @@
class=
"el-menu-vertical-demo"
>
class=
"el-menu-vertical-demo"
>
<div
class=
"menu-btn"
@
click=
"menuType = !menuType"
>
<div
class=
"menu-btn"
@
click=
"menuType = !menuType"
>
<i
v-if=
"!menuType"
class=
"iconfont icon-shouqi"
></i>
<i
v-if=
"!menuType"
class=
"iconfont icon-shouqi"
></i>
<i
v-if=
"menuType"
class=
"iconfont icon-zhankai"
></i>
<i
v-if=
"menuType"
class=
"iconfont icon-zhankai"
></i>
</div>
</div>
<el-submenu
v-for=
"
data in menuList"
:index=
"data.value
"
>
<el-submenu
v-for=
"
(data,index) in menuList"
:index=
"data.value"
:key=
"index
"
>
<template
slot=
"title"
>
<template
slot=
"title"
>
<i
:class=
"'iconfont menu-icon '+data.icon"
></i>
<i
:class=
"'iconfont menu-icon '+data.icon"
></i>
<span>
{{
data
.
value
}}
</span>
<span>
{{
data
.
value
}}
</span>
</
template
>
</
template
>
<el-menu-item
v-for=
"
item in data.list"
:index=
"item.path
"
class=
"item"
>
{{item.value}}
</el-menu-item>
<el-menu-item
v-for=
"
(item,i) in data.list"
:index=
"item.path"
:key=
"i
"
class=
"item"
>
{{item.value}}
</el-menu-item>
</el-submenu>
</el-submenu>
</el-menu>
</el-menu>
</template>
</template>
...
@@ -52,17 +53,17 @@
...
@@ -52,17 +53,17 @@
width: 200px;
width: 200px;
}
}
.el-menu{
.el-menu{
background:
#333
;
background:
@bg-b
;
color: white;
color: white;
overflow: auto;
overflow: auto;
height: 100%;
height: 100%;
.menu-btn{
.menu-btn{
height:
40
px;
height:
35
px;
background:
#444444
;
background:
@bg-b-s
;
line-height:
40
px;
line-height:
35
px;
/*text-align: center;*/
/*text-align: center;*/
i{
i{
font-size:
30
px;
font-size:
26
px;
float: right;
float: right;
padding: 0 15px;
padding: 0 15px;
}
}
...
@@ -75,7 +76,7 @@
...
@@ -75,7 +76,7 @@
right: 5px;
right: 5px;
}
}
.el-menu-item{
.el-menu-item{
background:
#222
;
background:
@main-font-color
;
}
}
.template{
.template{
color: black;
color: black;
...
...
src/components/framework/tab.vue
View file @
4f71768e
...
@@ -59,12 +59,10 @@
...
@@ -59,12 +59,10 @@
position: absolute;
position: absolute;
top: -4px;
top: -4px;
right: -4px;
right: -4px;
transition: all .
3
s;
transition: all .
1
s;
color: @secondary-font-color;
color: @secondary-font-color;
&:hover{
&:hover{
transform: scale(1.5,1.5);
transform: scale(1.2,1.2);
top: -6px;
right: -6px;
color: red;
color: red;
}
}
}
}
...
...
src/components/
material
/index.vue
→
src/components/
help
/index.vue
View file @
4f71768e
<
template
>
<
template
>
<div>
素材列表
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"index"
}
}
</
script
>
</
script
>
...
...
src/components/notice/index.vue
0 → 100644
View file @
4f71768e
<
template
>
</
template
>
<
script
>
export
default
{
name
:
"index"
}
</
script
>
<
style
scoped
>
</
style
>
src/components/periods/index.vue
0 → 100644
View file @
4f71768e
<
template
>
</
template
>
<
script
>
export
default
{
name
:
"index"
}
</
script
>
<
style
scoped
>
</
style
>
src/components/shop/index.vue
0 → 100644
View file @
4f71768e
<
template
>
</
template
>
<
script
>
export
default
{
name
:
"index"
}
</
script
>
<
style
scoped
>
</
style
>
src/components/single/dialog.vue
0 → 100644
View file @
4f71768e
<
template
>
<el-dialog
:title=
"title"
center
append-to-body
:visible
.
sync=
"show"
width=
"800px"
>
<div
v-loading=
"loading"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
v-if=
"type !== 1"
>
<el-button
@
click=
"show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sub"
>
确 定
</el-button>
</span>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
getTeacherDetailApi
,
addTeacherApi
,
editTeacherApi
}
from
"../../service/api"
;
import
{
TEACHERTYPE
}
from
"../../util/wordbook"
;
export
default
{
name
:
"dialogObj"
,
props
:[
'dialogObj'
],
data
(){
return
{
show
:
false
,
id
:
''
,
statusOption
:[
{
label
:
'正常'
,
value
:
0
},
{
label
:
'禁用'
,
value
:
1
}
],
typeOption
:[
{
label
:
'老师'
,
value
:
0
},{
label
:
'新星妈妈'
,
value
:
1
},{
label
:
'推广人'
,
value
:
2
},{
label
:
'市场'
,
value
:
3
}
],
loading
:
true
,
type
:
0
,
title
:
''
,
form
:{
name
:
''
,
type
:
0
,
qr
:
''
,
alias
:
''
,
status
:
0
,
},
rules
:{
name
:[
{
required
:
true
,
message
:
'请输入名称'
,
trigger
:
'change'
}
],
qr
:[
{
required
:
true
,
message
:
'请输入二维码'
,
trigger
:
'change'
}
]
},
teacherDetail
:{}
}
},
methods
:{
sub
(){
switch
(
this
.
dialogObj
.
type
){
case
2
:
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
){
editTeacherApi
(
this
.
id
,
this
.
form
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
this
.
$emit
(
"reflash"
);
this
.
show
=
false
;
})
}
});
break
;
case
0
:
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
){
addTeacherApi
(
this
.
form
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'新增成功!'
});
this
.
$emit
(
"reflash"
);
this
.
show
=
false
;
})
}
});
break
}
},
initDialog
(){
switch
(
this
.
dialogObj
.
type
){
case
0
:
this
.
title
=
'新增教师'
;
this
.
show
=
this
.
dialogObj
.
show
;
this
.
type
=
0
;
this
.
form
.
name
=
""
;
this
.
form
.
alias
=
""
;
this
.
form
.
qr
=
""
;
this
.
form
.
type
=
0
;
this
.
form
.
status
=
0
;
this
.
loading
=
false
;
break
;
case
1
:
this
.
title
=
'教师详情'
;
this
.
show
=
this
.
dialogObj
.
show
;
this
.
id
=
this
.
dialogObj
.
id
;
this
.
type
=
1
;
getTeacherDetailApi
(
this
.
id
).
then
(
res
=>
{
this
.
teacherDetail
=
res
;
this
.
loading
=
false
});
break
;
case
2
:
this
.
title
=
'编辑'
;
this
.
show
=
this
.
dialogObj
.
show
;
this
.
id
=
this
.
dialogObj
.
id
;
this
.
type
=
2
;
getTeacherDetailApi
(
this
.
id
).
then
(
res
=>
{
this
.
form
.
name
=
res
.
name
;
this
.
form
.
alias
=
res
.
alias
;
this
.
form
.
qr
=
res
.
qr
;
this
.
form
.
type
=
res
.
type
;
this
.
form
.
status
=
res
.
status
;
this
.
loading
=
false
});
break
}
}
},
watch
:{
dialogObj
:{
handler
:
function
()
{
this
.
loading
=
true
;
this
.
initDialog
()
},
deep
:
true
},
show
(
value
){
this
.
$emit
(
"changeShow"
,
value
);
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.el-col{
height: 50px;
text-align: center;
margin-bottom: 20px;
line-height: 40px;
.el-select{
width: 100%;
}
img{
width: 50px;
border-radius: 100px;
}
label{
color: #5982e6;
}
}
.dialog-footer{
display: block;
text-align: center;
}
</
style
>
src/components/single/index.vue
0 → 100644
View file @
4f71768e
<
template
>
<div
class=
"single"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"80px"
>
<el-row>
<el-col
:span=
"4"
>
<el-form-item
label=
"单品名称"
>
<el-input
v-model=
"searchFrom.name"
placeholder=
"名称"
size=
"small"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item>
<el-button
type=
"primary"
plain
size=
"small"
@
click=
""
>
搜索
</el-button>
<el-button
type=
"success"
plain
size=
"small"
@
click=
""
>
添加单品
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data=
"tableData"
:default-sort =
"
{prop: 'num', order: 'descending'}"
style="width: 100%">
<el-table-column
prop=
"id"
label=
"id"
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"名称"
>
</el-table-column>
<el-table-column
prop=
"num"
sortable
label=
"库存"
>
</el-table-column>
<el-table-column
width=
"200"
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
plain
type=
"warning"
@
click=
"edit(scope.row)"
>
编辑
</el-button>
<el-button
size=
"mini"
plain
type=
"danger"
@
click=
"edit(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<page
:total=
"total"
v-model=
"nowPage"
/>
<dialog-com
:dialogObj=
"dialogObj"
@
changeShow=
"changeShow"
@
reflash=
"getUser"
/>
</div>
</template>
<
script
>
import
{
getSingleListApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
dialogCom
from
'./dialog'
export
default
{
name
:
"index"
,
components
:{
page
,
dialogCom
},
data
(){
return
{
total
:
0
,
nowPage
:
0
,
searchFrom
:
{
name
:
''
},
tableData
:[]
}
},
created
(){
this
.
initPage
()
},
methods
:{
initPage
(){
getSingleListApi
(
this
.
searchFrom
.
name
).
then
(
res
=>
{
this
.
tableData
=
res
.
list
;
this
.
total
=
res
.
total
})
},
}
}
</
script
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.single{
.main-block
}
</
style
>
src/components/system/index.vue
deleted
100644 → 0
View file @
a39ba6ee
<
template
>
<div>
<transition
name=
"el-fade-in"
>
<el-menu
style=
"float: left;height: 100%"
:unique-opened=
"true"
:default-active=
"menuIndex"
:collapse=
"menuType"
>
<div
class=
"menu-btn"
@
click=
"menuType = !menuType"
>
<span
v-if=
"!menuType"
>
收起
</span>
<span
v-if=
"menuType"
>
展开
</span>
</div>
<div
v-for=
"data in menuList"
:key=
"data.id"
@
click=
"toPath(data)"
>
<el-menu-item
:index=
"data.name"
>
<i
:class=
"'iconfont '+data.icon"
></i>
<span
slot=
"title"
>
{{
data
.
value
}}
</span>
</el-menu-item>
</div>
</el-menu>
</transition>
<div
class=
"content"
>
<router-view
class=
"child-view"
/>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
(){
return
{
menuList
:
this
.
$store
.
state
.
menuList
.
find
((
a
)
=>
{
return
a
.
name
===
'system'
}).
children
,
menuType
:
false
,
menuIndex
:
this
.
$route
.
name
,
}
},
mounted
(){
this
.
$store
.
commit
(
'mainCanShow'
)
},
methods
:{
//菜单跳转
toPath
(
data
){
let
router
=
data
.
routerName
;
this
.
menuIndex
=
data
.
name
;
this
.
$router
.
push
({
name
:
router
})
}
},
watch
:{
$route
(
to
){
let
data
=
{
name
:
'system'
,
to
:
to
};
if
(
to
.
matched
[
1
].
name
===
'system'
)
this
.
$store
.
commit
(
'changeParentRouter'
,
data
)
}
}
//缓存为role则跳到role
}
</
script
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.menu-btn{
text-align: center;
height: 30px;
line-height: 30px;
font-size: 12px;
background: #3a8ee6;
color: @main-font-color;
}
.content{
height: 100%;
display: flex;
}
</
style
>
src/components/weChat/index.vue
0 → 100644
View file @
4f71768e
<
template
>
</
template
>
<
script
>
export
default
{
name
:
"index"
}
</
script
>
<
style
scoped
>
</
style
>
src/router/index.js
View file @
4f71768e
...
@@ -7,13 +7,21 @@ import index from '@/components/framework'
...
@@ -7,13 +7,21 @@ import index from '@/components/framework'
import
main
from
'@/components/main'
import
main
from
'@/components/main'
import
login
from
'@/components/login'
import
login
from
'@/components/login'
import
resources
from
'@/components/resources'
import
resources
from
'@/components/resources'
import
system
from
'@/components/system/index'
import
admin
from
'@/components/system/admin'
import
admin
from
'@/components/system/admin'
import
role
from
'@/components/system/role'
import
role
from
'@/components/system/role'
import
user
from
'@/components/user'
import
user
from
'@/components/user'
import
teacher
from
'@/components/teacher'
import
teacher
from
'@/components/teacher'
import
lesson
from
'@/components/lesson'
import
lesson
from
'@/components/lesson'
import
entity
from
'@/components/entity'
import
box
from
'@/components/box'
import
single
from
'@/components/single'
import
periods
from
'@/components/periods'
;
import
classList
from
'@/components/class'
import
order
from
'@/components/order'
import
shop
from
'@/components/shop'
import
consignment
from
'@/components/consignment'
import
notice
from
'@/components/notice'
import
weChat
from
'@/components/weChat'
import
help
from
'@/components/help'
Vue
.
use
(
Router
);
Vue
.
use
(
Router
);
const
router
=
new
Router
({
const
router
=
new
Router
({
...
@@ -36,14 +44,42 @@ const router =new Router({
...
@@ -36,14 +44,42 @@ const router =new Router({
path
:
''
,
path
:
''
,
name
:
'first'
,
name
:
'first'
,
component
:
main
component
:
main
},{
path
:
'/help'
,
name
:
'help'
,
component
:
help
},{
path
:
'/notice'
,
name
:
'notice'
,
component
:
notice
},{
path
:
'/weChat'
,
name
:
'weChat'
,
component
:
weChat
},{
},{
path
:
'/resources'
,
path
:
'/resources'
,
name
:
'resources'
,
name
:
'resources'
,
component
:
resources
component
:
resources
},{
},{
path
:
'/entity'
,
path
:
'/periods'
,
name
:
'entity'
,
name
:
'periods'
,
component
:
entity
component
:
periods
},{
path
:
'/shop'
,
name
:
'shop'
,
component
:
shop
},{
path
:
'/consignment'
,
name
:
'consignment'
,
component
:
consignment
},{
path
:
'/single'
,
name
:
'single'
,
component
:
single
},{
path
:
'/box'
,
name
:
'box'
,
component
:
box
},{
},{
path
:
'/lesson'
,
path
:
'/lesson'
,
name
:
'lesson'
,
name
:
'lesson'
,
...
@@ -57,27 +93,23 @@ const router =new Router({
...
@@ -57,27 +93,23 @@ const router =new Router({
name
:
'teacher'
,
name
:
'teacher'
,
component
:
teacher
component
:
teacher
},{
},{
path
:
'/system'
,
path
:
'/admin'
,
name
:
'system'
,
name
:
'admin'
,
component
:
system
,
component
:
admin
redirect
:{
name
:
'admin'
},
},{
children
:[
path
:
'/role'
,
{
name
:
'role'
,
path
:
''
,
component
:
role
redirect
:{
name
:
'admin'
}
},
},
{
{
path
:
'/class'
,
path
:
'admin'
,
name
:
'class'
,
name
:
'admin'
,
component
:
classList
component
:
admin
},{
},
path
:
'/order'
,
{
name
:
'order'
,
path
:
'role'
,
component
:
order
name
:
'role'
,
},
component
:
role
},
]
}
]
]
}
}
]
]
...
...
src/service/api.js
View file @
4f71768e
...
@@ -143,22 +143,20 @@ const sortCategoryUrl = `${_baseUrl}api/admin/category/sort`;
...
@@ -143,22 +143,20 @@ const sortCategoryUrl = `${_baseUrl}api/admin/category/sort`;
export
const
sortCategoryApi
=
function
(
json
)
{
export
const
sortCategoryApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$patch
(
sortCategoryUrl
,
json
)
return
Vue
.
prototype
.
$patch
(
sortCategoryUrl
,
json
)
};
};
//添加元素
const
addElementUrl
=
`
${
_baseUrl
}
api/admin/element/add/`
//获取分类下的元素列表
//获取分类下的元素列表
const
getCateDetailListUrl
=
`
${
_baseUrl
}
api/admin/element/list/0?category_id=`
;
const
getCateDetailListUrl
=
`
${
_baseUrl
}
api/admin/element/list/0?category_id=`
;
export
const
getCateListApi
=
function
(
id
)
{
export
const
getCateListApi
=
function
(
id
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
getCateDetailListUrl
}${
id
}
`
)
return
Vue
.
prototype
.
$fetch
(
`
${
getCateDetailListUrl
}${
id
}
`
)
};
};
//
获取实物
列表
//
获取单品
列表
const
get
EntityUrl
=
`
${
_baseUrl
}
api/admin/element/list/2?category_id=
`
;
const
get
SingleListUrl
=
`
${
_baseUrl
}
api/admin/item/stock/list
`
;
export
const
get
EntityApi
=
function
(
id
)
{
export
const
get
SingleListApi
=
function
(
name
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
get
EntityUrl
}${
id
}
`
)
return
Vue
.
prototype
.
$fetch
(
`
${
get
SingleListUrl
}
?name=
${
name
}
`
)
};
};
//
查询实物、菜单分类
//
获取单品详情
const
get
EntityMenuUrl
=
`
${
_baseUrl
}
api/admin/category/list/1
`
;
const
get
SingleDetailUrl
=
`
${
_baseUrl
}
api/admin/item/stock/info/
`
;
export
const
get
EntityMenuApi
=
function
(
p
id
)
{
export
const
get
SingleDetailApi
=
function
(
id
)
{
return
Vue
.
prototype
.
$fetch
(
getEntityMenuUrl
,{
'pid'
:
pid
}
)
return
Vue
.
prototype
.
$fetch
(
`
${
getSingleDetailUrl
}${
id
}
`
)
};
};
src/util/menuList.js
View file @
4f71768e
...
@@ -33,8 +33,8 @@ export default [
...
@@ -33,8 +33,8 @@ export default [
},
},
{
{
value
:
'期数列表'
,
value
:
'期数列表'
,
routerName
:
'
resource
s'
,
routerName
:
'
period
s'
,
path
:
'/
123
'
path
:
'/
periods
'
}
}
]
]
},{
},{
...
@@ -76,8 +76,8 @@ export default [
...
@@ -76,8 +76,8 @@ export default [
},
},
{
{
value
:
'发货管理'
,
value
:
'发货管理'
,
routerName
:
'
logistics
'
,
routerName
:
'
consignment
'
,
path
:
'/
logistics
'
path
:
'/
consignment
'
}
}
]
]
},{
},{
...
@@ -87,8 +87,8 @@ export default [
...
@@ -87,8 +87,8 @@ export default [
list
:
[
list
:
[
{
{
value
:
'单品列表'
,
value
:
'单品列表'
,
routerName
:
'
entity
'
,
routerName
:
'
single
'
,
path
:
'/
entity
'
path
:
'/
single
'
},
},
{
{
value
:
'盒子列表'
,
value
:
'盒子列表'
,
...
...
src/util/public.less
View file @
4f71768e
//颜色参数
//颜色参数
@bg-b: #2f2f3c;
@bg-b: #333;
@bg-b-s:#444;
@black-line:#191919;
@black-line:#191919;
@gray-line:#666;
@gray-line:#666;
@light-line:#ddd;
@light-line:#ddd;
...
@@ -12,6 +13,11 @@
...
@@ -12,6 +13,11 @@
.fl-r{
.fl-r{
float: right;
float: right;
}
}
.main-block{
margin: 5px;
background: white;
padding: 5px;
}
html{
html{
font-family: "Helvetica Neue",
font-family: "Helvetica Neue",
Helvetica,
Helvetica,
...
...
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