|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="mobile-center">
|
|
|
<div class="com-mobile-header mobile-center-header">
|
|
|
- <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
|
|
|
+ <a @click="goBack()"><i class="iconfont icon-fanhui"></i></a>
|
|
|
<p>店铺关注</p>
|
|
|
<p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
|
|
|
</div>
|
|
|
@@ -129,17 +129,20 @@
|
|
|
SearchHeader
|
|
|
},
|
|
|
methods: {
|
|
|
+ async goBack() {
|
|
|
+ if (this.searchShow === true) {
|
|
|
+ this.searchShow = false
|
|
|
+ this.keyword = ''
|
|
|
+ let { data } = await this.$http.get(`/trade/storeFocus/page`, {params: { count: 10, page: 1 }})
|
|
|
+ this.storeList = data
|
|
|
+ } else {
|
|
|
+ this.goLastPage()
|
|
|
+ }
|
|
|
+ },
|
|
|
onSearch(keyObj) {
|
|
|
if (keyObj.keyword === '') {
|
|
|
this.onRemind('请输入搜索关键字')
|
|
|
return
|
|
|
- if (this.searchShow === true) {
|
|
|
- this.searchShow = false
|
|
|
- this.storeList = {}
|
|
|
- this.page = 1
|
|
|
- this.reloadList()
|
|
|
- }
|
|
|
- return
|
|
|
}
|
|
|
this.searchShow = true
|
|
|
this.keyword = keyObj.keyword
|
|
|
@@ -201,8 +204,6 @@
|
|
|
async reloadList() {
|
|
|
if (this.searchShow) {
|
|
|
let { data } = await this.$http.get('/api/store-service/stores', {params: { page: this.page, count: this.count, type: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT', keyword: this.keyword || null, field: this.field, op: 'similar' }})
|
|
|
-
|
|
|
-
|
|
|
let _pull = []
|
|
|
for (let i = 0; i < data.content.length; i++) {
|
|
|
_pull.push(findStoreFocusInMobil({id: data.content[i].id}))
|
|
|
@@ -216,7 +217,6 @@
|
|
|
}
|
|
|
})
|
|
|
this.storeList.content = [...this.storeList.content, ...data.content]
|
|
|
-
|
|
|
} else {
|
|
|
let { data } = await axios.get(`/trade/storeFocus/page`, {params: {count: 10, page: this.page}})
|
|
|
this.storeList.content = [...this.storeList.content, ...data.content]
|