Browse Source

版本1.4.6

master
lihenian 5 years ago
parent
commit
d7d067d602
  1. 1
      app.json
  2. 2
      project.config.json
  3. 5
      subpages/associationNew/components/membersList/membersList.wxml
  4. 12
      subpages/associationNew/components/membersList/membersList.wxss
  5. BIN
      subpages/associationNew/images/copy@2x.png
  6. BIN
      subpages/associationNew/images/fire@2x.png
  7. BIN
      subpages/associationNew/images/huatizhinan@2x.png
  8. BIN
      subpages/associationNew/images/leader-logo.png
  9. BIN
      subpages/associationNew/images/leader-logo@2x.png
  10. BIN
      subpages/associationNew/images/leader2-logo@2x.png
  11. BIN
      subpages/associationNew/images/resident@2x.png
  12. 3
      subpages/associationNew/pages/community/community.js
  13. 47
      subpages/associationNew/pages/eventlist/eventlist.js
  14. 13
      subpages/associationNew/pages/eventlist/eventlist.wxml
  15. 72
      subpages/associationNew/pages/eventlist/eventlist.wxss
  16. 21
      subpages/associationNew/pages/guideInfo/guideInfo.js
  17. 5
      subpages/associationNew/pages/guideInfo/guideInfo.json
  18. 13
      subpages/associationNew/pages/guideInfo/guideInfo.wxml
  19. 78
      subpages/associationNew/pages/guideInfo/guideInfo.wxss
  20. 8
      subpages/associationNew/utils/api.js

1
app.json

