diff --git a/src/views/modules/heart/actinfo-list.vue b/src/views/modules/heart/actinfo-list.vue
index f463f3b..810b54b 100644
--- a/src/views/modules/heart/actinfo-list.vue
+++ b/src/views/modules/heart/actinfo-list.vue
@@ -62,6 +62,10 @@
编辑活动
新闻发稿
+
+ {{ '置顶' }}
+ {{ '取消置顶' }}
+
@@ -189,6 +193,31 @@ export default {
updateHandle (row) {
this.$parent.selectComponent = 'ActInfoAdd'
this.$router.push({ path: '/heart-actinfo', query: { id: row.id } })
+ },
+ top (id, topFlag) {
+ let title = '置顶'
+ if (topFlag === '0') {
+ title = '取消置顶'
+ }
+ this.$confirm(this.$t('prompt.info', { 'handle': title }), this.$t(title), {
+ confirmButtonText: this.$t('confirm'),
+ cancelButtonText: this.$t('cancel'),
+ type: 'warning'
+ }).then(() => {
+ this.$http['post']('/heart/actinfo/top', { 'actId': id, 'topFlag': topFlag }).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.$message({
+ message: this.$t('prompt.success'),
+ type: 'success',
+ duration: 500,
+ onClose: () => {
+ }
+ })
+ this.getDataList()
+ }).catch(() => {})
+ }).catch(() => {})
}
}
}