1. 程式人生 > >微信小程式·前端-錦囊

微信小程式·前端-錦囊

  <!-- Banner輪播圖 start --> <view> <swiper autoplay="true" indicator-dots="true" circular='true' interval="1500" > <swiper-item> <image src='{{muke.image1}}'></image> </swiper-item>
<swiper-item> <image src='{{muke.image2}}'></image> </swiper-item>
<swiper-item> <image src='{{muke.image3}}'></image> </swiper-item> </swiper> </view> <!-- Banner輪播圖 end -->   <block wx:for="{{post_key}}" wx:for-item="item" wx:for-index="ids"> {{ids}}  為索引 {{item}}  為值 {{item.image}} </block>       <view> <View style="width:100%"> <text style='color:red;margin-left:150rpx;'> 【柴靜霧霾調查:穹頂之下(完整版)】 </text> </View> <view > <video style="width: 100%;height=400px;margin:1px;" src="{{video}}" binderror="videoErrorCallback"></video> </view> </view> ---------------------------- this.setData({ post_key:post_content }), ========================== flex   display: flex; flex-direction: column;   flex-direction: row; vertical-align: middle; ==========================