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

时间:2017-08-27 14:03:12   收藏:0   阅读:284
首先对text 设置监听事件
 <view bindtap="toast" class="usermotto">
    <text class="user-motto">{{motto}}</text>
  </view>
然后对该text 设置事件跳转。
  //事件处理函数 点击text
  toast: function() {
    wx.navigateTo({
      url: ‘../blueberry/blueberry‘
    })
  }
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!