This commit is contained in:
2024-03-31 18:19:26 +08:00
parent b502385272
commit 60cb832b02
10 changed files with 107 additions and 109 deletions

View File

@@ -67,7 +67,7 @@
<text class='card-view-title'>优惠券
<text style='font-size: 22rpx;color: #F32B2B;'>已选最大优惠</text>
</text>
<view class='card-view-value' style='color: #F32B2B;margin: 0'>-20
<view class='card-view-value' style='color: #F32B2B;margin: 0'>-{{ checkedCoupon?.reduce || 0 }}
<image :src='assetsUrl("ic_arrow_right_gray.png")' />
</view>
</view>
@@ -96,7 +96,7 @@
</view>
</view>
<payment-dialog ref='paymentDialogRef' @change='args => paymentType=args' />
<coupon-dialog ref='couponDialogRef' />
<coupon-dialog ref='couponDialogRef' @confirm='confirmCoupon' :order-price='500' />
</template>
<script lang='ts' setup>
@@ -105,14 +105,16 @@ import PaymentDialog from '@/components/payment-dialog.vue';
import CouponDialog from '@/pages/mall/subs/components/coupon-dialog.vue';
import { goPath } from '@/utils';
import { orderCreate } from '@/api/goods';
import { CouponBean } from '@/api/user/types';
const couponDialogRef = ref();
const paymentDialogRef = ref();
const paymentType = ref(0);
const tabIndex = ref(0);
const checkedCoupon = ref<CouponBean>();
const changePayment = () => {
console.log(paymentDialogRef);
paymentDialogRef.value.show();
};
@@ -120,6 +122,10 @@ const showCouponDialog = () => {
couponDialogRef.value.show();
};
const confirmCoupon = (item: CouponBean) => {
checkedCoupon.value = item;
};
const payment = async () => {
const params = {
'discount': 0,