Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
b2a670ce
Commit
b2a670ce
authored
Jun 27, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
营地上架、下架
parent
2f686237
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
campsiteManage.js
src/api/campsiteManage.js
+11
-0
index.vue
src/views/campsiteManage/index.vue
+6
-5
No files found.
src/api/campsiteManage.js
View file @
b2a670ce
...
@@ -118,6 +118,17 @@ export function addCampsiteShop(params) {
...
@@ -118,6 +118,17 @@ export function addCampsiteShop(params) {
});
});
}
}
/**
* 营地上架、下架
* */
export
function
saleStatus
(
query
)
{
return
fetch
({
url
:
'/api/campsite/admin/campsiteShop/saleStatus'
,
method
:
'put'
,
params
:
query
});
}
/**
/**
* 判断营地名称是否已存在
* 判断营地名称是否已存在
* @param id
* @param id
...
...
src/views/campsiteManage/index.vue
View file @
b2a670ce
...
@@ -66,9 +66,9 @@
...
@@ -66,9 +66,9 @@
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<el-button
size=
"small"
type=
"success"
@
click=
"handleUpdate(scope.row)"
>
编辑
<el-button
size=
"small"
type=
"success"
@
click=
"handleUpdate(scope.row)"
>
编辑
</el-button>
</el-button>
<el-button
size=
"small"
type=
"primary"
v-if=
"scope.row.s
tatus==2|| scope.row.status
==0"
@
click=
"upStatus(scope.row)"
>
上架
<el-button
size=
"small"
type=
"primary"
v-if=
"scope.row.s
aleState==2|| scope.row.saleState
==0"
@
click=
"upStatus(scope.row)"
>
上架
</el-button>
</el-button>
<el-button
size=
"small"
type=
"warn"
v-if=
"scope.row.s
tatus
==1"
@
click=
"upStatus(scope.row)"
>
下架
<el-button
size=
"small"
type=
"warn"
v-if=
"scope.row.s
aleState
==1"
@
click=
"upStatus(scope.row)"
>
下架
</el-button>
</el-button>
<el-popover
<el-popover
ref=
"popover5"
ref=
"popover5"
...
@@ -120,7 +120,8 @@
...
@@ -120,7 +120,8 @@
}
from
'utils/auth'
;
}
from
'utils/auth'
;
import
{
import
{
getCampsiteList
,
getCampsiteList
,
delCampsiteShop
delCampsiteShop
,
saleStatus
}
from
'api/campsiteManage'
;
}
from
'api/campsiteManage'
;
import
Element1
from
"../admin/menu/components/element"
;
import
Element1
from
"../admin/menu/components/element"
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
...
@@ -212,9 +213,9 @@ import {
...
@@ -212,9 +213,9 @@ import {
upStatus
(
row
){
upStatus
(
row
){
let
params
=
{
let
params
=
{
id
:
row
.
id
,
id
:
row
.
id
,
status
:
row
.
s
tatus
==
1
?
2
:
1
status
:
row
.
s
aleState
==
1
?
2
:
1
};
};
upStatusChange
(
params
).
then
(
response
=>
{
saleStatus
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
this
.
$notify
({
title
:
'成功'
,
title
:
'成功'
,
...
...
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