const app = getApp() var util = require("../../../utils/util.js") Page({ /** * 页面的初始数据 */ data: { evaluateList: [], evaluateListNew: [], bigimagecurrent: 0, plindex: '-1', loaddisplay: true }, /** * 生命周期函数--监听页面加载 */ onLoad: function(options) { let _this = this; _this.setData({ navH: app.globalData.navHeight }) // 看点评列表 util.getData('/getWXDianPing').then(res => { // console.log(res); _this.setData({ evaluateList: res, loaddisplay: 'none' }) }) }, hidemask() { this.setData({ evaluateListNew: [], showmask: false }) }, showmask(e) { let index = e.currentTarget.dataset['index']; let dianPingImageIndex = e.currentTarget.dataset['imageIndex']; console.log(index, dianPingImageIndex, e.currentTarget) let arr = [] arr.push(this.data.evaluateList[index]) this.setData({ evaluateListNew: arr, bigimagecurrent: dianPingImageIndex, showmask: true }) }, opencomment(e) { // console.log(e) if (e.currentTarget.dataset.index == this.data.plindex) { this.setData({ plindex: '-1' }) } else { this.setData({ plindex: e.currentTarget.dataset.index }) } }, goback() { wx.navigateBack({ delta: 1 }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function() { }, /** * 用户点击右上角分享 */ onShareAppMessage: function() { } })