|
@@ -45,6 +45,15 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
|
</table>
|
|
</table>
|
|
|
|
|
+ <div style="float: right;">
|
|
|
|
|
+ <el-pagination
|
|
|
|
|
+ :current-page.sync="pageParams.page"
|
|
|
|
|
+ :page-size="pageParams.count"
|
|
|
|
|
+ layout="prev, pager, next, jumper"
|
|
|
|
|
+ :total="stores.totalElements"
|
|
|
|
|
+ @current-change="handleCurrentChange">
|
|
|
|
|
+ </el-pagination>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -72,7 +81,6 @@ export default {
|
|
|
search () {
|
|
search () {
|
|
|
this.pageParams.page = 1
|
|
this.pageParams.page = 1
|
|
|
this.pageParams.keyword = this.keyword === '' ? null : this.keyword
|
|
this.pageParams.keyword = this.keyword === '' ? null : this.keyword
|
|
|
- console.log(this.pageParams)
|
|
|
|
|
this.$store.dispatch('provider/findStoreList', this.pageParams)
|
|
this.$store.dispatch('provider/findStoreList', this.pageParams)
|
|
|
},
|
|
},
|
|
|
showLittleDescription (description) {
|
|
showLittleDescription (description) {
|
|
@@ -80,11 +88,33 @@ export default {
|
|
|
return '暂无简介'
|
|
return '暂无简介'
|
|
|
}
|
|
}
|
|
|
return description.slice(0, 160)
|
|
return description.slice(0, 160)
|
|
|
|
|
+ },
|
|
|
|
|
+ async pageCommodity (pageParams) {
|
|
|
|
|
+ pageParams.op = 'pageByType'
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ let { data } = await this.$http.get('/api/store-service/stores', { params: pageParams })
|
|
|
|
|
+ console.log('DATA', data)
|
|
|
|
|
+ this.$store.commit('provider/stores/GET_STORE_LIST_SUCCESS', data)
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ this.$store.commit('provider/stores/GET_STORE_LIST_FAILURE', err)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ handleCurrentChange (page) {
|
|
|
|
|
+ this.pageParams.page = page
|
|
|
|
|
+ this.pageParams.keyword = this.keyword === '' ? null : this.keyword
|
|
|
|
|
+
|
|
|
|
|
+ this.pageCommodity(this.pageParams)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
-<style scoped>
|
|
|
|
|
|
|
+<style>
|
|
|
|
|
+ .el-pagination .el-pager li.active{
|
|
|
|
|
+ background-color: #5078cb;
|
|
|
|
|
+ border-color: #337ab7;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
#store-list{
|
|
#store-list{
|
|
|
width: 1190px;
|
|
width: 1190px;
|
|
|
padding: 0;
|
|
padding: 0;
|