From 2b58bac9acd1dd947edb793c328052f42480144a Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Thu, 8 Jan 2026 02:30:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=A5=E4=B8=8B4=E4=B8=AA?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=86=85=E5=AE=B9=E5=88=86=E4=BA=AB?= =?UTF-8?q?=201.=20=E9=A6=96=E9=A1=B5=202.=20=E5=8C=85=E9=97=B4=E5=88=97?= =?UTF-8?q?=E8=A1=A8=203.=20=E8=8C=B6=E8=89=BA=E5=B8=88=E5=88=97=E8=A1=A8?= =?UTF-8?q?=204.=20=E8=8C=B6=E8=89=BA=E5=B8=88=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 5 -- src/api/tea-room.ts | 11 +--- src/bundle/tea-room/room.vue | 19 +++++- src/bundle_b/pages/tea-specialist/detail.vue | 61 +++++++++++++++++--- src/bundle_b/pages/tea-specialist/list.vue | 21 ++++++- src/pages/index/index.vue | 7 +++ src/pages/login/login.vue | 6 ++ 7 files changed, 103 insertions(+), 27 deletions(-) diff --git a/src/App.vue b/src/App.vue index 48c0834..19c907f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,11 +27,6 @@ // uni.setStorageSync(LOCATION_CITY_KEY, LOCATION_DEFAULT_CITY) }) onShow((options) => { - // uni.showModal({ - // title: '提示', - // content: `当前请求域名是:${import.meta.env.VITE_SERVER_BASEURL}`, - // showCancel: false - // }) if (options?.path === 'bundle/order/tea-room/order-detail') { uni.setStorageSync('transferOrderParams', { orderId: options?.query?.orderId || '', diff --git a/src/api/tea-room.ts b/src/api/tea-room.ts index a4be1ec..7e532c9 100644 --- a/src/api/tea-room.ts +++ b/src/api/tea-room.ts @@ -99,9 +99,7 @@ export interface IRoomDetailParams { } export function getTeaRoomDetail(data: IRoomDetailParams) { - return http.Post('/api/teaStore/teaStoreDetails', - data - ) + return http.Post('/api/teaStore/teaStoreDetails', data) } /** @@ -142,12 +140,7 @@ export interface IStoreTeaRoomListParams { } export function getStoreTeaRoomList(data: IStoreTeaRoomListParams) { - return http.Post('/api/teaStore/teaStoreRoomLists', - data, - { - meta: { ignoreAuth: true } - } - ) + return http.Post('/api/teaStore/teaStoreRoomLists', data) } /** diff --git a/src/bundle/tea-room/room.vue b/src/bundle/tea-room/room.vue index 9b511bc..35025f4 100644 --- a/src/bundle/tea-room/room.vue +++ b/src/bundle/tea-room/room.vue @@ -187,6 +187,7 @@ const tagColors = ['#40AE36', '#F55726'] onLoad((args) => { + console.log("🚀 ~ args:", args) if (args.id) { teaRoomId.value = Number(args.id) storeType.value = Number(args.type) || StoreType.Direct @@ -198,6 +199,14 @@ Room.handleInit() } + // 如果是从分享进入的未登录的情况下 + uni.$on('refreshShareTeaRoomLists', (params) => { + uni.$off('refreshShareTeaRoomLists') + Room.handleInit() + list.value = [] + getMescroll().resetUpScroll() + }) + uni.$on('refreshTeaRoomDetail', () => { list.value = [] getMescroll().resetUpScroll() @@ -205,10 +214,18 @@ }) onUnload(() => { - console.log("🚀 ~ 卸载refreshTeaRoomDetail事件:") + uni.$off('refreshShareTeaRoomLists') uni.$off('refreshTeaRoomDetail') }) + // 茶室分享(仅页面右上角分享,无需按钮分享) + onShareAppMessage(() => { + return { + title: teaRoom.value.name || '茶室预约', + path: `/bundle/tea-room/room?id=${teaRoomId.value}&type=${storeType.value}`, + } + }) + const Room = { sheetMenuType: '', // 记录菜单类型 diff --git a/src/bundle_b/pages/tea-specialist/detail.vue b/src/bundle_b/pages/tea-specialist/detail.vue index 51156c4..98564aa 100644 --- a/src/bundle_b/pages/tea-specialist/detail.vue +++ b/src/bundle_b/pages/tea-specialist/detail.vue @@ -68,7 +68,15 @@ - + +