收藏
回答

url的type怎么传?

如图中点击跳转到详情页,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
    })
  },
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容