<view class='content' >
<view class="left" >
<view class='item' wx:for="{{ProductionList}}" wx:if="{{index%2==0}}">
<image class="image" mode="center" lazy-load src="{{ ProductionList.mbr_Pic }}" data-src="{{ProductionList.mbr_Pic}}" >
<view class="productionNumder">
<view class="productionNumderFont" wx:if="{{ ProductionList.picNum }}">{{ ProductionList.picNum }} P</view>
</view>
</image>
<view class='item-text-view title-text' >
{{ProductionList.Title}}
</view>
<view class="contenIcon">
<view style="display: flex;">
<view class="contenIcon-view" >
<van-icon name="eye-o" size="28rpx" />
<view wx:if="{{ ProductionList.ViewNum }}">{{ ProductionList.ViewNum }}</view>
</view>
<view class="contenIcon-view">
<van-icon name="good-job-o" />
<view wx:if="{{ ProductionList.UpNum }}">{{ ProductionList.UpNum }}</view>
</view>
<view class="contenIcon-view">
<van-icon name="chat-o" />
<view wx:if="{{ ProductionList.ReviewNum }}">{{ ProductionList.ReviewNum }}</view>
</view>
</view>
</view>
<view class='item-text-view item-text-view1'>
<van-image round width="30rpx" height="30rpx" src="{{ ProductionList.mbrPic }}"/>
<view class="item-text" >{{ProductionList.firstname}}</view>
</view>
</view>
</view>
<view class="right" >
<view class='item' wx:for="{{ProductionList}}" wx:if="{{index%2==1}}">
<image class="image" mode="center" lazy-load src="{{ ProductionList.mbr_Pic }}" data-src="{{ProductionList.mbr_Pic}}" >
<view class="productionNumder">
<view class="productionNumderFont" wx:if="{{ ProductionList.picNum }}">{{ ProductionList.picNum }} P</view>
</view>
</image>
<view class='item-text-view title-text' >
{{ProductionList.Title}}
</view>
<view class="contenIcon">
<view style="display: flex;">
<view class="contenIcon-view" >
<van-icon name="eye-o" size="28rpx" />
<view wx:if="{{ ProductionList.ViewNum }}">{{ ProductionList.ViewNum }}</view>
</view>
<view class="contenIcon-view">
<van-icon name="good-job-o" />
<view wx:if="{{ ProductionList.UpNum }}">{{ ProductionList.UpNum }}</view>
</view>
<view class="contenIcon-view">
<van-icon name="chat-o" />
<view wx:if="{{ ProductionList.ReviewNum }}">{{ ProductionList.ReviewNum }}</view>
</view>
</view>
</view>
<view class='item-text-view item-text-view1'>
<van-image round width="30rpx" height="30rpx" src="{{ ProductionList.mbrPic }}"/>
<view class="item-text" >{{ProductionList.firstname}}</view>
</view>
</view>
</view>
</view>
.content{
margin: 0.5%;
text-align: justify;
}
.left,.right{
display: inline-block;
vertical-align: top;
width: 49.5%;
}
.item{
width: 96%;
background-color: #fff;
vertical-align: top;
margin-left: 2%;
margin-right: 2%;
margin-top: 2%;
margin-bottom: 2%;
display: inline-block;
box-shadow: 1rpx 2rpx 2rpx 1rpx rgb(199, 198, 198);
border-radius: 5%;
overflow: hidden;
}
.van-image {
display: inline-block;
}
.item-text-view{
display: flex;
font-size: 20rpx;
color: #000;
height: 40rpx;
padding-left: 20rpx;
line-height: 40rpx;
}
.item-text-view1 {
border-top: 1rpx solid #eee;
padding-top: 8rpx;
}
.title-text {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
padding-right: 30rpx;
}
.image {
width: 100%;
margin:0 auto;
position: relative;
}
.item-text {
display: inline-block;
font-size: 18rpx;
color: rgb(80, 79, 79);
margin-left: 10rpx;
height: 40rpx;
line-height: 30rpx;
}
.contenIcon {
display: flex;
justify-content: space-between;
font-size: 20rpx;
color: rgb(153, 152, 152);
margin: 0 0 5rpx 10rpx;
}
.contenIcon-view {
margin:0 10rpx;
display: flex;
}
.productionNumder {
display: flex;
justify-content: space-around;
position: absolute;
bottom: 20rpx;
right: 10rpx;
padding:0 10rpx;
line-height: 35rpx;
border-radius: 6rpx;
font-size: 20rpx;
background:rgba(5, 5, 5, 0.3);
color: #fff;
vertical-align: middle;
}
.productionNumderFont {
vertical-align: middle;
}
Page({
data: {
ProductionList: [],
},
requestProductionList: async function() {
var params = JSON.stringify({
"SessionId":"",
"Version":2,
"Command":{
"HOTPRODUCTS":{
"Types":"Month",
"page":1,
"page_count":"4"
}
}
})
let res = await httpRequestPost(httpURL.BASE_URL, params, "HOTPRODUCTS").catch(err => err)
console.log(res)
if (res.Result == 1) {
this.setData({
ProductionList:res.Data.list
})
}
console.log(this.data.ProductionList)
},
onLoad: function (options) {
this.requestProductionList()
},
onReady: function () {
},
onShow: function () {
},
onHide: function () {
},
onUnload: function () {
},
onPullDownRefresh: function () {
},
onReachBottom: function () {
},
onShareAppMessage: function () {
}
})