pull/2/head
xiaozhiyong 2 years ago
parent 0aba2c9769
commit a69e3bdbb7
  1. 17
      pages/index/newindex.vue

@ -191,6 +191,15 @@
this.user = uni.getStorageSync('user');
},
collectionFn(item) {
let collectHas3 = this.collection.every(i => i !== '')
if(collectHas3) {
uni.showToast({
title: '只可以收藏3个哦~',
icon: 'none'
})
return
}
let isHave = this.collection.find(i => i.name === item.name)
//
if(isHave) {
@ -203,10 +212,10 @@
this.$set(this.collection,isHaveEmptyIndex,item)
return
}
//
this.collection.pop()
//
this.collection.unshift(item)
// //
// this.collection.pop()
// //
// this.collection.unshift(item)
},
gestureAnalysis(e) {},
indexDis(e) {

Loading…
Cancel
Save