onLoad:function(options){
console.log(options);
that.setData{{list:res.data.items}}; //从列表页传来一个key
<view class="list" bindtap=onload News data-key="{{item.key}}"> //拿index模板列表页中的hotapp对应的后台数据
<view class="info">
<view class="title">
{{item.value.title}}
</view>
onLoadNews:function(e){
// console.log (e.currentTarget.dataset.key) //点击取dataset.key
wx.navigateTo({console.log(e.currentTarget.dataset.key)
url:"../description/index?key=+e.currentTarget.dataset.key,
success:function(res){
},
fail:function(){
},
complete:function(){
}
})
},
时间: 2024-10-14 12:54:00