|
|
@@ -46,7 +46,7 @@
|
|
|
middleware: 'authenticated',
|
|
|
fetch({store}) {
|
|
|
return Promise.all([
|
|
|
- store.dispatch('product/getUserCollectCode', {keyword: '', count: 10, page: 1, type: 'yes', enUU: store.state.option.user.data.enterprise.uu})
|
|
|
+ store.dispatch('product/getUserCollectCode', {keyword: '', count: 20, page: 1, type: 'yes', enUU: store.state.option.user.data.enterprise.uu})
|
|
|
])
|
|
|
},
|
|
|
data() {
|
|
|
@@ -109,30 +109,33 @@
|
|
|
this.$http.post('/produce/kindConcern/modify', param).then(res => {
|
|
|
this.collectResult = '取消成功'
|
|
|
this.timeoutCount++
|
|
|
- this.attentionList.splice(index, 1)
|
|
|
- if (this.attentionList.length <= 15 && this.page < this.allPage) {
|
|
|
- this.page++
|
|
|
- this.getAttentionListArray(this.page)
|
|
|
- }
|
|
|
+ // kindConcern.status = 0
|
|
|
+ this.$store.dispatch('product/UpdateCollectCode', { key: index, status: 0 })
|
|
|
+ // this.attentionList.splice(index, 1)
|
|
|
+ // if (this.attentionList.length <= 15 && this.page < this.allPage) {
|
|
|
+ // this.page++
|
|
|
+ // this.getAttentionListArray(this.page)
|
|
|
+ // }
|
|
|
})
|
|
|
} else {
|
|
|
this.$http.post('/produce/kindConcern/modify', param).then(res => {
|
|
|
this.collectResult = '关注成功'
|
|
|
this.timeoutCount++
|
|
|
- this.attentionList.splice(index, 1)
|
|
|
- if (this.attentionList.length <= 15 && this.page < this.allPage) {
|
|
|
- this.page++
|
|
|
- this.getAttentionListArray(this.page)
|
|
|
- }
|
|
|
+ this.$store.dispatch('product/UpdateCollectCode', {key: index, status: 1})
|
|
|
+ // this.attentionList.splice(index, 1)
|
|
|
+ // if (this.attentionList.length <= 15 && this.page < this.allPage) {
|
|
|
+ // this.page++
|
|
|
+ // this.getAttentionListArray(this.page)
|
|
|
+ // }
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
getAttentionListArray(page) {
|
|
|
this.isSearchSearchingMore = true
|
|
|
if (this.activeType === 'attention') {
|
|
|
- this.$store.dispatch('product/getUserCollectCode', {keyword: this.keyword, count: 20, page: page, type: 'yes', enUU: this.$store.state.option.user.data.enterprise.uu})
|
|
|
+ this.$store.dispatch('product/getUserCollectCode', {keyword: this.keyword, count: 20, page: page, enUU: this.$store.state.option.user.data.enterprise.uu})
|
|
|
} else {
|
|
|
- this.$store.dispatch('product/getUserCollectCode', {keyword: this.keyword, count: 20, page: page, type: 'no', enUU: this.$store.state.option.user.data.enterprise.uu})
|
|
|
+ this.$store.dispatch('product/getUserCollectCode', {keyword: this.keyword, count: 20, page: page, enUU: this.$store.state.option.user.data.enterprise.uu})
|
|
|
}
|
|
|
},
|
|
|
getMoreSearch() {
|