<p>微信小程序--简单页面跳转</p><p>例如:点击一个text ,跳转入一个新的页面blueberry.wxml</p><p>首先对text 设置监听事件</p><pre class="brush:js;toolbar:false"><viewbindtap="toast"class="usermotto">
<textclass="user-motto">{{motto}}</text>
</view>
然后对该text设置事件跳转。
//事件处理函数点击text
toast:function(){
wx.navigateTo({
url:'../blueberry/blueberry'
})
},</pre><p>这里看到跳转到一个目录 blueberry下,展示一个 blueberry.wxml页面</p><p>所以在项目的目录下创建一个blueberry</p><p>同时需要在 app.json 中添加页面配置</p><p>以上供新手朋友们参考。。</p>