feat(custom): \!
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-05 16:41:26 +08:00
parent 962d7a2b19
commit 94b6a9da10
23 changed files with 311 additions and 721 deletions

View File

@@ -10,20 +10,14 @@
<!-- </view>-->
<!-- 商品信息 -->
<view class="order-card">
<view
class="center mb-[20px]"
v-for="(item, index) in orderData.OrderGoods"
:key="index">
<view class="center mb-[20px]" v-for="(item, index) in orderData.OrderGoods" :key="index">
<view class="top">
<image :src="item.Goods.cover" />
<view class="flex flex-col justify-between flex-1">
<view class="title">{{ item.Goods?.name }}</view>
<view class="text-[#F83D3D] mt-5">
<view
>{{ item.pay_price }}
<text v-if="item.pay_integral > 0"
>+{{ item.pay_integral }}积分</text
>
<view>{{ item.pay_price }}
<text v-if="item.pay_integral > 0">+{{ item.pay_integral }}积分</text>
</view>
</view>
</view>
@@ -33,17 +27,12 @@
</view>
</view>
<!-- <view class="line"></view> -->
<view
class="flex justify-between items-center mt-2 mb-2 text-[25px]"
style="text-align: right">
<text class="text-[#9C9C9C] text-[28px]"
>{{ orderData.count }}件商品
<view class="flex justify-between items-center mt-2 mb-2 text-[25px]" style="text-align: right">
<text class="text-[#9C9C9C] text-[28px]">{{ orderData.count }}件商品
</text>
<text class="text-[26px]"
>应付款: {{ orderData.discount_price }}
<text class="text-[26px]">应付款: {{ orderData.discount_price }}
<text v-if="orderData.exchange > 0">
积分抵扣: {{ (orderData.exchange / 100).toFixed(2) }}</text
>
积分抵扣: {{ orderData.exchange }}</text>
</text>
<!-- <view class="line"></view> -->
</view>
@@ -51,14 +40,9 @@
<!-- {{ payVal }} -->
<nut-radio-group class="w-[95%]" v-model="payVal">
<nut-cell-group class="w-full">
<nut-cell class="text-[#333333]" title="选择积分抵扣"></nut-cell>
<nut-cell
v-for="(item, index) in payList"
:key="index"
class="flex items-center"
:title="item.name"
:desc="item.number > 0 ? `可用积分:${item.number}` : ''"
@click="cellClick(item.ID)">
<nut-cell class="text-[#333333]" title="支付方式"></nut-cell>
<nut-cell v-for="(item, index) in payList" :key="index" class="flex items-center" :title="item.name"
:desc="item.number > 0 ? `可用积分:${item.number}` : ''" @click="cellClick(item.ID)">
<template #icon>
<IconFont size="30" :name="item.icon" />
</template>
@@ -69,13 +53,7 @@
</nut-cell-group>
</nut-radio-group>
<view class="w-[90%] mt-[100px]">
<nut-button
shape="square"
:loading="isLoading"
type="primary"
block
@click="pay"
>确认支付
<nut-button shape="square" :loading="isLoading" type="primary" block @click="pay">确认支付
</nut-button>
</view>
</view>
@@ -83,11 +61,11 @@
<script setup lang="ts">
import Taro from '@tarojs/taro';
import {IconFont} from '@nutui/icons-vue-taro';
import {onUnmounted, ref} from 'vue';
import {getActiveOrderDetail, getPayList} from '@/api/goods';
import {getUserPoint} from '@/api/admin';
import {payOrder} from '@/api/order';
import { IconFont } from '@nutui/icons-vue-taro';
import { onUnmounted, ref } from 'vue';
import { getActiveOrderDetail, getPayList } from '@/api/goods';
import { getUserPoint } from '@/api/admin';
import { payOrder } from '@/api/order';
import * as dayjs from 'dayjs';
const payVal = ref();
@@ -103,7 +81,7 @@ const isLoading = ref(false);
const opt = ref<any>({});
Taro.useLoad(e => {
const {oid, bid, OrderType} = e;
const { oid, bid, OrderType } = e;
opt.value = e;
get_pay_list();
getData(oid, bid, OrderType);
@@ -160,7 +138,7 @@ const pay = async () => {
try {
isLoading.value = true;
if (!payVal.value)
return Taro.showToast({title: '请选择支付方式', icon: 'none'});
return Taro.showToast({ title: '请选择支付方式', icon: 'none' });
await confirmPay();
} catch (error) {