About how to click to jump to the banner diagram implemented by swiper in the vux component

Using the swiper plug-in in the vux component, the effect of the banner image is realized. It is also required that by clicking on the image of the banner image, you can jump to the details page, where the data of the banner image is transmitted from the backend.
The data transmitted from the backend is shown in the figure:
insert image description here
the parameter id in the data needs to be transmitted, so that the details page can get
the click event that I originally wanted to bind to the swiper. After binding, the click does not respond. I don’t know the specific reason. Why
insert image description here

Solution:
This is to connect to the back-end interface to obtain data. The original code
insert image description here
is modified. There is only one more line of code. Just
insert image description here
add url to the data transmitted from the back-end. The url can write the id of the current picture, use url Pass the parameter id out, without clicking the event, you can also jump with the parameter id after clicking

After adding the url, you can see that the background data has become like this
insert image description here
. The data transmitted from the backend can be modified and added.

Guess you like

Origin blog.csdn.net/weixin_44227395/article/details/103822154