diff --git a/src/bundle/components/DouYinExcharge.vue b/src/bundle/components/DouYinExcharge.vue index 45afa04..48d20f0 100644 --- a/src/bundle/components/DouYinExcharge.vue +++ b/src/bundle/components/DouYinExcharge.vue @@ -54,7 +54,7 @@ diff --git a/src/bundle/tea-room/room.vue b/src/bundle/tea-room/room.vue index 7d82bff..062119d 100644 --- a/src/bundle/tea-room/room.vue +++ b/src/bundle/tea-room/room.vue @@ -28,9 +28,9 @@ --> - + @@ -39,7 +39,7 @@ + :indicator="{ type: 'dots-bar' }" :list="swiperList" v-model:current="current" mode="aspectFit" @click="Room.handlePreviewImage"> @@ -122,7 +122,7 @@ - + @@ -152,7 +152,7 @@ import type { ITeaRoomDetailResult } from '@/api/types/tea-room' import type {IUserInfoVo } from '@/api/types/login' import { useUserStore } from '@/store' - import { router } from '@/utils/tools' + import { router, previewImage } from '@/utils/tools' import { StoreType } from '@/utils/tea' import DouYinExcharge from '@/bundle/components/DouYinExcharge.vue' @@ -401,6 +401,13 @@ router.navigateBack().catch(err => { router.switchTab('/pages/index/index') }) + }, + + /** + * 预览图片 + */ + handlePreviewImage: (e: {index: number, item: any}) => { + previewImage(swiperList.value[e.index], swiperList.value) } } diff --git a/src/bundle_b/pages/tea-specialist/detail.vue b/src/bundle_b/pages/tea-specialist/detail.vue index 66d008c..c8c78ea 100644 --- a/src/bundle_b/pages/tea-specialist/detail.vue +++ b/src/bundle_b/pages/tea-specialist/detail.vue @@ -99,7 +99,7 @@ + :indicator="{ type: 'dots-bar' }" :list="info.image_arr" mode="aspectFit" @click="Detail.handlePreviewImage"> @@ -362,7 +362,7 @@ import type { ITeaSpecialistRewardAmountsResult } from '@/api/types/tea' import { toast } from '@/utils/toast' import { TeaSpecialistLevelValue } from '@/utils/teaSpecialist' - import { router } from '@/utils/tools' + import { router, previewImage } from '@/utils/tools' import { useUserStore } from '@/store' import type {IUserInfoVo } from '@/api/types/login' @@ -565,6 +565,13 @@ router.navigateBack().catch(err => { router.switchTab('/pages/index/index') }) + }, + + /** + * 预览图片 + */ + handlePreviewImage: (e: {index: number, item: any}) => { + previewImage(info.value.image_arr[e.index], info.value.image_arr) } } diff --git a/src/components/reserve/RoomList.vue b/src/components/reserve/RoomList.vue index f9bd5c4..c5f0dc5 100644 --- a/src/components/reserve/RoomList.vue +++ b/src/components/reserve/RoomList.vue @@ -22,7 +22,7 @@ - + /小时 @@ -53,20 +53,17 @@ 预定 + 维护中 - - + + {{ item.people_number }} - + {{ item.title }} @@ -74,7 +71,7 @@ {{ item.hour }}小时 - {{ item.introduce }} + 适用包间:{{ item.room_name }} - 已售 {{ item.sold > 10 ? '10+' : item.sold }} - - 抢购 + 已售 {{ item.sold + '+' }} + + 抢购 diff --git a/src/utils/tools.ts b/src/utils/tools.ts index 841d36d..ba16c20 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -167,3 +167,12 @@ export function getCurrentDate() { return `${year}-${month}-${day}`; } +/** + * 预览图片 + */ +export function previewImage(current: string, urls: string[]) { + uni.previewImage({ + current, + urls + }) +} \ No newline at end of file