Browse Source

update topics

master
Meimei 6 years ago
parent
commit
1b3113ba2e
  1. 7
      app.json
  2. BIN
      pages/topics/common/goodIdea/cell/images/praise.png
  3. 19
      pages/topics/common/goodIdea/cell/index.js
  4. 46
      pages/topics/common/goodIdea/cell/index.wxml
  5. 39
      pages/topics/common/goodIdea/cell/index.wxss
  6. 2
      pages/topics/common/goodIdea/index.js
  7. 7
      pages/topics/common/goodIdea/index.wxml
  8. 2
      pages/topics/common/interactive/cell/index.wxss
  9. 12
      pages/topics/index.wxml

7
app.json

@ -11,7 +11,12 @@
"pages/topics/common/message/index", "pages/topics/common/message/index",
"pages/topics/common/goodIdea/index", "pages/topics/common/goodIdea/index",
"pages/article/index", "pages/article/index",
"pages/billboards/policy/policy-list/index" "pages/billboards/policy/policy-list/index",
"pages/user/common/myActivity/index",
"pages/user/common/myFavorite/index",
"pages/user/common/myIdea/index",
"pages/user/common/myMessage/index",
"pages/user/common/myTopics/index"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",

BIN
pages/topics/common/goodIdea/cell/images/praise.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

19
pages/topics/common/goodIdea/cell/index.js

@ -4,15 +4,16 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
ideaId: String, // ideaId: String,
articleImg: String, // articleImg: String,
userIcon: String, // userIcon: String,
userName: String, // userName: String,
time: String, // time: String,
isGoodIdea:Number, // isGoodIdea:Number,
detail:{ // detail:{
type: Object // type: Object
} // }
itemData:Object
}, },
/** /**

46
pages/topics/common/goodIdea/cell/index.wxml

@ -1,37 +1,43 @@
<!--pages/topics/common/goodIdea/cell/index.wxml--> <!--pages/topics/common/goodIdea/cell/index.wxml-->
<view class="cell" id="cell" bindtap="onTap"> <view class="cell" id="cell" bindtap="onTap">
<view class="content-left"> <view class="content-left">
<image src=""></image> <image src="" style="width:20px;height:20px;"></image>
</view> </view>
<view class="content-right"> <view class="content-right">
<view class="userInfo"> <view class="userInfo">
<view class="userName">{{userName}}</view> <view class="userInfo-left">
<view class="comment-time">刚刚</view> <view class="userName">{{itemData.userName}}</view>
<view class="goodIdeaIcon" wx:if="{{isGoodIdea === 1}}"> <view class="comment-time">{{itemData.time}}</view>
<image style="width:100%;height:100%;" src="./images/goodIdea.png"></image> <view class="goodIdeaIcon" wx:if="{{itemData.isGoodIdea === 1}}">
<image style="width:100%;height:100%;" src="./images/goodIdea.png"></image>
</view>
</view>
<view class="userInfo-right">
<view class="praiseNum">{{itemData.praiseNum}}</view>
<view class="praise-icon">
<image src="./images/praise.png" style="width:100%;"></image>
</view>
</view> </view>
</view> </view>
<view style="color:#3B3B3B;font-size:14px;padding: 0 0 5px 0;">评论内容</view> <view style="color:#3B3B3B;font-size:14px;padding: 0 0 5px 0;">评论内容</view>
<view class="detail"> <view class="detail">
<view class="detail-title">{{detail.title}}</view> <view class="detail-title">{{itemData.detail.title}}</view>
<view class="detail-userInfo"> <view class="detail-userInfo">
<view class="detail-userInfo-left">
<view class="detail-userInfo-left"> <view class="detail-user-icon">
<view class="detail-user-icon"> <image src="{{itemData.userIcon}}"></image>
<image src="{{userIcon}}"></image> </view>
<view class="detail-userName">{{itemData.detail.userName}}</view>
<view class="detail-time">{{itemData.detail.time}}</view>
</view> </view>
<view class="detail-userName">{{detail.userName}}</view> <view class="detail-userInfo-right">
<view class="detail-time">{{detail.time}}</view> <view class="detail-comments-icon">
</view> <image src=""></image>
</view>
<view class="detail-userInfo-right"> <view class="detail-commentNum">{{itemData.detail.commentNum}}</view>
<view class="detail-comments-icon">
<image src=""></image>
</view> </view>
<view class="detail-commentNum">{{detail.commentNum}}</view>
</view> </view>
<view class="detail-text">{{detail.text}}</view> <view class="detail-text">{{itemData.detail.text}}</view>
</view>
</view> </view>
</view> </view>
</view> </view>

39
pages/topics/common/goodIdea/cell/index.wxss

@ -8,7 +8,7 @@
width: 20px; width: 20px;
height: 20px; height: 20px;
border-radius: 50%; border-radius: 50%;
background-color: red; background-color: #EEEEEE;
} }
.content-right{ .content-right{
width: 100%; width: 100%;
@ -17,11 +17,30 @@
padding: 0 10px 0 10px; padding: 0 10px 0 10px;
} }
.userInfo{ .userInfo{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 0 0 5px 0;
}
.userInfo-left{
display: flex;
flex-direction: row;
align-items: center;
padding: 0 0 5px 0;
}
.userInfo-right{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
padding: 0 0 5px 0; padding: 0 0 5px 0;
} }
.praise-icon{
width: 15px;
height: 15px;
line-height: 10px;
margin-left: 5px;
}
.userName{ .userName{
color: #66708B; color: #66708B;
font-size: 14px; font-size: 14px;
@ -38,30 +57,30 @@
color: #D4D4D4; color: #D4D4D4;
} }
.detail{ .detail{
height: 200px;
border-radius: 10px; border-radius: 10px;
background-color: #F8F8F8; background-color: #F8F8F8;
padding: 10px;
} }
.detail-title{ .detail-title{
padding: 10px; /* padding: 10px 10px 5px 10px; */
} }
.detail-userInfo{ .detail-userInfo{
display: flex; display: flex;
flex: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
padding: 10px; padding: 5px 0 10px 0;
} }
.detail-userInfo-left{ .detail-userInfo-left{
display: flex; display: flex;
flex: row; flex-direction: row;
align-items: center; align-items: center;
} }
.detail-user-icon{ .detail-user-icon{
width: 20px; width: 20px;
height: 20px; height: 20px;
border-radius: 50%; border-radius: 50%;
background-color: red; background-color: #EEEEEE;
} }
.detail-userName{ .detail-userName{
margin: 0 5px 0 5px; margin: 0 5px 0 5px;
@ -86,11 +105,13 @@
border-radius: 5px; border-radius: 5px;
background-color: red; background-color: red;
} }
.detail-commentNum{ .detail-commentNum,
.praiseNum{
font-size: 12px; font-size: 12px;
color: #3B3B3B; color: #3B3B3B;
} }
.detail-text{ .detail-text{
color: #373737; color: #373737;
font-size: 13px;
/* padding: 0 10px 0 10px; */
} }

