如图中点击跳转到详情页,url中的type值怎么传?
<segment-carpool items="{{items}}" result="{{result}}" resultthree="{{result3}}" resultfous="{{result4}}"
binditemchengde="onItemChengdeEvent" defaultIndex="0">
<view slot="0" class="segment-page wehicle-page">
</view>
<view slot="1" class="segment-page people-page">
<view wx:if="{{isQuerying == true}}">
<view class="comment-title">全部信息(共有{{result1}}条)</view>
<sumlistone wx:for="{{listones}}" wx:key="key" wx:for-item="listone" list1="{{listone}}"></sumlistone>
</view>
<view wx:else>
<view class="comment-title">全部信息(共有{{result1}}条)</view>
<wehicle wx:for="{{listones}}" wx:key="key" wx:for-item="listone" list1="{{listone}}" items="items.item"
detailurl="../detail/detail?type={{itemchengde.items}}&index={{index}}"></wehicle>
</view>
</view>
<view slot="2" class="segment-page train-page">
</view>
<view slot="3" class="segment-page money-page">
</view>
<view slot="4" class="segment-page money-page">
</view>
</segment-carpool>
<loadingmore hasmore="{{hasmore}}"></loadingmore>
JS代码
data: {
items: ["全部", "我要找车", "我要找人", "我找货车", "我要找货"],
},
onItemChengdeEvent(event) {
console.log(event)
const that = this;
var index = event.detail.index;
that.setData({
index:index
})
},
页面间传参,建议用 eventchannel
可以参考文章https://developers.weixin.qq.com/community/develop/article/doc/00048430f146e080cb2e9548456013