diff --git a/subpages/associationNew/images/top-flag.png b/subpages/associationNew/images/top-flag.png
new file mode 100644
index 0000000..ac9998e
Binary files /dev/null and b/subpages/associationNew/images/top-flag.png differ
diff --git a/subpages/associationNew/images/top.png b/subpages/associationNew/images/top.png
new file mode 100644
index 0000000..31d36bf
Binary files /dev/null and b/subpages/associationNew/images/top.png differ
diff --git a/subpages/associationNew/images/untop.png b/subpages/associationNew/images/untop.png
new file mode 100644
index 0000000..2a57560
Binary files /dev/null and b/subpages/associationNew/images/untop.png differ
diff --git a/subpages/associationNew/pages/eventlist/eventlist.js b/subpages/associationNew/pages/eventlist/eventlist.js
index 4f3163d..ef50bf9 100644
--- a/subpages/associationNew/pages/eventlist/eventlist.js
+++ b/subpages/associationNew/pages/eventlist/eventlist.js
@@ -1,6 +1,6 @@
// subpages/associationNew/pages/eventlist/eventlist.js
const app = getApp()
-import { topiclist, commentSubmit, statement, shieldTopic } from "../../utils/api"
+import { topiclist, commentSubmit, statement, shieldTopic, topTopic } from "../../utils/api"
import {
getTimestamp
} from "../../../../utils/common"
@@ -454,5 +454,83 @@ Page({
this.topiclist()
}
})
+ },
+ topTopic (e) {
+ const param = {
+ topicId: e.currentTarget.dataset.id,
+ topFlag: '1'
+ }
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '确定要把选择的话题置顶?',
+ confirmColor: '#04BCA0',
+ cancelColor: '#999',
+ success (res) {
+ if (res.confirm) {
+ console.log('用户点击确定')
+ topTopic(param).then( res => {
+ console.log(res.data)
+ if (res.code == '0') {
+ wx.showToast({
+ title: '置顶成功',
+ icon: 'none',
+ duration: 2000
+ })
+ that.setData({
+ pageIndex: 1,
+ pageSize: 10,
+ nodata: false,
+ loadMoreType: "none",
+ loadMoreVisible: false,
+ topiclist: [],
+ })
+ that.topiclist()
+ }
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消')
+ }
+ }
+ })
+ },
+ unTopTopic (e) {
+ const param = {
+ topicId: e.currentTarget.dataset.id,
+ topFlag: '0'
+ }
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '确定要取消该话题的置顶?',
+ confirmColor: '#04BCA0',
+ cancelColor: '#999',
+ success (res) {
+ if (res.confirm) {
+ console.log('用户点击确定')
+ topTopic(param).then( res => {
+ console.log(res.data)
+ if (res.code == '0') {
+ wx.showToast({
+ title: '取消置顶成功',
+ icon: 'none',
+ duration: 2000
+ })
+ that.setData({
+ pageIndex: 1,
+ pageSize: 10,
+ nodata: false,
+ loadMoreType: "none",
+ loadMoreVisible: false,
+ topiclist: [],
+ })
+ that.topiclist()
+ }
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消')
+ }
+ }
+ })
}
})
\ No newline at end of file
diff --git a/subpages/associationNew/pages/eventlist/eventlist.wxml b/subpages/associationNew/pages/eventlist/eventlist.wxml
index 8aebc7c..79fd107 100644
--- a/subpages/associationNew/pages/eventlist/eventlist.wxml
+++ b/subpages/associationNew/pages/eventlist/eventlist.wxml
@@ -7,7 +7,9 @@
{{item.nickname}}
-
+
+
+
{{item.createdTime}}
@@ -35,6 +37,17 @@
屏蔽
+
+
+
+ 取消置顶
+
+
+
+ 置顶
+
+
+
diff --git a/subpages/associationNew/pages/eventlist/eventlist.wxss b/subpages/associationNew/pages/eventlist/eventlist.wxss
index 0713caf..a7425bc 100644
--- a/subpages/associationNew/pages/eventlist/eventlist.wxss
+++ b/subpages/associationNew/pages/eventlist/eventlist.wxss
@@ -45,6 +45,12 @@ page {
border-radius: 0px;
}
+.user-info .name-date .top-logo {
+ height: 28rpx;
+ width: 58rpx;
+ margin-left: 8rpx;
+ border-radius: 0px;
+}
.user-info .name-date .date {
font-size: 20rpx;
font-weight: 500;
diff --git a/subpages/associationNew/utils/api.js b/subpages/associationNew/utils/api.js
index 5c52091..59c850b 100644
--- a/subpages/associationNew/utils/api.js
+++ b/subpages/associationNew/utils/api.js
@@ -142,6 +142,16 @@ export function shieldTopic ({id, shieldReason}) {
})
}
+/**
+ * 群主或副群主 置顶 或 取消置顶
+ */
+export function topTopic ({topicId, topFlag}) {
+ return request.post("partyGroup/topic/top", {
+ topicId,
+ topFlag
+ })
+}
+