微信小程序--简单页面跳转

首先对text 设置监听事件
 <view bindtap="toast" class="usermotto">
    <text class="user-motto">{{motto}}</text>
  </view>
然后对该text 设置事件跳转。
  //事件处理函数 点击text
  toast: function() {
    wx.navigateTo({
      url: '../blueberry/blueberry'
    })
  }
posted @ 2017-08-27 13:36  爱吃醋的工程师  阅读(167)  评论(0编辑  收藏  举报