sell-pay-ok.vue
2.07 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<template>
<LayoutApp :show-back="true">
<div class="body">
<div class="header">
<i class="iconfont iconOk icon-class"></i>
</div>
<div class="title">上架成功</div>
<ProductInfo class="product-info" :data="product"></ProductInfo>
<YohoButton :txt="txt" class="btn-class" @on-click="onClick"></YohoButton>
<div class="info">
<div class="item" @click="goPublish">继续发布</div>
<div class="item" @click="goHome">随便逛逛</div>
</div>
</div>
</LayoutApp>
</template>
<script>
import ProductInfo from './components/confirm/buyer-product';
import { createNamespacedHelpers } from 'vuex';
const { mapActions: mapOrderAction } = createNamespacedHelpers('order/orderConfirm');
export default {
name: 'SellPayOk',
props: ['orderCode'],
data() {
return {
txt: '查看商品',
product: {}
};
},
components: {
ProductInfo
},
mounted() {
if (this.orderCode) {
this.fetchOrderGoods({ orderCode: this.orderCode }).then(result => {
this.product = result.data;
});
}
},
methods: {
...mapOrderAction(['fetchOrderGoods']),
onClick() {
this.$router.replace({
name: 'ProductDetail',
params: {
productId: this.product.productId
}
});
},
goPublish() {
this.onClick();
},
goHome() {
this.$router.replace({
name: 'channel'
});
}
}
};
</script>
<style lang="scss" scoped>
.body {
height: 100%;
margin: 0 32px;
padding-bottom: 140px;
overflow-y: auto;
}
.header {
margin-top: 80px;
text-align: center;
}
.icon-class {
font-size: 120px;
}
.btn-class {
height: 100px;
font-size: 32px;
line-height: 100px;
}
.title {
font-size: 40px;
font-weight: bold;
text-align: center;
margin-bottom: 60px;
}
.product-info {
margin-top: 140px;
margin-bottom: 74px;
}
.info {
font-size: 28px;
display: flex;
margin-top: 30px;
.item {
width: 50%;
text-align: center;
}
.item + .item {
border-left: 1px solid black;
}
}
</style>