Browse Source

Merge branch 'release'

master tagv1.4.30
lihenian 5 years ago
parent
commit
dfebff9539
  1. 2
      components/activity/activity.wxml
  2. BIN
      images/mine/topic-nodata.png
  3. BIN
      images/search.png
  4. 5
      pages/discussion/components/issueList/issueList.js
  5. 3
      pages/discussion/components/issueList/issueList.wxml
  6. 13
      pages/discussion/components/issueList/issueList.wxss
  7. 2
      pages/discussion/components/projectList/projectList.wxml
  8. 14
      pages/discussion/discussion.js
  9. 2
      pages/discussion/discussion.wxml
  10. 33
      pages/heartNew/heartNew.js
  11. 11
      pages/heartNew/heartNew.wxml
  12. 69
      pages/heartNew/heartNew.wxss
  13. 3
      pages/mine/components/topicItemNew/topicItemNew.wxml
  14. 16
      pages/mine/components/topicItemNew/topicItemNew.wxss
  15. 17
      pages/mine/mine.js
  16. 4
      pages/mine/mine.wxml
  17. 2
      pages/toRegister/toRegister.js
  18. 78
      subpages/association/pages/topicDetail/topicDetail.js
  19. 36
      subpages/association/pages/topicDetail/topicDetail.wxml
  20. 100
      subpages/association/pages/topicDetail/topicDetail.wxss
  21. 7
      subpages/association/utils/api.js
  22. 91
      subpages/associationNew/components/noticeVerify/noticeVerify.js
  23. 3
      subpages/associationNew/components/noticeVerify/noticeVerify.json
  24. 16
      subpages/associationNew/components/noticeVerify/noticeVerify.wxml
  25. 100
      subpages/associationNew/components/noticeVerify/noticeVerify.wxss
  26. BIN
      subpages/associationNew/images/shield.png
  27. 53
      subpages/associationNew/pages/eventlist/eventlist.js
  28. 3
      subpages/associationNew/pages/eventlist/eventlist.json
  29. 21
      subpages/associationNew/pages/eventlist/eventlist.wxml
  30. 7
      subpages/associationNew/pages/eventlist/eventlist.wxss
  31. 9
      subpages/associationNew/utils/api.js
  32. 2
      subpages/heart/pages/leaderboardNew/leaderboardNew.wxml

2
components/activity/activity.wxml

@ -1,4 +1,4 @@
<view class="layout" wx:for="{{activityList}}">
<view class="layout" wx:for="{{activityList}}" wx:key="index">
<view data-id="{{item.id}}"
data-actCurrentState="{{item.actCurrentState}}"
data-signupFlag="{{item.signupFlag}}"

BIN
images/mine/topic-nodata.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 53 KiB

BIN
images/search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

5
pages/discussion/components/issueList/issueList.js

@ -170,6 +170,11 @@ Component({
this.data.selectedIssueId = ""
})
}
},
//跳转项目列表
goProjectComponent () {
this.triggerEvent('goProjectComponent')
}
}
})

3
pages/discussion/components/issueList/issueList.wxml

@ -28,7 +28,7 @@
wx:for="{{[1]}}"
wx:for-index="index"
wx:for-item="item"
wx:key="{{index}}">
wx:key="index">
</preload-issue-item>
</block>
<block wx:if="{{issueList.length > 0}}">
@ -44,6 +44,7 @@
<view class="issue-nodata" wx:if="{{issueList.length === 0 && !preloadVisible}}">
<image class="nodata-image" src="../../../../images/mine/topic-nodata.png" />
<view class="nodata-tip">暂无议题</view>
<view class="nodata-tip">请前往“<text class="go-project" catchtap="goProjectComponent">项目</text>”进行查看</view>
</view>
</view>
</pulldown-refresh>

13
pages/discussion/components/issueList/issueList.wxss

@ -92,7 +92,7 @@
.issue-list .issue-nodata {
width: 100%;
height: calc(100vh - 300rpx);
height: calc(100vh - 500rpx);
background: #f7f7f7;
display: flex;
flex-direction: column;
@ -100,8 +100,10 @@
justify-content: center;
}
.issue-list .issue-nodata .nodata-image {
width: 256rpx;
height:245rpx;
/* width: 256rpx;
height:245rpx; */
width: 320rpx;
height:480rpx;
object-fit: cover;
}
.issue-list .issue-nodata .nodata-tip {
@ -110,3 +112,8 @@
height: 50rpx;
line-height: 50rpx;
}
.issue-list .issue-nodata .nodata-tip .go-project{
font-size: 28rpx;
color: #bcbcbc;
}

