Business requirements: Click the information list of the parent component to jump to the details page, and pass the data information in the parent component to the details page.
parent component configuration
-
In the index.wxml file:
data-item="{ {item}}"
-
In index.js:
url: "/pages/order/order-detail/index?dataList=" + dataList
[Note]: This is the transfer of complex data types, so use json.stringify and json.parse for type conversion.
subcomponent configuration
- Received in index.js:
onLoad函数中接收