864e02a7 by zhangmeng

餐饮

1 parent 1c064931
......@@ -6,98 +6,158 @@
</div>
<div class="box">
<div class="searchBar">
<el-input :placeholder="language==0?'请输入关键字搜索':'Search'" v-model="query.name" class="no-border">
</el-input>
<el-button size="large" type="primary" class="btn-lineG" icon="search" @click="getList">{{ language==0?'搜索':'Search' }}</el-button>
<el-input v-model="query.name" :placeholder="language==0?'请输入关键字搜索':'Search'" class="no-border" />
<el-button class="btn-lineG" icon="search" size="large" type="primary" @click="getList">
{{ language == 0 ? '搜索' : 'Search' }}
</el-button>
</div>
</div>
<div class="box">
<el-row :gutter="20">
<el-col :span="12" v-for="(h,index) in list" class="mb20">
<el-col v-for="(h,index) in list" :span="12" class="mb20">
<el-card>
<el-row class="hotel" align="middle" :gutter="20">
<el-row :gutter="20" align="middle" class="hotel">
<el-col :span="12">
<el-image class="w100 as16_9" fit="cover" :src="fillImgUrl(h.photos?.split(',')[0])"/>
<el-image :src="fillImgUrl(h.photos?.split(',')[0])" class="w100 as16_9" fit="cover" />
</el-col>
<el-col :span="12">
<h3 class="esp m0">{{h.name}}</h3>
<h3 class="esp m0">{{ h.name }}</h3>
<p class="esp addr">
<el-icon color="#929AA0"><LocationFilled /></el-icon>
{{h.addName}}
<el-icon color="#929AA0">
<LocationFilled />
</el-icon>
{{ h.addName }}
</p>
<div class="price mb10" v-if="language==0"><i class="text-warning">¥</i><span class="text-warning">{{ h.price || 0 }}</span></div>
<div class="price mb10" v-else><i class="text-warning"></i><span class="text-warning">{{ h.price || 0 }}</span>start</div>
<el-button class="btn-lineG" round type="primary" size="large" @click="goDetail(h)">{{ language==0?'立即预约':'Select' }}</el-button>
<div v-if="language==0" class="price mb10"><i class="text-warning">¥</i><span
class="text-warning"
>{{ h.price || 0 }}</span>
</div>
<div v-else class="price mb10"><i class="text-warning"></i><span class="text-warning">{{
h.price || 0
}}</span>start
</div>
<el-button class="btn-lineG" round size="large" type="primary" @click="goDetail(h)">
{{ language == 0 ? '立即预约' : 'Select' }}
</el-button>
</el-col>
</el-row>
</el-card>
</el-col>
</el-row>
</div>
</div>
</template>
<script setup>
import {onMounted} from "@vue/runtime-core"
import * as booking from "@/apiPc/booking"
import {useRoute, useRouter} from "vue-router"
import { onMounted } from '@vue/runtime-core'
import * as booking from '@/apiPc/booking'
import { useRoute, useRouter } from 'vue-router'
import { getActivityRestaurantList, getBaseInfoByActiveId } from '@/apiPc/booking'
import { useStorage } from '@vueuse/core/index'
import { getCurrentInstance, ref } from 'vue'
const { proxy } = getCurrentInstance()
const route = useRoute()
const router = useRouter()
const language = useStorage('language', 0)
import {getActivityRestaurantList} from "@/apiPc/booking";
import {useStorage} from "@vueuse/core/index";
const query = ref({
name:''
name: ''
})
const list = ref([''])
onMounted(()=>{
onMounted(() => {
getList()
})
function getList() {
query.value.activityId = route.params.cptId
getActivityRestaurantList(query.value).then(res=>{
getActivityRestaurantList(query.value).then(res => {
list.value = res.rows
})
}
function goDetail(n) {
router.push({
name:'dinnerDetail',
params:{
id:n.id,
async function goDetail(n) {
const { data } = await getBaseInfoByActiveId(route.params.cptId)
if (data.isJdView == 0) {
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.')
}
await router.push({
name: 'dinnerDetail',
params: {
id: n.id
},
query:{
detail:encodeURIComponent(JSON.stringify(n))
query: {
detail: encodeURIComponent(JSON.stringify(n))
}
})
}
</script>
<style scoped lang="scss">
.hotel{}
.banner{height: 140px;background-size: cover;text-align: center;
background: url("@/assets/booking/cy_bg.png") center;display: flex;align-items: center;
<style lang="scss" scoped>
.hotel {
}
.banner {
height: 140px;
background-size: cover;
text-align: center;
background: url("@/assets/booking/cy_bg.png") center;
display: flex;
align-items: center;
justify-content: center;
img{display: block;margin:-30px auto 0;width: auto;}
img {
display: block;
margin: -30px auto 0;
width: auto;
}
}
.searchBar {
position: relative;
top: -30px;
background: #FFFFFF;
display: flex;
padding: 20px;
border-radius: 10px;
}
.searchBar{position: relative;top: -30px;
background: #FFFFFF;display: flex;padding: 20px;
border-radius: 10px;}
.no-border{border: none;background: #F5F7F9;
:deep(.el-input__wrapper){border: none;box-shadow: none;background: #F5F7F9;}
.no-border {
border: none;
background: #F5F7F9;
:deep(.el-input__wrapper) {
border: none;
box-shadow: none;
background: #F5F7F9;
}
}
.addr{font-weight: 400;
.addr {
font-weight: 400;
font-size: 16px;
color: #929AA0;}
.price{font-weight: 400;
color: #929AA0;
}
.price {
font-weight: 400;
font-size: 18px;
color: #929AA0;
i{font-size: 24px;font-style: normal;}
span{font-weight: 600;font-size: 36px;font-family: "DIN Alternate";margin:0 6px;}
i {
font-size: 24px;
font-style: normal;
}
span {
font-weight: 600;
font-size: 36px;
font-family: "DIN Alternate";
margin: 0 6px;
}
}
</style>
......
......@@ -133,7 +133,8 @@
</div>
<div class="text-right">
<el-button
v-if="(b.orderType == 0||b.orderType == 5||b.orderType==1)&&b.viewStatus!=0" class="mb10" plain round
v-if="(b.orderType == 0||b.orderType == 5||b.orderType==1||b.orderType==2)&&b.viewStatus!=0"
class="mb10" plain round
size="small" type="success"
@click="Rebook(b)"
>
......@@ -241,6 +242,12 @@ function Rebook(row) {
})
}
if (row.orderType == 2) {
return router.push({
path: `/booking/dinner/${row.activeId}`
})
}
if (row.orderType == 0) {
router.push({
name: 'hotelDetail',
......@@ -252,7 +259,8 @@ function Rebook(row) {
id: row.extId
}
})
} else {
}
if (row.orderType == 5) {
router.push({
name: 'ticket',
params: {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!