clickselect: function (e) {
var index = 0;
var shopList = this.data.shop
for (let item of shopList) {
//若是當前點擊的對象id和循環對象裏的id一致
if (item.id == (e.currentTarget.dataset.index + 1)) {
if (shopList[index].isShow == "" || shopList[index].isShow == undefined) {
shopList[index].isShow = !shopList[index].isShow
} else {
shopList[index].isShow = ""
}
}
index++;
}
this.setData({
shop: shopList
});
},