When using wx.for to display the list,
to jump from the item item of the list to the next page, you
need to click on a different list to jump to a different page.
index.wxml
<
view
class
=
"carts-item"
wx:for="{{items}}" bindtap= "navito"data-object-id= "{{item.id}}">
<
view
class
=
"carts-text">
<
text
class
=
"carts-title">
{{item.name}}
</
text
>
</
view
>
index.js
data: {
items:[
{id:
"1"
,name:
"xxxxx"
},
{id:
"2"
,name:
"yyyyy"
},
],
Url:[
'../xxx/xxx'
,
'../yyy/yyy'
]
navito:
function
(e) {
// Click on a different list to jump to the list details
var
that=
this
;
var
id = e.currentTarget.dataset.objectId-
1
;
wx.navigateTo({
url: that.data.Url[id]
});
}
See the Daniel blog for many list jumps: https://blog.csdn.net/liona_koukou/article/details/52956058