|
@@ -5,7 +5,10 @@
|
|
|
<el-col :span="24" class="top">
|
|
|
<top topType="2" :leftArrow="false"></top>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }"> 我的订单 </el-col>
|
|
|
+ <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }">
|
|
|
+ <order-list :list="list"></order-list>
|
|
|
+ </el-col>
|
|
|
+ <page :limit="limit" :total="total" @search="search" />
|
|
|
<el-col :span="24" class="foot">
|
|
|
<foot :type="1"></foot>
|
|
|
</el-col>
|
|
@@ -15,8 +18,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import orderList from './parts/order-list.vue';
|
|
|
import top from '@/layout/common/top.vue';
|
|
|
import foot from '@/layout/common/foot.vue';
|
|
|
+import page from '@/layout/common/page.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: cashing } = createNamespacedHelpers('cashing');
|
|
|
export default {
|
|
@@ -25,6 +30,8 @@ export default {
|
|
|
components: {
|
|
|
top,
|
|
|
foot,
|
|
|
+ page,
|
|
|
+ orderList,
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
@@ -38,14 +45,17 @@ export default {
|
|
|
await this.search();
|
|
|
},
|
|
|
mounted() {
|
|
|
- let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 80;
|
|
|
+ let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 135;
|
|
|
this.$set(this, `clientHeight`, clientHeight);
|
|
|
},
|
|
|
methods: {
|
|
|
...cashing(['query']),
|
|
|
async search({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
- let res = await this.query({ skip, limit, ...info });
|
|
|
- console.log(res);
|
|
|
+ let res = await this.query({ skip, limit, ...info }); //, user_id: this.user._id
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
computed: {
|