代码:.wxml:
<view class="container">
<view class="book-root" >
<image class="book-img-left" src="../assets/img/wxts.png"/>
<text class="book-title" bindtap="clickWXTS">温馨提示</text>
<image class="book-img-right" src="../assets/img/jiantou.png"/>
</view>
</view>
.js:
Page({
clickWXTS:function(event){
//处理封面点击事件
//跳转到章节页面
wx.navigateTo({
url: "../hyzn_wxts/hyzn_wxts",
})
},
})
app.json:
{
"pages":[
"pages/hyzn_index/hyzn_index",
"pages/wxts/wxts",
"pages/index/index",
"pages/logs/logs",
"pages/hyzn/hyzn",
"pages/hyzl/hyzl",
"pages/gmzn/gmzn",
"pages/hwfw/hwfw",
"pages/hyzn_wxts/hyzn_wxts",
"pages/hyzn_rcap/hyzn_rcap"
],
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "测试",
"navigationBarTextStyle":"black"
}
}
点击时报错:
我确认无误啊,请问怎么解决?
pages/hyzn/hyzn 你这个页面定义了 bindtap="clickWXTS"这个事件了是吗?及对应的js里面