完善页面整合TS

This commit is contained in:
wangxiaowei
2025-09-19 17:25:23 +08:00
parent 864c40aa3a
commit ff2f645101
13 changed files with 540 additions and 302 deletions

View File

@ -15,12 +15,12 @@
</view>
<view class="text-[#909399] text-26rpx leading-36rpx mx-102rpx mb-40rpx">
<text v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">请在2025.12.31()前使用</text>
<text v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used">品一口香茗让生活慢下来从一杯好茶开始</text>
<text v-if="orderStatus === OrderStatus.ToUse">请在2025.12.31()前使用</text>
<text v-if="orderStatus === OrderStatus.Used">品一口香茗让生活慢下来从一杯好茶开始</text>
</view>
<!-- 待使用下显示 -->
<view class="coupon-bg2 p-30rpx mx-30rpx" v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">
<view class="coupon-bg2 p-30rpx mx-30rpx" v-if="orderStatus === OrderStatus.ToUse">
<view class="flex items-center">
<view class="mr-30rpx">
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
@ -56,7 +56,7 @@
</view>
<!-- 已使用下显示 -->
<view class="bg-white rounded-16rpx p-30rpx mx-30rpx" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used">
<view class="bg-white rounded-16rpx p-30rpx mx-30rpx" v-if="orderStatus === OrderStatus.Used">
<view class="flex items-center">
<view class="mr-30rpx">
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
@ -110,7 +110,7 @@
</view>
<!-- 订单信息 -->
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus !== GroupBuyingCategoryOrderStatus.Refunded">
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus !== OrderStatus.Refunded">
<view class="text-[#303133] text-32rpx leading-44rpx">订单信息</view>
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
<view>订单编号</view>
@ -135,7 +135,7 @@
</view>
<!-- 售后订单 -->
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Refunded">
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus === OrderStatus.Refunded">
<view class="text-[#303133] text-32rpx leading-44rpx">售后订单</view>
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
<view>售后原因</view>
@ -160,15 +160,15 @@
</view>
<!-- 操作按钮 -->
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx" v-if="orderStatus !== GroupBuyingCategoryOrderStatus.Used">
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx" v-if="orderStatus !== OrderStatus.Used">
<view class="mt-34rpx">
<!-- 待使用 -->
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === OrderStatus.ToUse">
<view class="w-630rpx h-90rpx bg-[#F6F7F8] rounded-8rpx text-[#303133]">申请退款</view>
</view>
<!-- 售后完成 -->
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Refunded">
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === OrderStatus.Refunded">
<view class="w-330rpx h-90rpx bg-[#F6F7F8] rounded-8rpx text-[#303133] mr-30rpx">联系商家</view>
<view class="w-330rpx h-90rpx bg-[#F6F7F8] rounded-8rpx text-[#303133]">联系平台</view>
</view>
@ -178,7 +178,7 @@
</template>
<script lang="ts" setup>
import { GroupBuyingCategory, GroupBuyingCategoryOrderStatus, GroupBuyingStatusTitle } from '@/utils/order'
import { OrderSource, OrderStatus, OrderStatusTitle } from '@/utils/order'
import {toast} from '@/utils/toast'
const OSS = inject('OSS')
@ -188,7 +188,7 @@
const orderStatus = ref<string>('') // 订单状态:待使用、退款等
onLoad((args) => {
title.value = GroupBuyingStatusTitle[GroupBuyingCategory.Franchise][args.orderStatus] || '订单详情'
title.value = OrderStatusTitle[OrderSource.Franchise][args.orderStatus] || '订单详情'
type.value = args.type
orderStatus.value = args.orderStatus