5c34676a
“wangming”
对会员端进行了设计
|
1
2
3
4
5
6
7
8
9
10
11
|
<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>
|
d8035736
“wangming”
Refactor project ...
|
12
|
<text class="subpage-subtitle">核销二维码已准备好,支持任意时间任意门店核销自提</text>
|
5c34676a
“wangming”
对会员端进行了设计
|
13
14
15
16
|
</view>
</view>
<view class="subpage-hero glass-card success-hero">
|
d8035736
“wangming”
Refactor project ...
|
17
18
19
20
|
<view class="success-mark">
<view class="success-mark-ring"></view>
<text class="success-mark-check">✓</text>
</view>
|
e1dcb3a0
“wangming”
1
|
21
22
23
|
<text class="hero-kicker">PICKUP READY</text>
<text class="hero-title">你的门店取件码已经生成</text>
<text class="hero-desc">订单编号 {{ order.orderNo }} · {{ statusText }}</text>
|
5c34676a
“wangming”
对会员端进行了设计
|
24
25
|
</view>
|
e1dcb3a0
“wangming”
1
|
26
27
28
29
30
31
|
<lf-pickup-code
v-if="order.pickupCode"
:code="order.pickupCode"
title="门店自提取件码"
desc="到自提门店出示取件码,门店核销后即可完成自提。"
/>
|
d8035736
“wangming”
Refactor project ...
|
32
|
|
5c34676a
“wangming”
对会员端进行了设计
|
33
34
35
36
|
<view class="subpage-card">
<view class="info-list">
<view class="info-row">
<text class="info-label">商品名称</text>
|
e1dcb3a0
“wangming”
1
|
37
|
<text class="info-value">{{ mainItemName }}</text>
|
5c34676a
“wangming”
对会员端进行了设计
|
38
39
|
</view>
<view class="info-row">
|
d8035736
“wangming”
Refactor project ...
|
40
|
<text class="info-label">商品数量</text>
|
e1dcb3a0
“wangming”
1
|
41
|
<text class="info-value">{{ totalQuantity }} 件</text>
|
d8035736
“wangming”
Refactor project ...
|
42
43
|
</view>
<view class="info-row">
|
e1dcb3a0
“wangming”
1
|
44
45
|
<text class="info-label">自提门店</text>
<text class="info-value">{{ order.storeName || '—' }}</text>
|
5c34676a
“wangming”
对会员端进行了设计
|
46
47
|
</view>
<view class="info-row">
|
e1dcb3a0
“wangming”
1
|
48
49
|
<text class="info-label">实付金额</text>
<text class="info-value">¥{{ order.payAmount }}</text>
|
d8035736
“wangming”
Refactor project ...
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
</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>
|
5c34676a
“wangming”
对会员端进行了设计
|
66
67
68
69
70
|
</view>
</view>
</view>
<view class="cta-row">
|
d8035736
“wangming”
Refactor project ...
|
71
72
|
<view class="secondary-button" @tap="goMall">继续逛逛</view>
<view class="primary-button" @tap="viewOrders">查看订单</view>
|
5c34676a
“wangming”
对会员端进行了设计
|
73
74
75
76
77
78
|
</view>
</view>
</view>
</template>
<script>
|
e1dcb3a0
“wangming”
1
|
79
80
|
import { getOrderDetail } from '@/api/mall'
import { ORDER_STATUS_TEXT } from '@/utils/orderStatus'
|
5c34676a
“wangming”
对会员端进行了设计
|
81
82
83
84
|
export default {
data() {
return {
|
e1dcb3a0
“wangming”
1
|
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
orderId: '',
order: {},
nextSteps: [
{ title: '保存取件码', desc: '订单详情页会持续展示取件码,不必担心找不到。' },
{ title: '到自提门店', desc: '前往下单时选择的自提门店,向门店出示取件码。' },
{ title: '完成自提', desc: '门店核销成功后即可当场领取商品。' }
]
}
},
computed: {
statusText() {
return ORDER_STATUS_TEXT[this.order.orderStatus] || '待自提'
},
mainItemName() {
const items = this.order.items || []
if (!items.length) return '—'
return items.length > 1 ? `${items[0].productName} 等 ${items.length} 件` : items[0].productName
},
totalQuantity() {
const items = this.order.items || []
return items.reduce((sum, it) => sum + (it.quantity || 0), 0)
|
5c34676a
“wangming”
对会员端进行了设计
|
106
107
108
|
}
},
onLoad(options) {
|
e1dcb3a0
“wangming”
1
|
109
110
|
this.orderId = options.orderId
this.loadOrder()
|
5c34676a
“wangming”
对会员端进行了设计
|
111
112
|
},
methods: {
|
e1dcb3a0
“wangming”
1
|
113
114
115
116
117
118
119
|
loadOrder() {
getOrderDetail(this.orderId)
.then((data) => {
this.order = data || {}
})
.catch(() => {})
},
|
5c34676a
“wangming”
对会员端进行了设计
|
120
|
viewOrders() {
|
e1dcb3a0
“wangming”
1
|
121
|
uni.navigateTo({ url: `/packageProfile/order-detail/order-detail?id=${this.orderId}` })
|
5c34676a
“wangming”
对会员端进行了设计
|
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
},
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;
|
d8035736
“wangming”
Refactor project ...
|
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
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;
|
5c34676a
“wangming”
对会员端进行了设计
|
216
217
|
}
</style>
|