1、设置头部的信息

通过wx.setNavigationBarTitle

详情见:https://developers.weixin.qq.com/miniprogram/dev/api/ui/navigation-bar/wx.setNavigationBarTitle.html

 onLoad: function (options) { // console.log(options) let {id,name}=options wx.setNavigationBarTitle({ title: name, }) // console.log(name) }, 

2、小程序轮播图

详情见:https://developers.weixin.qq.com/miniprogram/dev/component/swiper.html

<view>
  <swiper
  class="banner"
  indicator-dots
  indicator-color="#fff"
  autoplay
  circular
  interval="5000"
  indicator-active-color="#c33"
  >
    <block wx:for="{{banner}}" wx:key="index" >
      <swiper-item class="banner_item">
        <image src="{{item}}"></image>
      </swiper-item>
    </block>
  </swiper>
</view>

3、横向滚动纵向滚动

<scroll-view scroll-x>
scroll-view必须在最外面,scroll-X/Y决定哪个方向滑动
<view class="container"> <block wx:for="{{goods}}" wx:key="index"> <view class="item_view">{{item.name}}</view> </block> </view> </scroll-view>

4、分包加载!

详情见:https://developers.weixin.qq.com/miniprogram/dev/framework/subpackages/basic.html

12-26 02:07