wx.request({
url: app.globalData.globalUrl,
data: {
menu: options.title,
},
success: function(res) {
that.setData({
arr_res: res.data.result.data[0],
});
var arr=that.data.arr_res
console.log("有值啦",arr)
that.data.cpids=arr.id
console.log("有值啦", that.data.cpids)
},
fail: function(error) {
that.setData({
})
},
})
var cp = that.data.cpids
console.log("数据", cp)
var postsCollected = wx.getStorageSync("cpData"); //从缓存中读取所有的缓存状态
var posid = this.data.posid
postsCollected.forEach(item => {
posid = item.ids
console.log("id", posid)
})
if (posid != cp) {
this.data.isClick == true
} else {
this.data.isClick == false
}
},