|
@@ -30,7 +30,7 @@ const { userInfo } = storeToRefs(userStore)
|
|
const show = ref(false)
|
|
const show = ref(false)
|
|
const { alert } = useMessage()
|
|
const { alert } = useMessage()
|
|
const data = ref()
|
|
const data = ref()
|
|
-const selectedCoupons = ref<Coupon[]>()
|
|
|
|
|
|
+const selectedCoupons = ref<Coupon[]>([])
|
|
const requestData = computed(() => ({
|
|
const requestData = computed(() => ({
|
|
...data.value,
|
|
...data.value,
|
|
couponList:
|
|
couponList:
|
|
@@ -103,8 +103,6 @@ const handleClose = () => {
|
|
}
|
|
}
|
|
onLoad(async (query: { data: string }) => {
|
|
onLoad(async (query: { data: string }) => {
|
|
data.value = JSON.parse(query.data)
|
|
data.value = JSON.parse(query.data)
|
|
- console.log(data.value)
|
|
|
|
- setCoupons()
|
|
|
|
await Promise.all([setCoupons(), setConfirmOrder()])
|
|
await Promise.all([setCoupons(), setConfirmOrder()])
|
|
// await setConfirmOrder()
|
|
// await setConfirmOrder()
|
|
})
|
|
})
|
|
@@ -144,6 +142,7 @@ onLoad(async (query: { data: string }) => {
|
|
size="sm"
|
|
size="sm"
|
|
></SectionHeading>
|
|
></SectionHeading>
|
|
<div @click="handleQ">
|
|
<div @click="handleQ">
|
|
|
|
+ <!-- {{ selectedCoupons }}-->
|
|
<SectionHeading
|
|
<SectionHeading
|
|
title="优惠券"
|
|
title="优惠券"
|
|
:end-text="`已选${selectedCoupons?.length || 0}张`"
|
|
:end-text="`已选${selectedCoupons?.length || 0}张`"
|
|
@@ -169,7 +168,6 @@ onLoad(async (query: { data: string }) => {
|
|
class="text-sm font-normal font-['PingFang_SC'] leading-[10.18px]"
|
|
class="text-sm font-normal font-['PingFang_SC'] leading-[10.18px]"
|
|
:class="coupons.length ? 'text-[#ef4343]' : 'text-black/40'"
|
|
:class="coupons.length ? 'text-[#ef4343]' : 'text-black/40'"
|
|
>
|
|
>
|
|
- <!-- 选择优惠券-->
|
|
|
|
{{ coupons.length ? `${coupons.length}张可用` : '无可用' }}
|
|
{{ coupons.length ? `${coupons.length}张可用` : '无可用' }}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -187,7 +185,7 @@ onLoad(async (query: { data: string }) => {
|
|
</div>
|
|
</div>
|
|
<SectionHeading
|
|
<SectionHeading
|
|
title="实付积分"
|
|
title="实付积分"
|
|
- :end-text="confirmOrder?.totalsCurrPoints"
|
|
|
|
|
|
+ :end-text="String(confirmOrder?.totalsCurrPoints)"
|
|
size="sm"
|
|
size="sm"
|
|
></SectionHeading>
|
|
></SectionHeading>
|
|
</div>
|
|
</div>
|