完善页面
This commit is contained in:
@ -9,7 +9,7 @@ export interface IPrePayParams {
|
||||
pay_way: number
|
||||
order_source: number
|
||||
order_type: number
|
||||
store_id: number
|
||||
store_id?: number
|
||||
}
|
||||
|
||||
export function prePay(data: IPrePayParams) {
|
||||
|
||||
@ -50,6 +50,7 @@ export interface IHomeTeaStoreListParams {
|
||||
search: string
|
||||
latitude: number
|
||||
longitude: number
|
||||
city_area_id: number
|
||||
}
|
||||
|
||||
export function getHomeTeaStoreList(data: IHomeTeaStoreListParams) {
|
||||
|
||||
@ -133,7 +133,10 @@ export interface ITeaSpecialistOrderDetailsResult {
|
||||
start_time: string
|
||||
end_time: string
|
||||
renew_price: number
|
||||
}
|
||||
},
|
||||
is_lockpwd?: number,
|
||||
gate_key?: string,
|
||||
room_key?: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -91,14 +91,14 @@
|
||||
uni.scanCode({
|
||||
success: async (res) => {
|
||||
console.log("🚀 ~ res:", res)
|
||||
if(res.rawData) {
|
||||
code.value = res.rawData
|
||||
if(res.result) {
|
||||
code.value = res.result
|
||||
uni.showLoading({ title: '兑换中...' })
|
||||
try {
|
||||
const params = {
|
||||
store_id: storeId.value,
|
||||
code: res.rawData.replace(/\s+/g, ''),
|
||||
type: 1
|
||||
code: res.result.trim(),
|
||||
type: 2
|
||||
}
|
||||
|
||||
await checkDouyinCoupon(params)
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<view class="content mx-30rpx mt-34rpx">
|
||||
<mescroll-body ref="mescrollItem" @init="mescrollInit" @down="downCallback" @up="OrderList.upCallback" :down="downOption" :up="upOption">
|
||||
<view class="mb-20rpx" v-for="(item, index) in list" :key="index">
|
||||
<combo-card :type="OrderSource.Combo" :order="item"></combo-card>
|
||||
<combo-card :type="OrderSource.Combo" :order="item" @refresh="OrderList.handleResetSearch"></combo-card>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
@ -79,6 +79,16 @@
|
||||
// tab
|
||||
const tab = ref<string>('all')
|
||||
|
||||
const canReset = ref<boolean>(false) // 避免onShow重复加载
|
||||
|
||||
onShow(() => {
|
||||
if (canReset.value) {
|
||||
list.value = []
|
||||
getMescroll().resetUpScroll();
|
||||
}
|
||||
canReset.value = true
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
uni.$on('refreshComboOrderList', () => {
|
||||
list.value = []
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<wd-navbar safeAreaInsetTop custom-class='!bg-[#F6F7F8]' :bordered="false" placeholder>
|
||||
<template #left>
|
||||
<view class="h-48rpx flex items-center">
|
||||
<view class="mt-4rpx" @click="router.navigateBack()">
|
||||
<view class="mt-4rpx" @click="OrderList.handleBack()">
|
||||
<wd-icon name="thin-arrow-left" size="30rpx"></wd-icon>
|
||||
</view>
|
||||
<view class="search-box">
|
||||
@ -129,6 +129,15 @@
|
||||
handleSearch: () => {
|
||||
list.value = []
|
||||
getMescroll().resetUpScroll();
|
||||
},
|
||||
|
||||
/**
|
||||
* 因为会从页面分享页跳转,但是返回时页面没有栈,所以需要switch方法跳转
|
||||
*/
|
||||
handleBack: () => {
|
||||
router.navigateBack().catch(err => {
|
||||
router.switchTab('/pages/my/my')
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<!-- 使用 type="home" 属性设置首页,其他页面不需要设置,默认为page -->
|
||||
<route lang="jsonc" type="page">{
|
||||
"needLogin": true,
|
||||
"layout": "tabbar",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<!-- 使用 type="home" 属性设置首页,其他页面不需要设置,默认为page -->
|
||||
<route lang="jsonc" type="page">{
|
||||
"needLogin": true,
|
||||
"layout": "tabbar",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
|
||||
@ -160,7 +160,7 @@
|
||||
</template>
|
||||
</view>
|
||||
<view class="mt-4rpx">
|
||||
<wd-icon name="chevron-right" size="22px" color="#909399"></wd-icon>
|
||||
<wd-icon name="chevron-right" size="32rpx" color="#909399"></wd-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -181,7 +181,7 @@
|
||||
</template>
|
||||
</view>
|
||||
<view class="mt-4rpx">
|
||||
<wd-icon name="chevron-right" size="22px" color="#909399"></wd-icon>
|
||||
<wd-icon name="chevron-right" size="32rpx" color="#909399"></wd-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -59,11 +59,11 @@
|
||||
</view>
|
||||
<view>
|
||||
<view class="text-30rpx leading-42rpx text-[#303133]">茶室预定</view>
|
||||
<view class="text-28rpx leading-30rpx text-[#606266] mt-14rpx">预定茶室享受八折优惠</view>
|
||||
<view class="text-28rpx leading-30rpx text-[#606266] mt-14rpx">预定茶室享受九折优惠</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center mt-74rpx">
|
||||
<!-- <view class="flex items-center mt-74rpx">
|
||||
<view class="mr-26rpx">
|
||||
<wd-img width="88rpx" height="88rpx" :src="`${OSS}images/vip_benefits/vip_benefits_image4.png`"></wd-img>
|
||||
</view>
|
||||
@ -97,12 +97,12 @@
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] mt-14rpx">✓.尊享20个VIP名额(价值7980元)</view>
|
||||
<view class="text-28rpx leading-42rpx text-[#606266] mt-14rpx">✓.下级VIP消费金额5%永久提成,构建持续收益管道</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn text-center leading-108rpx mx-auto mt-116rpx" @click="benefits.handledToBuyVip" v-if="currentVipType === 'normal'">
|
||||
立即成为会员 ¥499/年
|
||||
立即成为会员 ¥9.9/年
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
<view class="mt-24rpx mx-30rpx">
|
||||
<view class="text-center">
|
||||
<view class="text-48rpx leading-66rpx text-[#303133]">¥499.00</view>
|
||||
<view class="text-48rpx leading-66rpx text-[#303133]">9.9</view>
|
||||
<view class="mt-20rpx text-28rpx leading-40rpx text-[#9CA3AF]">开通会员,解锁更多精彩内容!</view>
|
||||
</view>
|
||||
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
<template>
|
||||
<wd-navbar safeAreaInsetTop :bordered="false" :custom-class="customClass" :fixed="fixed" :placeholder="fixed" :zIndex="zIndex">
|
||||
<template #left>
|
||||
<view class="h-48rpx flex items-center" @click="Navbar.back">
|
||||
<view class="mt-4rpx">
|
||||
<view class="h-48rpx flex items-center" >
|
||||
<view class="mt-4rpx" v-if="!hideLeftIcon" @click="Navbar.back">
|
||||
<wd-icon name="thin-arrow-left" size="30rpx" :color="iconLeftColor" ></wd-icon>
|
||||
</view>
|
||||
<view class="text-[#303133] text-36rpx ml-24rpx leading-48rpx" v-if="!layoutLeft">{{ title }}</view>
|
||||
@ -73,6 +73,11 @@
|
||||
iconLeftColor: {
|
||||
type: String,
|
||||
default: '#121212'
|
||||
},
|
||||
|
||||
hideLeftIcon: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -261,6 +261,8 @@
|
||||
// 取消订单弹窗
|
||||
const message = useMessage('wd-message-box-slot')
|
||||
|
||||
const emit = defineEmits(['refresh'])
|
||||
|
||||
const ComboCard = {
|
||||
/**
|
||||
* 跳转到对对应室的详情页
|
||||
@ -291,8 +293,9 @@
|
||||
case OrderSource.Combo:
|
||||
orderType = PayOrderType.ComboRefund
|
||||
let res = await handleRefundOrderHooks(order.id, orderType)
|
||||
console.log("🚀 ~ res:", res)
|
||||
if (res) {
|
||||
uni.$emit('refreshComboOrderList')
|
||||
emit('refresh')
|
||||
}
|
||||
// TODO 这里调用删除直营订单的接口
|
||||
break;
|
||||
|
||||
@ -96,14 +96,15 @@
|
||||
*/
|
||||
handleChooseCity: (item: any) => {
|
||||
const params = {
|
||||
latitude: item.latitude,
|
||||
longitude: item.longitude,
|
||||
// latitude: item.latitude,
|
||||
// longitude: item.longitude,
|
||||
id: item.id,
|
||||
city: item.name
|
||||
}
|
||||
uni.$emit('locationUpdate', params)
|
||||
|
||||
uni.setStorageSync(LOCATION_LAT_KEY, item.latitude)
|
||||
uni.setStorageSync(LOCATION_LNG_KEY, item.longitude)
|
||||
// uni.setStorageSync(LOCATION_LAT_KEY, item.latitude)
|
||||
// uni.setStorageSync(LOCATION_LNG_KEY, item.longitude)
|
||||
uni.setStorageSync(LOCATION_CITY_KEY, item.name)
|
||||
router.navigateBack()
|
||||
}
|
||||
|
||||
@ -136,6 +136,7 @@
|
||||
const city = ref<string>('')
|
||||
const keywords = ref<string>('')
|
||||
const list = ref<Array<any>>([])
|
||||
const city_id = ref<number>(0)
|
||||
|
||||
let lastLocation = { lat: 0, lng: 0 }
|
||||
onShow(async () => {
|
||||
@ -152,7 +153,6 @@
|
||||
lastLocation.lat = location.lat
|
||||
lastLocation.lng = location.lng
|
||||
|
||||
console.log("🚀 ~ city.value:", 'xxxxx', city.value)
|
||||
Index.handleResetSearch()
|
||||
}
|
||||
}
|
||||
@ -172,6 +172,7 @@
|
||||
city.value = location.city
|
||||
latitude.value = location.latitude
|
||||
longitude.value = location.longitude
|
||||
console.log("🚀 ~ latitude.value:", latitude.value, longitude.value)
|
||||
|
||||
Index.handleResetSearch()
|
||||
})
|
||||
@ -192,10 +193,11 @@
|
||||
latitude: latitude.value,
|
||||
longitude: longitude.value,
|
||||
search: keywords.value,
|
||||
user_id: userId
|
||||
user_id: userId,
|
||||
city_area_id: city_id.value || 0
|
||||
}
|
||||
uni.showLoading({ title: '加载中...' })
|
||||
|
||||
uni.showLoading({ title: '加载中...' })
|
||||
try {
|
||||
getHomeTeaStoreList(filter).then( res => {
|
||||
uni.hideLoading()
|
||||
@ -227,12 +229,11 @@
|
||||
*/
|
||||
handleToCity: () => {
|
||||
uni.$on('locationUpdate', params => {
|
||||
console.log("🚀 ~ params:", params)
|
||||
uni.$off('locationUpdate')
|
||||
|
||||
city.value = params.city
|
||||
latitude.value = params.latitude
|
||||
longitude.value = params.longitude
|
||||
city_id.value = params.id
|
||||
// latitude.value = params.latitude
|
||||
// longitude.value = params.longitude
|
||||
Index.handleResetSearch()
|
||||
})
|
||||
router.navigateTo(`/pages/city/city?lat=${latitude.value}&lng=${longitude.value}`)
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
</view>
|
||||
<view class="mt-124rpx mx-60rpx box-border">
|
||||
<wd-button custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border" @click="Login.handleLogin">立即登录</wd-button>
|
||||
<!-- <wd-button custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border" @click="Login.handleMobileLogin">测试-账号登录</wd-button> -->
|
||||
<!-- <wd-button custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border" @click="Login.handleMobileLogin">测试-账号登录</wd-button> -->
|
||||
<!-- <wd-button open-type="getUserInfo" @getuserinfo="Login.handleWxLogin" custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border">立即登录</wd-button> -->
|
||||
<!-- <view class="text-30rpx font-400 text-[#303133] leading-42rpx text-center mt-32rpx">其它手机号登录</view> -->
|
||||
</view>
|
||||
@ -131,14 +131,13 @@
|
||||
}
|
||||
},
|
||||
|
||||
// 手机登录
|
||||
/**
|
||||
* 测试-账号登录
|
||||
*/
|
||||
// handleMobileLogin: async () => {
|
||||
// const userStore = useUserStore()
|
||||
// console.log("🚀 ~ userStore:", userStore)
|
||||
// const res = await userStore.mobileLogin('18868040087', 1, 2)
|
||||
// const res = await userStore.mobileLogin('15005837859', 1, 2)
|
||||
// if (res) {
|
||||
// uni.setStorageSync('latitude', '30.74744')
|
||||
// uni.setStorageSync('longitude', '120.78483')
|
||||
|
||||
@ -365,7 +365,7 @@
|
||||
|
||||
// 获取会员过期时间
|
||||
getUserMember().then(res => {
|
||||
expireTime.value = res.data.expiration_time
|
||||
expireTime.value = res?.data?.expiration_time
|
||||
})
|
||||
},
|
||||
|
||||
@ -394,14 +394,14 @@
|
||||
handleShowService: () => {
|
||||
showServiceMobile.value = true
|
||||
sheetMenu.value = [
|
||||
{ name: '400-800-8888' },
|
||||
{ name: '13000000000' },
|
||||
]
|
||||
},
|
||||
|
||||
// 选择菜单-拨打客服电话
|
||||
handleSelectMenu: (item: any) => {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: item.item.name
|
||||
phoneNumber: item.item.name
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@ -42,7 +42,14 @@
|
||||
// 是否是团购套餐
|
||||
const isGroupBuying = ref<number>(0)
|
||||
|
||||
const storeId = ref<number>(0) // 店铺ID
|
||||
const storeType = ref<number>(0) // 1. 直营 2. 加盟
|
||||
|
||||
onLoad((args) => {
|
||||
storeId.value = Number(args.storeId) || 0
|
||||
storeType.value = Number(args.storeType) || 0
|
||||
console.log("🚀 ~ 456 storeId:", storeId.value, storeType.value)
|
||||
|
||||
type.value = args.type || ''
|
||||
isGroupBuying.value = Number(args.isGroupBuying) || 0
|
||||
})
|
||||
@ -53,7 +60,7 @@
|
||||
*/
|
||||
handleRoomSeeOrder: () => {
|
||||
if (isGroupBuying.value) {
|
||||
router.navigateTo('/bundle/order/platform/order-list')
|
||||
router.reLaunch( `/bundle/tea-room/room?id=${storeId.value}&type=${storeType.value}`)
|
||||
} else {
|
||||
router.navigateTo('/bundle/order/tea-room/order-list')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user