微信小程序-swiper轮播图获取index

1.获取之后存入stroage

  stroage的get/set使用就不多介绍了,只说一下思想,利用轮播图变化绑定事件,获取e.detail.current(即为index)

2.通过url传值

直接上图  

获取index   ->  e.detail.current  


将index写入url  


 将url中的index读取

   

猜你喜欢

转载自blog.csdn.net/liuyahui_0126/article/details/79312668