摸大红支持购物车多选一起结账

下单支持多商品行快照与一次支付;支付后整单复制文案,前台提供购物车加购与结账。
This commit is contained in:
yml2213
2026-07-16 20:58:39 +08:00
parent e241607535
commit 183351a297
17 changed files with 1159 additions and 117 deletions
@@ -90,8 +90,9 @@ async function uploadQrcode(file: File) {
<el-input v-model="form.order_copy_template" type="textarea" :rows="8" />
<div class="hint">
可用变量&#123;&#123;order_no&#125;&#125; &#123;&#123;created_at&#125;&#125;
&#123;&#123;product_title&#125;&#125; &#123;&#123;quantity&#125;&#125; &#123;&#123;amount&#125;&#125;
&#123;&#123;buyer_name&#125;&#125; &#123;&#123;buyer_phone&#125;&#125; &#123;&#123;unit&#125;&#125;
&#123;&#123;items&#125;&#125;多商品明细 &#123;&#123;product_title&#125;&#125;
&#123;&#123;quantity&#125;&#125; &#123;&#123;amount&#125;&#125; &#123;&#123;buyer_name&#125;&#125;
&#123;&#123;buyer_phone&#125;&#125; &#123;&#123;unit&#125;&#125;
</div>
</el-form-item>
</el-form>
@@ -175,6 +175,13 @@ async function copyText(text: string) {
{{ detail.buyer_nickname }} {{ detail.buyer_phone }}
</el-descriptions-item>
</el-descriptions>
<div v-if="detail.items?.length" class="items-box">
<strong>商品明细</strong>
<div v-for="item in detail.items" :key="item.product_id" class="item-line">
<span>{{ item.title }} × {{ item.quantity }}</span>
<em>¥{{ item.amount || formatCent(item.amount_cent) }}</em>
</div>
</div>
<div v-if="detail.copy_text" class="copy-box">
<div class="copy-head">
<strong>复制文案</strong>
@@ -215,6 +222,23 @@ async function copyText(text: string) {
gap: 10px;
flex-wrap: wrap;
}
.items-box {
margin-top: 14px;
display: grid;
gap: 8px;
}
.item-line {
display: flex;
justify-content: space-between;
gap: 12px;
font-size: 13px;
color: #334155;
}
.item-line em {
font-style: normal;
color: #ff6a00;
font-weight: 600;
}
.copy-box,
.qr-box {
margin-top: 16px;