调试接口
This commit is contained in:
@ -9,6 +9,7 @@ export interface IPrePayParams {
|
||||
pay_way: number
|
||||
order_source: number
|
||||
order_type: number
|
||||
store_id: number
|
||||
}
|
||||
|
||||
export function prePay(data: IPrePayParams) {
|
||||
@ -19,7 +20,9 @@ export function prePay(data: IPrePayParams) {
|
||||
* 余额支付接口
|
||||
*/
|
||||
export interface ITeaSpecialistPayParams {
|
||||
id: number
|
||||
id: number,
|
||||
store_id: number,
|
||||
pay_way: number
|
||||
}
|
||||
|
||||
export function balancePay(data: ITeaSpecialistPayParams) {
|
||||
@ -30,7 +33,7 @@ export function balancePay(data: ITeaSpecialistPayParams) {
|
||||
* 获取退款订单ID
|
||||
*/
|
||||
export interface IRefundOrderParams {
|
||||
order_id: number
|
||||
id: number
|
||||
order_type: number
|
||||
}
|
||||
|
||||
|
||||
@ -94,6 +94,7 @@ export interface ICreateTeaSpecialistOrderResult {
|
||||
* 订单详情返回结果
|
||||
*/
|
||||
export interface ITeaSpecialistOrderDetailsResult {
|
||||
id?: number
|
||||
order_amount: string
|
||||
order_sn: string
|
||||
store_id: number
|
||||
@ -127,6 +128,7 @@ export interface ITeaSpecialistOrderDetailsResult {
|
||||
dtime: string
|
||||
update_dtime: string
|
||||
renew_price: number,
|
||||
renew_hour?: number,
|
||||
renew_dtime: {
|
||||
start_time: string
|
||||
end_time: string
|
||||
|
||||
@ -177,4 +177,11 @@ export function getUserBillDetails(id: number) {
|
||||
*/
|
||||
export function transferOrder(order_id: number) {
|
||||
return http.Post('/api/order/transferOrder', {order_id})
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户一件授权手机号
|
||||
*/
|
||||
export function getMobileByMnp(code: string) {
|
||||
return http.Post('/api/user/getMobileByMnp', {code})
|
||||
}
|
||||
@ -297,7 +297,8 @@
|
||||
*/
|
||||
handleToRefund: () => {
|
||||
message.confirm({
|
||||
title: '是否申请退款?',
|
||||
title: '提示',
|
||||
msg: '是否申请退款?',
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
cancelButtonProps: {
|
||||
@ -308,7 +309,7 @@
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.action == 'confirm') {
|
||||
let res = handleRefundOrderHooks(order.value.user_group.id, PayOrderType.ComboRefund)
|
||||
let res = handleRefundOrderHooks(order.value.id, PayOrderType.ComboRefund)
|
||||
if (res) {
|
||||
OrderDetail.handleInit()
|
||||
uni.$emit('refreshComboOrderList')
|
||||
|
||||
@ -100,7 +100,7 @@
|
||||
<!-- 描述信息 -->
|
||||
<view class="text-[#909399] text-26rpx leading-36rpx mb-40rpx mt-20rpx">
|
||||
<view class="ml-80rpx" v-if="orderStatus === TeaRoomOrderStatus.Pay || orderStatus === TeaRoomOrderStatus.Consumption">使用过程中有任何问题,请联系客服</view>
|
||||
<view class="flex items-center justify-center" v-if="orderStatus === TeaRoomOrderStatus.Pending">
|
||||
<!-- <view class="flex items-center justify-center" v-if="orderStatus === TeaRoomOrderStatus.Pending">
|
||||
<view class="flex items-center mr-6rpx">
|
||||
<wd-img width="36rpx" height="36rpx" :src="`${OSS}icon/icon_time.png`"/>
|
||||
</view>
|
||||
@ -111,14 +111,21 @@
|
||||
</view>
|
||||
<view>订单自动取消</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="ml-80rpx" v-if="orderStatus === TeaRoomOrderStatus.Finished">品一口香茗,让生活慢下来,从一杯好茶开始</view>
|
||||
<view v-if="orderStatus === TeaRoomOrderStatus.Refunded" class="text-center mt-14rpx">
|
||||
<view class="text-40rpx text-[#303133] leading-56rpx">
|
||||
<view>退款成功¥{{ order.order_amount }}</view>
|
||||
</view>
|
||||
<view class="text-28rpx text-[#606266] leading-54rpx mt-20rpx">谢谢您的信任,我们一定会做的更好</view>
|
||||
<view class="text-24rpx text-[#606266] leading-34rpx mt-12rpx">{{ order.update_dtime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mx-30rpx coupon-bg" >
|
||||
<view class="flex items-center px-30rpx pt-30rpx pb-40rpx">
|
||||
<view class="mr-30rpx">
|
||||
<wd-img width="190rpx" height="190rpx" :src="order.room_msg.img" mode="scaleToFill"></wd-img>
|
||||
<wd-img width="190rpx" height="190rpx" :src="order.room_msg.img" mode="scaleToFill" radius="10rpx"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view class="flex justify-between items-center" @click="OrderDetail.handleToStore">
|
||||
@ -145,9 +152,11 @@
|
||||
<view class="mt-28rpx pb-36rpx">
|
||||
<view class="text-30rpx leading-42rpx text-[#303133] px-30rpx">预约信息</view>
|
||||
<view class="font-500 text-26rpx leading-48rpx text-[#606266] mt-20rpx">
|
||||
<view class="mb-20rpx px-30rpx">预约时间:{{ order.day_time }} {{ order?.renew_dtime?.start_time || order?.start_time }}-{{ order?.renew_dtime?.end_time || order?.end_time }}</view>
|
||||
<view class="mb-20rpx px-30rpx">预约时间:{{ order.day_time }} {{ order?.start_time }}-{{ order?.end_time }}</view>
|
||||
<view class="flex justify-between items-center pl-30rpx" >
|
||||
<view>预约时长:{{ order.hours }}小时</view>
|
||||
<view>
|
||||
预约时长:{{ Number(order.hours) + Number(order.renew_hour || 0) }}小时
|
||||
</view>
|
||||
<!-- 已预约和消费中显示一键续订 -->
|
||||
<view v-if="orderStatus === TeaRoomOrderStatus.Pay || orderStatus === TeaRoomOrderStatus.Consumption"
|
||||
class="bg-[#4C9F44] rounded-[100rpx_0rpx_0rpx_100rpx] font-bold text-28rpx leading-40rpx text-[#fff] w-170rpx h-56rpx flex justify-center items-center"
|
||||
@ -155,10 +164,20 @@
|
||||
一键续订
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="mt-20rpx px-30rpx" >续订时长:1小时</view> -->
|
||||
<!-- <view class="mb-20rpx px-30rpx" v-if="order.renew_hour">续订时长:{{ order?.renew_hour }}小时</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="order.renew_hour">
|
||||
<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>
|
||||
<view>{{ order.renew_hour }} 小时</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 已预约和消费中显示开门锁 -->
|
||||
<view class="bg-white rounded-16rpx mx-30rpx mt-20rpx" v-if="orderStatus === TeaRoomOrderStatus.Pay || orderStatus === TeaRoomOrderStatus.Consumption">
|
||||
<view class="pt-32rpx text-[#303133] text-32rpx leading-44rpx px-30rpx">开门锁</view>
|
||||
@ -193,7 +212,7 @@
|
||||
<view class="pt-32rpx text-[#303133] text-32rpx leading-44rpx">适用门店</view>
|
||||
<view class="mt-26rpx flex items-center">
|
||||
<view class="mr-24rpx">
|
||||
<wd-img width="170rpx" height="170rpx" :src="order.store_msg.image"></wd-img>
|
||||
<wd-img width="170rpx" height="170rpx" :src="order.store_msg.image" radius="10rpx"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1 flex justify-between items-center relative">
|
||||
<view class="">
|
||||
@ -244,9 +263,9 @@
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx">
|
||||
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx" v-if="orderStatus !== TeaRoomOrderStatus.Refunded">
|
||||
<!-- 已预约 -->
|
||||
<view class="flex items-center justify-center text-32rpx leading-44rpx leading-90rpx text-center !mt-34rpx" v-if="orderStatus == TeaRoomOrderStatus.Pay || orderStatus == TeaRoomOrderStatus.Consumption">
|
||||
<view class="flex items-center justify-center text-32rpx leading-44rpx leading-90rpx text-center !mt-34rpx" v-if="orderStatus == TeaRoomOrderStatus.Pay">
|
||||
<wd-button custom-class="!text-32rpx !w-630rpx !h-90rpx !bg-[#4C9F44] !rounded-8rpx !text-[#fff]" open-type="share">分享房间给朋友</wd-button>
|
||||
</view>
|
||||
|
||||
@ -257,21 +276,15 @@
|
||||
</view>
|
||||
<view class="w-360rpx h-90rpx leading-90rpx text-center bg-[#4C9F44] rounded-8rpx text-[#fff]" @click="OrderDetail.handleToPay">立即支付¥{{ order.order_amount }}</view>
|
||||
</view>
|
||||
<!-- <view class="flex items-center justify-between mx-58rpx mt-34rpx" v-if="orderStatus === TeaRoomOrderStatus.Pending">
|
||||
|
||||
<!-- 消费中 -->
|
||||
<view class="flex items-center justify-between mx-58rpx mt-34rpx" v-if="orderStatus == TeaRoomOrderStatus.Consumption">
|
||||
<view class="flex items-center">
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] mr-16rpx" @click="OrderDetail.handleCancelOrder">取消</view>
|
||||
<view class="flex items-center">
|
||||
<view class="mr-16rpx mt-[-8rpx]">
|
||||
<price-format color="#FF5951" :first-size="40" :second-size="40" :subscript-size="28" :price="23.02"></price-format>
|
||||
</view>
|
||||
<view class="flex items-center text-[#4C9F44]" >
|
||||
<view class="text-24rpx mr-10rpx" @click="showCostPopup = true">费用明细</view>
|
||||
<wd-icon name="arrow-down" size="24rpx" color="#4C9F44"></wd-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分享出去的订单不要显示申请退款 -->
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] mr-16rpx" @click="OrderDetail.handleRefundOrder" v-if="!shareSource">申请退款</view>
|
||||
</view>
|
||||
<view class="w-178rpx h-90rpx leading-90rpx text-center bg-[#4C9F44] rounded-8rpx text-[#fff]">立即预定</view>
|
||||
</view> -->
|
||||
<wd-button custom-class="!text-32rpx !w-360rpx !h-90rpx !bg-[#4C9F44] !rounded-8rpx !text-[#fff]" open-type="share">分享房间给朋友</wd-button>
|
||||
</view>
|
||||
|
||||
<!-- 交易完成 -->
|
||||
<view @click="OrderDetail.handleAgainReserve" class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center mt-34rpx"
|
||||
@ -279,8 +292,6 @@
|
||||
<view class="w-630rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]">再次预定</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -289,7 +300,7 @@
|
||||
import { useMessage } from 'wot-design-uni'
|
||||
import {toast} from '@/utils/toast'
|
||||
import { getTeaRoomOrderDetail } from '@/api/tea-room'
|
||||
import { handleTRCancelOrderHooks, handleTRToPayHooks, handleToTRStoreHooks } from '@/hooks/useOrder'
|
||||
import { handleTRCancelOrderHooks, handleTRToPayHooks, handleToTRStoreHooks, handleRefundOrderHooks } from '@/hooks/useOrder'
|
||||
import type { ITeaSpecialistOrderDetailsResult } from '@/api/types/tea'
|
||||
import { router } from '@/utils/tools'
|
||||
import { ReserveServiceCategory, OrderType } from '@/utils/order'
|
||||
@ -298,6 +309,7 @@
|
||||
import { transferOrder } from '@/api/user'
|
||||
import { toTimes, copy } from '@/utils/tools'
|
||||
import { useUserStore } from '@/store'
|
||||
import { PayOrderType } from '@/utils/pay'
|
||||
|
||||
|
||||
const OSS = inject('OSS')
|
||||
@ -356,6 +368,7 @@
|
||||
// 订单
|
||||
const orderId = ref<number>(0)
|
||||
const order = ref<ITeaSpecialistOrderDetailsResult>({
|
||||
id: 0,
|
||||
order_amount: '',
|
||||
order_sn: '',
|
||||
store_id: 0,
|
||||
@ -389,6 +402,7 @@
|
||||
dtime: '',
|
||||
update_dtime: '',
|
||||
renew_price: 0,
|
||||
renew_hour: 0,
|
||||
renew_dtime: {
|
||||
start_time: '',
|
||||
end_time: '',
|
||||
@ -636,8 +650,6 @@
|
||||
* 转让订单
|
||||
*/
|
||||
handleTransferOrder: async () => {
|
||||
console.log('开始转让订单2')
|
||||
|
||||
message.confirm({
|
||||
title: '提示',
|
||||
msg: '是否接收该笔订单?',
|
||||
@ -663,6 +675,34 @@
|
||||
}).catch(() => {
|
||||
// 点击取消按钮回调事件
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 申请退款
|
||||
*/
|
||||
handleRefundOrder: () => {
|
||||
message.confirm({
|
||||
title: '提示',
|
||||
msg: '是否申请退款?',
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
cancelButtonProps: {
|
||||
customClass: '!bg-[#F6F7F8] !text-[#303133] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
},
|
||||
confirmButtonProps: {
|
||||
customClass: '!bg-[#4C9F44] !text-[#fff] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
}
|
||||
}).then(async (res) => {
|
||||
if (res.action == 'confirm') {
|
||||
// 改为当前退款订单ID
|
||||
let res = await handleRefundOrderHooks(order.value.id, PayOrderType.TeaRoom)
|
||||
console.log("🚀 ~ res:", res)
|
||||
if (res) {
|
||||
OrderDetail.handleInit()
|
||||
uni.$emit('refreshOrderList')
|
||||
}
|
||||
}
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 昵称 -->
|
||||
<view class="flex justify-between items-center" @click="showEditNicknamePopup = true">
|
||||
<view class="flex justify-between items-center mb-54rpx" @click="showEditNicknamePopup = true">
|
||||
<view class="font-400 text-[#303133] text-30rpx leading-42rpx">昵称</view>
|
||||
<view class="flex justify-end">
|
||||
<view class="flex items-center">
|
||||
@ -100,20 +100,19 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- TODO 暂时隐藏-修改手机号 -->
|
||||
<!-- <view class="flex justify-between items-center" @click="Profile.handleToEditMobile">
|
||||
<view class="flex justify-between items-center">
|
||||
<view class="font-400 text-[#303133] text-30rpx leading-42rpx">修改手机号</view>
|
||||
<view class="flex justify-end">
|
||||
<view class="flex items-center">
|
||||
<view class="font-400 text-[#303133] text-30rpx leading-42rpx">
|
||||
+86 {{ maskedMobile }}
|
||||
</view>
|
||||
<view>
|
||||
<wd-icon name="arrow-right" size="32rpx" color="#C0C4CC" />
|
||||
</view>
|
||||
<wd-button type="text" open-type="getPhoneNumber" @getphonenumber="Profile.handleToEditMobile" custom-class="!p-0 !m-0 !bg-transparent !h-auto !leading-normal !w-300rpx !text-right">
|
||||
<view class="font-400 text-[#303133] text-30rpx leading-42rpx" v-if="maskedMobile">
|
||||
+86 {{ maskedMobile }}
|
||||
</view>
|
||||
<view class="font-400 text-[#303133] text-30rpx leading-42rpx" v-else>点击绑定</view>
|
||||
</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bg-white rounded-16rpx mt-144rpx mx-30rpx px-30rpx py-32rpx text-center font-400 text-[#303133] text-30rpx leading-42rpx" @click="showLogoutPopup = true">
|
||||
@ -129,6 +128,7 @@
|
||||
import type { IUserResult } from '@/api/types/user'
|
||||
import { router } from '@/utils/tools'
|
||||
import { useUserStore } from '@/store'
|
||||
import { getMobileByMnp } from '@/api/user'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
const showLogoutPopup = ref<boolean>(false) // 是否显示退出登录弹出框
|
||||
@ -221,10 +221,8 @@
|
||||
/**
|
||||
* 修改手机号
|
||||
*/
|
||||
handleToEditMobile: () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/mobile?type=edit&userId=123' // userId仅做测试使用,实际请传真实用户ID
|
||||
})
|
||||
handleToEditMobile: async (e: any) => {
|
||||
const res = await getMobileByMnp(e.code)
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -499,11 +499,11 @@
|
||||
uni.$off('chooseCoupon')
|
||||
|
||||
if (type === CouponType.Discount) {
|
||||
selectedCoupon.value = {id: params.coupon.user_coupon_id, name: `${params.coupon.name}减${params.coupon.coupon_price}` }
|
||||
selectedCoupon.value = {id: params.coupon.id, name: `${params.coupon.name}减${params.coupon.coupon_price}` }
|
||||
bill.value.coupon = params.coupon.coupon_price
|
||||
selectCouponId.value = params.coupon.id // 这里的ID是在数据表自增的ID,保存下来是为了回显列表的,没有其他作用
|
||||
} else {
|
||||
selectedGroupCoupon.value = {id: params.coupon.group_id, name: `团购券-${params.coupon?.title}` }
|
||||
selectedGroupCoupon.value = {id: params.coupon.id, name: `团购券-${params.coupon?.title}` }
|
||||
bill.value.groupCoupon = params.coupon.coupon_price
|
||||
selectGroupCouponId.value = params.coupon.id // 这里的ID是在数据表自增的ID,保存下来是为了回显列表的,没有其他作用
|
||||
}
|
||||
@ -513,6 +513,7 @@
|
||||
|
||||
// 获取预定了几个小时
|
||||
const count = bill.value.service.num
|
||||
console.log("🚀 ~ bill.value:", bill.value)
|
||||
console.log("🚀 ~ selectCouponId:", selectCouponId.value)
|
||||
|
||||
router.navigateTo(`/bundle/coupon/coupon?id=${id.value}&numbers=${count}&type=${type}&storeId=${storeId.value}&couponId=${selectCouponId.value}&groupCouponId=${selectGroupCouponId.value}`)
|
||||
@ -588,7 +589,6 @@
|
||||
} catch (error) {
|
||||
uni.hideLoading()
|
||||
isSubmitting.value = false
|
||||
toast.info('订单提交失败,请稍后重试')
|
||||
return
|
||||
}
|
||||
// 正常流程下,isSubmitting.value 会在支付回调中重置
|
||||
|
||||
@ -164,7 +164,8 @@
|
||||
order_id: res.order_id,
|
||||
pay_way: 2,
|
||||
order_source: PayOrderSource.MINI, //订单来源:1-小程序; 2-h5; 3app
|
||||
order_type: PayOrderType.Recharge
|
||||
order_type: PayOrderType.Recharge,
|
||||
store_id: 0
|
||||
})
|
||||
|
||||
wechatPay(pay.pay.config).then((res) => {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
<view class="">
|
||||
<view class="booking-time">
|
||||
<wd-tabs v-model="selectedDay" color="#4C9F44" @click="BookingTime.handleChangeTimeTab">
|
||||
<wd-tabs v-model="selectedDay" color="#4C9F44" @click="BookingTime.handleChangeTimeTab" :slidable-num="4">
|
||||
<scroll-view scroll-y class="!h-500rpx pb-100rpx">
|
||||
<block v-for="(item, index) in day.time" :key="index">
|
||||
<wd-tab :title="`${item.display}`" :name="item.display">
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<view class="mt-22rpx">
|
||||
<view class="flex">
|
||||
<view class="mr-28rpx">
|
||||
<wd-img width="200rpx" height="200rpx" :src="order.image"></wd-img>
|
||||
<wd-img width="200rpx" height="200rpx" :src="order.image" radius="10rpx"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view @click="ComboCard.handleToOrderDetail">
|
||||
@ -39,16 +39,16 @@
|
||||
<view class="text-center flex items-center text-28rpx mt-28rpx justify-end" v-if="order.status === GroupComboOrderStatus.ToUse">
|
||||
<view
|
||||
@click="ComboCard.handleOrderRefund(order, OrderSource.Combo)"
|
||||
class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133]"
|
||||
:class="order.operation_type === StoreType.Direct ? ' mr-28rpx' : ''">
|
||||
class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133]">
|
||||
<!-- :class="order.operation_type === StoreType.Direct ? ' mr-28rpx' : ''"> -->
|
||||
申请退款
|
||||
</view>
|
||||
<view
|
||||
<!-- <view
|
||||
@click="ComboCard.handleUsePackage"
|
||||
class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44]"
|
||||
v-if="order.operation_type === StoreType.Direct">
|
||||
立即预定
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -75,7 +75,7 @@
|
||||
<view class="mt-22rpx">
|
||||
<view class="flex">
|
||||
<view class="mr-28rpx">
|
||||
<wd-img width="200rpx" height="200rpx" :src="order.image"></wd-img>
|
||||
<wd-img width="200rpx" height="200rpx" :src="order.image" radius="10rpx"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view @click="ComboCard.handleToOrderDetail">
|
||||
@ -85,9 +85,9 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="text-center flex items-center text-28rpx mt-28rpx justify-end">
|
||||
<!-- <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-[#4C9F44] text-[#4C9F44]" v-if="order.status === DouYinOrderStatus.ToUse">立即预定</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -110,13 +110,14 @@
|
||||
<text v-if="order.order_status === TeaRoomOrderStatus.Consumption">消费中</text>
|
||||
<text v-if="order.order_status === TeaRoomOrderStatus.Pay">已预约</text>
|
||||
<text v-if="order.order_status === TeaRoomOrderStatus.Finished" class="text-[#606266]">完成</text>
|
||||
<text v-if="order.order_status === TeaRoomOrderStatus.Cancelled" class="text-[#C9C9C9]" >订单取消</text>
|
||||
<text v-if="order.order_status === TeaRoomOrderStatus.Cancelled" class="text-[#C9C9C9]">订单取消</text>
|
||||
<text v-if="order.order_status === TeaRoomOrderStatus.Refunded" class="text-[#C9C9C9]">已退款</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-22rpx">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-28rpx">
|
||||
<wd-img width="200rpx" height="200rpx" :src="`${OSS}images/home/home_image5.png`"></wd-img>
|
||||
<wd-img width="200rpx" height="200rpx" :src="order.image" radius="10rpx"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view @click="ComboCard.handleToOrderDetail">
|
||||
@ -154,7 +155,7 @@
|
||||
<view v-if="type === OrderSource.TeaSpecialist" class="bg-white rounded-10rpx p-28rpx">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-28rpx">
|
||||
<wd-img width="200rpx" height="200rpx" :src="`${OSS}images/home/home_image5.png`"></wd-img>
|
||||
<wd-img width="200rpx" height="200rpx" :src="`${OSS}images/home/home_image5.png`" radius="10rpx"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1" @click="ComboCard.handleToOrderDetail">
|
||||
<view class="flex items-center relative">
|
||||
@ -273,7 +274,8 @@
|
||||
*/
|
||||
handleOrderRefund: (order: any, source: string) => {
|
||||
message.confirm({
|
||||
title: '是否申请退款?',
|
||||
title: '提示',
|
||||
msg: '是否申请退款?',
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
cancelButtonProps: {
|
||||
@ -294,16 +296,6 @@
|
||||
}
|
||||
// TODO 这里调用删除直营订单的接口
|
||||
break;
|
||||
case OrderSource.DouYin:
|
||||
// TODO 这里调用删除抖音订单的接口
|
||||
break;
|
||||
case OrderSource.TeaRoom:
|
||||
// 这里调用删除茶室订单的接口
|
||||
handleTRDeleteOrderHooks(props.order.id)
|
||||
break;
|
||||
case OrderSource.TeaSpecialist:
|
||||
// TODO 这里调用删除茶室订单的接口
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -87,15 +87,15 @@ export async function handleTRConfirmOrderHooks(orderId: number) {
|
||||
|
||||
/**
|
||||
* 订单退款
|
||||
* @param orderId 订单ID
|
||||
* @param id 订单的主键
|
||||
* @param orderType 订单类型
|
||||
*/
|
||||
export async function handleRefundOrderHooks(orderId: number, orderType: number) {
|
||||
export async function handleRefundOrderHooks(id: number, orderType: number) {
|
||||
try {
|
||||
uni.showLoading({ title: '退款中...' })
|
||||
const res = await submitRefund({ order_id: orderId, order_type: orderType })
|
||||
const res = await submitRefund({ id, order_type: orderType })
|
||||
await refund({ id: res.id })
|
||||
toast.info('退款成功,退款有延迟,请耐心等待,注意查收')
|
||||
toast.info('退款成功,注意查收')
|
||||
|
||||
// 退款延迟-1.5秒钟后再执行
|
||||
setTimeout(() => {
|
||||
|
||||
@ -169,6 +169,15 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/webview/webview",
|
||||
"type": "page",
|
||||
"needLogin": true,
|
||||
"layout": "tabbar",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/share/tea-room/share-order-detail",
|
||||
"type": "page",
|
||||
|
||||
@ -248,20 +248,27 @@
|
||||
if (isGroupBuying.value) {
|
||||
// 购买团购套餐
|
||||
ordeType = PayOrderType.BuyCombo
|
||||
} else if (renew.value) {
|
||||
// 续订包间
|
||||
ordeType = PayOrderType.RenewRoom
|
||||
}
|
||||
console.log("🚀 ~ PayValueMap[pay.value]:", PayValueMap[pay.value])
|
||||
|
||||
const res = await prePay({
|
||||
from: PayValueMap[pay.value],
|
||||
order_id: orderId.value,
|
||||
pay_way: pay.value,
|
||||
order_source: PayOrderSource.MINI, //订单来源:1-小程序; 2-h5; 3app
|
||||
order_type: ordeType // 0为茶艺师 1为茶室包间 2为茶室套餐
|
||||
order_type: ordeType, // 0为茶艺师 1为茶室包间 2为茶室套餐
|
||||
store_id: storeId.value || 0
|
||||
})
|
||||
|
||||
// 余额支付(平台余额、门店余额)
|
||||
if (pay.value == PayValue.PlatformBalance || pay.value == PayValue.StoreBalance) {
|
||||
await balancePay({
|
||||
id: res.pay
|
||||
id: res.pay,
|
||||
store_id: storeId.value || 0,
|
||||
pay_way: pay.value,
|
||||
})
|
||||
|
||||
uni.hideLoading()
|
||||
|
||||
@ -57,10 +57,10 @@
|
||||
<view class="font-bold text-36rpx leading-50rpx"> {{ isLogin ? user.coupon_count : '- -' }}</view>
|
||||
<view class="text-24rpx leading-34rpx">优惠券</view>
|
||||
</view>
|
||||
<view class="w-160rpx text-[#303133] text-center" @click="router.navigateTo('/bundle/collect/collect')">
|
||||
<!-- <view class="w-160rpx text-[#303133] text-center" @click="router.navigateTo('/bundle/collect/collect')">
|
||||
<view class="font-bold text-36rpx leading-50rpx"> {{ isLogin ? user.collect_count : '- -' }}</view>
|
||||
<view class="text-24rpx leading-34rpx">收藏</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="relative" @click="router.navigateTo('/bundle/wallet/wallet')">
|
||||
<view class="w-300rpx h-148rpx">
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
</view>
|
||||
|
||||
<view class="mt-40rpx flex flex-wrap items-center">
|
||||
<view class="bg-[#F8F9FA] rounded-28rpx w-112rpx h-56rpx text-center text-[#606266] text-26rpx leading-56rpx mr-20rpx mb-24rpx" v-for="(item, index) in searchHistory" :key="index">
|
||||
<view class="bg-[#F8F9FA] rounded-28rpx w-112rpx h-56rpx text-center text-[#606266] text-26rpx leading-56rpx mr-20rpx mb-24rpx" v-for="(item, index) in searchHistory" :key="index" @click="keywords = item.content;Search.handleSearch()">
|
||||
{{ item.content }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -218,6 +218,7 @@ export enum TeaRoomOrderStatus {
|
||||
Consumption = 2, // 消费中
|
||||
Finished = 3, // 完成
|
||||
Cancelled = 4, // 订单取消
|
||||
Refunded = 5, // 已退款
|
||||
}
|
||||
|
||||
// 包间订单状态文本
|
||||
@ -228,6 +229,7 @@ export enum TeaRoomOrderStatusText {
|
||||
Consumption = 'consumption', // 消费中
|
||||
Finished = 'finished', // 已完成
|
||||
Cancelled = 'cancelled', // 已取消
|
||||
Refunded = 'refunded', // 已取消
|
||||
}
|
||||
|
||||
// 状态内容映射
|
||||
@ -246,6 +248,9 @@ export const TeaRoomOrderStatusTextValue: Record<TeaRoomOrderStatus, any> = {
|
||||
},
|
||||
[TeaRoomOrderStatus.Cancelled]: {
|
||||
title: '订单取消'
|
||||
},
|
||||
[TeaRoomOrderStatus.Refunded]: {
|
||||
title: '已退款'
|
||||
},
|
||||
}
|
||||
|
||||
@ -257,9 +262,10 @@ export const TeaRoomOrderStatusValue: Record<TeaRoomOrderStatusText, string | nu
|
||||
[TeaRoomOrderStatusText.Consumption]: 2,
|
||||
[TeaRoomOrderStatusText.Finished]: 3,
|
||||
[TeaRoomOrderStatusText.Cancelled]: 4,
|
||||
[TeaRoomOrderStatusText.Refunded]: 5,
|
||||
}
|
||||
|
||||
// 包间订单状态数字(根据UI图还缺已退款、待接单、售后中、售后完成)
|
||||
// 包间订单套餐状态数字(根据UI图还缺已退款、待接单、售后中、售后完成)
|
||||
export enum TeaRoomPackageOrderStatus {
|
||||
Pending = 0, // 待付款
|
||||
ToUse = 1, // 待使用
|
||||
|
||||
@ -23,7 +23,7 @@ export enum PayValue {
|
||||
export const PayValueMap = {
|
||||
[PayValue.PlatformBalance]: 'balance',
|
||||
[PayValue.WeChatPay]: 'wx',
|
||||
[PayValue.StoreBalance]: 'store_balance',
|
||||
[PayValue.StoreBalance]: 'balance',
|
||||
}
|
||||
|
||||
// 支付方式列表
|
||||
@ -63,6 +63,7 @@ export enum PayOrderType {
|
||||
Recharge = 4, // 充值
|
||||
ComboRefund = 5, // 套餐退款
|
||||
TeaRoomRefund = 6, // 茶室退款
|
||||
RenewRoom = 7, // 续订包间
|
||||
}
|
||||
|
||||
// 支付订单来源
|
||||
|
||||
Reference in New Issue
Block a user