企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
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 }); }, ~~~