|
@@ -5,7 +5,10 @@
|
|
<el-col :span="24" class="top">
|
|
<el-col :span="24" class="top">
|
|
<top topType="2" :leftArrow="false"></top>
|
|
<top topType="2" :leftArrow="false"></top>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }"> 我的额度 </el-col>
|
|
|
|
|
|
+ <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }">
|
|
|
|
+ <coupons-list :list="list"></coupons-list>
|
|
|
|
+ </el-col>
|
|
|
|
+ <page :limit="limit" :total="total" @search="search"></page>
|
|
<el-col :span="24" class="foot">
|
|
<el-col :span="24" class="foot">
|
|
<foot :type="1"></foot>
|
|
<foot :type="1"></foot>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -17,25 +20,43 @@
|
|
<script>
|
|
<script>
|
|
import top from '@/layout/common/top.vue';
|
|
import top from '@/layout/common/top.vue';
|
|
import foot from '@/layout/common/foot.vue';
|
|
import foot from '@/layout/common/foot.vue';
|
|
|
|
+import page from '@/layout/common/page.vue';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
|
+const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
|
|
export default {
|
|
export default {
|
|
name: 'quota',
|
|
name: 'quota',
|
|
props: {},
|
|
props: {},
|
|
components: {
|
|
components: {
|
|
top,
|
|
top,
|
|
foot,
|
|
foot,
|
|
|
|
+ page,
|
|
|
|
+ couponsList: () => import('./parts/list.vue'),
|
|
},
|
|
},
|
|
data: function () {
|
|
data: function () {
|
|
return {
|
|
return {
|
|
clientHeight: '',
|
|
clientHeight: '',
|
|
|
|
+ list: [],
|
|
|
|
+ total: 0,
|
|
|
|
+ limit: '10',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- async created() {},
|
|
|
|
|
|
+ async created() {
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
mounted() {
|
|
mounted() {
|
|
- let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 80;
|
|
|
|
|
|
+ let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 135;
|
|
this.$set(this, `clientHeight`, clientHeight);
|
|
this.$set(this, `clientHeight`, clientHeight);
|
|
},
|
|
},
|
|
- methods: {},
|
|
|
|
|
|
+ methods: {
|
|
|
|
+ ...couponsApply(['query']),
|
|
|
|
+ async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
|
+ const res = await this.query({ skip, limit, ...info, user_id: this.user.user_id });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
},
|
|
},
|
|
@@ -62,6 +83,8 @@ export default {
|
|
.info {
|
|
.info {
|
|
overflow-x: hidden;
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
|
|
+ background: #f9f9f9;
|
|
|
|
+ padding: 5px;
|
|
}
|
|
}
|
|
.foot {
|
|
.foot {
|
|
height: 40px;
|
|
height: 40px;
|