|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="hotel">
|
|
<div class="hotel">
|
|
|
|
|
+ <navcustom :config="config" class="navcustom" v-if="customShow"/>
|
|
|
<div class="head_img" @click="onpreview">
|
|
<div class="head_img" @click="onpreview">
|
|
|
<image :src="detail.mainImage" mode="aspectFill" class="bg_img" />
|
|
<image :src="detail.mainImage" mode="aspectFill" class="bg_img" />
|
|
|
</div>
|
|
</div>
|
|
@@ -8,7 +9,7 @@
|
|
|
<div class="h_address flex_r flex_jb flex_ac">
|
|
<div class="h_address flex_r flex_jb flex_ac">
|
|
|
<div class="hil">
|
|
<div class="hil">
|
|
|
<div class="h_tags">
|
|
<div class="h_tags">
|
|
|
- <span>{{ detail.avgScore }}分</span>
|
|
|
|
|
|
|
+ <span>{{ detail.avgScore || 0 }}分</span>
|
|
|
<span>{{ hotelStarF(detail.hotelStar) }}</span>
|
|
<span>{{ hotelStarF(detail.hotelStar) }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="address">{{ detail.address }}</div>
|
|
<div class="address">{{ detail.address }}</div>
|
|
@@ -62,23 +63,35 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 图片查看组件 -->
|
|
<!-- 图片查看组件 -->
|
|
|
- <preview ref="previewimg" />
|
|
|
|
|
|
|
+ <preview ref="previewimg" @close="previewclose"/>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import preview from "@/pagesB/components/swiper-preview/index.vue";
|
|
import preview from "@/pagesB/components/swiper-preview/index.vue";
|
|
|
|
|
+import navcustom from "@/components/navigationCustom/navigation-custom.vue"
|
|
|
import { setCache, getCache } from "@/utils/storage.js";
|
|
import { setCache, getCache } from "@/utils/storage.js";
|
|
|
import { post } from "@/request/api.js";
|
|
import { post } from "@/request/api.js";
|
|
|
export default {
|
|
export default {
|
|
|
name: "hotel",
|
|
name: "hotel",
|
|
|
props: {},
|
|
props: {},
|
|
|
- components: { preview },
|
|
|
|
|
|
|
+ components: { preview, navcustom },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
query: {},
|
|
query: {},
|
|
|
hotelID: "",
|
|
hotelID: "",
|
|
|
detail: {},
|
|
detail: {},
|
|
|
RatePlan: [],
|
|
RatePlan: [],
|
|
|
|
|
+ config: {
|
|
|
|
|
+ title: "",
|
|
|
|
|
+ bgcolor: "",
|
|
|
|
|
+ type: 1,
|
|
|
|
|
+ linear: false,
|
|
|
|
|
+ transparent: true,
|
|
|
|
|
+ fontcolor: "#000",
|
|
|
|
|
+ menuIcon: "",
|
|
|
|
|
+ menuText: ""
|
|
|
|
|
+ },
|
|
|
|
|
+ customShow: true
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -107,6 +120,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
onpreview() {
|
|
onpreview() {
|
|
|
if (this.detail.pictures.length) {
|
|
if (this.detail.pictures.length) {
|
|
|
|
|
+ this.customShow = false
|
|
|
this.$refs.previewimg.open({
|
|
this.$refs.previewimg.open({
|
|
|
imgs: this.detail.pictures,
|
|
imgs: this.detail.pictures,
|
|
|
current: 0,
|
|
current: 0,
|
|
@@ -115,12 +129,16 @@ export default {
|
|
|
},
|
|
},
|
|
|
onpreview2(arr) {
|
|
onpreview2(arr) {
|
|
|
if (arr.length) {
|
|
if (arr.length) {
|
|
|
|
|
+ this.customShow = false
|
|
|
this.$refs.previewimg.open({
|
|
this.$refs.previewimg.open({
|
|
|
imgs: arr,
|
|
imgs: arr,
|
|
|
current: 0,
|
|
current: 0,
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ previewclose(){
|
|
|
|
|
+ this.customShow = true
|
|
|
|
|
+ },
|
|
|
onshow(i) {
|
|
onshow(i) {
|
|
|
this.$set(this.RatePlan[i], 'show', !this.RatePlan[i].show)
|
|
this.$set(this.RatePlan[i], 'show', !this.RatePlan[i].show)
|
|
|
},
|
|
},
|
|
@@ -153,6 +171,11 @@ export default {
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped lang='scss'>
|
|
<style scoped lang='scss'>
|
|
|
|
|
+.navcustom{
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+}
|
|
|
.head_img {
|
|
.head_img {
|
|
|
.bg_img {
|
|
.bg_img {
|
|
|
width: 100%;
|
|
width: 100%;
|