就是我的参数传过不去,控制台一直显示undefined
列表页:
goto:function(e){
console.log(e.target.dataset.itemId);
wx.navigateTo({
url: '../details/details?itemId=${e.target.dataset.itemId}',
});
},
wxml:
<block wx:for="{{images}}" >
<view>
<view class="wrap">
<view class="new-author-date">
<image class='stylehh' src='{{userInfo.avatarUrl}}'></image>
<text class='timeStyle'>{{item.time}}</text>
</view>
<view><image src="{{item.fileID}}"></image></view>
<view><text>{{item.host}}</text></view>
<view><text>{{item.time}}</text></view>
<view><text>{{item.place}}</text></view>
<view><text>{{item.describe}}</text></view>
<view class="new-img-num">
<button bindtap='goto' data-itemId="${{item._id}}">详情</button>
<button open-type='share'>分享</button>
</view>
</view>
</view>
</block>
详情页:
onLoad: function (options) {
console.log(options);
},
<button bindtap='goto' data-itemId="${{item._id}}">详情</button>
这行代码多写了一个$符号
求助啊