packageSuccess.vue
2.5 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
<template>
<div class="main">
<div class="success-box">
<div class="success-img">
<van-icon name="checked" class="success-icon" v-if="status" />
<van-icon name="warning" class="warning-icon" v-else />
</div>
<div class="success-number">¥{{ price }}</div>
<div class="success-desc" v-if="status">购买成功</div>
<div class="success-desc" v-if="!status">购买失败</div>
<div class="btn-grounp">
<div class="success-order" v-if="status" @click="getOrder">
查看订单
</div>
<div class="driver_blank"></div>
<div class="success-order" v-if="status" @click="toMyPackage">
去卡包使用
</div>
</div>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: "success",
data() {
return {
status: true,
price: "",
};
},
beforeCreate() {
document.querySelector("body").setAttribute("style", "background:#FFFFFF");
},
mounted() {
this.price = this.$route.query.price;
},
methods: {
toMyPackage() {
let { sessionId } = this.$store.state;
let [href] = window.location.href.split("/#/");
let url = `${href}/#/cardRoll/cardPage?sessionId=${sessionId}`;
this.openWindows(url, "cardRoll.cardPage");
},
getOrder() {
let { sessionId } = this.$store.state;
let [href] = window.location.href.split("/#/");
let url = `${href}/#/cardRoll/index?sessionId=${sessionId}`;
this.openWindows(url, "cardRoll.index");
},
},
};
</script>
<style scoped lang="scss">
.main {
.success-box {
text-align: center;
.success-icon {
font-size: 70px;
color: #19c34e;
background: #ffffff;
margin-top: 60px;
}
.warning-icon {
font-size: 70px;
color: #f10016;
background: #ffffff;
margin-top: 60px;
}
.success-number {
font-size: 24px;
color: #323232;
line-height: 42px;
font-weight: 700;
}
.success-desc {
font-weight: 700;
font-size: 16px;
color: #323232;
line-height: 22px;
margin-bottom: 100px;
}
.btn-grounp{
display: flex;
align-items: center;
justify-content: center;
}
.success-order {
box-sizing: border-box;
padding: 11px 25px;
border-radius: 4px;
border: 1px solid #FC5B32;
font-size: 16px;
font-weight: 400;
color: #FC5B32;
}
.driver_blank{
width: 20px;
}
}
}
</style>