2
pages/discussion/components/projectList/projectList.wxml

@ -13,7 +13,7 @@
wx:for="{{[1]}}"
wx:for-index="index"
wx:for-item="item"
wx:key="{{index}}">
wx:key="index">
</preload-project-item>
</block>
<block wx:if="{{projectList.length > 0}}">

14
pages/discussion/discussion.js

@ -104,6 +104,20 @@ Page({
getIssueComponent () {
this.issuelist = this.selectComponent("#issuelist")
},
goProjectComponent () {
const list = this.data.typeList
list.forEach(item => {
if (item.type == '1') {
item.select = true
} else {
item.select = false
}
})
this.setData({
typeList: list,
discussionType: "project"
})
},
// 检查 是否完善信息
verifyCompleteInfo () {
if (this.data.infoCompleted == 0) {

2
pages/discussion/discussion.wxml

@ -18,7 +18,7 @@
</view>
<view class="issue-list" wx:if="{{discussionType === 'issue'}}">
<issue-list id="issuelist" bind:getIssueComponent="getIssueComponent"></issue-list>
<issue-list id="issuelist" bind:getIssueComponent="getIssueComponent" bind:goProjectComponent="goProjectComponent"></issue-list>
</view>
<view class="project-list" wx:else>
<project-list id="projectlist" bind:getProjectComponent="getProjectComponent"></project-list>

33
pages/heartNew/heartNew.js

@ -36,7 +36,8 @@ Page({
listLength:0,//数据长度判断是否需要加载
getImgUrl:"",
ifClickImage:false,//因为志友多多点击图片查看大图,会出现列表刷新的bug,所以加这个字段进行控制
tabFixed: false
tabFixed: false,
searchName: ''
},
/**
@ -130,7 +131,8 @@ Page({
dingdan: true,
jingcai: true,
volunteerlist:[],//列表置空
listLength:0
listLength:0,
searchName: ''
})
let parms = {
pageIndex: this.data.indexPage,
@ -204,7 +206,7 @@ Page({
})
}
that.setData({
listLength:res.data.length,
listLength:res.data.volunteerList.length,
volunteerlist:that.data.volunteerlist.concat(res.data.volunteerList),
volunteerCount: res.data.volunteerCount
})
@ -242,7 +244,32 @@ Page({
})
},
bindInputValue (e) {
this.setData({
searchName: e.detail.value
})
},
searchName () {
console.log(this.data.searchName)
if(!this.data.searchName) {
wx.showToast({
title: '请输入搜索的昵称',
icon: 'none',
duration: 2000
})
return;
}
let parms = {
pageIndex: this.data.indexPage,
pageSize: this.data.pageSize,
nickname: this.data.searchName
}
this.setData({
volunteerlist: []
})
this.volunteerlist(parms)
},
/**
* 生命周期函数--监听页面隐藏
*/

11
pages/heartNew/heartNew.wxml

@ -77,9 +77,18 @@
<!-- 志友朵朵 -->
<block wx:if="{{ selectedTab == 'tab1' }}">
<view class="details-top">
<view class="search">
<view class="item-all">
<view class="item-left">
<image src="../../images/search.png"></image>
<input placeholder-class="placeholder-style" placeholder="输入昵称关键字" bindinput="bindInputValue" value="{{searchName}}"></input>
</view>
<button class="item-right" bindtap="searchName" hover-class="none">搜索</button>
</view>
</view>
<view class="reg-count">志愿者注册数:{{volunteerCount}}</view>
<view class="volunteer-box">
<volunteer-list bind:clickImage="clickImage" wx:for="{{volunteerlist}}" volunteerItemObj="{{item}}" wx:for-index="index" wx:for-item="item" wx:key="{{index}}"></volunteer-list>
<volunteer-list bind:clickImage="clickImage" wx:for="{{volunteerlist}}" volunteerItemObj="{{item}}" wx:for-index="index" wx:for-item="item" wx:key="index"></volunteer-list>
</view>
<!-- <view class="show">*按姓氏拼音排序</view> -->
</view>

69
pages/heartNew/heartNew.wxss

@ -393,3 +393,72 @@ button:last-child {
font-weight: 500;
color: #C5C5C5;
}
/* 搜索志愿者 start */
.search {
/* margin-top: 17rpx; */
height: 66rpx;
background: rgba(255, 255, 255, 1);
border-radius: 33rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 10rpx 40rpx;
}
.search .item-all {
height: 30rpx;
width: 100%;
width: calc(100% - 60rpx);
display: flex;
align-items: center;
justify-content: space-between;
}
.search .item-all .item-left {
/* background: red; */
width: calc(100% - 73rpx);
height: 30rpx;
border-right: 1rpx solid #BFBFBF;
display: flex;
align-items: center;
justify-content: space-between;
}
.search .item-all .item-left image {
width: 30rpx;
height: 28rpx;
}
.search .item-all .item-left input {
width: calc(100% - 41rpx);
height: 30rpx;
font-size: 28rpx;
color: #333;
}
.placeholder-style {
font-size: 28rpx;
font-weight: 500;
color: rgba(168, 168, 168, 1);
}
.search .item-all .item-right {
font-size: 28rpx;
font-weight: 500;
color: rgba(51, 51, 51, 1);
background-color: #fff;
}
.search button {
width: 100rpx;
height: 58rpx;
padding: 0;
border-radius: 0;
line-height: 58rpx;
}
.search button::after {
border-radius: 0px;
border: none;
}
/* 搜索志愿者 end */

3
pages/mine/components/topicItemNew/topicItemNew.wxml

@ -1,4 +1,4 @@
<view class="item-list">
<view class="item-list" data-topicid="{{topicObj.id}}" bindtap="toDetail">
<view class="user-info">
<image src="{{topicObj.userFace}}"></image>
<view class="name-date">
@ -34,4 +34,5 @@
<view wx:for="{{topicObj.comments}}" wx:key="index" wx:for-index="index" wx:for-item="item_"
class="comment-list"><text>{{item_.username}}:</text>{{item_.content}}</view>
</view>
<view class="shield-line" wx:if="{{topicObj.shieldFlag=='1'}}"><view class="shield-label">已屏蔽</view></view>
</view>

16
pages/mine/components/topicItemNew/topicItemNew.wxss

@ -210,3 +210,19 @@
height: 100%;
object-fit: cover;
}
.shield-line {
display: flex;
justify-content: flex-end;
margin-top: 10rpx;
}
.shield-line .shield-label {
width: 90rpx;
height: 34rpx;
border-radius: 17rpx;
background: #F40C0C;
color: #fff;
font-size: 22rpx;
line-height: 34rpx;
text-align:center;
}

17
pages/mine/mine.js

@ -288,14 +288,15 @@ Page({
})
},
// 话题列表 跳转详情
// toTopicDetail(e) {
// const {
// topicId
// } = e.detail
// wx.navigateTo({
// url: `/subpages/association/pages/topicDetail/topicDetail?detailId=${topicId}`
// })
// },
toTopicDetail(e) {
console.log(e.detail)
const {
topicId
} = e.detail
wx.navigateTo({
url: `/subpages/association/pages/topicDetail/topicDetail?detailId=${topicId}`
})
},
// 我有事说
addIssue () {
if (this.data.infoCompleted == 0) {

4
pages/mine/mine.wxml

@ -110,10 +110,10 @@
<view class="topic-list" wx:elif="{{selectedTabBar === 'topic'}}">
<block wx:if="{{topicList.length === 0 && preloadVisible}}">
<preload-topic-item wx:for="{{[1]}}" wx:key="{{index}}" wx:for-index="index"></preload-topic-item>
<preload-topic-item wx:for="{{[1]}}" wx:key="index" wx:for-index="index"></preload-topic-item>
</block>
<block wx:if="{{topicList.length > 0}}">
<topic-item wx:for="{{topicList}}" wx:for-item="item" wx:for-index="index" topicObj="{{item}}" bind:toTopicDetail="toTopicDetail" wx:key="{{item.id}}">
<topic-item wx:for="{{topicList}}" wx:for-item="item" wx:for-index="index" topicObj="{{item}}" bind:toTopicDetail="toTopicDetail" wx:key="id">
</topic-item>
</block>
<view class="topic-nodata" wx:if="{{topicList.length === 0 && !preloadVisible}}">

2
pages/toRegister/toRegister.js

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

78
subpages/association/pages/topicDetail/topicDetail.js

@ -1,11 +1,12 @@
import {
getTopicDetail,
getRemarkList,
closeTopic,
getTopicDetailV2,
//getRemarkList,
//closeTopic,
// publishStatement,
topicComLike,
topicComUnlike,
getCloseReason } from "../../utils/api"
//topicComLike,
//topicComUnlike,
//getCloseReason
} from "../../utils/api"
const app = getApp()
Page({
@ -51,31 +52,30 @@ Page({
detailId: options.detailId,
infoCompleted: app.globalData.infoCompleted
})
this.getCloseReason()
// this.getCloseReason()
},
onShow () {
this.setData({
pageNo: 1,
loadMoreType: "loading",
timestamp: ""
})
this.getTopicRemark()
// this.setData({
// pageNo: 1,
// loadMoreType: "loading",
// timestamp: ""
// })
// this.getTopicRemark()
},
onReachBottom () {
if (!this.data.loadMoreVisible) {
this.setData({
loadMoreVisible: true
})
}
if (this.data.loadMoreType === "loading") {
this.setData({
pageNo: this.data.pageNo + 1
})
setTimeout(() => {
this.getTopicRemark()
},500)
}
// if (!this.data.loadMoreVisible) {
// this.setData({
// loadMoreVisible: true
// })
// }
// if (this.data.loadMoreType === "loading") {
// this.setData({
// pageNo: this.data.pageNo + 1
// })
// setTimeout(() => {
// this.getTopicRemark()
// },500)
// }
},
// 跳转 评论
inputFocus () {
@ -104,20 +104,30 @@ Page({
},
// 获取话题详情
getTopicDetail (detailId) {
getTopicDetail(detailId).then(res => {
getTopicDetailV2(detailId).then(res => {
console.log("话题详情",res)
const detailInfo = {}
for(const key in this.data.detailInfo) {
detailInfo[key] = res.data[key]
}
// const detailInfo = {}
// for(const key in this.data.detailInfo) {
// detailInfo[key] = res.data[key]
// }
// this.setData({
// lordFlag: res.data.lordFlag,
// detailInfo
// })
this.data.detailInfo = { ...res.data }
this.setData({
lordFlag: res.data.lordFlag,
detailInfo
detailInfo: this.data.detailInfo
})
}).catch(err => {
console.log(err)
})
},
previewImage (e) {
wx.previewImage({
urls: this.data.detailInfo.images,
current: e.currentTarget.dataset.src
})
},
// 获取话题评论列表
getTopicRemark () {
const para = {

36
subpages/association/pages/topicDetail/topicDetail.wxml

@ -1,4 +1,4 @@
<view class="topic-detail">
<!-- <view class="topic-detail">
<topic-content detailInfo="{{detailInfo}}"></topic-content>
@ -54,5 +54,37 @@
<completeinfo-dialog
completeInfoDialogVisible="{{completeInfoDialogVisible}}">
</completeinfo-dialog>
</completeinfo-dialog> -->
<view class="topic-detail">
<view class="topic-content">
<view class="user-info">
<image class="avatar" src="{{detailInfo.userFace}}" />
<view class="identify">
<view class="identify-top">
<view class="nickname">{{detailInfo.nickname}}</view>
<!-- <image class="party-flag" wx:if="{{detailInfo.partyFlag == '1'}}" src="../../images/ic_dangbiaoqian.png" /> -->
</view>
<view class="identify-bottom">{{detailInfo.createdTime}}</view>
</view>
</view>
<view class="issue-content">{{detailInfo.topicContent}}</view>
<view class="image-list">
<image
catchtap="previewImage"
data-src="{{item}}"
wx:for="{{detailInfo.images}}"
wx:for-index="index"
wx:for-item="item"
mode="widthFix"
wx:key="index"
class="image-item"
src="{{item}}" />
</view>
</view>
<view class="handle-progress" wx:if="{{detailInfo.shieldFlag =='1'}}">
<view class="title">屏蔽原因</view>
<view class="handle-progress-content">{{detailInfo.shieldReason}}</view>
</view>
</view>

100
subpages/association/pages/topicDetail/topicDetail.wxss

@ -2,7 +2,7 @@ page {
width: 100%;
height: 100vh;
}
.topic-detail {
/* .topic-detail {
width: 100%;
min-height: 101%;
background: #f7f7f7;
@ -77,4 +77,102 @@ page {
}
.bottom-operation .hover-change {
background: red;
} */
page {
width: 100%;
min-height: 100vh;
height: auto;
overflow-y: auto;
}
.topic-detail {
width: 100%;
min-height: 100vh;
background: #f7f7f7;
box-sizing: border-box;
padding: 20rpx;
}
.topic-content {
width: 100%;
background: #fff;
box-sizing: border-box;
padding: 0 25rpx;
overflow: hidden;
}
.topic-content .user-info {
width: 100%;
height: 64rpx;
display: flex;
align-items: center;
margin-top: 50rpx;
}
.topic-content .user-info .avatar {
width: 64rpx;
height: 64rpx;
object-fit: cover;
border-radius: 50rpx;
margin-right: 13rpx;
}
.topic-content .user-info .identify {
display: flex;
flex-direction:column;
justify-content: space-between;
}
.topic-content .user-info .identify .identify-top {
display: flex;
align-items: center;
}
.topic-content .user-info .identify .identify-top .nickname {
font-size: 28rpx;
color: #444;
}
.topic-content .user-info .identify .identify-top .party-flag {
width: 27rpx;
height: 27rpx;
object-fit: cover;
margin-left: 6rpx;
}
.topic-content .user-info .identify .identify-bottom {
font-size: 20rpx;
color: #999;
}
.topic-content .issue-content {
font-size: 38rpx;
color: #333;
line-height: 58rpx;
margin: 26rpx 0;
}
.topic-content .image-list {
width: 100%;
margin-bottom: 76rpx;
}
.topic-content .image-list .image-item {
width: 100%;
border-radius: 16rpx;
}
.topic-content .image-list .image-item + .image-item {
margin-top: 20rpx;
}
.handle-progress {
width: 100%;
overflow: hidden;
}
.handle-progress .title {
width: 100%;
font-size: 32rpx;
color: #333;
line-height: 86rpx;
height: 86rpx;
margin-top: 38rpx;
font-weight: bolder;
}
.handle-progress .handle-progress-content {
width: 100%;
background: #fff;
box-sizing: border-box;
padding: 30rpx 25rpx;
font-size: 32rpx;
color: #F40D0D;
}

7
subpages/association/utils/api.js

@ -149,7 +149,12 @@ export function getTopicList ({ pageIndex, pageSize, timestamp, groupId, topicId
export function getTopicDetail (detailId) {
return request.get(`group/topic/detail/${detailId}`)
}
/**
* 话题详情v2
*/
export function getTopicDetailV2 (detailId) {
return request.get(`partyGroup/topic/detail/${detailId}`)
}
/**
* 退群
* @param groupId

91
subpages/associationNew/components/noticeVerify/noticeVerify.js

@ -0,0 +1,91 @@
Component({
data: {
visible: false,
textareaValue: ''
},
properties: {
noticeVerifyVisible: {
type: Boolean,
value: false,
observer: function (newValue) {
this.setData({
visible: !this.data.visible
})
}
},
title: {
type: String,
value: ''
},
cancelText: {
type: String,
value: ''
},
confirmText: {
type: String,
value: ''
},
tipVisible: {
type: Boolean,
value: false
},
tipValue: {
type: String,
value: '*请输入屏蔽该话题的原因'
}
},
lifetimes: {
attached () {
console.log('notice-verify')
},
deattached () {
}
},
pageLifetimes: {
show () {
},
hide () {
}
},
methods: {
close () {
this.triggerEvent('close', {data: this.data.textareaValue})
this.setData({
// visible: !this.data.visible,
textareaValue: ''
})
},
confirm () {
if (this.data.textareaValue === '') {
wx.showToast({
title: '原因不能为空',
icon: 'none',
duration: 2000
})
return false
}
this.triggerEvent('confirm', {data: this.data.textareaValue})
this.setData({
// visible: !this.data.visible,
textareaValue: ''
})
},
textareaInput (e) {
this.setData({
textareaValue: e.detail.value
})
// console.log(this.data.textareaValue)
},
closeDialog () {
this.setData({
visible: !this.data.visible
})
},
move () {
}
}
})

3
subpages/associationNew/components/noticeVerify/noticeVerify.json

@ -0,0 +1,3 @@
{
"component": true
}

16
subpages/associationNew/components/noticeVerify/noticeVerify.wxml

@ -0,0 +1,16 @@
<view class="notice-verify" wx:if="{{visible}}" capture-catch:touchmove="move">
<view class="content">
<view class="close" bindtap="closeDialog">
<!-- <image src="../../images/delete.png" /> -->
</view>
<view class="title">{{title}}</view>
<view class="textarea">
<textarea value="{{textareaValue}}" bindinput="textareaInput" placeholder-class="textarea-placeholder" placeholder="屏蔽原因(必填 100字以内)" maxlength="100"/>
</view>
<view class="note" wx:if="{{tipVisible}}">{{tipValue}}</view>
<view class="footer">
<view class="unpass" wx:if="{{cancelText != ''}}" bindtap="close">{{cancelText}}</view>
<view class="pass" wx:if="{{confirmText != ''}}" bindtap="confirm">{{confirmText}}</view>
</view>
</view>
</view>

100
subpages/associationNew/components/noticeVerify/noticeVerify.wxss

@ -0,0 +1,100 @@
.notice-verify {
width: 100%;
height: 100vh;
position: fixed;
left: 0;
top: 0;
background: rgba(0,0,0,0.3);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.notice-verify .content {
width: 610rpx;
height: auto;
border-radius: 16rpx;
background: #fff;
box-sizing: border-box;
padding: 0 30rpx;
}
.notice-verify .content .close {
width: 100%;
height: 62rpx;
display: flex;
justify-content: flex-end;
align-items: center;
}
.notice-verify .content .close image {
width: 40rpx;
height: 40rpx;
object-fit:cover;
position: relative;
left: 7px;
top: 2px;
}
.notice-verify .content .title {
font-size: 40rpx;
color: #333;
line-height: 57rpx;
height: 57rpx;
width:100%;
text-align:center;
margin-bottom: 26rpx;
}
.notice-verify .content .textarea {
width: 100%;
height: 345rpx;
border-radius: 16rpx;
background: #f7f7f7;
box-sizing: border-box;
padding: 27rpx 17rpx 0;
margin-bottom: 20rpx;
}
.notice-verify .content .textarea textarea {
width: 100%;
height: 100%;
font-size: 32rpx;
line-height: 44rpx;
color: #666;
}
.notice-verify .content .textarea .textarea-placeholder {
font-size: 28rpx;
color: #999;
line-height: 40rpx;
}
.notice-verify .content .note {
font-size: 24rpx;
color: #999;
height:58rpx;
line-height: 58rpx;
}
.notice-verify .content .footer {
width: 100%;
height: 107rpx;
box-sizing: border-box;
padding: 15rpx 0;
display: flex;
justify-content: space-around;
align-items: center;
border-top: 1rpx solid #eaeaea;
}
.notice-verify .content .unpass {
height: 100%;
line-height: 77rpx;
font-size: 36rpx;
flex: 1;
color: #999;
text-align: center;
}
.notice-verify .content .unpass + .pass {
border-left: 1rpx solid #eaeaea;
}
.notice-verify .content .pass {
height: 100%;
line-height: 77rpx;
font-size: 36rpx;
flex: 1;
color: #04BCA0;
text-align: center;
}

BIN
subpages/associationNew/images/shield.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

53
subpages/associationNew/pages/eventlist/eventlist.js

@ -1,6 +1,6 @@
// subpages/associationNew/pages/eventlist/eventlist.js
const app = getApp()
import { topiclist, commentSubmit, statement } from "../../utils/api"
import { topiclist, commentSubmit, statement, shieldTopic } from "../../utils/api"
import {
getTimestamp
} from "../../../../utils/common"
@ -31,7 +31,11 @@ Page({
commentViewContent: "发个小看法", // 写评论按钮 文字内容
violationsCount: 0,
isConReview: false,
lastTopicId: ""
lastTopicId: "",
currentUserIdentity: "", //当前用户是否 -群主0-副群主1-群成员2
showModal: false, //是否显示屏蔽原因模态框
shieldId: '', //被屏蔽话题的ID
shieldReason: '', //屏蔽的原因
},
/**
* 生命周期函数--监听页面加载
@ -70,6 +74,7 @@ Page({
wx.stopPullDownRefresh();
that.setData({
bannedFlag: res.data.bannedFlag,
currentUserIdentity: res.data.currentUserIdentity,
nodata: false,
topiclist: that.data.topiclist.concat(res.data.topicList),
loadMoreType: res.data.topicList.length === that.data.pageSize ? "loading" : "none",
@ -405,5 +410,49 @@ Page({
wx.navigateTo({
url: `/subpages/associationNew/pages/guideInfo/guideInfo?partyGroupId=${this.data.partyGroupId}`
})
},
// 群主或副群主 屏蔽话题操作
shieldTopic (e) {
this.setData({
showModal: true,
shieldId: e.currentTarget.dataset.id,
shieldReason: ''
})
},
modalCancel (e) {
this.setData({
showModal: false,
shieldReason: ''
})
},
modalConfirm (e) {
this.setData({
showModal: false,
shieldReason: e.detail.data
})
const param = {
id: this.data.shieldId,
shieldReason: this.data.shieldReason
}
shieldTopic(param).then( res => {
console.log(res.data)
if (res.code == '0') {
wx.showToast({
title: '屏蔽成功',
icon: 'none',
duration: 2000
})
this.setData({
pageIndex: 1,
pageSize: 10,
nodata: false,
loadMoreType: "none",
loadMoreVisible: false,
topiclist: [],
})
this.topiclist()
}
})
}
})

3
subpages/associationNew/pages/eventlist/eventlist.json

@ -2,7 +2,8 @@
"usingComponents": {
"load-more": "../../../../components/loadMore/loadMore",
"no-data":"../../../../components/nodata/nodata",
"completeInfo-dialog": "../../../../components/completeInfoDialog/completeInfoDialog"
"completeInfo-dialog": "../../../../components/completeInfoDialog/completeInfoDialog",
"notice-verify": "../../components/noticeVerify/noticeVerify"
},
"navigationBarTitleText": "",
"enablePullDownRefresh": true,

21
subpages/associationNew/pages/eventlist/eventlist.wxml

@ -31,13 +31,16 @@
<image src="../../images/comment.png"></image>
<view class="give-data-n">{{item.commentNum}}</view>
</view>
<view class="all" data-id="{{item.id}}" bindtap="shieldTopic" wx:if="{{currentUserIdentity=='0'||currentUserIdentity=='1'}}">
<image src="../../images/shield.png"></image>
<view class="give-data-m">屏蔽</view>
</view>
<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">
<image class="comment_ic" src="../../images/comment_ic.png" ></image>
{{commentViewContent}}
</view>
<image class="comment_ic" src="../../images/comment_ic.png" ></image>
{{commentViewContent}}
</view>
</view>
</view>
<view wx:if="{{item.likes.length > 0}}" class="likes">
@ -76,3 +79,13 @@
</movable-area>
<completeInfo-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}">
</completeInfo-dialog>
<notice-verify
noticeVerifyVisible="{{showModal}}"
bind:close="modalCancel"
bind:confirm="modalConfirm"
title="屏蔽原因"
tipVisible="{{true}}"
cancelText="取消"
confirmText="屏蔽">
</notice-verify>

7
subpages/associationNew/pages/eventlist/eventlist.wxss

@ -105,6 +105,13 @@ page {
margin-right: 10rpx;
}
.attitude .all .give-data-m {
font-size: 26rpx;
font-weight: 500;
color: rgba(51, 51, 51, 1);
margin-left: 9rpx;
/* width: 196rpx; */
}
.attitude .all .give-data-n {
font-size: 30rpx;
font-weight: 500;

9
subpages/associationNew/utils/api.js

@ -132,6 +132,15 @@ export function getGuideInfo (partyGroupId) {
return request.get("partyGroup/group/guideInfo/"+partyGroupId)
}
/**
* 群主或副群主 屏蔽话题
*/
export function shieldTopic ({id, shieldReason}) {
return request.post("partyGroup/topic/shield", {
id,
shieldReason
})
}

2
subpages/heart/pages/leaderboardNew/leaderboardNew.wxml

@ -60,7 +60,7 @@
<pulldown-refresh id="pulldown-refresh" bind:pullDownRefresh="pulldownRefresh">
<view class="activity-list" slot="content">
<block wx:if="{{preloadVisible}}">
<preload-activity-item wx:for="{{[1,2]}}" wx:for-index="index" wx:for-item="item" wx:key="{{index}}">
<preload-activity-item wx:for="{{[1,2]}}" wx:for-index="index" wx:for-item="item" wx:key="index">
</preload-activity-item>
</block>
<block wx:elif="{{signedList.length > 0 && !preloadVisible}}">

Loading…
Cancel
Save