payment-success.vue
5.05 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<template>
<view class="page-shell payment-success-page">
<view class="page-blur"></view>
<view class="page-blur-secondary"></view>
<view class="page-blur-tertiary"></view>
<view class="page-content subpage-content">
<view class="subpage-nav">
<view class="subpage-back" @tap="goMall">‹</view>
<view class="subpage-title-wrap">
<text class="subpage-title">下单成功</text>
<text class="subpage-subtitle">核销二维码已准备好,支持任意时间任意门店核销自提</text>
</view>
</view>
<view class="subpage-hero glass-card success-hero">
<view class="success-mark">
<view class="success-mark-ring"></view>
<text class="success-mark-check">✓</text>
</view>
<text class="hero-kicker">QR READY</text>
<text class="hero-title">你的门店核销码已经生成</text>
<text class="hero-desc">订单编号 {{ order.orderNo }} · {{ order.status }}</text>
</view>
<lf-pickup-code :code="order.verifyCode" desc="到店出示二维码即可核销自提,支持任意时间任意门店使用。" />
<view class="subpage-card">
<view class="info-list">
<view class="info-row">
<text class="info-label">商品名称</text>
<text class="info-value">{{ order.title }}</text>
</view>
<view class="info-row">
<text class="info-label">商品数量</text>
<text class="info-value">{{ order.quantity }} 件</text>
</view>
<view class="info-row">
<text class="info-label">核销范围</text>
<text class="info-value">任意门店通用</text>
</view>
<view class="info-row">
<text class="info-label">使用时间</text>
<text class="info-value">任意时间可核销</text>
</view>
</view>
</view>
<view class="subpage-card">
<view class="section-head">
<text class="section-title">接下来怎么做</text>
<text class="section-link">门店自提</text>
</view>
<view class="next-list">
<view v-for="(item, index) in nextSteps" :key="item.title" class="next-item">
<view class="next-index">{{ index + 1 }}</view>
<view class="next-copy">
<text class="next-title">{{ item.title }}</text>
<text class="next-desc">{{ item.desc }}</text>
</view>
</view>
</view>
</view>
<view class="cta-row">
<view class="secondary-button" @tap="goMall">继续逛逛</view>
<view class="primary-button" @tap="viewOrders">查看订单</view>
</view>
</view>
</view>
</template>
<script>
import { getDisplayOrderById } from '@/packageMall/data/orderFlow'
export default {
data() {
return {
order: getDisplayOrderById(5001),
nextSteps: []
}
},
onLoad(options) {
this.order = getDisplayOrderById(options.orderId)
this.nextSteps = [
{ title: '保存二维码', desc: '订单详情页会持续展示核销二维码,不必担心找不到。' },
{ title: '任意门店可用', desc: '无需提前选择门店,到店出示二维码即可核销。' },
{ title: '完成自提', desc: '门店扫码成功后即可当场领取商品。' }
]
},
methods: {
viewOrders() {
uni.navigateTo({ url: `/packageProfile/order-detail/order-detail?id=${this.order.id}` })
},
goMall() {
uni.reLaunch({ url: '/packageMall/main/main' })
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/mixins.scss';
@import '@/styles/subpage.scss';
.success-hero {
min-height: 260rpx;
padding-right: 180rpx;
}
.success-mark {
position: absolute;
right: 40rpx;
top: 34rpx;
width: 112rpx;
height: 112rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.7);
box-shadow: 0 18rpx 40rpx rgba(54, 77, 64, 0.08);
}
.success-mark-ring {
position: absolute;
inset: 10rpx;
border-radius: 50%;
border: 2rpx solid rgba(100, 140, 118, 0.2);
animation: lfPulseSoft 4.8s ease-in-out infinite;
}
.success-mark-check {
position: relative;
z-index: 2;
font-size: 42rpx;
font-weight: 700;
color: $brand-primary-deep;
}
.next-item {
display: flex;
align-items: flex-start;
padding: 18rpx 0;
border-bottom: 1rpx solid rgba(100, 140, 118, 0.08);
}
.next-item:last-child {
border-bottom: 0;
padding-bottom: 0;
}
.next-index {
width: 52rpx;
height: 52rpx;
margin-right: 18rpx;
flex-shrink: 0;
border-radius: 18rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
font-weight: 700;
color: $brand-primary-deep;
background: rgba(210, 191, 156, 0.14);
}
.next-copy {
flex: 1;
}
.next-title,
.next-desc {
display: block;
}
.next-title {
font-size: 28rpx;
font-weight: 600;
color: $text-primary;
}
.next-desc {
margin-top: 10rpx;
font-size: 23rpx;
line-height: 1.8;
color: $text-secondary;
}
</style>