作者 朱振飞

修改

@@ -21,6 +21,6 @@ padding: 52rpx 0 40rpx; @@ -21,6 +21,6 @@ padding: 52rpx 0 40rpx;
21 color: #666; 21 color: #666;
22 font-weight: normal; 22 font-weight: normal;
23 } 23 }
24 -.form{ 24 +.from{
25 margin-right: 30rpx; 25 margin-right: 30rpx;
26 } 26 }
@@ -18,7 +18,8 @@ Page({ @@ -18,7 +18,8 @@ Page({
18 currentTab: 0, 18 currentTab: 0,
19 page: 1, 19 page: 1,
20 list:[], 20 list:[],
21 - ifData:!1 21 + ifData:!1,
  22 + noMore:!1
22 }, 23 },
23 24
24 /** 25 /**
@@ -72,11 +73,13 @@ Page({ @@ -72,11 +73,13 @@ Page({
72 list: e.data.list.concat(res.data), 73 list: e.data.list.concat(res.data),
73 page: res.current_page, 74 page: res.current_page,
74 lastPage: res.last_page, 75 lastPage: res.last_page,
75 - ifData: !0 76 + ifData: !0,
  77 + noMore: res.last_page==res.per_page?!0:!1
76 }) 78 })
77 !e.data.list.concat(res.data).length?e.setData({ 79 !e.data.list.concat(res.data).length?e.setData({
78 ifData:!1 80 ifData:!1
79 }):'' 81 }):''
  82 + wx.stopPullDownRefresh();
80 }) 83 })
81 }, 84 },
82 bannerDetail(e){ 85 bannerDetail(e){
@@ -116,14 +119,24 @@ Page({ @@ -116,14 +119,24 @@ Page({
116 * 页面相关事件处理函数--监听用户下拉动作 119 * 页面相关事件处理函数--监听用户下拉动作
117 */ 120 */
118 onPullDownRefresh: function () { 121 onPullDownRefresh: function () {
119 - 122 + let t = this;
  123 + t.setData({
  124 + page:1,
  125 + list:[]
  126 + })
  127 + t.getList(t.data.category_id,1)
120 }, 128 },
121 129
122 /** 130 /**
123 * 页面上拉触底事件的处理函数 131 * 页面上拉触底事件的处理函数
124 */ 132 */
125 onReachBottom: function () { 133 onReachBottom: function () {
126 - 134 + let t = this;
  135 + !t.data.noMore ? (t.setData({
  136 + page:t.dat.page+1
  137 + }),t.getList(t.data.category_id,t.data.page)) : wx.showToast({
  138 + title: '没有更多了',
  139 + })
127 }, 140 },
128 141
129 /** 142 /**
1 { 1 {
2 - "usingComponents": {} 2 + "usingComponents": {},
  3 + "enablePullDownRefresh": true
3 } 4 }
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 </view> 20 </view>
21 21
22 <!-- 新闻 --> 22 <!-- 新闻 -->
23 -<scroll-view bindscroll="scroll" bindscrolltolower="getMore" class="news_detail_container" hidden='{{!ifData}}' scrollTop="{{scrollTop}}" scrollY="true" style="height:{{windowHeight-200}}px;"> 23 +<view class="news_detail_container" hidden='{{!ifData}}' style="height:{{windowHeight-205}}px;">
24 <view class='news_detail_items'> 24 <view class='news_detail_items'>
25 <block wx:for='{{list}}' wx:key=''> 25 <block wx:for='{{list}}' wx:key=''>
26 <navigator class='news_detail_item' url='/pages/attract/articleDetail/articleDetail?id={{item.id}}' id="{{item.id}}" > 26 <navigator class='news_detail_item' url='/pages/attract/articleDetail/articleDetail?id={{item.id}}' id="{{item.id}}" >
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 </navigator> 37 </navigator>
38 </block> 38 </block>
39 </view> 39 </view>
40 -</scroll-view> 40 +</view>
41 41
42 <view class="none-box" hidden="{{ifData}}"> 42 <view class="none-box" hidden="{{ifData}}">
43 <view>暂无相关信息</view> 43 <view>暂无相关信息</view>
@@ -67,7 +67,7 @@ page{ @@ -67,7 +67,7 @@ page{
67 } 67 }
68 .news_detail_container{ 68 .news_detail_container{
69 background: #FFF; 69 background: #FFF;
70 - margin-top: 195px; 70 + margin-top: 390rpx;
71 position: relative; 71 position: relative;
72 } 72 }
73 .news_detail_items{ 73 .news_detail_items{
@@ -5,7 +5,10 @@ Page({ @@ -5,7 +5,10 @@ Page({
5 * 页面的初始数据 5 * 页面的初始数据
6 */ 6 */
7 data: { 7 data: {
8 - startComment: false 8 + startComment: false,
  9 + comments:[],
  10 + noMore:!1,
  11 + page:1
9 }, 12 },
10 /** 13 /**
11 * 生命周期函数--监听页面加载 14 * 生命周期函数--监听页面加载
@@ -17,6 +20,17 @@ Page({ @@ -17,6 +20,17 @@ Page({
17 }),t.d(options.id),t.c() 20 }),t.d(options.id),t.c()
18 21
19 }, 22 },
  23 + comment(){
  24 + console.log(1)
  25 + this.setData({
  26 + startComment: true
  27 + })
  28 + },
  29 + outFocus(){
  30 + this.setData({
  31 + startComment: false
  32 + })
  33 + },
20 d(id){ 34 d(id){
21 let url = '/api/interact/getPostsDetail',params = { 35 let url = '/api/interact/getPostsDetail',params = {
22 id:id 36 id:id
@@ -30,11 +44,14 @@ Page({ @@ -30,11 +44,14 @@ Page({
30 }, 44 },
31 c(){ 45 c(){
32 let url = '/api/interact/getPostsCommentList',t = this ,params={ 46 let url = '/api/interact/getPostsCommentList',t = this ,params={
33 - id:t.data.id 47 + id:t.data.id,
  48 + page: t.data.page
34 }; 49 };
35 A.post(url,params).then((r)=>{ 50 A.post(url,params).then((r)=>{
36 t.setData({ 51 t.setData({
37 - comments:r.data 52 + comments: t.data.comments.concat(r.data),
  53 + total:r.total,
  54 + noMore: r.last_page == r.current_page?!0:!1
38 }) 55 })
39 }) 56 })
40 }, 57 },
@@ -44,11 +61,15 @@ Page({ @@ -44,11 +61,15 @@ Page({
44 content: t.data.content 61 content: t.data.content
45 }, url ='/api/interact/setPostsComment'; 62 }, url ='/api/interact/setPostsComment';
46 t.data.parent_id?params.parent_id = t.data.parent_id:''; 63 t.data.parent_id?params.parent_id = t.data.parent_id:'';
47 - params.content?A.post(url,params).then((r)=>{  
48 - t.c(),t.setData({ 64 + params.content?A.post(url,params,false).then((r)=>{
  65 + t.setData({
49 content:'', 66 content:'',
50 - parent_id:'' 67 + parent_id:'',
  68 + comments:[],
  69 + page:1,
  70 + startComment: false
51 }) 71 })
  72 + t.c();
52 }):wx.showToast({ 73 }):wx.showToast({
53 title: '请输入评论', 74 title: '请输入评论',
54 icon:'none' 75 icon:'none'
@@ -60,9 +81,8 @@ Page({ @@ -60,9 +81,8 @@ Page({
60 type: '2' 81 type: '2'
61 }, index = e.currentTarget.dataset.indx, t = this, type = e.currentTarget.dataset.type; 82 }, index = e.currentTarget.dataset.indx, t = this, type = e.currentTarget.dataset.type;
62 A.post(url, params).then((r) => { 83 A.post(url, params).then((r) => {
63 - console.log(r)  
64 - t.data.comments[index].is_like = type == 1 ? 0 : 1  
65 - t.data.comments[index].likes = r 84 + t.data.comments[index].is_like = r.is_like
  85 + t.data.comments[index].likes = r.likes
66 t.setData({ 86 t.setData({
67 comments: t.data.comments 87 comments: t.data.comments
68 }) 88 })
@@ -135,14 +155,23 @@ Page({ @@ -135,14 +155,23 @@ Page({
135 * 页面相关事件处理函数--监听用户下拉动作 155 * 页面相关事件处理函数--监听用户下拉动作
136 */ 156 */
137 onPullDownRefresh: function () { 157 onPullDownRefresh: function () {
138 - 158 + let t = this;
  159 + t.setData({
  160 + page:1,
  161 + comments:[]
  162 + }),
  163 + t.d(t.data.id),
  164 + t.c();
139 }, 165 },
140 166
141 /** 167 /**
142 * 页面上拉触底事件的处理函数 168 * 页面上拉触底事件的处理函数
143 */ 169 */
144 onReachBottom: function () { 170 onReachBottom: function () {
145 - 171 + let t = this;
  172 + !t.data.noMore?(t.setData({
  173 + page: t.data.page+1,
  174 + }),t.c()):''
146 }, 175 },
147 176
148 /** 177 /**
@@ -2,5 +2,6 @@ @@ -2,5 +2,6 @@
2 "usingComponents": {}, 2 "usingComponents": {},
3 "navigationBarTitleText": "详情页", 3 "navigationBarTitleText": "详情页",
4 "navigationBarBackgroundColor": "#169BD5", 4 "navigationBarBackgroundColor": "#169BD5",
5 - "navigationBarTextStyle": "white" 5 + "navigationBarTextStyle": "white",
  6 + "enablePullDownRefresh": true
6 } 7 }
@@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
5 <view class='item_mid'> 5 <view class='item_mid'>
6 <view class='item_mid_text'> 6 <view class='item_mid_text'>
7 {{detail.content}} 7 {{detail.content}}
8 - <span class='color_blue'>全部</span>  
9 </view> 8 </view>
10 <!-- 图片盒子 --> 9 <!-- 图片盒子 -->
11 <view class='item_mid_box' wx:if="{{detail.images}}"> 10 <view class='item_mid_box' wx:if="{{detail.images}}">
@@ -37,7 +36,7 @@ @@ -37,7 +36,7 @@
37 <view class='item_right'> 36 <view class='item_right'>
38 <!-- 图片 --> 37 <!-- 图片 -->
39 <view class='item_right_pic'> 38 <view class='item_right_pic'>
40 - <image src='../../images/chakan@3x.png'></image> 39 + <image src='../../images/chakan@3x.png' mode='widthFix'></image>
41 </view> 40 </view>
42 <!-- 数量 --> 41 <!-- 数量 -->
43 <view class='item_right_number'> 42 <view class='item_right_number'>
@@ -49,7 +48,7 @@ @@ -49,7 +48,7 @@
49 </view> 48 </view>
50 <!-- 数量 --> 49 <!-- 数量 -->
51 <view class='item_right_number'> 50 <view class='item_right_number'>
52 - {{detail.comment_count}} 51 + {{total}}
53 </view> 52 </view>
54 53
55 </view> 54 </view>
@@ -59,7 +58,7 @@ @@ -59,7 +58,7 @@
59 58
60 <view class='item_box'> 59 <view class='item_box'>
61 <!-- 回复内容1 --> 60 <!-- 回复内容1 -->
62 - <view class='item item_bottom' wx:for='{{comments}}' wx:key=''> 61 + <view class='item item_bottom bottom_space' wx:for='{{comments}}' wx:key=''>
63 <view class='item_list'> 62 <view class='item_list'>
64 <view class='item_list_left'> 63 <view class='item_list_left'>
65 <view class='item_list_left_pic'> 64 <view class='item_list_left_pic'>
@@ -82,11 +81,12 @@ @@ -82,11 +81,12 @@
82 {{item.create_time_text}} 81 {{item.create_time_text}}
83 </view> 82 </view>
84 <view class='time_bottom_left' bindtap='zan' id='{{item.id}}' data-indx = '{{index}}' data-type='{{item.is_like}}'> 83 <view class='time_bottom_left' bindtap='zan' id='{{item.id}}' data-indx = '{{index}}' data-type='{{item.is_like}}'>
85 - <view>{{item.likes}}</view>  
86 <view class='time_bottom_left_pic'> 84 <view class='time_bottom_left_pic'>
87 - <image src='/images/zan@3x.png' wx:if="{{item.is_like==0}}"></image>  
88 - <image src='/images/thumb-up-button@3x.png' wx:else></image> 85 + <image src='/images/zan@3x.png' wx:if="{{item.is_like==0}}" mode='widthFix'></image>
  86 + <image src='/images/thumb-up-button@3x.png' wx:else mode='widthFix'></image>
89 </view> 87 </view>
  88 + <view>{{item.likes}}</view>
  89 +
90 </view> 90 </view>
91 </view> 91 </view>
92 <!-- 底部评论 --> 92 <!-- 底部评论 -->
@@ -107,7 +107,8 @@ @@ -107,7 +107,8 @@
107 <!-- 底部发表按钮 --> 107 <!-- 底部发表按钮 -->
108 <view class='bottom_box'> 108 <view class='bottom_box'>
109 <view class='bottom_box_input'> 109 <view class='bottom_box_input'>
110 - <input placeholder='发表评论...' value='{{content}}' focus='{{startComment}}' bindtap='parentSet' bindinput='subComments' id=''></input> 110 + <input placeholder='发表评论...' value='{{content}}' focus='{{startComment}}' bindinput='subComments' bindblur='outFocus' cursor-spacing='10' class='comments'/>
  111 + <!-- <view class='sub_box comments' bindtap='comment' hidden='{{startComment}}'>{{content||"发表评论..."}}</view> -->
111 </view> 112 </view>
112 <view class='bottom_box_text' bindtap='s'> 113 <view class='bottom_box_text' bindtap='s'>
113 发表 114 发表
@@ -23,6 +23,7 @@ page{ @@ -23,6 +23,7 @@ page{
23 } 23 }
24 .item_mid_text{ 24 .item_mid_text{
25 margin-top: 22rpx; 25 margin-top: 22rpx;
  26 + margin-bottom: 22rpx;
26 font-size:26rpx; 27 font-size:26rpx;
27 font-family:PingFang SC; 28 font-family:PingFang SC;
28 font-weight:400; 29 font-weight:400;
@@ -53,16 +54,20 @@ page{ @@ -53,16 +54,20 @@ page{
53 .item_bottom{ 54 .item_bottom{
54 display: flex; 55 display: flex;
55 justify-content: space-between; 56 justify-content: space-between;
56 - padding: 34rpx 32rpx; 57 + padding: 34rpx 0;
  58 + align-items: center;
  59 +}
  60 +.bottom_space{
  61 + padding: 34rpx;
  62 + align-items: stretch
57 } 63 }
58 -  
59 64
60 .item_left{ 65 .item_left{
61 display: flex; 66 display: flex;
62 } 67 }
63 .item_left_pic{ 68 .item_left_pic{
64 - width:32rpx;  
65 - height:32rpx; 69 + width:46rpx;
  70 + height:46rpx;
66 background:rgba(0,0,0,0); 71 background:rgba(0,0,0,0);
67 border-radius:50%; 72 border-radius:50%;
68 opacity:1; 73 opacity:1;
@@ -73,11 +78,13 @@ page{ @@ -73,11 +78,13 @@ page{
73 height: 100%; 78 height: 100%;
74 } 79 }
75 .item_name{ 80 .item_name{
76 -  
77 - font-size:22rpx;  
78 font-family:PingFang SC; 81 font-family:PingFang SC;
  82 + font-size: 28rpx;
79 font-weight:400; 83 font-weight:400;
80 - line-height:32rpx; 84 + max-width: 200rpx;
  85 + overflow: hidden;
  86 + text-overflow: ellipsis;
  87 + white-space: nowrap;
81 color:rgba(204,204,204,1); 88 color:rgba(204,204,204,1);
82 margin-left: 16rpx; 89 margin-left: 16rpx;
83 opacity:1; 90 opacity:1;
@@ -85,24 +92,23 @@ page{ @@ -85,24 +92,23 @@ page{
85 .item_right{ 92 .item_right{
86 display: flex; 93 display: flex;
87 align-items: center; 94 align-items: center;
  95 + white-space: nowrap;
88 } 96 }
89 .item_right_pic{ 97 .item_right_pic{
90 -  
91 width:36rpx; 98 width:36rpx;
92 - height:23rpx; 99 + font-size: 28rpx;
93 /* background:rgba(204,204,204,1); */ 100 /* background:rgba(204,204,204,1); */
94 opacity:1; 101 opacity:1;
95 display: flex; 102 display: flex;
96 } 103 }
97 .item_right_pic image{ 104 .item_right_pic image{
98 width: 100%; 105 width: 100%;
99 - height: 100%;  
100 } 106 }
101 .item_right_number{ 107 .item_right_number{
102 margin-left: 12rpx; 108 margin-left: 12rpx;
103 width:24rpx; 109 width:24rpx;
104 height:28rpx; 110 height:28rpx;
105 - font-size:20rpx; 111 + font-size:28rpx;
106 font-family:PingFang SC; 112 font-family:PingFang SC;
107 font-weight:400; 113 font-weight:400;
108 line-height:28rpx; 114 line-height:28rpx;
@@ -140,21 +146,23 @@ page{ @@ -140,21 +146,23 @@ page{
140 } 146 }
141 .item_time{ 147 .item_time{
142 margin-left: 16rpx; 148 margin-left: 16rpx;
143 - font-size:22rpx; 149 + font-size:28rpx;
144 font-family:PingFang SC; 150 font-family:PingFang SC;
145 font-weight:400; 151 font-weight:400;
146 - line-height:32rpx;  
147 color:rgba(204,204,204,1); 152 color:rgba(204,204,204,1);
148 opacity:1; 153 opacity:1;
  154 + display: flex;
  155 + align-items: center;
149 } 156 }
150 .item_delete{ 157 .item_delete{
151 margin-left: 28rpx; 158 margin-left: 28rpx;
152 - font-size:22rpx; 159 + font-size:28rpx;
153 font-family:PingFang SC; 160 font-family:PingFang SC;
154 font-weight:400; 161 font-weight:400;
155 - line-height:32rpx;  
156 color:rgba(22,155,213,1); 162 color:rgba(22,155,213,1);
157 opacity:1; 163 opacity:1;
  164 + display: flex;
  165 + align-items: center;
158 } 166 }
159 167
160 .item_list{ 168 .item_list{
@@ -207,23 +215,21 @@ page{ @@ -207,23 +215,21 @@ page{
207 margin-top: 6rpx; 215 margin-top: 6rpx;
208 } 216 }
209 .time_bottom_left{ 217 .time_bottom_left{
210 -  
211 - font-size:20rpx; 218 + font-size:28rpx;
212 font-family:PingFang SC; 219 font-family:PingFang SC;
213 - font-weight:400;  
214 - line-height:28rpx;  
215 color:rgba(153,153,153,1); 220 color:rgba(153,153,153,1);
216 opacity:1; 221 opacity:1;
217 display: flex; 222 display: flex;
218 align-items: center; 223 align-items: center;
  224 + height: 30rpx;
219 } 225 }
220 .time_bottom_left_pic{ 226 .time_bottom_left_pic{
221 - margin-left: 8rpx;  
222 - width:22rpx;  
223 - height:20rpx; 227 + margin-right: 8rpx;
  228 + width:36rpx;
224 /* background:rgba(153,153,153,1); */ 229 /* background:rgba(153,153,153,1); */
225 opacity:1; 230 opacity:1;
226 display: flex; 231 display: flex;
  232 +
227 } 233 }
228 .time_bottom_left_pic image{ 234 .time_bottom_left_pic image{
229 width: 100%; 235 width: 100%;
@@ -251,18 +257,25 @@ page{ @@ -251,18 +257,25 @@ page{
251 } 257 }
252 .bottom_box{ 258 .bottom_box{
253 width: 750rpx; 259 width: 750rpx;
254 - height: 120rpx; 260 + /* min-height: 120rpx; */
255 display: flex; 261 display: flex;
256 align-items: center; 262 align-items: center;
257 justify-content: center; 263 justify-content: center;
258 background: #fff; 264 background: #fff;
259 position: fixed; 265 position: fixed;
260 bottom: 0; 266 bottom: 0;
261 - border-top: 2rpx solid #ccc; 267 + border-top: 2rpx solid #F5F5F5;
  268 + padding: 20rpx 0;
  269 + z-index: 10;
  270 +}
  271 +.comments{
  272 + border:1rpx solid #F5F5F5;
  273 + font-size: 28rpx;
  274 + padding: 15rpx;
  275 + max-height: 130rpx;
262 } 276 }
263 .bottom_box_input{ 277 .bottom_box_input{
264 width: 608rpx; 278 width: 608rpx;
265 -  
266 display: flex; 279 display: flex;
267 background:rgba(247,247,247,1); 280 background:rgba(247,247,247,1);
268 border:2px solid rgba(238,238,238,1); 281 border:2px solid rgba(238,238,238,1);
@@ -289,4 +302,8 @@ page{ @@ -289,4 +302,8 @@ page{
289 } 302 }
290 .item_box{ 303 .item_box{
291 margin-top: 16rpx; 304 margin-top: 16rpx;
  305 + padding-bottom: 120rpx;
  306 +}
  307 +.sub_box{
  308 + color: #666;
292 } 309 }
1 -let A = getApp(); 1 + let A = getApp();
2 Page({ 2 Page({
3 3
4 /** 4 /**
@@ -43,8 +43,8 @@ Page({ @@ -43,8 +43,8 @@ Page({
43 type:'1' 43 type:'1'
44 }, index = e.currentTarget.dataset.idx,t=this,type=e.currentTarget.dataset.type; 44 }, index = e.currentTarget.dataset.idx,t=this,type=e.currentTarget.dataset.type;
45 A.post(url,params).then((r)=>{ 45 A.post(url,params).then((r)=>{
46 - t.data.postList[index].is_like = type==1?0:1  
47 - t.data.postList[index].likes = r 46 + t.data.postList[index].is_like = r.is_like
  47 + t.data.postList[index].likes = r.likes
48 t.setData({ 48 t.setData({
49 postList: t.data.postList 49 postList: t.data.postList
50 }) 50 })
@@ -82,6 +82,9 @@ Page({ @@ -82,6 +82,9 @@ Page({
82 }) 82 })
83 }, 83 },
84 getzixun() { 84 getzixun() {
  85 + wx.showLoading({
  86 + title: '加载中',
  87 + })
85 let url = '/api/interact/getQuestionList', d = this, params = { 88 let url = '/api/interact/getQuestionList', d = this, params = {
86 page: d.data.page 89 page: d.data.page
87 }; 90 };
@@ -104,9 +107,14 @@ Page({ @@ -104,9 +107,14 @@ Page({
104 show: !1 107 show: !1
105 }, 1200) 108 }, 1200)
106 }) 109 })
  110 + wx.hideLoading()
  111 + wx.stopPullDownRefresh()
107 }) 112 })
108 }, 113 },
109 postList() { 114 postList() {
  115 + wx.showLoading({
  116 + title: '加载中',
  117 + })
110 let url = '/api/interact/getPostsList', d = this, params = { 118 let url = '/api/interact/getPostsList', d = this, params = {
111 page: d.data.page 119 page: d.data.page
112 }; 120 };
@@ -124,21 +132,10 @@ Page({ @@ -124,21 +132,10 @@ Page({
124 }) : (r.data.length < r.per_page ? d.setData({ 132 }) : (r.data.length < r.per_page ? d.setData({
125 noMore: !0 133 noMore: !0
126 }) : "") 134 }) : "")
  135 + wx.hideLoading()
127 wx.stopPullDownRefresh() 136 wx.stopPullDownRefresh()
128 }) 137 })
129 }, 138 },
130 - getMore(){  
131 - console.log(1)  
132 - let t = this;  
133 - t.setData({  
134 - page: t.data.page++  
135 - })  
136 - !t.data.noMore ? (t.data.currentTab == '0' ? t.getzixun():t.postList()):wx.showToast({  
137 - title: '没有更多了',  
138 - icon:'none'  
139 - })  
140 -  
141 - },  
142 139
143 askQuestion() { 140 askQuestion() {
144 wx.navigateTo({ 141 wx.navigateTo({
@@ -167,12 +164,19 @@ Page({ @@ -167,12 +164,19 @@ Page({
167 }) 164 })
168 }, 165 },
169 navbarTap: function (e) { 166 navbarTap: function (e) {
  167 + wx.pageScrollTo({
  168 + scrollTop: 0,
  169 + duration: 0,
  170 + })
170 let t = this, idx = e.currentTarget.dataset.idx; 171 let t = this, idx = e.currentTarget.dataset.idx;
171 this.setData({ 172 this.setData({
  173 + show:!0,
172 currentTab: idx, 174 currentTab: idx,
173 zixunList:[], 175 zixunList:[],
174 - postList:[] 176 + postList:[],
  177 + page:1
175 }), idx ? t.postList() : t.getzixun(); 178 }), idx ? t.postList() : t.getzixun();
  179 +
176 }, 180 },
177 jump() { 181 jump() {
178 wx.navigateTo({ 182 wx.navigateTo({
@@ -199,7 +203,8 @@ Page({ @@ -199,7 +203,8 @@ Page({
199 this.setData({ 203 this.setData({
200 zixunList: [], 204 zixunList: [],
201 postList:[], 205 postList:[],
202 - page: 1 206 + page: 1,
  207 + show:!0
203 }) 208 })
204 this.data.currentTab=='0'?this.getzixun():this.postList() 209 this.data.currentTab=='0'?this.getzixun():this.postList()
205 }, 210 },
@@ -235,6 +240,14 @@ Page({ @@ -235,6 +240,14 @@ Page({
235 * 页面上拉触底事件的处理函数 240 * 页面上拉触底事件的处理函数
236 */ 241 */
237 onReachBottom: function () { 242 onReachBottom: function () {
  243 + let t = this;
  244 + t.setData({
  245 + page: t.data.page++
  246 + })
  247 + !t.data.noMore ? (t.data.currentTab == '0' ? t.getzixun() : t.postList()) : wx.showToast({
  248 + title: '没有更多了',
  249 + icon: 'none'
  250 + })
238 }, 251 },
239 252
240 /** 253 /**
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 </view> 3 </view>
4 4
5 5
6 -<scroll-view wx:if='{{auth=="2"}}' class='main_container' style='height:{{winHeight}}px' scroll-y="true" bindscrolltolower='getMore'> 6 +<view wx:if='{{auth=="2"}}' class='main_container' style='height:{{winHeight}}px' >
7 <view class="none-box" hidden="{{!ifData}}"> 7 <view class="none-box" hidden="{{!ifData}}">
8 <view>暂无相关咨询</view> 8 <view>暂无相关咨询</view>
9 </view> 9 </view>
@@ -16,10 +16,10 @@ @@ -16,10 +16,10 @@
16 <view class='mid_item_right'> 16 <view class='mid_item_right'>
17 <view class='mid_item_right_top'> 17 <view class='mid_item_right_top'>
18 {{item.question}}? 18 {{item.question}}?
19 - <view class='mid_label' hidden='{{item.is_show_state}}'>  
20 - <image src='../../images/huifujishi@3x.png' wx:if="{{item.state==1}}"></image>  
21 - <image src='../../images/huifuyiban@3x.png' wx:elif='{{item.state==2}}'></image>  
22 - <image src='../../images/huifuzhihuan @3x.png' wx:elif='{{item.state==3}}'></image> 19 + <view class='mid_label' hidden='{{!item.is_show_state}}'>
  20 + <image src='../../images/huifujishi@3x.png' wx:if="{{item.state=='1'}}"></image>
  21 + <image src='../../images/huifuyiban@3x.png' wx:elif='{{item.state=="2"}}'></image>
  22 + <image src='../../images/huifuzhihuan @3x.png' wx:elif='{{item.state=="3"}}'></image>
23 </view> 23 </view>
24 </view> 24 </view>
25 <view class='mid_item_right_bottom'> 25 <view class='mid_item_right_bottom'>
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 {{item.content}} 82 {{item.content}}
83 </view> 83 </view>
84 <!-- 图片 --> 84 <!-- 图片 -->
85 - <view class='mid_pic_box' wx:if='{{item.images}}' bindtap='navdetail' id='{{item.id}}'> 85 + <view class='mid_pic_box' wx:if='{{item.images!=""}}' bindtap='navdetail' id='{{item.id}}'>
86 <view class='mid_pic_box_item' wx:for="{{item.images}}" wx:key='' wx:for-item='sec'> 86 <view class='mid_pic_box_item' wx:for="{{item.images}}" wx:key='' wx:for-item='sec'>
87 <image src='{{sec}}'></image> 87 <image src='{{sec}}'></image>
88 </view> 88 </view>
@@ -95,8 +95,8 @@ @@ -95,8 +95,8 @@
95 <view class='mid_item_like_right'> 95 <view class='mid_item_like_right'>
96 <!-- 点赞 --> 96 <!-- 点赞 -->
97 <view class='mid_like color_blue' bindtap='zan' id='{{item.id}}' data-idx='{{index}}' data-type='{{item.is_like}}'> 97 <view class='mid_like color_blue' bindtap='zan' id='{{item.id}}' data-idx='{{index}}' data-type='{{item.is_like}}'>
98 - <image src='../../images/thumb-up-button@3x.png' wx:if='{{item.is_like==1}}'></image>  
99 - <image src='../../images/dainzan@3x.png' wx:else></image> 98 + <image src='../../images/thumb-up-button@3x.png' class='zan' wx:if='{{item.is_like==1}}'></image>
  99 + <image src='../../images/dainzan@3x.png' class='zan' wx:else></image>
100 </view> 100 </view>
101 <view class='mid_number color_blue'> 101 <view class='mid_number color_blue'>
102 {{item.likes}} 102 {{item.likes}}
@@ -105,7 +105,7 @@ @@ -105,7 +105,7 @@
105 <view class='mid_like' bindtap='navdetail' id='{{item.id}}'> 105 <view class='mid_like' bindtap='navdetail' id='{{item.id}}'>
106 <image src='../../images/pinglun@3x.png'></image> 106 <image src='../../images/pinglun@3x.png'></image>
107 </view> 107 </view>
108 - <view class='mid_number'> 108 + <view class='mid_number commentCount'>
109 {{item.comment_count}} 109 {{item.comment_count}}
110 </view> 110 </view>
111 </view> 111 </view>
@@ -113,7 +113,7 @@ @@ -113,7 +113,7 @@
113 </view> 113 </view>
114 </view> 114 </view>
115 </view> 115 </view>
116 -</scroll-view> 116 +</view>
117 117
118 118
119 <!-- 没有权限 --> 119 <!-- 没有权限 -->
@@ -46,6 +46,7 @@ page{ @@ -46,6 +46,7 @@ page{
46 z-index: 999; 46 z-index: 999;
47 top: 0; 47 top: 0;
48 left: 0; 48 left: 0;
  49 + border-bottom: 1px solid #f5f5f5;
49 } 50 }
50 .top_left{ 51 .top_left{
51 width: 169rpx; 52 width: 169rpx;
@@ -63,7 +64,7 @@ page{ @@ -63,7 +64,7 @@ page{
63 64
64 } 65 }
65 .mid_item{ 66 .mid_item{
66 - padding: 50rpx 0; 67 + padding: 50rpx 0 30rpx;
67 width: 686rpx; 68 width: 686rpx;
68 margin: 0 auto; 69 margin: 0 auto;
69 display: flex; 70 display: flex;
@@ -80,6 +81,10 @@ page{ @@ -80,6 +81,10 @@ page{
80 opacity:1; 81 opacity:1;
81 display: flex; 82 display: flex;
82 } 83 }
  84 +.zan{
  85 + position: relative;
  86 + top: -4rpx;
  87 +}
83 .mid_item_left image{ 88 .mid_item_left image{
84 width: 100%; 89 width: 100%;
85 height: 100%; 90 height: 100%;
@@ -225,24 +230,25 @@ page{ @@ -225,24 +230,25 @@ page{
225 opacity:1; 230 opacity:1;
226 } 231 }
227 .mid_item_text{ 232 .mid_item_text{
228 -  
229 font-size:26rpx; 233 font-size:26rpx;
230 font-family:PingFang SC; 234 font-family:PingFang SC;
231 font-weight:400; 235 font-weight:400;
232 /* line-height:36rpx; */ 236 /* line-height:36rpx; */
233 color:rgba(51,51,51,1); 237 color:rgba(51,51,51,1);
234 opacity:1; 238 opacity:1;
235 - margin-top: 32rpx; 239 + margin-top: 30rpx;
  240 + margin-bottom: 30rpx;
236 } 241 }
237 .mid_item_like{ 242 .mid_item_like{
238 margin-top: 34rpx; 243 margin-top: 34rpx;
239 width: 686rpx; 244 width: 686rpx;
240 display: flex; 245 display: flex;
241 justify-content: space-between; 246 justify-content: space-between;
  247 + align-items: center;
242 } 248 }
243 .mid_item_like_left{ 249 .mid_item_like_left{
244 -  
245 - font-size:22rpx; 250 +
  251 + font-size:28rpx;
246 font-family:PingFang SC; 252 font-family:PingFang SC;
247 font-weight:400; 253 font-weight:400;
248 line-height:32rpx; 254 line-height:32rpx;
@@ -258,7 +264,7 @@ page{ @@ -258,7 +264,7 @@ page{
258 height:36rpx; 264 height:36rpx;
259 opacity:1; 265 opacity:1;
260 display: flex; 266 display: flex;
261 - margin-left: 50rpx; 267 + margin-left: 20rpx;
262 } 268 }
263 .mid_like image{ 269 .mid_like image{
264 width: 100%; 270 width: 100%;
@@ -266,16 +272,20 @@ page{ @@ -266,16 +272,20 @@ page{
266 } 272 }
267 .mid_number{ 273 .mid_number{
268 margin-left: 10rpx; 274 margin-left: 10rpx;
269 - font-size:22rpx;  
270 font-family:PingFang SC; 275 font-family:PingFang SC;
271 - font-weight:400;  
272 - line-height:48rpx;  
273 color: #b5b5b5; 276 color: #b5b5b5;
274 - opacity:1; 277 + position: relative;
  278 + font-size: 30rpx;
  279 + width: 60rpx;
275 } 280 }
  281 + .commentCount{
  282 + font-weight: normal;
  283 +
  284 + }
276 285
277 .color_blue{ 286 .color_blue{
278 color: #169BD5; 287 color: #169BD5;
  288 + font-size: 28rpx;
279 } 289 }
280 .color_size{ 290 .color_size{
281 color: #b5b5b5; 291 color: #b5b5b5;
@@ -386,7 +396,8 @@ page{ @@ -386,7 +396,8 @@ page{
386 z-index: 10000; 396 z-index: 10000;
387 } 397 }
388 .add_notice image{ 398 .add_notice image{
389 - width: 100% 399 + width: 100%;
  400 + background-color: #FFF;
390 } 401 }
391 .main_container{ 402 .main_container{
392 margin-top: 50px; 403 margin-top: 50px;
@@ -36,11 +36,11 @@ Page({ @@ -36,11 +36,11 @@ Page({
36 header: true 36 header: true
37 }; app.post(url,params,false).then((r)=>{ 37 }; app.post(url,params,false).then((r)=>{
38 wx.showToast({ 38 wx.showToast({
39 - title: r == 2 ? "关注成功" : "已取消", 39 + title: r.is_like == 1 ? "关注成功" : "已取消",
40 icon:'none' 40 icon:'none'
41 }) 41 })
42 this.setData({ 42 this.setData({
43 - 'detailInfo.is_like': r==2?1:0 43 + 'detailInfo.is_like': r.is_like
44 }) 44 })
45 }) 45 })
46 }, 46 },
@@ -54,19 +54,18 @@ Page({ @@ -54,19 +54,18 @@ Page({
54 }, 54 },
55 // 获取矩阵列表 55 // 获取矩阵列表
56 getCompanyList(category_id,park){ 56 getCompanyList(category_id,park){
57 - let url = '/api/Company/index', b = this; 57 + let url = '/api/Company/index', b = this, companyList = b.data.page > 1 ? b.data.companyList : [];
58 let params = { 58 let params = {
59 category_id: category_id||'', 59 category_id: category_id||'',
60 park:park||'', 60 park:park||'',
61 page: b.data.page 61 page: b.data.page
62 } 62 }
63 - let companylist = b.data.page == 1 ? []:b.data.companylist;  
64 app.post(url,params).then((res)=>{ 63 app.post(url,params).then((res)=>{
65 b.setData({ 64 b.setData({
66 - companyList: companylist.concat(res.data), 65 + companyList: companyList.concat(res.data),
67 totalPage: res.total, 66 totalPage: res.total,
68 currpage: res.current_page, 67 currpage: res.current_page,
69 - ifData: companylist.concat(res.data).length>0?!0:!1, 68 + ifData: companyList.concat(res.data).length>0?!0:!1,
70 noMore: res.last_page>res.current_page?!1:!0 69 noMore: res.last_page>res.current_page?!1:!0
71 }) 70 })
72 wx.stopPullDownRefresh(); 71 wx.stopPullDownRefresh();
@@ -104,11 +103,6 @@ Page({ @@ -104,11 +103,6 @@ Page({
104 }) 103 })
105 s.getCompanyList(e.currentTarget.dataset.current, s.data.park) 104 s.getCompanyList(e.currentTarget.dataset.current, s.data.park)
106 }, 105 },
107 - scroll(){  
108 - },  
109 - reload(){  
110 -  
111 - },  
112 106
113 /** 107 /**
114 * 生命周期函数--监听页面加载 108 * 生命周期函数--监听页面加载
@@ -167,7 +161,7 @@ Page({ @@ -167,7 +161,7 @@ Page({
167 * 页面上拉触底事件的处理函数 161 * 页面上拉触底事件的处理函数
168 */ 162 */
169 onReachBottom: function() { 163 onReachBottom: function() {
170 - 164 + this.getMore();
171 }, 165 },
172 166
173 /** 167 /**
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 </scroll-view> 15 </scroll-view>
16 <view class='iconfont icon-gengduo1' bindtap='changeShow'></view> 16 <view class='iconfont icon-gengduo1' bindtap='changeShow'></view>
17 </view> 17 </view>
18 -<scroll-view bindscroll="scroll" bindscrolltolower="getMore" class="scroll-content" hidden="{{!ifData}}" scrollTop="{{scrollTop}}" scrollY="true" style="height:{{scrollHeight}}px;"> 18 +<view class="scroll-content" hidden="{{!ifData}}"style="height:{{scrollHeight}}px;">
19 <view class='content_box' wx:if='{{showType}}'> 19 <view class='content_box' wx:if='{{showType}}'>
20 <navigator class='item_list' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}" 20 <navigator class='item_list' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}"
21 open-type="navigate" 21 open-type="navigate"
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
48 </view> 48 </view>
49 </navigator> 49 </navigator>
50 </view> 50 </view>
51 -</scroll-view> 51 +</view>
52 52
53 <view class="none-box" hidden="{{ifData}}"> 53 <view class="none-box" hidden="{{ifData}}">
54 <view>暂无相关企业</view> 54 <view>暂无相关企业</view>
@@ -11,6 +11,7 @@ page { @@ -11,6 +11,7 @@ page {
11 top: 0; 11 top: 0;
12 left: 0; 12 left: 0;
13 display: flex; 13 display: flex;
  14 + z-index: 10;
14 } 15 }
15 16
16 .tab_box { 17 .tab_box {
@@ -8,7 +8,8 @@ Page({ @@ -8,7 +8,8 @@ Page({
8 data: { 8 data: {
9 followList: [], 9 followList: [],
10 page: 1, 10 page: 1,
11 - ifData:!1 11 + ifData:!1,
  12 + noMore:!0
12 }, 13 },
13 /** 14 /**
14 * 生命周期函数--监听页面加载 15 * 生命周期函数--监听页面加载
@@ -24,24 +25,41 @@ Page({ @@ -24,24 +25,41 @@ Page({
24 page: b.data.page 25 page: b.data.page
25 }; 26 };
26 a.post(url, params).then((res) => { 27 a.post(url, params).then((res) => {
27 - console.log(res);  
28 b.setData({ 28 b.setData({
29 followList: res.data, 29 followList: res.data,
30 ifData: res.data.length>0?true:false, 30 ifData: res.data.length>0?true:false,
31 noMore: res.last_page==res.current_page?!0:!1 31 noMore: res.last_page==res.current_page?!0:!1
32 }) 32 })
  33 + wx.stopPullDownRefresh()
33 }) 34 })
34 - },  
35 - getMore(){  
36 - this.setData({  
37 - page: this.data.page++  
38 - })  
39 - !this.data.noMore?this.getFollowList():wx.showToast({  
40 - title: '没有更多了',  
41 - icon:'none' 35 + },
  36 + cancleFocus(e){
  37 + let t = this, url ='/api/company/setFollow',indx = e.currentTarget.dataset.indx,
  38 + params = {
  39 + id: e.currentTarget.id
  40 + };
  41 + wx.showModal({
  42 + title: '提示',
  43 + content: '是否取消关注该企业?',
  44 + success:(r)=>{
  45 + if(r.confirm){
  46 + a.post(url, params).then(r => {
  47 + wx.showToast({
  48 + title: '已取消关注',
  49 + icon: 'none'
  50 + })
  51 + t.data.followList.splice(indx, 1);
  52 + setTimeout(() => {
  53 + t.setData({
  54 + followList: t.data.followList
  55 + })
  56 + }, 1200)
  57 + })
  58 + }
  59 + }
42 }) 60 })
43 - },  
44 61
  62 + },
45 /** 63 /**
46 * 生命周期函数--监听页面初次渲染完成 64 * 生命周期函数--监听页面初次渲染完成
47 */ 65 */
@@ -74,18 +92,24 @@ Page({ @@ -74,18 +92,24 @@ Page({
74 * 页面相关事件处理函数--监听用户下拉动作 92 * 页面相关事件处理函数--监听用户下拉动作
75 */ 93 */
76 onPullDownRefresh: function () { 94 onPullDownRefresh: function () {
77 - 95 + this.setData({
  96 + page: 1,
  97 + followList:[]
  98 + }),
  99 + this.getFollowList()
78 }, 100 },
79 101
80 /** 102 /**
81 * 页面上拉触底事件的处理函数 103 * 页面上拉触底事件的处理函数
82 */ 104 */
83 onReachBottom: function () { 105 onReachBottom: function () {
84 - let that = this;  
85 - that.setData({  
86 - page: that.data.page + 1,  
87 - });  
88 - that.getFollowList(); 106 + this.setData({
  107 + page: this.data.page+1
  108 + })
  109 + !this.data.noMore ? this.getFollowList() : wx.showToast({
  110 + title: '没有更多了',
  111 + icon: 'none'
  112 + })
89 }, 113 },
90 114
91 /** 115 /**
@@ -2,5 +2,6 @@ @@ -2,5 +2,6 @@
2 "usingComponents": {}, 2 "usingComponents": {},
3 "navigationBarBackgroundColor": "#f7f7f7", 3 "navigationBarBackgroundColor": "#f7f7f7",
4 "navigationBarTitleText": "我的关注", 4 "navigationBarTitleText": "我的关注",
5 - "navigationBarTextStyle": "black" 5 + "navigationBarTextStyle": "black",
  6 + "enablePullDownRefresh": true
6 } 7 }
1 <!--pages/my/myAttention/myAttention.wxml--> 1 <!--pages/my/myAttention/myAttention.wxml-->
2 -<scroll-view class='box' scroll-y='true' hidden='{{!ifData}}' bindscrolltolower='getMore'> 2 +<scroll-view class='box' >
3 <view class='item_list' wx:for='{{followList}}' wx:key="index"> 3 <view class='item_list' wx:for='{{followList}}' wx:key="index">
4 <image src='{{item.logo_image}}'></image> 4 <image src='{{item.logo_image}}'></image>
5 <view class='list_right'> 5 <view class='list_right'>
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <text>21:00</text> --> 11 <text>21:00</text> -->
12 </view> 12 </view>
13 </view> 13 </view>
14 - <view class='list_btn'>已关注</view> 14 + <view class='list_btn'bindtap='cancleFocus' id='{{item.id}}' data-indx="{{index}}">取消关注</view>
15 </view> 15 </view>
16 </view> 16 </view>
17 </scroll-view> 17 </scroll-view>
1 const a = getApp(); 1 const a = getApp();
2 Page({ 2 Page({
3 3
4 - /**  
5 - * 页面的初始数据  
6 - */  
7 - data: {  
8 - commentsList: [],  
9 - page: 1,  
10 - ifData:!1  
11 - },  
12 -  
13 - /**  
14 - * 生命周期函数--监听页面加载  
15 - */  
16 - onLoad: function(options) {  
17 - this.getCommentsList();  
18 - },  
19 -  
20 - // 获取评论列表  
21 - getCommentsList() {  
22 - let b = this,  
23 - url = '/api/User/getMyCommentList',  
24 - params = {  
25 - header: true,  
26 - page: b.data.page  
27 - };  
28 - a.post(url, params).then((res) => {  
29 - for(let b of res.data){  
30 - b.images = b.images.split(',')  
31 - }  
32 - b.setData({  
33 - commentsList: b.data.commentsList.concat(res.data)  
34 - })  
35 - b.data.commentsList.length > 0 ? b.setData({  
36 - ifData: !0  
37 - }) : b.setData({  
38 - ifData: !1  
39 - }), res.data.length < res.per_page ? b.setData({  
40 - noMore: !0,  
41 - }) : ''  
42 - })  
43 - },  
44 - delCom(e){  
45 - let t = this, id = e.currentTarget.id, url ='/api/interact/deleteComment',params={  
46 - id: id 4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + commentsList: [],
  9 + page: 1,
  10 + ifData: !1
  11 + },
  12 +
  13 + /**
  14 + * 生命周期函数--监听页面加载
  15 + */
  16 + onLoad: function(options) {
  17 + this.getCommentsList();
  18 + },
  19 +
  20 + // 获取评论列表
  21 + getCommentsList() {
  22 + let b = this,
  23 + url = '/api/User/getMyCommentList',
  24 + params = {
  25 + header: true,
  26 + page: b.data.page
47 }; 27 };
48 - a.post(url,params).then(r=>{  
49 - wx.showToast({  
50 - title: '删除成功',  
51 - icon: 'none'  
52 - });  
53 - t.data.commentsList.splice(index, 1)  
54 - let index = e.currentTarget.dataset.indx;  
55 - t.setData({  
56 - commentsList: t.data.commentsList  
57 - })  
58 -  
59 - 28 + a.post(url, params).then((res) => {
  29 + for (let b of res.data) {
  30 + b.images = b.images.split(',')
  31 + }
  32 + b.setData({
  33 + commentsList: b.data.commentsList.concat(res.data)
60 }) 34 })
61 - },  
62 - /**  
63 - * 生命周期函数--监听页面初次渲染完成  
64 - */  
65 - onReady: function() {  
66 -  
67 - },  
68 -  
69 - /**  
70 - * 生命周期函数--监听页面显示  
71 - */  
72 - onShow: function() {  
73 -  
74 - },  
75 -  
76 - /**  
77 - * 生命周期函数--监听页面隐藏  
78 - */  
79 - onHide: function() {  
80 -  
81 - },  
82 -  
83 - /**  
84 - * 生命周期函数--监听页面卸载  
85 - */  
86 - onUnload: function() {  
87 -  
88 - },  
89 -  
90 - /**  
91 - * 页面相关事件处理函数--监听用户下拉动作  
92 - */  
93 - onPullDownRefresh: function() {  
94 -  
95 - },  
96 -  
97 - /**  
98 - * 页面上拉触底事件的处理函数  
99 - */  
100 - onReachBottom: function() {  
101 - let that = this;  
102 - if(that.data.noMore){  
103 - wx.showToast({  
104 - title: '没有更多了',  
105 - icon:'none'  
106 - })  
107 - }else{  
108 - that.setData({  
109 - page: that.data.page + 1,  
110 - });  
111 - that.getCommentsList(); 35 + b.data.commentsList.length > 0 ? b.setData({
  36 + ifData: !0
  37 + }) : b.setData({
  38 + ifData: !1
  39 + }), res.data.length < res.per_page ? b.setData({
  40 + noMore: !0,
  41 + }) : ''
  42 + wx.stopPullDownRefresh()
  43 + })
  44 + },
  45 + navdetail(e) {
  46 + wx.navigateTo({
  47 + url: '/pages/colleagues_2/colleagues_2?id=' + e.currentTarget.id,
  48 + })
  49 + },
  50 + delCom(e) {
  51 + let t = this,
  52 + id = e.currentTarget.id,
  53 + url = '/api/interact/deleteComment',
  54 + indx = e.currentTarget.dataset.indx,
  55 + params = {
  56 + id: id
  57 + };
  58 + wx.showModal({
  59 + title: '提示',
  60 + content: '是否删除该评论?',
  61 + success:(res)=>{
  62 + if(res.confirm){
  63 + a.post(url, params).then(r => {
  64 + wx.showToast({
  65 + title: '删除成功',
  66 + icon: 'none'
  67 + });
  68 + t.data.commentsList.splice(indx, 1)
  69 + t.setData({
  70 + commentsList: t.data.commentsList
  71 + })
  72 + })
  73 + }
112 } 74 }
  75 + })
  76 + },
  77 + /**
  78 + * 生命周期函数--监听页面初次渲染完成
  79 + */
  80 + onReady: function() {
  81 +
  82 + },
  83 +
  84 + /**
  85 + * 生命周期函数--监听页面显示
  86 + */
  87 + onShow: function() {
  88 +
  89 + },
  90 +
  91 + /**
  92 + * 生命周期函数--监听页面隐藏
  93 + */
  94 + onHide: function() {
  95 +
  96 + },
  97 +
  98 + /**
  99 + * 生命周期函数--监听页面卸载
  100 + */
  101 + onUnload: function() {
  102 +
  103 + },
  104 +
  105 + /**
  106 + * 页面相关事件处理函数--监听用户下拉动作
  107 + */
  108 + onPullDownRefresh: function() {
  109 + this.setData({
  110 + page:1,
  111 + commentsList:[]
  112 + }),
  113 + this.getCommentsList()
  114 + },
  115 +
  116 + /**
  117 + * 页面上拉触底事件的处理函数
  118 + */
  119 + onReachBottom: function() {
  120 + let that = this;
  121 + if (that.data.noMore) {
  122 + wx.showToast({
  123 + title: '没有更多了',
  124 + icon: 'none'
  125 + })
  126 + } else {
  127 + that.setData({
  128 + page: that.data.page + 1,
  129 + });
  130 + that.getCommentsList();
  131 + }
113 132
114 - }, 133 + },
115 134
116 - /**  
117 - * 用户点击右上角分享  
118 - */  
119 - onShareAppMessage: function() { 135 + /**
  136 + * 用户点击右上角分享
  137 + */
  138 + onShareAppMessage: function() {
120 139
121 - } 140 + }
122 }) 141 })
@@ -2,5 +2,6 @@ @@ -2,5 +2,6 @@
2 "usingComponents": {}, 2 "usingComponents": {},
3 "navigationBarTitleText": "我的评论", 3 "navigationBarTitleText": "我的评论",
4 "navigationBarBackgroundColor": "#fff", 4 "navigationBarBackgroundColor": "#fff",
5 - "navigationBarTextStyle": "black" 5 + "navigationBarTextStyle": "black",
  6 + "enablePullDownRefresh": true
6 } 7 }
1 <!-- 企话吧 --> 1 <!-- 企话吧 -->
2 -<scroll-view scroll-y='true'> 2 +<view>
3 <view class='mid'> 3 <view class='mid'>
4 <!-- 条目 --> 4 <!-- 条目 -->
5 <view class='mid_item' wx:for="{{commentsList}}" wx:key="index"> 5 <view class='mid_item' wx:for="{{commentsList}}" wx:key="index">
@@ -20,10 +20,10 @@ @@ -20,10 +20,10 @@
20 </view> 20 </view>
21 <!-- 文字内容 --> 21 <!-- 文字内容 -->
22 <view class='mid_item_text'> 22 <view class='mid_item_text'>
23 - 新个人所得税法近日备受关注。关于个人所得税,想必大家都十分关心,让我们通过以下问题! 23 + {{item.comment_content}}
24 </view> 24 </view>
25 <!-- 文本内容 --> 25 <!-- 文本内容 -->
26 - <view class='mid_item_content'> 26 + <view class='mid_item_content' bindtap='navdetail' id='{{item.object_id}}'>
27 <!-- 条目 --> 27 <!-- 条目 -->
28 <view class='mid_item content'> 28 <view class='mid_item content'>
29 <view class='mid_item_top'> 29 <view class='mid_item_top'>
@@ -35,9 +35,9 @@ @@ -35,9 +35,9 @@
35 <!-- 文字 --> 35 <!-- 文字 -->
36 <view class='mid_item_top_left_text'> 36 <view class='mid_item_top_left_text'>
37 {{item.nickname}} 37 {{item.nickname}}
38 - <view class='icon_tm'> 38 + <!-- <view class='icon_tm'>
39 <image src='../../images/guangfang@2x.png'></image> 39 <image src='../../images/guangfang@2x.png'></image>
40 - </view> 40 + </view> -->
41 </view> 41 </view>
42 </view> 42 </view>
43 <view class='mid_item_top_right'> 43 <view class='mid_item_top_right'>
@@ -58,13 +58,31 @@ @@ -58,13 +58,31 @@
58 </view> 58 </view>
59 <!-- 底部 --> 59 <!-- 底部 -->
60 <view class='mid_item_like'> 60 <view class='mid_item_like'>
61 - <view class='mid_item_like_left' bindtap='delCom' id='{{item.id}}' data-indx = '{{index}}'> 61 + <view class='mid_item_like_left' bindtap='delCom' id='{{item.id}}' data-indx='{{index}}'>
62 删除 62 删除
63 </view> 63 </view>
  64 + <view class='mid_item_like_right'>
  65 + <!-- 点赞 -->
  66 + <view class='mid_like color_blue' bindtap='zan' id='{{item.id}}' data-idx='{{index}}' data-type='{{item.is_like}}'>
  67 + <image src='../../images/thumb-up-button@3x.png' class='zan' wx:if='{{item.is_like==1}}'></image>
  68 + <image src='../../images/dainzan@3x.png' class='zan' wx:else></image>
  69 + </view>
  70 + <view class='mid_number color_blue'>
  71 + {{item.likes}}
  72 + </view>
  73 + <!-- 评论 -->
  74 + <view class='mid_like' bindtap='navdetail' id='{{item.id}}'>
  75 + <image src='../../images/pinglun@3x.png'></image>
  76 + </view>
  77 + <view class='mid_number commentCount'>
  78 + {{item.comment_count}}
  79 + </view>
  80 + </view>
64 </view> 81 </view>
  82 +
65 </view> 83 </view>
66 </view> 84 </view>
67 -</scroll-view> 85 +</view>
68 <view class="none-box" hidden="{{ifData}}"> 86 <view class="none-box" hidden="{{ifData}}">
69 <view>暂无相关评论</view> 87 <view>暂无相关评论</view>
70 </view> 88 </view>
@@ -213,10 +213,10 @@ page{ @@ -213,10 +213,10 @@ page{
213 width: 686rpx; 213 width: 686rpx;
214 display: flex; 214 display: flex;
215 justify-content: space-between; 215 justify-content: space-between;
  216 + align-items: center;
216 } 217 }
217 .mid_item_like_left{ 218 .mid_item_like_left{
218 -  
219 - font-size:22rpx; 219 + font-size:28rpx;
220 font-family:PingFang SC; 220 font-family:PingFang SC;
221 font-weight:400; 221 font-weight:400;
222 line-height:32rpx; 222 line-height:32rpx;
@@ -238,14 +238,18 @@ page{ @@ -238,14 +238,18 @@ page{
238 width: 100%; 238 width: 100%;
239 height: 100%; 239 height: 100%;
240 } 240 }
  241 +.zan{
  242 + position: relative;
  243 + top: -4rpx;
  244 +}
241 .mid_number{ 245 .mid_number{
242 margin-left: 10rpx; 246 margin-left: 10rpx;
243 - font-size:22rpx;  
244 font-family:PingFang SC; 247 font-family:PingFang SC;
245 font-weight:400; 248 font-weight:400;
246 line-height:48rpx; 249 line-height:48rpx;
247 color: #b5b5b5; 250 color: #b5b5b5;
248 opacity:1; 251 opacity:1;
  252 + font-size: 28rpx;
249 } 253 }
250 254
251 .color_blue{ 255 .color_blue{
@@ -307,6 +311,7 @@ page{ @@ -307,6 +311,7 @@ page{
307 .mid_pic_item{ 311 .mid_pic_item{
308 width:218rpx; 312 width:218rpx;
309 height:218rpx; 313 height:218rpx;
  314 + overflow: hidden;
310 background:rgba(0,0,0,0); 315 background:rgba(0,0,0,0);
311 opacity:1; 316 opacity:1;
312 display: flex; 317 display: flex;
@@ -7,7 +7,8 @@ Page({ @@ -7,7 +7,8 @@ Page({
7 data: { 7 data: {
8 noticeList: [], 8 noticeList: [],
9 page: 1, 9 page: 1,
10 - ifData:!1 10 + ifData:!1,
  11 + noMore:!0
11 }, 12 },
12 13
13 /** 14 /**
@@ -20,11 +21,11 @@ Page({ @@ -20,11 +21,11 @@ Page({
20 // 获取点赞列表 21 // 获取点赞列表
21 getInformList() { 22 getInformList() {
22 let b = this, 23 let b = this,
23 - url = '/api/User/getNoticeList',  
24 - params = {  
25 - header: true,  
26 - page: b.data.page  
27 - }; 24 + url = '/api/User/getNoticeList',
  25 + params = {
  26 + header: true,
  27 + page: b.data.page
  28 + };
28 a.post(url, params).then((res) => { 29 a.post(url, params).then((res) => {
29 b.setData({ 30 b.setData({
30 noticeList: b.data.noticeList.concat(res.data) 31 noticeList: b.data.noticeList.concat(res.data)
@@ -36,17 +37,19 @@ Page({ @@ -36,17 +37,19 @@ Page({
36 }), res.data.length < res.per_page ? b.setData({ 37 }), res.data.length < res.per_page ? b.setData({
37 noMore: !0, 38 noMore: !0,
38 }) : '' 39 }) : ''
  40 + wx.stopPullDownRefresh();
  41 + setTimeout(()=>{
  42 + let noticeList = b.data.noticeList;
  43 + for(let obj of noticeList){
  44 + obj.read_switch = 1
  45 + }
  46 + b.setData({
  47 + noticeList: noticeList
  48 + })
  49 + },2000)
39 }) 50 })
40 }, 51 },
41 - getMore() {  
42 - this.setData({  
43 - page: this.data.page++  
44 - })  
45 - !this.data.noMore ? this.getInformList() : wx.showToast({  
46 - title: '没有更多了',  
47 - icon: 'none'  
48 - })  
49 - }, 52 +
50 53
51 /** 54 /**
52 * 生命周期函数--监听页面初次渲染完成 55 * 生命周期函数--监听页面初次渲染完成
@@ -80,18 +83,24 @@ Page({ @@ -80,18 +83,24 @@ Page({
80 * 页面相关事件处理函数--监听用户下拉动作 83 * 页面相关事件处理函数--监听用户下拉动作
81 */ 84 */
82 onPullDownRefresh: function() { 85 onPullDownRefresh: function() {
83 - 86 + this.setData({
  87 + page: 1,
  88 + noticeList:[]
  89 + })
  90 + this.getInformList();
84 }, 91 },
85 92
86 /** 93 /**
87 * 页面上拉触底事件的处理函数 94 * 页面上拉触底事件的处理函数
88 */ 95 */
89 onReachBottom: function() { 96 onReachBottom: function() {
90 - let that = this;  
91 - that.setData({  
92 - page: that.data.page + 1,  
93 - });  
94 - that.getInformList(); 97 + this.setData({
  98 + page: this.data.page + 1
  99 + })
  100 + !this.data.noMore ? this.getInformList() : wx.showToast({
  101 + title: '没有更多了',
  102 + icon: 'none'
  103 + })
95 }, 104 },
96 105
97 /** 106 /**
@@ -2,5 +2,6 @@ @@ -2,5 +2,6 @@
2 "usingComponents": {}, 2 "usingComponents": {},
3 "navigationBarTitleText": "发文通知", 3 "navigationBarTitleText": "发文通知",
4 "navigationBarBackgroundColor": "#fff", 4 "navigationBarBackgroundColor": "#fff",
5 - "navigationBarTextStyle": "black" 5 + "navigationBarTextStyle": "black",
  6 + "enablePullDownRefresh": true
6 } 7 }
1 - <scroll-view scroll-y='true' style='height:{{winHeight}}px' hidden='{{!ifData}}' bindscrolltolower='getMore'>  
2 - <view class='mid'>  
3 - <view class='mid_item' wx:for="{{noticeList}}" wx:key="index">  
4 - <view class='mid_item_top'>  
5 - <view class='mid_item_top_left'>  
6 - <!-- 图片 -->  
7 - <view class='mid_item_top_left_pic'>  
8 - <image src='../../images/03_nav@2x.png'></image>  
9 - </view>  
10 - <!-- 文字 -->  
11 - <view class='mid_item_top_left_text color_blue'>  
12 - 牧羊人  
13 - <view class='mid_icon' wx:if="{{item.read_switch == 0}}">  
14 - 未读  
15 - <!-- <image src='../../images/weidu@2x.png'></image> -->  
16 - </view>  
17 - <view class='mid_icon color_read' wx:if="{{item.read_switch == 1}}">  
18 - 已读  
19 - <!-- <image src='../../images/weidu@2x.png'></image> -->  
20 - </view>  
21 - </view>  
22 - </view>  
23 - <view class='mid_item_top_right '>  
24 - 15分钟前  
25 - </view>  
26 - </view>  
27 - <!-- 大标题 -->  
28 - <view class='mid_item_title'>  
29 - {{item.title}}  
30 - </view>  
31 - <!-- 文字内容 -->  
32 - <view class='mid_item_text'>  
33 - {{item.content}} 1 +<view scroll-y='true' style='height:{{winHeight}}px' hidden='{{!ifData}}' bindscrolltolower='getMore'>
  2 + <view class='mid'>
  3 + <view class='mid_item' wx:for="{{noticeList}}" wx:key="index">
  4 + <view class='mid_item_top'>
  5 + <view class='mid_item_top_left'>
  6 + <!-- 图片 -->
  7 + <!-- <view class='mid_item_top_left_pic'>
  8 + <image src='../../images/03_nav@2x.png'></image>
  9 + </view> -->
  10 + <!-- 文字 -->
  11 + <view class='mid_item_top_left_text color_blue'>
  12 + 系统消息
  13 + <view class='mid_icon' wx:if="{{item.read_switch == 0}}">
  14 + 未读
  15 + <!-- <image src='../../images/weidu@2x.png'></image> -->
  16 + </view>
  17 + <view class='mid_icon color_read' wx:if="{{item.read_switch == 1}}">
  18 + 已读
  19 + <!-- <image src='../../images/weidu@2x.png'></image> -->
  20 + </view>
34 </view> 21 </view>
  22 + </view>
  23 + <view class='mid_item_top_right '>
  24 + 15分钟前
  25 + </view>
  26 + </view>
  27 + <!-- 大标题 -->
  28 + <view class='mid_item_title'>
  29 + {{item.title}}
  30 + </view>
  31 + <!-- 文字内容 -->
  32 + <view class='mid_item_text'>
  33 + {{item.content}}
35 </view> 34 </view>
  35 + </view>
36 </view> 36 </view>
37 - </scroll-view>  
38 -  
39 - <view class="none-box" hidden="{{ifData}}">  
40 - <view>暂无相关发文</view>  
41 </view> 37 </view>
42 -  
  38 +<view class="none-box" hidden="{{ifData}}">
  39 + <view>暂无相关发文</view>
  40 +</view>
@@ -186,7 +186,7 @@ page{ @@ -186,7 +186,7 @@ page{
186 line-height:42rpx; 186 line-height:42rpx;
187 color:rgba(51,51,51,1); 187 color:rgba(51,51,51,1);
188 opacity:1; 188 opacity:1;
189 - margin-left: 16rpx; 189 + /* margin-left: 16rpx; */
190 position: relative; 190 position: relative;
191 } 191 }
192 .mid_item_top_right{ 192 .mid_item_top_right{
@@ -2,94 +2,137 @@ @@ -2,94 +2,137 @@
2 const a = getApp(); 2 const a = getApp();
3 Page({ 3 Page({
4 4
5 - /**  
6 - * 页面的初始数据  
7 - */  
8 - data: {  
9 - likeList: [],  
10 - page: 1,  
11 - ifData: !1,  
12 - noMore:!1  
13 - },  
14 -  
15 - /**  
16 - * 生命周期函数--监听页面加载  
17 - */  
18 - onLoad: function(options) {  
19 - this.getLikeList();  
20 - },  
21 -  
22 - // 获取点赞列表  
23 - getLikeList() {  
24 - let b = this, url = '/api/User/getMyLikeList', params = {  
25 - header: true,  
26 - page: b.data.page  
27 - };  
28 - a.post(url, params).then((res) => {  
29 - for(let b of res.data){  
30 - b.images = b.images.split(',')  
31 - }  
32 - b.setData({  
33 - likeList: b.data.likeList.concat(res.data),  
34 - ifData: res.data.length>0?true:false,  
35 - noMore: res.data.length < res.per_page?!0:!1  
36 - })  
37 - })  
38 - },  
39 -  
40 - /**  
41 - * 生命周期函数--监听页面初次渲染完成  
42 - */  
43 - onReady: function() {  
44 -  
45 - },  
46 -  
47 - /**  
48 - * 生命周期函数--监听页面显示  
49 - */  
50 - onShow: function() {  
51 -  
52 - },  
53 -  
54 - /**  
55 - * 生命周期函数--监听页面隐藏  
56 - */  
57 - onHide: function() {  
58 -  
59 - },  
60 -  
61 - /**  
62 - * 生命周期函数--监听页面卸载  
63 - */  
64 - onUnload: function() {  
65 -  
66 - }, 5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + likeList: [],
  10 + page: 1,
  11 + ifData: !1,
  12 + noMore: !1
  13 + },
  14 +
  15 + /**
  16 + * 生命周期函数--监听页面加载
  17 + */
  18 + onLoad: function (options) {
  19 + this.getLikeList();
  20 + },
  21 + navdetail(e) {
  22 + wx.navigateTo({
  23 + url: '/pages/colleagues_2/colleagues_2?id=' + e.currentTarget.id,
  24 + })
  25 + },
  26 +
  27 + zan(e) {
  28 + console.log(e)
  29 + let t = this, id = e.currentTarget.id, url = '/api/interact/deletePosts', params = {
  30 + id: id
  31 + }, index = e.currentTarget.dataset.indx;
  32 + a.post(url, params).then((rt) => {
  33 + wx.showToast({
  34 + title: '删除成功',
  35 + icon: 'none',
  36 + duration: 1300
  37 + })
67 38
68 - /**  
69 - * 页面相关事件处理函数--监听用户下拉动作  
70 - */  
71 - onPullDownRefresh: function() {  
72 39
73 - }, 40 + })
  41 + },
74 42
75 - /**  
76 - * 页面上拉触底事件的处理函数  
77 - */  
78 - onReachBottom: function() {  
79 - let that = this;  
80 - !this.data.noMore ? (that.setData({  
81 - page: that.data.page + 1,  
82 - }), that.getLikeList()):wx.showToast({  
83 - title: '没有更多了',  
84 - icon: 'none' 43 + zan(e) {
  44 + let url = '/api/interact/setLike', params = {
  45 + object_id: e.currentTarget.id,
  46 + type: '1'
  47 + }, index = e.currentTarget.dataset.indx, t = this, type = e.currentTarget.dataset.type;
  48 + a.post(url, params).then((r) => {
  49 + wx.showToast({
  50 + title: '已取消点赞',
  51 + icon:'none'
85 }) 52 })
86 -  
87 - },  
88 -  
89 - /**  
90 - * 用户点击右上角分享  
91 - */  
92 - onShareAppMessage: function() {  
93 -  
94 - } 53 + t.data.likeList.splice(index, 1);
  54 + setTimeout(()=>{
  55 + t.setData({
  56 + likeList: t.data.likeList
  57 + })
  58 + },1200)
  59 + })
  60 + },
  61 + // 获取点赞列表
  62 + getLikeList() {
  63 + let b = this, url = '/api/User/getMyLikeList', params = {
  64 + header: true,
  65 + page: b.data.page
  66 + };
  67 + a.post(url, params).then((res) => {
  68 + for (let b of res.data) {
  69 + b.images = b.images.split(',')
  70 + }
  71 + b.setData({
  72 + likeList: b.data.likeList.concat(res.data),
  73 + ifData: res.data.length > 0 ? true : false,
  74 + noMore: res.data.length < res.per_page ? !0 : !1
  75 + })
  76 + })
  77 + },
  78 +
  79 + /**
  80 + * 生命周期函数--监听页面初次渲染完成
  81 + */
  82 + onReady: function () {
  83 +
  84 + },
  85 +
  86 + /**
  87 + * 生命周期函数--监听页面显示
  88 + */
  89 + onShow: function () {
  90 +
  91 + },
  92 +
  93 + /**
  94 + * 生命周期函数--监听页面隐藏
  95 + */
  96 + onHide: function () {
  97 +
  98 + },
  99 +
  100 + /**
  101 + * 生命周期函数--监听页面卸载
  102 + */
  103 + onUnload: function () {
  104 +
  105 + },
  106 +
  107 + /**
  108 + * 页面相关事件处理函数--监听用户下拉动作
  109 + */
  110 + onPullDownRefresh: function () {
  111 + this.setData({
  112 + page: 1,
  113 + likeList: []
  114 + }),
  115 + this.getLikeList()
  116 + },
  117 +
  118 + /**
  119 + * 页面上拉触底事件的处理函数
  120 + */
  121 + onReachBottom: function () {
  122 + let that = this;
  123 + !this.data.noMore ? (that.setData({
  124 + page: that.data.page + 1,
  125 + }), that.getLikeList()) : wx.showToast({
  126 + title: '没有更多了',
  127 + icon: 'none'
  128 + })
  129 +
  130 + },
  131 +
  132 + /**
  133 + * 用户点击右上角分享
  134 + */
  135 + onShareAppMessage: function () {
  136 +
  137 + }
95 }) 138 })
@@ -2,5 +2,6 @@ @@ -2,5 +2,6 @@
2 "usingComponents": {}, 2 "usingComponents": {},
3 "navigationBarTitleText": "我的点赞", 3 "navigationBarTitleText": "我的点赞",
4 "navigationBarBackgroundColor": "#fff", 4 "navigationBarBackgroundColor": "#fff",
5 - "navigationBarTextStyle": "black" 5 + "navigationBarTextStyle": "black",
  6 + "enablePullDownRefresh": true
6 } 7 }
1 -  
2 - <!-- 企话吧 -->  
3 - <scroll-view class='box_right' hidden='{{!ifData}}'>  
4 - <view class='mid'>  
5 - <!-- 条目 -->  
6 - <view class='mid_item' wx:for="{{likeList}}" wx:key="index">  
7 - <view class='mid_item_top'>  
8 - <view class='mid_item_top_left'>  
9 - <!-- 图片 -->  
10 - <view class='mid_item_top_left_pic'>  
11 - <image src='{{item.avatar}}'></image>  
12 - </view>  
13 - <!-- 文字 -->  
14 - <view class='mid_item_top_left_text'>  
15 - {{item.nickname}}  
16 - </view> 1 +<!-- 企话吧 -->
  2 +<scroll-view class='box_right' hidden='{{!ifData}}'>
  3 + <view class='mid'>
  4 + <!-- 条目 -->
  5 + <view class='mid_item' wx:for="{{likeList}}" wx:key="index" bindtap='navdetail' id='{{item.object_id}}'>
  6 + <view class='mid_item_top' bindtap='navdetail' id='{{item.object_id}}'>
  7 + <view class='mid_item_top_left'>
  8 + <!-- 图片 -->
  9 + <view class='mid_item_top_left_pic'>
  10 + <image src='{{item.avatar}}'></image>
17 </view> 11 </view>
18 - <view class='mid_item_top_right'>  
19 - {{item.create_time_text}} 12 + <!-- 文字 -->
  13 + <view class='mid_item_top_left_text'>
  14 + {{item.nickname}}
20 </view> 15 </view>
21 </view> 16 </view>
22 - <!-- 文字内容 -->  
23 - <view class='mid_item_text'>{{item.title}} 17 + <view class='mid_item_top_right'>
  18 + {{item.create_time_text}}
24 </view> 19 </view>
25 - <!-- 图片内容 -->  
26 - <view class='mid_pic_box'>  
27 - <view class='mid_pic_box_p' wx:for="{{item.images}}" wx:key="index">  
28 - <image src='{{item}}'></image>  
29 - </view>  
30 - <!-- <view class='mid_pic_box_p'>  
31 - <image src='../../images/weirenzheng@3x.png'></image>  
32 - </view> -->  
33 -  
34 - 20 + </view>
  21 + <!-- 文字内容 -->
  22 + <view class='mid_item_text'>{{item.title}}
  23 + </view>
  24 + <!-- 图片内容 -->
  25 + <view class='mid_pic_box' hidden='{{item.images==""}}'>
  26 + <view class='mid_pic_box_p' wx:for="{{item.images}}" wx:key="index">
  27 + <image src='{{item}}'></image>
35 </view> 28 </view>
  29 + </view>
36 30
37 - <!-- 底部 -->  
38 - <view class='mid_item_like'>  
39 - <view class='mid_item_like_left'>  
40 - <!-- 删除 --> 31 + <!-- 底部 -->
  32 + <view class='mid_item_like'>
  33 + <view class='mid_item_like_left' >
  34 + <!-- 删除 -->
  35 + </view>
  36 + <view class='mid_item_like_right'>
  37 + <!-- 点赞 -->
  38 + <view class='mid_like color_blue' catchtap='zan' id='{{item.object_id}}' data-idx='{{index}}' >
  39 + <image src='../../images/thumb-up-button@3x.png' class='zan' wx:if='{{item.is_like==1}}'></image>
  40 + <image src='../../images/dainzan@3x.png' class='zan' wx:else></image>
  41 + </view>
  42 + <view class='mid_number color_blue' catchtap='zan' id='{{item.object_id}}' data-idx='{{index}}'>
  43 + {{item.likes}}
  44 + </view>
  45 + <!-- 评论 -->
  46 + <view class='mid_like' bindtap='navdetail' id='{{item.id}}'>
  47 + <image src='../../images/pinglun@3x.png' wx:if="{{item.is_comment==0}}"></image>
  48 + <image src='../../images/pinglun_fill@3x.png' wx:else></image>
  49 + </view>
  50 + <view class='mid_number commentCount'>
  51 + {{item.comment_count}}
41 </view> 52 </view>
42 -  
43 - <!-- <view class='mid_item_like_right'> -->  
44 - <!-- 点赞 -->  
45 - <!-- <view class='mid_like color_blue'>  
46 - <image src='../../images/thumb-up-button@3x.png'></image>  
47 - </view> -->  
48 - <!-- 数量 -->  
49 - <!-- <view class='mid_number color_blue'>  
50 - 46  
51 - </view> -->  
52 -  
53 - <!-- 点赞 -->  
54 - <!-- <view class='mid_like'>  
55 - <image src='../../images/pinglun@3x.png'></image>  
56 - </view> -->  
57 - <!-- 数量 -->  
58 - <!-- <view class='mid_number'>  
59 - 46  
60 - </view> -->  
61 - <!-- </view> -->  
62 </view> 53 </view>
63 </view> 54 </view>
64 </view> 55 </view>
65 - </scroll-view> 56 + </view>
  57 +</scroll-view>
66 58
67 59
68 <view class="none-box" hidden="{{ifData}}"> 60 <view class="none-box" hidden="{{ifData}}">
69 - <view>暂无相关点赞</view>  
70 -</view>  
71 -  
  61 + <view>暂无相关点赞</view>
  62 +</view>
@@ -237,9 +237,13 @@ page{ @@ -237,9 +237,13 @@ page{
237 width: 100%; 237 width: 100%;
238 height: 100%; 238 height: 100%;
239 } 239 }
  240 +.zan{
  241 + position: relative;
  242 + top: -4rpx;
  243 +}
240 .mid_number{ 244 .mid_number{
241 margin-left: 10rpx; 245 margin-left: 10rpx;
242 - font-size:22rpx; 246 + font-size:28rpx;
243 font-family:PingFang SC; 247 font-family:PingFang SC;
244 font-weight:400; 248 font-weight:400;
245 line-height:48rpx; 249 line-height:48rpx;
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 <view class='item_right'> 19 <view class='item_right'>
20 <!-- 图片 --> 20 <!-- 图片 -->
21 <view class='item_right_pic'> 21 <view class='item_right_pic'>
22 - <image src='../../images/chakan@3x.png'></image> 22 + <image src='../../images/chakan@3x.png' mode='widthFix'></image>
23 </view> 23 </view>
24 <!-- 数量 --> 24 <!-- 数量 -->
25 <view class='item_right_number'> 25 <view class='item_right_number'>
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 28
29 <!-- 图片 --> 29 <!-- 图片 -->
30 <view class='item_right_pic2'> 30 <view class='item_right_pic2'>
31 - <image src='../../images/pinglun@3x.png'></image> 31 + <image src='../../images/pinglun@3x.png' mode='widthFix'></image>
32 </view> 32 </view>
33 <!-- 数量 --> 33 <!-- 数量 -->
34 <view class='item_right_number'> 34 <view class='item_right_number'>
@@ -12,7 +12,8 @@ page{ @@ -12,7 +12,8 @@ page{
12 flex-flow: column; 12 flex-flow: column;
13 background: #fff; 13 background: #fff;
14 box-sizing: border-box; 14 box-sizing: border-box;
15 - padding: 48rpx 32rpx; 15 + padding: 30rpx;
  16 + font-size: 28rpx;
16 border-bottom:2rpx solid #f7f7f7 17 border-bottom:2rpx solid #f7f7f7
17 } 18 }
18 .item_top{ 19 .item_top{
@@ -51,15 +52,13 @@ page{ @@ -51,15 +52,13 @@ page{
51 } 52 }
52 53
53 .item_bottom{ 54 .item_bottom{
54 - margin-top: 18rpx; 55 + margin-top: 22rpx;
55 display: flex; 56 display: flex;
56 justify-content: space-between; 57 justify-content: space-between;
  58 + font-size: 28rpx;
57 } 59 }
58 .item_left{ 60 .item_left{
59 display: flex; 61 display: flex;
60 - width:44rpx;  
61 - height:32rpx;  
62 - font-size:22rpx;  
63 font-family:PingFang SC; 62 font-family:PingFang SC;
64 font-weight:400; 63 font-weight:400;
65 line-height:32rpx; 64 line-height:32rpx;
@@ -94,21 +93,18 @@ page{ @@ -94,21 +93,18 @@ page{
94 } 93 }
95 .item_right_pic{ 94 .item_right_pic{
96 95
97 - width:36rpx;  
98 - height:23rpx; 96 + width:46rpx;
99 /* background:rgba(204,204,204,1); */ 97 /* background:rgba(204,204,204,1); */
100 opacity:1; 98 opacity:1;
101 display: flex; 99 display: flex;
102 } 100 }
103 .item_right_pic image{ 101 .item_right_pic image{
104 width: 100%; 102 width: 100%;
105 - height: 100%;  
106 } 103 }
107 .item_right_number{ 104 .item_right_number{
108 margin-left: 12rpx; 105 margin-left: 12rpx;
109 width:24rpx; 106 width:24rpx;
110 height:28rpx; 107 height:28rpx;
111 - font-size:20rpx;  
112 font-family:PingFang SC; 108 font-family:PingFang SC;
113 font-weight:400; 109 font-weight:400;
114 line-height:28rpx; 110 line-height:28rpx;
@@ -116,16 +112,14 @@ page{ @@ -116,16 +112,14 @@ page{
116 opacity:1; 112 opacity:1;
117 } 113 }
118 .item_right_pic2{ 114 .item_right_pic2{
119 - margin-left: 40rpx;  
120 - width:34rpx;  
121 - height:32rpx; 115 + margin-left: 30rpx;
  116 + width:42rpx;
122 /* background:rgba(204,204,204,1); */ 117 /* background:rgba(204,204,204,1); */
123 opacity:1; 118 opacity:1;
124 display: flex; 119 display: flex;
125 } 120 }
126 .item_right_pic2 image{ 121 .item_right_pic2 image{
127 width: 100%; 122 width: 100%;
128 - height: 100%;  
129 } 123 }
130 .button{ 124 .button{
131 width:686rpx; 125 width:686rpx;