@ -63,6 +63,7 @@
"pages": [ "pages": [
"pages/associationlist/associationlist", "pages/associationlist/associationlist",
"pages/community/community", "pages/community/community",
"pages/guideInfo/guideInfo",
"pages/gMembersList/gMembersList", "pages/gMembersList/gMembersList",
"pages/gOfficialsList/gOfficialsList", "pages/gOfficialsList/gOfficialsList",
"pages/talklist/talklist", "pages/talklist/talklist",

2
project.config.json

@ -4,7 +4,7 @@
"ignore": [] "ignore": []
}, },
"setting": { "setting": {
"urlCheck": false, "urlCheck": true,
"es6": true, "es6": true,
"postcss": true, "postcss": true,
"preloadBackgroundData": false, "preloadBackgroundData": false,

5
subpages/associationNew/components/membersList/membersList.wxml

@ -8,7 +8,10 @@
wx:key="index"> wx:key="index">
<view class="item-top"> <view class="item-top">
<image class="head-icon" src="{{item.userAvatar}}"></image> <image class="head-icon" src="{{item.userAvatar}}"></image>
<text class="user-name">{{item.nickname}}</text><image wx:if="{{item.identityFlag === '0'}}" class="leader-logo" src="../../images/leader-logo.png"></image> <text class="user-name">{{item.nickname}}</text>
<image wx:if="{{item.identityFlag === '0'}}" class="identity-logo identity0" src="../../images/leader-logo@2x.png"></image>
<image wx:if="{{item.identityFlag === '1'}}" class="identity-logo identity1" src="../../images/leader2-logo@2x.png"></image>
<image wx:if="{{item.thisCommunity === '1'}}" class="identity-logo this-community" src="../../images/resident@2x.png"></image>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="item-bottom"> <view class="item-bottom">

12
subpages/associationNew/components/membersList/membersList.wxss

@ -33,11 +33,19 @@
color: rgba(0, 0, 0, 1); color: rgba(0, 0, 0, 1);
margin-left: 20rpx; margin-left: 20rpx;
} }
.members-item .item-top .leader-logo{ .members-item .item-top .identity-logo{
width: 59rpx;
height: 28rpx; height: 28rpx;
margin-left: 8rpx; margin-left: 8rpx;
} }
.members-item .item-top .identity0{
width: 59rpx;
}
.members-item .item-top .identity1{
width: 76rpx;
}
.members-item .item-top .this-community{
width: 116rpx;
}
.members-item .item-bottom{ .members-item .item-bottom{
height: 100rpx; height: 100rpx;
width: 750rpx; width: 750rpx;

BIN
subpages/associationNew/images/copy@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
subpages/associationNew/images/fire@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
subpages/associationNew/images/huatizhinan@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

BIN
subpages/associationNew/images/leader-logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
subpages/associationNew/images/leader-logo@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
subpages/associationNew/images/leader2-logo@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
subpages/associationNew/images/resident@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

3
subpages/associationNew/pages/community/community.js

@ -39,7 +39,7 @@ Page({
onShareAppMessage: function () { onShareAppMessage: function () {
}, },
//跳转页面 //跳转页面-群成员
navToGroupMembers (e) { navToGroupMembers (e) {
console.log(this.data.partyGroupId) console.log(this.data.partyGroupId)
wx.navigateTo({ wx.navigateTo({
@ -53,7 +53,6 @@ Page({
url: `/subpages/associationNew/pages/gOfficialsList/gOfficialsList?partyGroupId=${this.data.partyGroupId}` url: `/subpages/associationNew/pages/gOfficialsList/gOfficialsList?partyGroupId=${this.data.partyGroupId}`
}) })
} else if (e.currentTarget.dataset.page === 'gather') { } else if (e.currentTarget.dataset.page === 'gather') {
console.log('/subpages/associationNew/pages/community/community.js')
wx.navigateTo({ wx.navigateTo({
url:`/subpages/associationNew/pages/eventlist/eventlist?partyGroupId=${this.data.partyGroupId}&topicType=1` //`#/话对捧个场` url:`/subpages/associationNew/pages/eventlist/eventlist?partyGroupId=${this.data.partyGroupId}&topicType=1` //`#/话对捧个场`
}) })

47
subpages/associationNew/pages/eventlist/eventlist.js

@ -175,7 +175,9 @@ Page({
if (this.verifyCompleteInfo()) { if (this.verifyCompleteInfo()) {
return false return false
} }
let index = e.currentTarget.dataset.index this.setData({
index: e.currentTarget.dataset.index
})
// <!-- 用户是否已点赞 0否;1是 --> // <!-- 用户是否已点赞 0否;1是 -->
if (this.data.bannedFlag == '1') {//被禁言 if (this.data.bannedFlag == '1') {//被禁言
wx.showToast({ wx.showToast({
@ -198,13 +200,7 @@ Page({
} }
statement(para).then(res => { statement(para).then(res => {
// 点赞成功以后实现局部刷新功能 // 点赞成功以后实现局部刷新功能
var obj = that.data.topiclist[index] that.nowLikesList(e.currentTarget.dataset.id);
// <!-- 用户是否已点赞 0否;1是 -->
obj.likeFlag = obj.likeFlag == '0' ? '1' : '0'
obj.supportNum = obj.likeFlag == '1' ? obj.supportNum + 1 : obj.supportNum - 1
that.setData({
["topiclist[" + index + "]"]: obj
})
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
@ -314,5 +310,40 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
},
/**
* 点赞后局部更新内容
*/
nowLikesList (topicId) {
let that = this;
const para = {
pageIndex: 1,
pageSize: 10,
timestamp: getTimestamp(),
topicType: this.data.topicType,
partyGroupId: this.data.partyGroupId, //党群id
partyTopicId: topicId
}
topiclist(para).then(res => {
var obj = that.data.topiclist[that.data.index]
obj = res.data.topicList[0]
// <!-- 用户是否已点赞 0否;1是 -->
// obj.likeFlag = obj.likeFlag == '0' ? '1' : '0'
// obj.supportNum = obj.likeFlag == '1' ? obj.supportNum + 1 : obj.supportNum - 1
that.setData({
["topiclist[" + that.data.index + "]"]: obj
})
}).catch(err => {
console.log(err)
})
},
/*
* 前往论坛指南页面
*/
navToForumGuide (e) {
console.log('前往论坛指南')
wx.navigateTo({
url: `/subpages/associationNew/pages/guideInfo/guideInfo?partyGroupId=${this.data.partyGroupId}`
})
} }
}) })

13
subpages/associationNew/pages/eventlist/eventlist.wxml

@ -1,8 +1,13 @@
<view class="func-top">
<text>话题指南</text>
<button hover-class="hover-class" class="top-right" bindtap="navToForumGuide" plain='true'><image src="../../images/next.png"/></button>
</view>
<view class="item-list" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{topiclist}}"> <view class="item-list" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{topiclist}}">
<view class="user-info"> <view class="user-info">
<image src="{{item.userFace}}"></image> <image src="{{item.userFace}}"></image>
<view class="name-date"> <view class="name-date">
<view class="name">{{item.nickname}}</view> <view class="name">{{item.nickname}}
<image class="community-logo" wx:if="{{item.thisCommunity == '1'}}" src="../../images/resident@2x.png"></image></view>
<view class="date">{{item.createdTime}}</view> <view class="date">{{item.createdTime}}</view>
</view> </view>
</view> </view>
@ -31,6 +36,12 @@
<view class="give-data">评论</view> <view class="give-data">评论</view>
</view> </view>
</view> </view>
<view wx:if="{{item.likes.length > 0}}" class="likes">
<block wx:for="{{item.likes}}" wx:key="index" wx:for-index="index" wx:for-item="likesItem">
<text>{{likesItem.nickname}}</text><text wx:if="{{index < item.likes.length - 1}}">,</text>
</block>
</view>
<view wx:if="{{item.likes.length > 0 && item.comments.length > 0}}" class="line"></view>
<view wx:if="{{item.comments.length > 0}}" class="comment"> <view wx:if="{{item.comments.length > 0}}" class="comment">
<view wx:for="{{item.comments}}" wx:key="index" wx:for-index="index" wx:for-item="item_" <view wx:for="{{item.comments}}" wx:key="index" wx:for-index="index" wx:for-item="item_"
class="comment-list"><text>{{item_.username}}:</text>{{item_.content}}</view> class="comment-list"><text>{{item_.username}}:</text>{{item_.content}}</view>

72
subpages/associationNew/pages/eventlist/eventlist.wxss

@ -7,6 +7,7 @@ page {
padding: 40rpx 29rpx 20rpx 29rpx; padding: 40rpx 29rpx 20rpx 29rpx;
background: #fff; background: #fff;
margin-top: 20rpx; margin-top: 20rpx;
box-sizing: border-box;
} }
.user-info { .user-info {
@ -33,6 +34,15 @@ page {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
display: flex;
align-items: center;
}
.user-info .name-date .community-logo {
height: 28rpx;
width: 116rpx;
margin-left: 8rpx;
border-radius: 0px;
} }
.user-info .name-date .date { .user-info .name-date .date {
@ -50,7 +60,8 @@ page {
} }
.image-list { .image-list {
width: calc(100% - 58rpx); /* width: calc(100% - 58rpx); */
width: 100%;
margin-top: 30rpx; margin-top: 30rpx;
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(216rpx, 1fr)); grid-template-columns: repeat(auto-fit, minmax(216rpx, 1fr));
@ -66,7 +77,7 @@ page {
.attitude { .attitude {
width: calc(100% - 300rpx); width: calc(100% - 300rpx);
margin-top: 21rpx; margin: 21rpx 0rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -81,12 +92,12 @@ page {
} }
.attitude .all image { .attitude .all image {
width: 28rpx; width: 30rpx;
height: 28rpx; height: 30rpx;
} }
.attitude .all .give-data { .attitude .all .give-data {
font-size: 24rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
margin-left: 9rpx; margin-left: 9rpx;
@ -97,12 +108,27 @@ page {
color: #FFB103; color: #FFB103;
} }
.comment { .likes {
width: calc(100% - 98rpx); width: calc(100% - 98rpx);
padding: 26rpx 20rpx; padding: 24rpx 20rpx 12rpx 20rpx;
background: #F2F2F2; background: #F2F2F2;
border-radius: 8rpx; border-radius: 8rpx;
margin-top: 25rpx; margin-top: 25rpx;
font-size: 28rpx;
color: #333333;
}
.line {
width: calc(100% - 60rpx);
height: 0.5px;
background-color: #dddddd;
}
.comment {
width: calc(100% - 98rpx);
padding: 12rpx 20rpx 24rpx 20rpx;
background: #F2F2F2;
border-radius: 8rpx;
/* margin-top: 25rpx; */
} }
.comment .comment-list { .comment .comment-list {
@ -212,3 +238,35 @@ page {
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
.func-top{
height: 94rpx;
width: 750rpx;
position: relative;
background: rgba(255, 255, 255, 1);
}
.func-top text{
height: 94rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(51, 51, 51, 1);
line-height: 94rpx;
position: absolute;
left: 29rpx;
}
.func-top .top-right{
width: 40rpx;
height: 94rpx;
padding: 0;
border: none;
position: absolute;
right: 34rpx;
}
.func-top .top-right image{
width: 18rpx;
height: 24rpx;
margin: 0;
position: absolute;
top: 30rpx;
}

21
subpages/associationNew/pages/guideInfo/guideInfo.js

@ -0,0 +1,21 @@
import { getGuideInfo} from '../../utils/api'
Page({
data: {
partyGroupId: '',
todayTopic: {},
guideInfoData: []
},
onLoad: function (options) {
this.data.partyGroupId = options.partyGroupId
getGuideInfo(this.data.partyGroupId).then(res => {
if (res.data.length > 0) {
this.todayTopic = {...res.data[0]}
res.data.shift()
this.setData({
todayTopic: this.todayTopic,
guideInfoData: res.data
})
}
})
}
})

5
subpages/associationNew/pages/guideInfo/guideInfo.json

@ -0,0 +1,5 @@
{
"usingComponents": {
},
"navigationBarTitleText": "话题指南"
}

13
subpages/associationNew/pages/guideInfo/guideInfo.wxml

@ -0,0 +1,13 @@
<view class="guide-info">
<image class="topic-img" src="../../images/huatizhinan@2x.png" />
<view class="guide-content">
<view class="today-item">
<view class="today-top"><image src="../../images/fire@2x.png"/><text>{{todayTopic.showTime}}</text></view>
<view class="today-content"><text>{{todayTopic.content}}</text></view>
</view>
<view class="topic-item" wx:for="{{guideInfoData}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item-top"><image src="../../images/copy@2x.png"/><text>{{item.showTime}}</text></view>
<view class="item-content"><text>{{item.content}}</text></view>
</view>
</view>
</view>

78
subpages/associationNew/pages/guideInfo/guideInfo.wxss

@ -0,0 +1,78 @@
page {
width:100%;
height: auto;
min-height:100vh;
overflow-y: auto;
background: linear-gradient(to bottom, #db1a1f 0%,#e95027 50%,#db1a1f 100%);
}
.guide-info {
position: relative;
}
.topic-img{
width: 750rpx;
height: 306rpx;
position: absolute;
}
.guide-content {
display: flex;
flex-direction: column;
position: absolute;
top: 243rpx;
margin: 16rpx 30rpx;
}
.today-top {
position: relative;
}
.today-top image{
width: 232rpx;
height: 50rpx;
}
.today-top text{
height: 50rpx;
line-height: 50rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(255,255,255,1);
position: absolute;
left: 76rpx;
z-index: 999;
}
.topic-item, .today-item {
background-color: #ffffff;
border-radius: 10rpx;
display: flex;
flex-direction: column;
margin-bottom: 16rpx;
width: 690rpx;
}
.item-top {
position: relative;
display: flex;
align-items: center;
padding-left: 31rpx;
margin-top: 39rpx;
}
.item-top image{
width: 32rpx;
height: 32rpx;
}
.item-top text{
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #BF1F1F;
margin-left: 18rpx;
}
.item-content, .today-content{
padding: 28rpx 32rpx;
}
.item-content text,.today-content text{
font-size:34rpx;
font-family:PingFang SC;
font-weight:500;
color:rgba(51,51,51,1);
line-height:52rpx;
height: 52rpx;
}

8
subpages/associationNew/utils/api.js

@ -123,6 +123,14 @@ export function statement({attitude, topicId}) {
}) })
} }
/**
* 获取论坛指南
*/
export function getGuideInfo(partyGroupId) {
return request.get('partyGroup/group/guideInfo/'+partyGroupId)
}

Loading…
Cancel
Save