完善页面

This commit is contained in:
wangxiaowei
2025-09-03 17:01:22 +08:00
parent ab9cf08c86
commit ef7b1c01bf
11 changed files with 986 additions and 105 deletions

View File

@ -1,7 +1,7 @@
<template>
<view class="">
<!-- 团购和抖音团购 -->
<view v-if="type === 'Direct' || type === 'Franchise' || type === 'DouYin'" class="bg-white rounded-10rpx p-30rpx">
<!-- 平台团购直营店 -->
<view v-if="type === 'Direct'" class="bg-white rounded-10rpx p-30rpx">
<view class="flex justify-between items-center">
<view class="flex items-center">
<view class="w-40rpx h-40rpx mr-10rpx">
@ -13,9 +13,9 @@
</view>
</view>
<view class="font-400 text-28rpx leading-40rpx mt-12rpx">
<text class="text-[#4C9F44]" v-if="orderType === OrderStatus.ToUse">待使用</text>
<text class="text-[#606266]" v-if="orderType === OrderStatus.Used">已使用</text>
<text class="text-[#C9C9C9]" v-if="orderType === OrderStatus.AfterSaleFinished">已退款</text>
<text class="text-[#4C9F44]" v-if="orderType === GroupBuyingCategoryOrderStatus.ToUse">待使用</text>
<text class="text-[#606266]" v-if="orderType === GroupBuyingCategoryOrderStatus.Used">已使用</text>
<text class="text-[#C9C9C9]" v-if="orderType === GroupBuyingCategoryOrderStatus.AfterSaleFinished">已退款</text>
</view>
</view>
<view class="mt-22rpx">
@ -30,16 +30,54 @@
<wd-tag bg-color="#F3F3F3" color="#606266" custom-class="!px-16rpx">3小时</wd-tag>
</view>
<view class="font-400 leading-36rpx text-26rpx text-[#606266]">
<!-- TODO 除了直营店其它的都没有这个描述信息 适用包间 青茶红茶绿茶 -->
<view class="mt-12rpx">适用包间 青茶红茶绿茶</view>
<view class="mt-10rpx">有效期至2025-03-23</view>
</view>
</view>
<!-- TODO 直营店有申请退款和立即预定按钮加盟店只有申请退款按钮抖音只有立即预定按钮 -->
<view class="text-center flex items-center text-28rpx mt-28rpx" v-if="type === 'Direct' ? 'justify-start' : 'justify-end'">
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx" v-if="type === 'Direct' || type === 'Franchise'">申请退款</view>
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44]" v-if="type === 'Direct' || type === 'DouYin'">立即预定</view>
<view class="text-center flex items-center text-28rpx mt-28rpx justify-start">
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx">申请退款</view>
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44]">立即预定</view>
</view>
</view>
</view>
</view>
</view>
<!-- 平台团购加盟店和抖音团购 -->
<view v-if="type === 'Franchise' || type === 'DouYin'" class="bg-white rounded-10rpx p-30rpx">
<view class="flex justify-between items-center">
<view class="flex items-center">
<view class="w-40rpx h-40rpx mr-10rpx">
<wd-img width="100%" height="100%" :src="`${OSS}icon/icon_tea.png`"></wd-img>
</view>
<view class="flex items-center" @click="comboCard.handleToStore">
<view class="font-bold text-30rpx leading-42rpx text-[#303133] mr-10rpx w-400rpx line-1">这是茶馆的名称这是茶馆的名称这是茶馆的名称</view>
<wd-icon name="chevron-right" size="32rpx"></wd-icon>
</view>
</view>
<view class="font-400 text-28rpx leading-40rpx mt-12rpx">
<text class="text-[#4C9F44]" v-if="orderType === GroupBuyingCategoryOrderStatus.ToUse">待使用</text>
<text class="text-[#606266]" v-if="orderType === GroupBuyingCategoryOrderStatus.Used">已使用</text>
<text class="text-[#C9C9C9]" v-if="orderType === GroupBuyingCategoryOrderStatus.Refunded">已退款</text>
</view>
</view>
<view class="mt-22rpx">
<view class="flex">
<view class="w-200rpx h-200rpx mr-28rpx">
<wd-img width="100%" height="100%" :src="`${OSS}images/home/home_image5.png`"></wd-img>
</view>
<view class="flex-1">
<view @click="comboCard.handleToOrderDetail">
<view class="font-500 text-30rpx text-[#303133] leading-42rpx line-1 w-400rpx">这是套餐的名字这是套餐的名字这是套餐的名字这是套餐的名字这是套餐的名字</view>
<view>
<wd-tag bg-color="#F3F3F3" color="#606266" custom-class="!px-16rpx">3小时</wd-tag>
</view>
</view>
<view class="text-center flex items-center text-28rpx mt-28rpx justify-end">
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx" v-if="type === 'Franchise'">申请退款</view>
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44]" v-if="type === 'DouYin'">立即预定</view>
</view>
</view>
</view>
@ -49,7 +87,7 @@
</template>
<script lang="ts" setup name="ComboCard">
import { OrderStatus, OrderStatusText } from '@/utils/order'
import { GroupBuyingCategoryOrderStatus } from '@/utils/order'
/**
* ComboCard 套餐卡片组件
@ -60,7 +98,7 @@
const props = defineProps({
/**
* 类型: 直营(Direct)、抖音(DouYin)、加盟(Franchise) 等
* 类型: 直营(Direct)、加盟(Franchise)、抖音(DouYin)
*/
type: {
type: String,
@ -86,9 +124,26 @@
// 跳转到团购订单详情页
handleToOrderDetail: () => {
uni.navigateTo({
url: `/bundle/group-buying/platform/order-detail?type=${props.type}&orderType=${OrderStatus.ToUse}`
})
// TODO 这里要对不同类型的订单进行区分跳转一个是直营的一个市加盟的
switch (props.type) {
case 'Direct':
uni.navigateTo({
url: `/bundle/group-buying/platform/direct-order-detail?orderType=${props.orderType}`
})
break;
case 'Franchise':
uni.navigateTo({
url: `/bundle/group-buying/platform/franchise-order-detail?orderType=${props.orderType}`
})
break;
case 'DouYin':
uni.navigateTo({
url: `/bundle/group-buying/douyin/douyin-order-detail?orderType=${props.orderType}`
})
break;
default:
break;
}
}
}
</script>

