实现点击列表显示当前列表的明细思路:1、根据列表当前项id查询对应明细2、实现点击当前列表显示当前明细 (1) let sh = that.data.show; let itemId = e.currentTarget.dataset.detailid; that.setData({ getCarDetails: [] }) if (sh == itemId) { that.setData({ show: false, }) } else { that.setData({ show: itemId, }) / / 明细请求} (2)class设置show或hidden:<view wx:if="{{show == item.detailId}}" class='current {{show==item.detailId?"show":"hidden"}}'></view>注意:此处若不设置wx:if会出现覆盖现象,原因是上次显示内容未被销毁