list.vue
900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<template>
<LayoutApp>
<div class="order-page">
<div class="title">出售中</div>
<div class="product">
<p class="name">{{orderProduct}}</p>
<p>{{orderDetail}}</p>
</div>
</div>
</LayoutApp>
</template>
<script>
import {createNamespacedHelpers} from 'vuex';
const {mapState, mapActions} = createNamespacedHelpers('ufo/order');
export default {
name: 'UfoCouponListPage',
computed: {
...mapState(['orderProduct', 'orderDetail'])
},
asyncData({store, router}) {
return store.dispatch('ufo/order/fetchProduct', {orderId: router.params.orderId});
},
created() {
},
mounted() {
this.fetchOrderDetail({orderId: this.$route.params.orderId});
},
methods: {
...mapActions(['fetchOrderDetail'])
}
};
</script>
<style lang="scss" scoped>
.title {
text-align: center;
font-size: 70px;
line-height: 200px;
}
</style>