wxml
<!--头条——开始-->
<navigator url='../kshare/kshare'>
<view class='BC_JJtt'>
<view class='BC_JJttimg'>
<image src='../../../images/BC_JJtt.png'></image>
</view>
<view class='BC_JJttname'>
<swiper autoplay="auto" interval="3000" duration="500" current="{{swiperCurrent_jjtt}}" class="swiper" vertical="true">
<block wx:for="{{slider_jjtt}}" wx:key="unique">
<swiper-item>
<p class="p">{{item.title}}</p>
</swiper-item>
</block>
</swiper>
</view>
</view>
</navigator>
<!--头条——结束-->
js
jjtt: function (channelid){
var that=this;
wx.request({
url: '' + app.information.host + '/api/json/content/content.ashx?action=list&companyid=' + app.information.companyid + '&channelid=' + channelid,
header: {
'content-type': 'application/json'
},
//请求后台数据成功
success: function (res) {
if(res.data.status==1){
that.setData({
slider_jjtt: res.data.list
})
}else{
}
}
});
},
/*头条*/
.BC_JJtt{border-top: 0.14vw solid #EEEEEE;display: flex;align-items: center;height: 11.11vw;padding: 0vw 5vw 0 5vw;border-bottom:2.78vw solid #eeeeee;z-index: 1}
.BC_JJttimg image{width: 16.94vw;height:4.31vw;}
.BC_JJttname{width: 60vw;height: 4vw;margin-left: 5vw;}
.BC_JJttname swiper{height: 4vw;}
.BC_JJttname swiper swiper-item{line-height:3.33vw;}
.BC_JJttname swiper .p{font-size:3.33vw; line-height: 3.33vw}
网友评论