NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
1. 将id通过 data-id="{{item.postId}}"给图片一个id 然后通过 触发的事件将一起传过去 然后再接收传到跳转页 2. 取到的和下标是一样的 通过下标将数据获取然后渲染 ~~~ onLoad: function (options) { var key=options.id; // console.log(options) var self = this; var postList = loacal.postList; var list = []; var temp = {}; temp.author = postList[key].author; temp.title = postList[key].title; list.push(temp); this.setData({ postList, list }); }, ~~~