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. 30
      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. 4
      pages/topics/index.wxml

7
app.json

@ -11,7 +11,12 @@
"pages/topics/common/message/index",
"pages/topics/common/goodIdea/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": {
"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: {
ideaId: String,
articleImg: String,
userIcon: String,
userName: String,
time: String,
isGoodIdea:Number,
detail:{
type: Object
}
// ideaId: String,
// articleImg: String,
// userIcon: String,
// userName: String,
// time: String,
// isGoodIdea:Number,
// detail:{
// type: Object
// }
itemData:Object
},
/**

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

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

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

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

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

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

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

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

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

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

4
pages/topics/index.wxml

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

Loading…
Cancel
Save