navigateTo two ways to pass parameters
1. Splicing routing
When there are few parameters, we generally use splicing routing to jump pages and pass parameters
proxy.$tab.navigateTo('/pages/sy/stock/checkstock?stockId=' + item.stockId + '+&yardName=' + item.yardName + '')
when receiving
onLoad((option) => {
cargoSelect()
const item = reactive(option.stockId)
console.log('option.stockId', option.stockId);
})
2. Pass an object
However, when there is too much data, we can't splicing and splicing together, which will make our code very bloated,
so we need to pass an object in the past
proxy.$tab.navigateTo('/pages/sy/stock/checkstock?row=' + JSON.stringify(item))
when receiving
onLoad((option) => {
const item = reactive(JSON.parse(option.row))
console.log('item', item);
})