Browse Source

Merge branch 'release'

master tagv1.4.34
lihenian 5 years ago
parent
commit
1d245206ee
  1. 2
      pages/toRegister/toRegister.js
  2. BIN
      subpages/associationNew/images/top-flag.png
  3. BIN
      subpages/associationNew/images/top.png
  4. BIN
      subpages/associationNew/images/untop.png
  5. 80
      subpages/associationNew/pages/eventlist/eventlist.js
  6. 15
      subpages/associationNew/pages/eventlist/eventlist.wxml
  7. 6
      subpages/associationNew/pages/eventlist/eventlist.wxss
  8. 10
      subpages/associationNew/utils/api.js

2
pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
// }
// })
let that = this
const versionNum = "1.4.33"
const versionNum = "1.4.34"
api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data)
let state = res.data.scanFlag

BIN
subpages/associationNew/images/top-flag.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

BIN
subpages/associationNew/images/top.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

BIN
subpages/associationNew/images/untop.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

80
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('用户点击取消')
}
}
})
}
})

15
subpages/associationNew/pages/eventlist/eventlist.wxml

@ -7,7 +7,9 @@
<image src="{{item.userFace}}"></image>
<view class="name-date">
<view class="name">{{item.nickname}}
<image class="community-logo" wx:if="{{item.thisCommunity == '1'}}" src="../../images/resident@2x.png"></image></view>
<image class="community-logo" wx:if="{{item.thisCommunity == '1'}}" src="../../images/resident@2x.png"></image>
<image class="top-logo" wx:if="{{item.topFlag == '1'}}" src="../../images/top-flag.png"></image>
</view>
<view class="date">{{item.createdTime}}</view>
</view>
</view>
@ -35,6 +37,17 @@
<image src="../../images/shield.png"></image>
<view class="give-data-m">屏蔽</view>
</view>
<block wx:if="{{currentUserIdentity=='0'||currentUserIdentity=='1'}}">
<view class="all" data-id="{{item.id}}" bindtap="unTopTopic" wx:if="{{item.topFlag == '1'}}">
<image src="../../images/top.png"></image>
<view class="give-data-m">取消置顶</view>
</view>
<view class="all" data-id="{{item.id}}" bindtap="topTopic" wx:else>
<image src="../../images/untop.png"></image>
<view class="give-data-m">置顶</view>
</view>
</block>
<view class="all" data-id="{{item.id}}" data-index="{{index}}" bindtap="clickTextarea">
<!-- <image class="wcomment" src="../../images/wcomment@2x.png"></image> -->
<view class="give-data-s">

6
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;

10
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
})
}

Loading…
Cancel
Save