添加页面

This commit is contained in:
wangxiaowei
2025-08-27 17:34:40 +08:00
parent 03745bb676
commit fdaa01f801
8 changed files with 106 additions and 20 deletions

View File

@ -8,7 +8,7 @@
</div>
<div>开发规范</div>
1. 页面或组件添加方法的时候前面加上<b>handle</b>关键字
1. 页面或组件添加方法的时候前面加上<b>handle</b>关键字除了插件相关内容如mescroll
handleConfirmHour: () => {
if (totalHour.value <= 0) {
toast.info('至少起订N小时')

View File

@ -310,7 +310,7 @@
])
const current = ref<number>(0)
const html: string = '<p>这里是富文本内容,需要后台传递</p>'
const isGroupBuying: boolean = false // 是否是团购套餐
const isGroupBuying: boolean = true // 是否是团购套餐
const pay = ref<number>(1) // 支付方式
const payList = ref<Array<any>>([
{
@ -343,6 +343,7 @@
const endTimeValue = ref<string>('') // 结束时间
const now = new Date()
const minTimestamp = Date.now()
// 允许选择未来两个月的日期
const maxTimestamp = new Date(now.getFullYear(), now.getMonth() + 1, now.getDate()).getTime()
const startTimeLayout = ref<string>('')
@ -354,7 +355,12 @@
const showPayPopup = ref<boolean>(false) // 支付popup
onLoad(() => {
if (isGroupBuying) {
// TODO 如果是团购套餐则直接微信支付?
pay.value = 3
console.log("🚀 ~ pay.value:", pay.value)
}
})
const detail = {

View File

@ -27,7 +27,7 @@
<view>
<wd-swiper value-key="image" height="320rpx"
:indicator="{ type: 'dots-bar' }" :list="swiperList" v-model:current="current"
@click="room.handleClick" @change="room.onChange" mode="aspectFit">
@click="room.handleClick" mode="aspectFit">
</wd-swiper>
</view>
<view class="mt-38rpx flex justify-between">
@ -78,17 +78,17 @@
</view>
<view class="tabs">
<wd-tabs v-model="tab" swipeable slidable="always" @change="room.tabIndex" :lazy="false">
<wd-tab title="茶室预定">
<wd-tab title="茶室预定" v-if="storeType != 2">
<view class="content mx-30rpx mt-34rpx">
<mescroll-body @init="mescrollInit" @down="downCallback" @up="room.upCallback">
<roomList :is-reserve="true"></roomList>
<roomList :is-reserve="true" :store-type="storeType"></roomList>
</mescroll-body>
</view>
</wd-tab>
<wd-tab title="团购套餐">
<view class="content mx-30rpx mt-34rpx">
<mescroll-body @init="mescrollInit" @down="downCallback" @up="room.upCallback">
<roomList :is-group-buying="true" :is-reserve="false"></roomList>
<roomList :is-group-buying="true" :is-reserve="false" :store-type="storeType"></roomList>
</mescroll-body>
</view>
</wd-tab>
@ -132,6 +132,8 @@
const sheetMenu = ref([])
const showServicePopup = ref<boolean>(false)
const storeType = ref<number>(1) // 1直营 2加盟
/* mescroll */
const { mescrollInit, downCallback } = useMescroll(onPageScroll, onReachBottom) // 调用mescroll的hook
@ -267,21 +269,10 @@
console.log('Clicked item:', item)
},
onChange: (e: any) => {
// 设置 current.value 为当前轮播索引
current.value = e.current
},
handleToRecharge: () => {
uni.navigateTo({
url: '/bundle/store-recharge/store-recharge'
})
},
back: () => {
uni.navigateBack({
delta: 1,
})
}
}
</script>

View File

@ -35,8 +35,8 @@
</view>
</view>
<!-- TODO 这里要有规格判断 -->
<view v-if="spec" class="text-[#999] text-22rpx leading-30rpx mt-12rpx w-300rpx line-2">适用包间:绿茶、红茶、青茶、白茶、绿茶适用包间:绿茶、红茶、青茶、白茶、绿茶</view>
<view class="flex mb-52rpx" :class="`${spec ? 'mt-10rpx' : 'mt-55rpx'}`">
<view v-if="storeType != 2" class="text-[#999] text-22rpx leading-30rpx mt-12rpx w-300rpx line-2">适用包间:绿茶、红茶、青茶、白茶、绿茶适用包间:绿茶、红茶、青茶、白茶、绿茶</view>
<view class="flex mb-52rpx" :class="`${spec ? 'mt-10rpx' : 'mt-55rpx'}${storeType == 2 ? ' mt-54rpx' : ' mt-0rpx'}`">
<view class="mr-14rpx">
<price-format color="#FF5951" :first-size="34" :second-size="26"
:subscript-size="26" :price="23.02" weight="500"></price-format>
@ -68,6 +68,7 @@
<script lang="ts" setup name="roomList">
import { ref, watch, inject } from 'vue'
import priceFormat from '@/components/price-format.vue';
import store from '@/store';
let OSS = inject('OSS')
@ -87,6 +88,11 @@
isGroupBuying: {
type: Boolean,
default: false
},
// 店铺类型
storeType: {
type: Number,
default: 2 // 1直营 2加盟
}
})

View File

@ -105,6 +105,30 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/result/bill",
"type": "page",
"layout": "default",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/result/pay",
"type": "page",
"layout": "default",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/result/reserve",
"type": "page",
"layout": "default",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/search/search",
"type": "page",

19
src/pages/result/bill.vue Normal file
View File

@ -0,0 +1,19 @@
<route lang="jsonc" type="page">{
"layout": "default",
"style": {
"navigationBarTitleText": ""
}
}</route>
<script lang="ts" setup>
//
</script>
<template>
<view class="">
<!-- 此处是流水明细结果通知页面 -->
</view>
</template>
<style lang="scss" scoped>
//</style>

20
src/pages/result/pay.vue Normal file
View File

@ -0,0 +1,20 @@
<route lang="jsonc" type="page">{
"layout": "default",
"style": {
"navigationBarTitleText": ""
}
}</route>
<template>
<view class="">
<!-- 此处是支付结果通知页面 -->
</view>
</template>
<script lang="ts" setup>
//
</script>
<style lang="scss" scoped>
//</style>

View File

@ -0,0 +1,20 @@
<route lang="jsonc" type="page">{
"layout": "default",
"style": {
"navigationBarTitleText": ""
}
}</route>
<template>
<view class="">
<!-- 此处是预约结果通知页面 -->
</view>
</template>
<script lang="ts" setup>
//
</script>
<style lang="scss" scoped>
//</style>