DivisionTestStep1Pay.vue
1.6 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
<template>
<div class="division-test-step1">
<div v-if="!step1Paid" class="pay-qrcode-wrap">
<img v-if="qrCodeURL" :src="qrCodeURL" class="pay-qrcode" alt="支付二维码">
<div v-else class="pay-qrcode pay-qrcode--loading" v-loading="true" />
<p class="pay-tip">微信扫码支付({{ payAmount }}元)</p>
</div>
<div v-else class="order-linked">
<span>关联测试订单:{{ orderCode }}</span>
<el-button
type="text"
class="retest-link"
@click="$emit('retest')"
>
重新测试
</el-button>
</div>
</div>
</template>
<script>
export default {
name: 'DivisionTestStep1Pay',
props: {
step1Paid: {
type: Boolean,
default: false
},
orderCode: {
type: String,
default: ''
},
qrCodeURL: {
type: String,
default: ''
},
payAmount: {
type: [String, Number],
default: 3.5
},
readOnly: {
type: Boolean,
default: false
}
}
}
</script>
<style scoped lang="scss">
.division-test-step1 {
min-height: 280px;
display: flex;
align-items: center;
justify-content: center;
background: #f5f7fa;
border-radius: 8px;
padding: 24px;
}
.pay-qrcode-wrap {
text-align: center;
}
.pay-qrcode {
width: 200px;
height: 200px;
object-fit: contain;
display: block;
margin: 0 auto 16px;
background: #fff;
}
.pay-qrcode--loading {
min-height: 200px;
}
.pay-tip {
font-size: 14px;
color: #333;
margin: 0;
}
.order-linked {
font-size: 14px;
color: #333;
.retest-link {
margin-left: 8px;
padding: 0;
}
}
</style>