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 @@ - + +