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