|
@@ -13,7 +13,7 @@
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
</td>
|
|
</td>
|
|
|
- <td width="150" style="vertical-align: middle"><span>入驻商家:</span><span class="text-message">{{stores ? stores.length : 0}}</span><span>家</span></td>
|
|
|
|
|
|
|
+ <td width="150" style="vertical-align: middle"><span>入驻商家:</span><span class="text-message">{{stores ? stores.totalElements : 0}}</span><span>家</span></td>
|
|
|
<td width="150">
|
|
<td width="150">
|
|
|
<a href="vendor#/store-apply"><button class="btn btn-primary" style="margin-left: 6px;">立即入驻</button></a>
|
|
<a href="vendor#/store-apply"><button class="btn btn-primary" style="margin-left: 6px;">立即入驻</button></a>
|
|
|
</td>
|
|
</td>
|
|
@@ -21,7 +21,7 @@
|
|
|
</thead>
|
|
</thead>
|
|
|
<tbody>
|
|
<tbody>
|
|
|
<!--<tr>{{$data}}</tr>-->
|
|
<!--<tr>{{$data}}</tr>-->
|
|
|
- <tr v-for="store in stores">
|
|
|
|
|
|
|
+ <tr v-for="store in stores.content" v-if="store">
|
|
|
<td>
|
|
<td>
|
|
|
<div class="logo">
|
|
<div class="logo">
|
|
|
<a :href="'/store/' + store.uuid"><img :src="store.logoUrl || '/images/store/common/default.png'" :alt="store.storeName"></a>
|
|
<a :href="'/store/' + store.uuid"><img :src="store.logoUrl || '/images/store/common/default.png'" :alt="store.storeName"></a>
|
|
@@ -31,7 +31,7 @@
|
|
|
<a class="store-name" :href="'/store/' + store.uuid" target="_blank"><div :title="store.storeName">{{store.storeName}}</div></a>
|
|
<a class="store-name" :href="'/store/' + store.uuid" target="_blank"><div :title="store.storeName">{{store.storeName}}</div></a>
|
|
|
<div class="store-message">
|
|
<div class="store-message">
|
|
|
<span>商家介绍:</span>
|
|
<span>商家介绍:</span>
|
|
|
- <span>{{store.description.slice(0,160)}}<em v-if="store.description.length > 160">...</em></span>
|
|
|
|
|
|
|
+ <span>{{showLittleDescription(store.description)}}<em v-if="store.description.length > 160">...</em></span>
|
|
|
</div>
|
|
</div>
|
|
|
</td>
|
|
</td>
|
|
|
<td class="vertical-middle">
|
|
<td class="vertical-middle">
|
|
@@ -51,10 +51,16 @@
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'suppliers',
|
|
name: 'suppliers',
|
|
|
- props: ['op'],
|
|
|
|
|
|
|
+ props: ['types'],
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
- keyword: ''
|
|
|
|
|
|
|
+ keyword: '',
|
|
|
|
|
+ pageParams: {
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ count: 10,
|
|
|
|
|
+ keyword: '',
|
|
|
|
|
+ types: this.types
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -64,8 +70,16 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
search () {
|
|
search () {
|
|
|
- let params = { op: this.op, keyword: this.keyword }
|
|
|
|
|
- this.$store.dispatch('provider/findStoreList', params)
|
|
|
|
|
|
|
+ this.pageParams.page = 1
|
|
|
|
|
+ this.pageParams.keyword = this.keyword === '' ? null : this.keyword
|
|
|
|
|
+ console.log(this.pageParams)
|
|
|
|
|
+ this.$store.dispatch('provider/findStoreList', this.pageParams)
|
|
|
|
|
+ },
|
|
|
|
|
+ showLittleDescription (description) {
|
|
|
|
|
+ if (!description || description === '') {
|
|
|
|
|
+ return '暂无简介'
|
|
|
|
|
+ }
|
|
|
|
|
+ return description.slice(0, 160)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|