怎么把当前页面数据的_id传给跳转的页面?

小程序 文章 2022-02-17 17:20 321 0 全屏看文

AI助手支持GPT4.0

怎么把当前页面数据的_id传给跳转的页面?How to pass the _id of the current page data to the redirected page?

怎么把当前页面数据的_id传给跳转的页面?

如图将AppData中dataList的_id传给另一个界面。在wxml的11行

比如,我点击商品,需要跳转到详情界面,我点击哪个商品就需要把商品的数据传到详情界面

我是新手,请问这个应该怎么解决?

As shown in the figure, the datalist in appdata_ The ID is passed to another interface. In line 11 of wxml, for example, if I click on a product, I need to jump to the details interface. If I click on a product, I need to transfer the data of the product to the details interface. I'm a novice. How can I solve this problem?

回答:

小黎:

循环写在上一级 传item._id

Long long ago:

res.dataList[index]._id

Long long ago:要给个index你才能取到  dataList中的值
brave:

-EOF-

AI助手支持GPT4.0