|
3 | 3 | <view class="common-list"> |
4 | 4 | <block wx:key="id" wx:for="{{postsList}}"> |
5 | 5 | <!-- 开始判断列表内容的第3列,样式重新排列 //大图模式 --> |
6 | | - <view wx:if="{{index%10==2}}"> |
| 6 | + <view wx:if="{{index%10==0 || index%10==4 || index%10==8 || index%10==12 || index%10==16 || index%10==20 || index%10==24 || index%10==28}}"> |
7 | 7 | <view class="list-item has-img w-100" index="{{index}}" id="{{item.id}}" bindtap="redictDetail"> |
8 | 8 | <view class="content-title content-title-100"> |
9 | 9 | <vpush-view> |
|
12 | 12 | </view> |
13 | 13 |
|
14 | 14 | <view class="content-title content-title-100" style='margin-top:0;margin-bottom:0'> |
15 | | - <vpush-view><text style='font-size:26rpx;color:#959595;margin:32rpx auto;'>{{item.excerpt.rendered}}</text></vpush-view> |
| 15 | + <vpush-view> |
| 16 | + <text style='font-size:26rpx;color:#959595;margin:10rpx auto;'>{{item.excerpt.rendered}}</text> |
| 17 | + </vpush-view> |
16 | 18 | </view> |
17 | 19 |
|
18 | 20 | <view class="content-date" style='margin-right:0;'> |
|
38 | 40 | </view> |
39 | 41 | </view> |
40 | 42 | <!-- 开始判断列表内容的第4列,样式重新排列 // 双图模式 --> |
41 | | - <view wx:elif="{{index%10==3}}"> |
| 43 | + <view wx:elif="{{index%10==5 || index%10==5 || index%10==13 || index%10==17 || index%10==21 || index%10==25 || index%10==29}}"> |
42 | 44 | <view class="list-item has-img w-100" index="{{index}}" id="{{item.id}}" bindtap="redictDetail"> |
43 | 45 | <view class="content-title content-title-100" style="margin-top:180px;"> |
44 | 46 | <vpush-view> |
|
47 | 49 | </view> |
48 | 50 |
|
49 | 51 | <view class="content-title content-title-100" style='margin-top:0;margin-bottom:0'> |
50 | | - <vpush-view><text style='font-size:26rpx;color:#959595;margin:32rpx auto;'>{{item.excerpt.rendered}}</text></vpush-view> |
51 | | - </view> |
52 | | - |
53 | | - <view class="content-date" style='margin-right:0;'> |
54 | | - <block wx:if="{{item.category_name !=null}}"> |
55 | | - <text>{{item.category_name}}</text> |
56 | | - </block> |
57 | | - |
58 | | - <!--image src="../../images/calendar.png"></image> |
59 | | - <text>{{item.date}}</text--> |
60 | | - |
61 | | - <image src="../../images/pageviews.png"></image> |
62 | | - <text class="">{{item.pageviews}}</text> |
63 | | - |
64 | | - <image src="../../images/comments.png"></image> |
65 | | - <text class="">{{item.total_comments}}</text> |
66 | | - |
67 | | - <image src="../../images/home-like.png"></image> |
68 | | - <text class="">{{item.like_count}}</text> |
69 | | - |
70 | | - </view> |
71 | | - |
72 | | - <!-- 调取文章首图、特色图,进行重新排版 --> |
73 | | - <view wx:if="{{item.content_first_image}}"> |
74 | | - <image src="{{item.post_thumbnail_image}}" mode="aspectFill" class="cover cover-100" style='width:50%;height:165px;margin-right:50%'></image> |
75 | | - <image src="{{item.content_first_image}}" mode="aspectFill" class="cover cover-100" style='width:48%;height:165px;'></image> |
76 | | - </view> |
77 | | - <view wx:else> |
78 | | - <image src="{{item.post_thumbnail_image}}" mode="aspectFill" class="cover cover-100"></image> |
79 | | - </view> |
80 | | - |
81 | | - </view> |
82 | | - </view> |
83 | | - <!-- 开始判断列表内容的第9列,样式重新排列 // 大图模式--> |
84 | | - <view wx:elif="{{index%10==8}}"> |
85 | | - <view class="list-item has-img w-100" index="{{index}}" id="{{item.id}}" bindtap="redictDetail"> |
86 | | - <view class="content-title content-title-100"> |
87 | 52 | <vpush-view> |
88 | | - <text>{{item.title.rendered}}</text> |
| 53 | + <text style='font-size:26rpx;color:#959595;margin:10rpx auto;'>{{item.excerpt.rendered}}</text> |
89 | 54 | </vpush-view> |
90 | 55 | </view> |
91 | 56 |
|
92 | | - <view class="content-title content-title-100" style='margin-top:0;margin-bottom:0'> |
93 | | - <vpush-view><text style='font-size:26rpx;color:#959595;margin:32rpx auto;'>{{item.excerpt.rendered}}</text></vpush-view> |
94 | | - </view> |
95 | | - |
96 | 57 | <view class="content-date" style='margin-right:0;'> |
97 | 58 | <block wx:if="{{item.category_name !=null}}"> |
98 | 59 | <text>{{item.category_name}}</text> |
|
110 | 71 | <image src="../../images/home-like.png"></image> |
111 | 72 | <text class="">{{item.like_count}}</text> |
112 | 73 |
|
113 | | - </view> |
114 | | - <image src="{{item.post_thumbnail_image}}" mode="aspectFill" class="cover cover-100"></image> |
115 | | - </view> |
116 | | - </view> |
117 | | - <!-- 开始判断列表内容的第12列,样式重新排列 // 大图模式--> |
118 | | - <view wx:elif="{{index%10==11}}"> |
119 | | - <view class="list-item has-img w-100" index="{{index}}" id="{{item.id}}" bindtap="redictDetail"> |
120 | | - <view class="content-title content-title-100"> |
121 | | - <vpush-view> |
122 | | - <text>{{item.title.rendered}}</text> |
123 | | - </vpush-view> |
124 | | - </view> |
125 | | - |
126 | | - <view class="content-title content-title-100" style='margin-top:0;margin-bottom:0'> |
127 | | - <vpush-view><text style='font-size:26rpx;color:#959595;margin:32rpx auto;'>{{item.excerpt.rendered}}</text></vpush-view> |
128 | | - </view> |
129 | | - |
130 | | - <view class="content-date" style='margin-right:0;'> |
131 | | - <block wx:if="{{item.category_name !=null}}"> |
132 | | - <text>{{item.category_name}}</text> |
133 | | - </block> |
134 | | - |
135 | | - <!--image src="../../images/calendar.png"></image> |
136 | | - <text>{{item.date}}</text--> |
137 | | - |
138 | | - <image src="../../images/pageviews.png"></image> |
139 | | - <text class="">{{item.pageviews}}</text> |
140 | | - |
141 | | - <image src="../../images/comments.png"></image> |
142 | | - <text class="">{{item.total_comments}}</text> |
143 | | - |
144 | | - <image src="../../images/home-like.png"></image> |
145 | | - <text class="">{{item.like_count}}</text> |
146 | | - |
147 | | - </view> |
148 | | - <image src="{{item.post_thumbnail_image}}" mode="aspectFill" class="cover cover-100"></image> |
149 | | - </view> |
150 | | - </view> |
151 | | - <!-- 开始判断列表内容的第17列,样式重新排列 // 双图模式 --> |
152 | | - <view wx:elif="{{index%10==16}}"> |
153 | | - <view class="list-item has-img w-100" index="{{index}}" id="{{item.id}}" bindtap="redictDetail"> |
154 | | - <view class="content-title content-title-100" style="margin-top:180px;"> |
155 | | - <vpush-view> |
156 | | - <text>{{item.title.rendered}}</text> |
157 | | - </vpush-view> |
158 | | - </view> |
159 | | - |
160 | | - <view class="content-title content-title-100" style='margin-top:0;margin-bottom:0'> |
161 | | - <vpush-view><text style='font-size:26rpx;color:#959595;margin:32rpx auto;'>{{item.excerpt.rendered}}</text></vpush-view> |
162 | | - </view> |
163 | | - |
164 | | - <view class="content-date" style='margin-right:0;'> |
165 | | - <block wx:if="{{item.category_name !=null}}"> |
166 | | - <text>{{item.category_name}}</text> |
167 | | - </block> |
168 | | - |
169 | | - <image src="../../images/pageviews.png"></image> |
170 | | - <text class="">{{item.pageviews}}</text> |
171 | | - |
172 | | - <image src="../../images/comments.png"></image> |
173 | | - <text class="">{{item.total_comments}}</text> |
174 | | - |
175 | | - <image src="../../images/home-like.png"></image> |
176 | | - <text class="">{{item.like_count}}</text> |
177 | | - |
178 | 74 | </view> |
179 | 75 |
|
180 | 76 | <!-- 调取文章首图、特色图,进行重新排版 --> |
|
191 | 87 | <!-- 除去满足以上条件以外的列表内容,默认排列 // 右图模式 --> |
192 | 88 | <view wx:else> |
193 | 89 | <view class="list-item has-img" index="{{index}}" id="{{item.id}}" bindtap="redictDetail"> |
194 | | - <view class="content-title"> |
| 90 | + <view class="content-title" style='margin-bottom:10rpx;'> |
195 | 91 | <vpush-view> |
196 | 92 | <text>{{item.title.rendered}}</text> |
197 | 93 | </vpush-view> |
198 | 94 | </view> |
199 | 95 |
|
| 96 | + <view class="content-title" style='margin-top:0;margin-bottom:10rpx;'> |
| 97 | + <vpush-view> |
| 98 | + <text style='font-size:26rpx;color:#959595;margin:10rpx auto;-webkit-line-clamp:1;'>{{item.excerpt.rendered}}</text> |
| 99 | + </vpush-view> |
| 100 | + </view> |
| 101 | + |
200 | 102 | <view class="content-date"> |
201 | 103 | <block wx:if="{{item.category_name !=null}}"> |
202 | 104 | <text>{{item.category_name}}</text> |
|
0 commit comments