View File

@ -1,6 +1,6 @@
<template>
<view>
<!-- 平台团购直营店抖音团购待使用 -->
<!-- 平台团购直营店待使用平台团购加盟已使用抖音待使用 -->
<view class="bg-white rounded-16rpx p-30rpx" v-if="type === 'Direct' || type === 'Franchise' || type === 'DouYin'">
<view class="flex items-center" @click="comboCoupon.handleToStore">
<view class="mr-30rpx">
@ -10,11 +10,11 @@
<view class="flex justify-between items-center" @click="comboCoupon.handleToStore">
<view class="font-bold text-30rpx leading-42rpx text-[#303133] mr-10rpx w-362rpx line-1">团购套餐的可以点击跳转团购套餐的可以点击跳转团购套餐的可以点击跳转 </view>
<wd-icon name="chevron-right" size="32rpx" v-if="type === 'Direct'"></wd-icon>
<view class="text-26rpx leading-36rpx text-[#909399]" v-if="type === 'DouYin'">324</view>
<view class="text-26rpx leading-36rpx text-[#909399]" v-if="type === 'DouYin' || type === 'Franchise'">324</view>
</view>
<view class="flex justify-between items-center text-26rpx leading-36rpx text-[#909399] mt-18rpx">
<view>3小时</view>
<view v-if="type === 'Direct'">x1</view>
<view v-if="type === 'Direct' || type === 'Franchise'">x1</view>
</view>
<view class="text-[#606266] text-right mt-26rpx" v-if="type === 'Direct'">
<text class="text-24rpx leading-34rpx mr-12rpx">实付</text>
@ -28,7 +28,7 @@
</view>
<!-- 平台团购直营店待使用 -->
<view class="mt-30rpx font-500 leading-48rpx" v-if="type === 'Direct' && orderType === OrderStatus.ToUse">
<view class="mt-30rpx font-500 leading-48rpx" v-if="type === 'Direct' && orderType === GroupBuyingCategoryOrderStatus.ToUse">
<view class="text-26rpx text-[#606266]">有效期2025.04.04-2025.12.31</view>
<view class="text-28rpx text-[#303133] mt-18rpx">
<text class="mr-20rpx">券码 1052 4258 5654 125</text>
@ -37,29 +37,8 @@
</view>
</view>
<!-- 抖音团购已使用 -->
<view class="bg-white rounded-16rpx p-30rpx" v-if="orderType === OrderStatus.Used && type === 'DouYin'">
<view class="flex items-center" @click="comboCoupon.handleToStore">
<view class="mr-30rpx">
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
</view>
<view class="flex-1">
<view class="flex justify-between items-center" @click="comboCoupon.handleToStore">
<view class="font-bold text-30rpx leading-42rpx text-[#303133] mr-10rpx w-300rpx line-1">这是团购套餐的名字</view>
<view class="text-26rpx leading-36rpx text-[#909399] mt-8rpx">324</view>
</view>
<view class="flex justify-between items-center text-26rpx leading-36rpx text-[#909399] mt-18rpx">
3小时
</view>
<view class="font-400 text-26rpx text-[#606266] leading-40rpx mt-40rpx">
适用包间青茶红茶绿茶
</view>
</view>
</view>
</view>
<!-- 平台团购直营店已使用 -->
<view class="coupon-bg" v-if="type === 'Direct' && orderType === OrderStatus.Used">
<view class="coupon-bg" v-if="type === 'Direct' && orderType === GroupBuyingCategoryOrderStatus.Used">
<view class="flex items-center px-30rpx pt-30rpx pb-40rpx" @click="comboCoupon.handleToStore">
<view class="mr-30rpx">
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
@ -92,7 +71,7 @@
</view>
<!-- 平台团购加盟-待使用 -->
<view class="coupon-bg2 p-30rpx" v-if="type === 'Franchise' && orderType === OrderStatus.ToUse">
<view class="coupon-bg2 p-30rpx" v-if="type === 'Franchise' && orderType === GroupBuyingCategoryOrderStatus.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>
@ -126,11 +105,33 @@
</view>
</view>
</view>
<!-- 抖音团购已使用 -->
<view class="bg-white rounded-16rpx p-30rpx" v-if="orderType === GroupBuyingCategoryOrderStatus.Used && type === 'DouYin'">
<view class="flex items-center" @click="comboCoupon.handleToStore">
<view class="mr-30rpx">
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
</view>
<view class="flex-1">
<view class="flex justify-between items-center" @click="comboCoupon.handleToStore">
<view class="font-bold text-30rpx leading-42rpx text-[#303133] mr-10rpx w-300rpx line-1">这是团购套餐的名字</view>
<view class="text-26rpx leading-36rpx text-[#909399] mt-8rpx">324</view>
</view>
<view class="flex justify-between items-center text-26rpx leading-36rpx text-[#909399] mt-18rpx">
3小时
</view>
<view class="font-400 text-26rpx text-[#606266] leading-40rpx mt-40rpx">
适用包间青茶红茶绿茶
</view>
</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup name="ComboCoupon">
import { OrderStatus, OrderStatusText } from '@/utils/order'
import { GroupBuyingCategoryOrderStatus } from '@/utils/order'
/**
* Combo 套餐券组件