2
pages/topics/common/goodIdea/index.js

@ -12,6 +12,7 @@ Page({
userName: "用户名", userName: "用户名",
time: "刚刚", time: "刚刚",
isGoodIdea:1, isGoodIdea:1,
praiseNum:"30",
detail:{ detail:{
title:"习近平主持政治局第十七次集体... 拷贝", title:"习近平主持政治局第十七次集体... 拷贝",
userIcon:"", userIcon:"",
@ -27,6 +28,7 @@ Page({
userName: "用户名", userName: "用户名",
time: "1分钟前", time: "1分钟前",
isGoodIdea: 0, isGoodIdea: 0,
praiseNum: "30",
detail: { detail: {
title: "习近平主持政治局第十七次集体... 拷贝", title: "习近平主持政治局第十七次集体... 拷贝",
userIcon: "", userIcon: "",

7
pages/topics/common/goodIdea/index.wxml

@ -2,12 +2,7 @@
<view class="container"> <view class="container">
<block wx:for="{{list}}" wx:key="*this"> <block wx:for="{{list}}" wx:key="*this">
<cell <cell
ideaId="{{item.ideaId}}" itemData="{{item}}"
userName="{{item.userName}}"
time="{{item.time}}"
userIcon="{{item.userIcon}}"
isGoodIdea="{{item.isGoodIdea}}"
deital="{{item.detail}}"
bind:clickListItem="clickListItem"/> bind:clickListItem="clickListItem"/>
</block> </block>
</view> </view>

2
pages/topics/common/interactive/cell/index.wxss

@ -30,7 +30,7 @@
width: 20px; width: 20px;
height: 20px; height: 20px;
border-radius: 50%; border-radius: 50%;
background-color: red; background-color: #EEEEEE;
} }
.userName{ .userName{
margin: 0 5px 0 5px; margin: 0 5px 0 5px;

12
pages/topics/index.wxml

@ -1,9 +1,7 @@
<!--pages/topics/index.wxml--> <!--pages/topics/index.wxml-->
<view class="mian"> <view class="content-wrapper">
<view class="content-wrapper"> <e-segment bind:tapSegment="tapSegment" headerTitles="{{headerTitles}}" defaultSelectIndex="{{selectedTitle}}"/>
<e-segment bind:tapSegment="tapSegment" headerTitles="{{headerTitles}}" defaultSelectIndex="{{selectedTitle}}"/> <interactive wx:if="{{selectedTitle==0}}" />
<interactive wx:if="{{selectedTitle==0}}" /> <goodIdea wx:if="{{selectedTitle==1}}" />
<goodIdea wx:if="{{selectedTitle==1}}" /> <message wx:if="{{selectedTitle==2}}" />
<message wx:if="{{selectedTitle==2}}" />
</view>
</view> </view>

Loading…
Cancel
Save