Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
small-program-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a34ecd77
authored
Aug 16, 2019
by
me
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加token验证
parent
ec801e35
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
145 additions
and
38 deletions
+145
-38
src/components/Layout.vue
+9
-4
src/main.js
+2
-2
src/views/Login.vue
+14
-7
src/views/banner/bannerAdd.vue
+8
-2
src/views/banner/bannerList.vue
+4
-1
src/views/bjManage/bjDetail.vue
+7
-1
src/views/bjManage/bjList.vue
+7
-1
src/views/cookManage/CookAdd.vue
+7
-1
src/views/cookManage/CookDetail.vue
+7
-1
src/views/cookManage/CookList.vue
+7
-1
src/views/cookbook.vue
+6
-2
src/views/flowerManage/flowerList.vue
+7
-1
src/views/log.vue
+4
-1
src/views/orderList/OrderDetail.vue
+13
-3
src/views/orderList/OrderList.vue
+24
-6
src/views/user.vue
+5
-2
src/views/wxManage/wxDetail.vue
+7
-1
src/views/wxManage/wxList.vue
+7
-1
No files found.
src/components/Layout.vue
View file @
a34ecd77
...
...
@@ -18,8 +18,8 @@
<el-submenu
index=
"1"
>
<template
slot=
"title"
><i
class=
"icon"
><img
src=
"../assets/img/icon/ico3.png"
alt=
""
></i>
菜单管理
</
template
>
<el-menu-item-group>
<el-menu-item
index=
"/tab/bannerList"
>
banner管理
</el-menu-item>
<el-menu-item
index=
"/tab/cookbook"
>
菜谱管理
</el-menu-item>
<el-menu-item
index=
"/tab/bannerList"
>
banner管理
</el-menu-item>
<el-menu-item
index=
"/tab/cookbook"
>
菜谱管理
</el-menu-item>
<el-menu-item
index=
"/tab/cookList"
>
厨师人员管理
</el-menu-item>
<el-menu-item
index=
"/tab/bjList"
>
保洁人员管理
</el-menu-item>
<el-menu-item
index=
"/tab/wxList"
>
维修人员管理
</el-menu-item>
...
...
@@ -46,7 +46,7 @@
</div>
</div>
</el-header>
<el-main
class=
"main"
>
<el-main
class=
"main"
>
<transition
name=
"fade"
mode=
"out-in"
>
<router-view></router-view>
</transition>
...
...
@@ -62,7 +62,9 @@ export default {
data
()
{
return
{
userName
:
''
,
currentDate
:
''
currentDate
:
''
,
index
:
0
,
index1
:
0
,
}
},
mounted
()
{
...
...
@@ -71,6 +73,9 @@ export default {
},
methods
:
{
getUserInfor
()
{
// var routerParams = this.$route.query.nameId;
// this.index = routerParams;
// console.log(routerParams)
if
(
window
.
localStorage
.
length
>
0
)
{
var
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
if
(
userInfo
!=
null
)
{
...
...
src/main.js
View file @
a34ecd77
...
...
@@ -15,8 +15,8 @@ import 'quill/dist/quill.bubble.css'
// use
Vue
.
use
(
VueQuillEditor
)
axios
.
defaults
.
baseURL
=
'http://47.94.209.240:8088/'
//
axios.defaults.baseURL = 'https://slbjgfwj.cn/api/'
//
axios.defaults.baseURL = 'http://47.94.209.240:8088/'
axios
.
defaults
.
baseURL
=
'https://slbjgfwj.cn/api/'
Vue
.
prototype
.
$ImageUploadUrl
=
'https://slbjgfwj.cn/api/file/fileUpload'
...
...
src/views/Login.vue
View file @
a34ecd77
...
...
@@ -19,8 +19,9 @@ export default {
userForm
:
{
loginName
:
''
,
passWord
:
''
,
locPwd
:
false
}
locPwd
:
false
,
},
// nameId:1,
}
},
created
()
{
...
...
@@ -29,16 +30,22 @@ export default {
methods
:
{
login
()
{
if
(
this
.
userForm
.
loginName
&&
this
.
userForm
.
passWord
)
{
let
_this
=
this
let
_this
=
this
;
this
.
$axios
({
method
:
'post'
,
url
:
'/operator/login/user'
,
data
:
_this
.
userForm
data
:
_this
.
userForm
,
}).
then
((
res
)
=>
{
console
.
log
(
res
.
data
)
console
.
log
(
res
.
data
.
data
.
accessToken
)
if
(
res
.
data
.
code
===
'0'
)
{
this
.
$router
.
push
({
name
:
'userList'
})
window
.
localStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
res
.
data
))
this
.
$router
.
push
({
name
:
'userList'
,
// query:{
// nameId:_this.nameId,
// },
})
window
.
localStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
res
.
data
))
window
.
localStorage
.
setItem
(
'token'
,
JSON
.
stringify
(
res
.
data
.
data
.
accessToken
))
}
})
}
else
{
...
...
src/views/banner/bannerAdd.vue
View file @
a34ecd77
...
...
@@ -100,8 +100,14 @@ export default {
postUrl
=
'/pcbanner/update/banner'
params
.
id
=
this
.
addForm
.
id
}
this
.
$axios
.
post
(
postUrl
,
params
,
{
}).
then
((
res
)
=>
{
this
.
$axios
({
method
:
'post'
,
url
:
postUrl
,
data
:
params
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
$router
.
go
(
-
1
)
})
},
...
...
src/views/banner/bannerList.vue
View file @
a34ecd77
...
...
@@ -139,7 +139,10 @@ export default {
this
.
$axios
({
method
:
'post'
,
url
:
'/pcbanner/get/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
data
:
parms
data
:
parms
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
orderListData
=
res
.
data
.
data
.
resultList
this
.
countPage
=
res
.
data
.
data
.
countPage
...
...
src/views/bjManage/bjDetail.vue
View file @
a34ecd77
...
...
@@ -84,7 +84,13 @@ export default {
},
methods
:
{
getData
()
{
this
.
$axios
.
get
(
'/pccleaning/get/'
+
this
.
$route
.
params
.
id
).
then
((
res
)
=>
{
this
.
$axios
({
method
:
'get'
,
url
:
'/pccleaning/get/'
+
this
.
$route
.
params
.
id
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
cookData
=
res
.
data
.
data
})
},
...
...
src/views/bjManage/bjList.vue
View file @
a34ecd77
...
...
@@ -125,6 +125,9 @@ export default {
this
.
$axios
({
method
:
'get'
,
url
:
'/pccook/delete/'
+
id
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
getList
()
})
...
...
@@ -141,7 +144,10 @@ export default {
this
.
$axios
({
method
:
'post'
,
url
:
'/pccleaning/get/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
data
:
parms
data
:
parms
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
data
=
res
.
data
.
data
.
resultList
this
.
countPage
=
res
.
data
.
data
.
countPage
...
...
src/views/cookManage/CookAdd.vue
View file @
a34ecd77
...
...
@@ -109,7 +109,13 @@ export default {
},
methods
:
{
getData
()
{
this
.
$axios
.
get
(
'/pccook/get/'
+
this
.
$route
.
params
.
id
).
then
((
res
)
=>
{
this
.
$axios
({
method
:
'get'
,
url
:
'/pccook/get/'
+
this
.
$route
.
params
.
id
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
addForm
=
res
.
data
.
data
this
.
imageUrl
=
this
.
addForm
.
url
res
.
data
.
data
.
status
==
'Y'
?
this
.
addForm
.
status
=
true
:
this
.
addForm
.
status
=
false
...
...
src/views/cookManage/CookDetail.vue
View file @
a34ecd77
...
...
@@ -60,7 +60,13 @@ export default {
},
methods
:
{
getData
()
{
this
.
$axios
.
get
(
'/pccook/get/'
+
this
.
$route
.
params
.
id
).
then
((
res
)
=>
{
this
.
$axios
.
get
({
method
:
'get'
,
url
:
'/pccook/get/'
+
this
.
$route
.
params
.
id
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
cookData
=
res
.
data
.
data
})
},
...
...
src/views/cookManage/CookList.vue
View file @
a34ecd77
...
...
@@ -138,6 +138,9 @@ export default {
this
.
$axios
({
method
:
'get'
,
url
:
'/pccook/delete/'
+
id
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
getList
()
})
...
...
@@ -154,7 +157,10 @@ export default {
this
.
$axios
({
method
:
'post'
,
url
:
'/pccook/get/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
data
:
parms
data
:
parms
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
data
=
res
.
data
.
data
.
resultList
this
.
countPage
=
res
.
data
.
data
.
countPage
...
...
src/views/cookbook.vue
View file @
a34ecd77
...
...
@@ -50,7 +50,7 @@
align=
"center"
label=
"菜品图片"
>
<template
slot-scope=
"scope"
>
<img
class=
"cookImage"
v-if=
"scope.row.img
Url"
:src=
"scope.row.imgUrl
"
alt=
""
>
<img
class=
"cookImage"
v-if=
"scope.row.img
Base64"
:src=
"scope.row.imgBase64
"
alt=
""
>
</
template
>
</el-table-column>
<el-table-column
...
...
@@ -159,11 +159,15 @@ export default {
this
.
$axios
({
method
:
'post'
,
url
:
'/pcfood/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
data
:
parms
data
:
parms
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
orderListData
=
res
.
data
.
data
.
resultList
this
.
countPage
=
res
.
data
.
data
.
countPage
this
.
page
=
res
.
data
.
data
.
page
console
.
log
()
})
},
handleRowChange
(
row
,
event
,
column
)
{
...
...
src/views/flowerManage/flowerList.vue
View file @
a34ecd77
...
...
@@ -116,6 +116,9 @@ export default {
this
.
$axios
({
method
:
'get'
,
url
:
'/pccook/delete/'
+
id
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
getList
()
})
...
...
@@ -130,7 +133,10 @@ export default {
this
.
$axios
({
method
:
'post'
,
url
:
'/pcproduct/get/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
data
:
parms
data
:
parms
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
data
=
res
.
data
.
data
.
resultList
this
.
countPage
=
res
.
data
.
data
.
countPage
...
...
src/views/log.vue
View file @
a34ecd77
...
...
@@ -123,7 +123,10 @@ export default {
this
.
$axios
({
method
:
'post'
,
url
:
'/pclog/get/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
data
:
parms
data
:
parms
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
orderListData
=
res
.
data
.
data
.
resultList
this
.
countPage
=
res
.
data
.
data
.
countPage
...
...
src/views/orderList/OrderDetail.vue
View file @
a34ecd77
...
...
@@ -133,7 +133,12 @@
<el-col
:span=
"3"
class=
"align-right padding-right10"
>
支付方式:
</el-col>
<el-col
:span=
"5"
>
{{
orderObg
.
payType
}}
</el-col>
</el-row>
<!--
<el-row
v-if=
"orderObg.type == 'CS'"
>
<el-col
:span=
"3"
class=
"align-right padding-right10"
>
取货时间:
</el-col>
<el-col
:span=
"8"
>
付款后一周(工作日 11:30~13:30 16:30~17:00)
</el-col>
<el-col
:span=
"3"
class=
"align-right padding-right10"
>
取货方式:
</el-col>
<el-col
:span=
"5"
>
{{
orderObg
.
payType
}}
</el-col>
</el-row>
-->
<el-row
v-if=
"orderObg.type == 'WM' || orderObg.type == 'CS'"
>
<el-col
:span=
"3"
class=
"align-right padding-right10"
>
状态:
</el-col>
<el-col
:span=
"5"
>
{{
renderStatus
(
orderObg
.
status
)
}}
</el-col>
...
...
@@ -197,8 +202,13 @@ export default {
methods
:
{
getDetail
()
{
var
_this
=
this
this
.
$axios
.
get
(
'/pc/trade/get/id/'
+
this
.
$route
.
params
.
id
,
{
}).
then
(
function
(
res
)
{
this
.
$axios
({
method
:
'get'
,
url
:
'/pc/trade/get/id/'
+
this
.
$route
.
params
.
id
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
(
function
(
res
)
{
console
.
log
(
res
.
data
)
_this
.
orderObg
=
res
.
data
.
data
})
...
...
src/views/orderList/OrderList.vue
View file @
a34ecd77
...
...
@@ -274,7 +274,10 @@ export default {
data
:
{
id
:
id
,
userName
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'userInfo'
)).
data
.
userResponse
.
userName
}
},
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
getOrderList
()
})
...
...
@@ -287,7 +290,10 @@ export default {
data
:
{
id
:
id
,
userName
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'userInfo'
)).
data
.
userResponse
.
userName
}
},
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
getOrderList
()
})
...
...
@@ -300,7 +306,10 @@ export default {
data
:
{
id
:
id
,
userName
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'userInfo'
)).
data
.
userResponse
.
userName
}
},
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
getOrderList
()
})
...
...
@@ -313,7 +322,10 @@ export default {
data
:
{
id
:
id
,
userName
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'userInfo'
)).
data
.
userResponse
.
userName
}
},
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
getOrderList
()
})
...
...
@@ -335,7 +347,10 @@ export default {
this
.
$axios
({
method
:
'post'
,
url
:
'/pc/trade/get/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
data
:
parms
data
:
parms
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
res
.
data
.
data
.
resultList
.
forEach
((
item
)
=>
{
if
(
item
.
type
==
'WM'
||
item
.
type
==
'CS'
)
{
...
...
@@ -378,7 +393,10 @@ export default {
this
.
$axios
({
method
:
'post'
,
url
:
'/pc/trade/get/group'
,
data
:
params
data
:
params
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
res
.
data
.
data
.
forEach
((
item
)
=>
{
item
.
num
=
parseInt
(
item
.
num
)
...
...
src/views/user.vue
View file @
a34ecd77
...
...
@@ -109,7 +109,7 @@ export default {
currentPage
:
10
,
countPage
:
''
,
page
:
''
,
orderListData
:
[]
orderListData
:
[]
,
}
},
created
()
{
...
...
@@ -128,7 +128,10 @@ export default {
this
.
$axios
({
method
:
'post'
,
url
:
'/pcuser/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
data
:
parms
data
:
parms
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
orderListData
=
res
.
data
.
data
.
resultList
this
.
countPage
=
res
.
data
.
data
.
countPage
...
...
src/views/wxManage/wxDetail.vue
View file @
a34ecd77
...
...
@@ -73,7 +73,13 @@ export default {
},
methods
:
{
getData
()
{
this
.
$axios
.
get
(
'/pcrepair/get/'
+
this
.
$route
.
params
.
id
).
then
((
res
)
=>
{
this
.
$axios
({
method
:
'get'
,
url
:
'/pcrepair/get/'
+
this
.
$route
.
params
.
id
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
cookData
=
res
.
data
.
data
})
},
...
...
src/views/wxManage/wxList.vue
View file @
a34ecd77
...
...
@@ -125,6 +125,9 @@ export default {
this
.
$axios
({
method
:
'get'
,
url
:
'/pccook/delete/'
+
id
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
getList
()
})
...
...
@@ -141,7 +144,10 @@ export default {
this
.
$axios
({
method
:
'post'
,
url
:
'/pcrepair/get/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
data
:
parms
data
:
parms
,
headers
:
{
'token'
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'token'
)),
}
}).
then
((
res
)
=>
{
this
.
data
=
res
.
data
.
data
.
resultList
this
.
countPage
=
res
.
data
.
data
.
countPage
...
...
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