小程序带参数跳转详情页

2020-09-01  本文已影响0人  倩仔6

uni小程序带参数跳转详情页

<li
                   class="content_item"
                   @click="itemDetail(itemCon)"
                   v-for="(itemCon, index) in listBx"
                   :key="index"
                 >
                   <div>
                     <p>报修时间:{{ itemCon.submitDate }}</p>
                     <p>故障地点:{{ itemCon.location }}</p>
                   </div>
                   <button>查看</button>
                 </li>

  itemDetail(e) {
    //由我发起详情页
    e.num = this.num;
    uni.navigateTo({
      url:
        "/pages/wx/wxDetail/index?detailDate=" +
        encodeURIComponent(JSON.stringify(e)),
    });
  },

<li
class="content_item"
@click="itemDetail(itemCon)"
v-for="(itemCon, index) in listBx"
:key="index"
>
<div>
<p>报修时间:{{ itemCon.submitDate }}</p>
<p>故障地点:{{ itemCon.location }}</p>
</div>
<button>查看</button>
</li>

itemDetail(e) {
//由我发起详情页
e.num = this.num;
uni.navigateTo({
url:
"/pages/wx/wxDetail/index?detailDate=" +
encodeURIComponent(JSON.stringify(e)),
});
},

上一篇下一篇

猜你喜欢

热点阅读