Browse Source

话对捧个场和事好鼓个掌 中增加话题指南页面

master
ZhaoTongYao 5 years ago
parent
commit
deaa754679
  1. 2
      project.config.json
  2. BIN
      subpages/associationNew/images/copy@2x.png
  3. BIN
      subpages/associationNew/images/fire@2x.png
  4. BIN
      subpages/associationNew/images/huatizhinan@2x.png
  5. 6
      subpages/associationNew/pages/community/community.js
  6. 4
      subpages/associationNew/pages/community/community.wxml
  7. 12
      subpages/associationNew/pages/eventlist/eventlist.js
  8. 4
      subpages/associationNew/pages/eventlist/eventlist.wxml
  9. 37
      subpages/associationNew/pages/eventlist/eventlist.wxss
  10. 14
      subpages/associationNew/pages/guideInfo/guideInfo.js
  11. 2
      subpages/associationNew/pages/guideInfo/guideInfo.json
  12. 10
      subpages/associationNew/pages/guideInfo/guideInfo.wxml
  13. 73
      subpages/associationNew/pages/guideInfo/guideInfo.wxss

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,

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

6
subpages/associationNew/pages/community/community.js

@ -46,12 +46,6 @@ Page({
url: `/subpages/associationNew/pages/gMembersList/gMembersList?partyGroupId=${this.data.partyGroupId}` url: `/subpages/associationNew/pages/gMembersList/gMembersList?partyGroupId=${this.data.partyGroupId}`
}) })
}, },
navToForumGuide (e) {
console.log('前往论坛指南')
wx.navigateTo({
url: `/subpages/associationNew/pages/guideInfo/guideInfo?partyGroupId=${this.data.partyGroupId}`
})
},
navToNewPage (e) { navToNewPage (e) {
// console.log(e.currentTarget.dataset.page); // console.log(e.currentTarget.dataset.page);
if (e.currentTarget.dataset.page === 'help') { if (e.currentTarget.dataset.page === 'help') {

4
subpages/associationNew/pages/community/community.wxml

@ -3,10 +3,6 @@
<text>群成员</text> <text>群成员</text>
<button hover-class="hover-class" class="top-right" bindtap="navToGroupMembers" plain='true'><image src="../../images/next.png"/></button> <button hover-class="hover-class" class="top-right" bindtap="navToGroupMembers" plain='true'><image src="../../images/next.png"/></button>
</view> </view>
<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="func-item" <view class="func-item"
wx:for="{{imageUrlList}}" wx:for="{{imageUrlList}}"
wx:for-index="index" wx:for-index="index"

12
subpages/associationNew/pages/eventlist/eventlist.js

@ -311,6 +311,9 @@ Page({
onShareAppMessage: function () { onShareAppMessage: function () {
}, },
/**
* 点赞后局部更新内容
*/
nowLikesList (topicId) { nowLikesList (topicId) {
let that = this; let that = this;
const para = { const para = {
@ -333,5 +336,14 @@ Page({
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
},
/*
* 前往论坛指南页面
*/
navToForumGuide (e) {
console.log('前往论坛指南')
wx.navigateTo({
url: `/subpages/associationNew/pages/guideInfo/guideInfo?partyGroupId=${this.data.partyGroupId}`
})
} }
}) })

4
subpages/associationNew/pages/eventlist/eventlist.wxml

@ -1,3 +1,7 @@
<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>

37
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 {
@ -41,6 +42,7 @@ page {
height: 28rpx; height: 28rpx;
width: 116rpx; width: 116rpx;
margin-left: 8rpx; margin-left: 8rpx;
border-radius: 0px;
} }
.user-info .name-date .date { .user-info .name-date .date {
@ -58,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));
@ -235,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;
}

14
subpages/associationNew/pages/guideInfo/guideInfo.js

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

2
subpages/associationNew/pages/guideInfo/guideInfo.json

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

10
subpages/associationNew/pages/guideInfo/guideInfo.wxml

@ -1,5 +1,13 @@
<view class="guide-info"> <view class="guide-info">
<image class="topic-img" src="../../images/huatizhinan@2x.png" />
<view class="guide-content"> <view class="guide-content">
{{guideInfoData}} <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>
</view> </view>

73
subpages/associationNew/pages/guideInfo/guideInfo.wxss

@ -1,9 +1,78 @@
page { page {
width:100%; width:100%;
height: auto; height: auto;
min-height:100vh;
overflow-y: auto; overflow-y: auto;
background: #f7f7f7; 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 { .guide-content {
font-size: 34rpx; 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;
} }
Loading…
Cancel
Save