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
29f0b5e8
Commit
29f0b5e8
authored
Aug 30, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增活动置顶
parent
9597a786
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
activity.js
src/api/officialWebsit/activity.js
+10
-0
activityList.vue
src/views/xxOfficialWebsite/activityList.vue
+33
-1
No files found.
src/api/officialWebsit/activity.js
View file @
29f0b5e8
...
...
@@ -48,6 +48,16 @@ export function isPublishStatus(id, state) {
method
:
'put'
});
}
/**
* 是否置顶、不发布
* */
export
function
isHomePageStatus
(
id
,
state
)
{
return
fetch
({
url
:
'/api/uccn/admin/summitActivity/home_page/'
+
id
+
'/'
+
state
,
method
:
'put'
});
}
/**
*删除活动
*/
...
...
src/views/xxOfficialWebsite/activityList.vue
View file @
29f0b5e8
...
...
@@ -97,7 +97,10 @@
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
v-if=
"scope.row.isPublish==1 && campsiteshop_btn_update_salestatus"
@
click=
"isPublishStatus(scope.row)"
>
不发布
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
v-if=
"(scope.row.isHomePage==0) && campsiteshop_btn_update_salestatus"
@
click=
"isHomePageStatus(scope.row)"
>
发布
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
v-if=
"scope.row.isHomePage==1 && campsiteshop_btn_update_salestatus"
@
click=
"isHomePageStatus(scope.row)"
>
不发布
</el-button>
<el-button
class=
"el-button el-button--text el-button--small"
style=
"color:red;"
size=
"small"
@
click=
"deleteHandler(scope.row)"
v-if=
"campsiteshop_btn_del"
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
@@ -139,6 +142,7 @@ import {
getActivityList
,
isShowStatus
,
isPublishStatus
,
isHomePageStatus
,
deleteActivityTag
}
from
'../../api/officialWebsit/activity'
;
import
Element1
from
"../admin/menu/components/element"
;
...
...
@@ -296,6 +300,34 @@ import {
}
});
},
/**
* 是否置顶 参数 id status 1-上架;2-下架 post
*/
isHomePageStatus
(
row
){
let
params
=
{
id
:
row
.
id
,
state
:
row
.
isHomePage
==
1
?
0
:
1
};
isHomePageStatus
(
params
.
id
,
params
.
state
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
oneCampsiteDialogVisible
=
false
;
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
},
/**
* 编辑
* */
...
...
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