餐饮
Showing
2 changed files
with
112 additions
and
44 deletions
| ... | @@ -6,29 +6,40 @@ | ... | @@ -6,29 +6,40 @@ |
| 6 | </div> | 6 | </div> |
| 7 | <div class="box"> | 7 | <div class="box"> |
| 8 | <div class="searchBar"> | 8 | <div class="searchBar"> |
| 9 | <el-input :placeholder="language==0?'请输入关键字搜索':'Search'" v-model="query.name" class="no-border"> | 9 | <el-input v-model="query.name" :placeholder="language==0?'请输入关键字搜索':'Search'" class="no-border" /> |
| 10 | </el-input> | 10 | <el-button class="btn-lineG" icon="search" size="large" type="primary" @click="getList"> |
| 11 | <el-button size="large" type="primary" class="btn-lineG" icon="search" @click="getList">{{ language==0?'搜索':'Search' }}</el-button> | 11 | {{ language == 0 ? '搜索' : 'Search' }} |
| 12 | </el-button> | ||
| 12 | </div> | 13 | </div> |
| 13 | </div> | 14 | </div> |
| 14 | 15 | ||
| 15 | <div class="box"> | 16 | <div class="box"> |
| 16 | <el-row :gutter="20"> | 17 | <el-row :gutter="20"> |
| 17 | <el-col :span="12" v-for="(h,index) in list" class="mb20"> | 18 | <el-col v-for="(h,index) in list" :span="12" class="mb20"> |
| 18 | <el-card> | 19 | <el-card> |
| 19 | <el-row class="hotel" align="middle" :gutter="20"> | 20 | <el-row :gutter="20" align="middle" class="hotel"> |
| 20 | <el-col :span="12"> | 21 | <el-col :span="12"> |
| 21 | <el-image class="w100 as16_9" fit="cover" :src="fillImgUrl(h.photos?.split(',')[0])"/> | 22 | <el-image :src="fillImgUrl(h.photos?.split(',')[0])" class="w100 as16_9" fit="cover" /> |
| 22 | </el-col> | 23 | </el-col> |
| 23 | <el-col :span="12"> | 24 | <el-col :span="12"> |
| 24 | <h3 class="esp m0">{{h.name}}</h3> | 25 | <h3 class="esp m0">{{ h.name }}</h3> |
| 25 | <p class="esp addr"> | 26 | <p class="esp addr"> |
| 26 | <el-icon color="#929AA0"><LocationFilled /></el-icon> | 27 | <el-icon color="#929AA0"> |
| 27 | {{h.addName}} | 28 | <LocationFilled /> |
| 29 | </el-icon> | ||
| 30 | {{ h.addName }} | ||
| 28 | </p> | 31 | </p> |
| 29 | <div class="price mb10" v-if="language==0"><i class="text-warning">¥</i><span class="text-warning">{{ h.price || 0 }}</span>起</div> | 32 | <div v-if="language==0" class="price mb10"><i class="text-warning">¥</i><span |
| 30 | <div class="price mb10" v-else><i class="text-warning">€</i><span class="text-warning">{{ h.price || 0 }}</span>start</div> | 33 | class="text-warning" |
| 31 | <el-button class="btn-lineG" round type="primary" size="large" @click="goDetail(h)">{{ language==0?'立即预约':'Select' }} ⇀</el-button> | 34 | >{{ h.price || 0 }}</span>起 |
| 35 | </div> | ||
| 36 | <div v-else class="price mb10"><i class="text-warning">€</i><span class="text-warning">{{ | ||
| 37 | h.price || 0 | ||
| 38 | }}</span>start | ||
| 39 | </div> | ||
| 40 | <el-button class="btn-lineG" round size="large" type="primary" @click="goDetail(h)"> | ||
| 41 | {{ language == 0 ? '立即预约' : 'Select' }} ⇀ | ||
| 42 | </el-button> | ||
| 32 | 43 | ||
| 33 | </el-col> | 44 | </el-col> |
| 34 | </el-row> | 45 | </el-row> |
| ... | @@ -42,62 +53,111 @@ | ... | @@ -42,62 +53,111 @@ |
| 42 | </template> | 53 | </template> |
| 43 | 54 | ||
| 44 | <script setup> | 55 | <script setup> |
| 45 | import {onMounted} from "@vue/runtime-core" | 56 | import { onMounted } from '@vue/runtime-core' |
| 46 | import * as booking from "@/apiPc/booking" | 57 | import * as booking from '@/apiPc/booking' |
| 47 | import {useRoute, useRouter} from "vue-router" | 58 | import { useRoute, useRouter } from 'vue-router' |
| 59 | import { getActivityRestaurantList, getBaseInfoByActiveId } from '@/apiPc/booking' | ||
| 60 | import { useStorage } from '@vueuse/core/index' | ||
| 61 | import { getCurrentInstance, ref } from 'vue' | ||
| 62 | |||
| 63 | const { proxy } = getCurrentInstance() | ||
| 48 | const route = useRoute() | 64 | const route = useRoute() |
| 49 | const router = useRouter() | 65 | const router = useRouter() |
| 50 | const language = useStorage('language', 0) | 66 | const language = useStorage('language', 0) |
| 51 | import {getActivityRestaurantList} from "@/apiPc/booking"; | ||
| 52 | import {useStorage} from "@vueuse/core/index"; | ||
| 53 | const query = ref({ | 67 | const query = ref({ |
| 54 | name:'' | 68 | name: '' |
| 55 | }) | 69 | }) |
| 56 | const list = ref(['']) | 70 | const list = ref(['']) |
| 57 | onMounted(()=>{ | 71 | onMounted(() => { |
| 58 | getList() | 72 | getList() |
| 59 | }) | 73 | }) |
| 60 | 74 | ||
| 61 | function getList() { | 75 | function getList() { |
| 62 | query.value.activityId = route.params.cptId | 76 | query.value.activityId = route.params.cptId |
| 63 | getActivityRestaurantList(query.value).then(res=>{ | 77 | getActivityRestaurantList(query.value).then(res => { |
| 64 | list.value = res.rows | 78 | list.value = res.rows |
| 65 | }) | 79 | }) |
| 66 | } | 80 | } |
| 67 | function goDetail(n) { | 81 | |
| 68 | router.push({ | 82 | async function goDetail(n) { |
| 69 | name:'dinnerDetail', | 83 | const { data } = await getBaseInfoByActiveId(route.params.cptId) |
| 70 | params:{ | 84 | if (data.isJdView == 0) { |
| 71 | id:n.id, | 85 | return proxy.$modal.confirm(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.') |
| 86 | } | ||
| 87 | await router.push({ | ||
| 88 | name: 'dinnerDetail', | ||
| 89 | params: { | ||
| 90 | id: n.id | ||
| 72 | }, | 91 | }, |
| 73 | query:{ | 92 | query: { |
| 74 | detail:encodeURIComponent(JSON.stringify(n)) | 93 | detail: encodeURIComponent(JSON.stringify(n)) |
| 75 | } | 94 | } |
| 76 | 95 | ||
| 77 | }) | 96 | }) |
| 78 | } | 97 | } |
| 79 | </script> | 98 | </script> |
| 80 | 99 | ||
| 81 | <style scoped lang="scss"> | 100 | <style lang="scss" scoped> |
| 82 | .hotel{} | 101 | .hotel { |
| 83 | .banner{height: 140px;background-size: cover;text-align: center; | 102 | } |
| 84 | background: url("@/assets/booking/cy_bg.png") center;display: flex;align-items: center; | 103 | |
| 104 | .banner { | ||
| 105 | height: 140px; | ||
| 106 | background-size: cover; | ||
| 107 | text-align: center; | ||
| 108 | background: url("@/assets/booking/cy_bg.png") center; | ||
| 109 | display: flex; | ||
| 110 | align-items: center; | ||
| 85 | justify-content: center; | 111 | justify-content: center; |
| 86 | img{display: block;margin:-30px auto 0;width: auto;} | 112 | |
| 113 | img { | ||
| 114 | display: block; | ||
| 115 | margin: -30px auto 0; | ||
| 116 | width: auto; | ||
| 117 | } | ||
| 118 | } | ||
| 119 | |||
| 120 | .searchBar { | ||
| 121 | position: relative; | ||
| 122 | top: -30px; | ||
| 123 | background: #FFFFFF; | ||
| 124 | display: flex; | ||
| 125 | padding: 20px; | ||
| 126 | border-radius: 10px; | ||
| 87 | } | 127 | } |
| 88 | .searchBar{position: relative;top: -30px; | 128 | |
| 89 | background: #FFFFFF;display: flex;padding: 20px; | 129 | .no-border { |
| 90 | border-radius: 10px;} | 130 | border: none; |
| 91 | .no-border{border: none;background: #F5F7F9; | 131 | background: #F5F7F9; |
| 92 | :deep(.el-input__wrapper){border: none;box-shadow: none;background: #F5F7F9;} | 132 | |
| 133 | :deep(.el-input__wrapper) { | ||
| 134 | border: none; | ||
| 135 | box-shadow: none; | ||
| 136 | background: #F5F7F9; | ||
| 137 | } | ||
| 93 | } | 138 | } |
| 94 | .addr{font-weight: 400; | 139 | |
| 140 | .addr { | ||
| 141 | font-weight: 400; | ||
| 95 | font-size: 16px; | 142 | font-size: 16px; |
| 96 | color: #929AA0;} | 143 | color: #929AA0; |
| 97 | .price{font-weight: 400; | 144 | } |
| 145 | |||
| 146 | .price { | ||
| 147 | font-weight: 400; | ||
| 98 | font-size: 18px; | 148 | font-size: 18px; |
| 99 | color: #929AA0; | 149 | color: #929AA0; |
| 100 | i{font-size: 24px;font-style: normal;} | 150 | |
| 101 | span{font-weight: 600;font-size: 36px;font-family: "DIN Alternate";margin:0 6px;} | 151 | i { |
| 152 | font-size: 24px; | ||
| 153 | font-style: normal; | ||
| 154 | } | ||
| 155 | |||
| 156 | span { | ||
| 157 | font-weight: 600; | ||
| 158 | font-size: 36px; | ||
| 159 | font-family: "DIN Alternate"; | ||
| 160 | margin: 0 6px; | ||
| 161 | } | ||
| 102 | } | 162 | } |
| 103 | </style> | 163 | </style> | ... | ... |
| ... | @@ -133,7 +133,8 @@ | ... | @@ -133,7 +133,8 @@ |
| 133 | </div> | 133 | </div> |
| 134 | <div class="text-right"> | 134 | <div class="text-right"> |
| 135 | <el-button | 135 | <el-button |
| 136 | v-if="(b.orderType == 0||b.orderType == 5||b.orderType==1)&&b.viewStatus!=0" class="mb10" plain round | 136 | v-if="(b.orderType == 0||b.orderType == 5||b.orderType==1||b.orderType==2)&&b.viewStatus!=0" |
| 137 | class="mb10" plain round | ||
| 137 | size="small" type="success" | 138 | size="small" type="success" |
| 138 | @click="Rebook(b)" | 139 | @click="Rebook(b)" |
| 139 | > | 140 | > |
| ... | @@ -241,6 +242,12 @@ function Rebook(row) { | ... | @@ -241,6 +242,12 @@ function Rebook(row) { |
| 241 | }) | 242 | }) |
| 242 | } | 243 | } |
| 243 | 244 | ||
| 245 | if (row.orderType == 2) { | ||
| 246 | return router.push({ | ||
| 247 | path: `/booking/dinner/${row.activeId}` | ||
| 248 | }) | ||
| 249 | } | ||
| 250 | |||
| 244 | if (row.orderType == 0) { | 251 | if (row.orderType == 0) { |
| 245 | router.push({ | 252 | router.push({ |
| 246 | name: 'hotelDetail', | 253 | name: 'hotelDetail', |
| ... | @@ -252,7 +259,8 @@ function Rebook(row) { | ... | @@ -252,7 +259,8 @@ function Rebook(row) { |
| 252 | id: row.extId | 259 | id: row.extId |
| 253 | } | 260 | } |
| 254 | }) | 261 | }) |
| 255 | } else { | 262 | } |
| 263 | if (row.orderType == 5) { | ||
| 256 | router.push({ | 264 | router.push({ |
| 257 | name: 'ticket', | 265 | name: 'ticket', |
| 258 | params: { | 266 | params: { | ... | ... |
-
Please register or sign in to post a comment