diff --git a/src/components/Introduce/FicHatch.vue b/src/components/Introduce/FicHatch.vue index 13ca053..4fcfde5 100644 --- a/src/components/Introduce/FicHatch.vue +++ b/src/components/Introduce/FicHatch.vue @@ -98,6 +98,16 @@ + @@ -117,38 +127,12 @@ export default { }, data() { return { - lists: [ - { - description: '系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍...', - name: '测试公司1', - logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2816433753,267880517&fm=26&gp=0.jpg', - man: '张三', - tel: '15000000000', - }, - { - description: '系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍...', - name: '测试公司1', - logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2816433753,267880517&fm=26&gp=0.jpg', - man: '张三', - tel: '15000000000', - }, - { - description: '系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍...', - name: '测试公司1', - logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2816433753,267880517&fm=26&gp=0.jpg', - man: '张三', - tel: '15000000000', - }, - { - description: '系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍系统创新中心介绍...', - name: '测试公司1', - logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2816433753,267880517&fm=26&gp=0.jpg', - man: '张三', - tel: '15000000000', - }, - ], + lists: [], colorList: ['rgba(19, 172, 196, 0.3)', 'rgba(19,96,196,0.3)', 'rgba(162,19,196,0.3)', 'rgba(19,196,72,0.3)'], placeType: 1, + current: 1, + pageSize: 4, + total: 10, }; }, created() { @@ -162,21 +146,26 @@ export default { }, methods: { + + onShowSizeChange(current, size) { + this.current = current; + this.getData(); + }, async getData() { try { const params = { param: { placeType: this.placeType, - pageNum: 1, - pageSize: 10, + pageNum: this.current, + pageSize: this.pageSize, }, }; const res = await searchPlaceFront(params); const { data, msg, code } = res.data; if (code === 200) { console.log(data) - // this.lists = data.list; - // this.total = parseInt(data.total); + this.lists = data.list; + this.total = parseInt(data.total); } } catch (error) { console.log(error); @@ -233,6 +222,12 @@ export default { width: 100px; border-radius: 50%; } +.pagination { + margin-top: 28px; + margin-bottom: 28px; + text-align: right; +} + .ent-title { text-align: center; diff --git a/src/views/Business/Children/Business.vue b/src/views/Business/Children/Business.vue index ee92943..5a2eb5c 100644 --- a/src/views/Business/Children/Business.vue +++ b/src/views/Business/Children/Business.vue @@ -5,14 +5,21 @@
-
-
+
@@ -83,6 +95,10 @@ export default { return { lists: [], colorList: ['rgba(19, 172, 196, 0.3)', 'rgba(19,96,196,0.3)', 'rgba(162,19,196,0.3)', 'rgba(19,196,72,0.3)'], + current: 1, + pageSize: 4, + total: 10, + }; }, created() { @@ -96,21 +112,26 @@ export default { this.$router.push('/Hatch/Fictitious'); } }, - async getData() { + onShowSizeChange(current, size) { + this.current = current; + this.getData(); + }, + async getData(getParam) { try { + const params = { param: { placeType: 2, - pageNum: 1, - pageSize: 10, + pageNum: this.current, + pageSize: this.pageSize, }, }; const res = await searchPlaceFront(params); const { data, msg, code } = res.data; if (code === 200) { - console.log(data) - this.lists = data - // this.total = parseInt(data.total); + // console.log(data) + this.lists = data.list + this.total = parseInt(data.total); } } catch (error) { console.log(error); @@ -219,6 +240,12 @@ export default { float: right; } +.pagination { + margin-top: 28px; + text-align: right; +} + + @media only screen and (max-width: 1600px) { .ent-rh { float: left;