|
@@ -1,5 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
|
|
+ <van-skeleton :loading="loading">
|
|
<view style="height: 65upx;"></view>
|
|
<view style="height: 65upx;"></view>
|
|
<scroll-view style="height: 95vh;" class="floor-list"
|
|
<scroll-view style="height: 95vh;" class="floor-list"
|
|
:scroll-top="scrollTop" scroll-y="true" @scroll="scroll" @scrolltoupper="upper" @scrolltolower="lower"
|
|
:scroll-top="scrollTop" scroll-y="true" @scroll="scroll" @scrolltoupper="upper" @scrolltolower="lower"
|
|
@@ -122,7 +123,7 @@
|
|
<shopList :productList="goods_list" />
|
|
<shopList :productList="goods_list" />
|
|
</view>
|
|
</view>
|
|
</van-tab>
|
|
</van-tab>
|
|
- <van-tab :name="1" :title="'评价' +' '+hoteldetail.feedback_count">
|
|
|
|
|
|
+ <van-tab :name="1" :title="'评价' +' '+feedback_count">
|
|
<!-- 评价列表 -->
|
|
<!-- 评价列表 -->
|
|
<assess :feedback_list="feedback_list" :showpicture="showpicture" />
|
|
<assess :feedback_list="feedback_list" :showpicture="showpicture" />
|
|
</van-tab>
|
|
</van-tab>
|
|
@@ -150,6 +151,7 @@
|
|
<button type="warn" @click="gofeedback">您的入住意见反馈(反馈送圈币)</button>
|
|
<button type="warn" @click="gofeedback">您的入住意见反馈(反馈送圈币)</button>
|
|
</view>
|
|
</view>
|
|
<Gobacktop @getop="getop" v-if="isTop" />
|
|
<Gobacktop @getop="getop" v-if="isTop" />
|
|
|
|
+ </van-skeleton>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -163,7 +165,7 @@
|
|
import shopList from '@/component/shopList.vue' // 商品列表
|
|
import shopList from '@/component/shopList.vue' // 商品列表
|
|
import assess from '@/component/assess.vue' // 评价列表
|
|
import assess from '@/component/assess.vue' // 评价列表
|
|
import Gobacktop from '@/component/Gobacktop.vue'
|
|
import Gobacktop from '@/component/Gobacktop.vue'
|
|
- export default {
|
|
|
|
|
|
+ export default {
|
|
components: {
|
|
components: {
|
|
uniIcon,
|
|
uniIcon,
|
|
uniNavBar,
|
|
uniNavBar,
|
|
@@ -174,9 +176,12 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ firstloading: 0,
|
|
showpicture: false,
|
|
showpicture: false,
|
|
|
|
+ loading: true,
|
|
storeinformation: {},
|
|
storeinformation: {},
|
|
isTop: 0,
|
|
isTop: 0,
|
|
|
|
+ feedback_count: 0,
|
|
hoteldetail: {},
|
|
hoteldetail: {},
|
|
has_collected: 0, // 收藏酒店
|
|
has_collected: 0, // 收藏酒店
|
|
chosegoods_commonid: true,
|
|
chosegoods_commonid: true,
|
|
@@ -241,14 +246,14 @@
|
|
withShareTicket: true
|
|
withShareTicket: true
|
|
});
|
|
});
|
|
let that = this;
|
|
let that = this;
|
|
- let id = this.goodId; // 商品Id
|
|
|
|
-
|
|
|
|
|
|
+ let id = this.goodId; // 酒店id
|
|
|
|
+ console.log(id);
|
|
if (res.from === 'button') {
|
|
if (res.from === 'button') {
|
|
// 来自页面内分享按钮
|
|
// 来自页面内分享按钮
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
title: that.hotelitle,
|
|
title: that.hotelitle,
|
|
- path: `/pages/index/shop?id=${id}`,
|
|
|
|
|
|
+ path: `/pages/index/hotel?id=${id}`,
|
|
imageUrl:that.store_slide[0]
|
|
imageUrl:that.store_slide[0]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -272,6 +277,7 @@
|
|
this.getshopdetail(); // 获取商品详情
|
|
this.getshopdetail(); // 获取商品详情
|
|
this.hotelmenu(); // 一级菜单
|
|
this.hotelmenu(); // 一级菜单
|
|
this.gethoteil(); // 获取酒店信息
|
|
this.gethoteil(); // 获取酒店信息
|
|
|
|
+ //this.getStockPriceByName(); // 分装异步函数
|
|
uni.$on('changshow', (e) => {
|
|
uni.$on('changshow', (e) => {
|
|
this.changeshow();
|
|
this.changeshow();
|
|
})
|
|
})
|
|
@@ -333,7 +339,12 @@
|
|
type:'store',
|
|
type:'store',
|
|
fav_id: this.goodId
|
|
fav_id: this.goodId
|
|
},
|
|
},
|
|
- success: () => {
|
|
|
|
|
|
+ success: (res) => {
|
|
|
|
+ if(res.data.data.action == 'add') {
|
|
|
|
+ this.$msg("收藏成功")
|
|
|
|
+ }else {
|
|
|
|
+ this.$msg("取消收藏")
|
|
|
|
+ }
|
|
this.gethoteil()
|
|
this.gethoteil()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -402,7 +413,20 @@
|
|
url: `/pages/index/hoteldetail?id=${id}&gc_name=${gc_name}&store_id=${store_id}`
|
|
url: `/pages/index/hoteldetail?id=${id}&gc_name=${gc_name}&store_id=${store_id}`
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // async getStockPriceByName() {
|
|
|
|
+ // try {
|
|
|
|
+ // // Promise.all
|
|
|
|
+ // let [foo, bar, val1] = await Promise.all([this.getshopdetail(), this.gethoteil(),this.hotelmenu()]);
|
|
|
|
+ // console.log(val1);
|
|
|
|
+ // }
|
|
|
|
+ // catch (err) {
|
|
|
|
+ // }
|
|
|
|
+ // //this.getshopdetail(); // 获取商品详情
|
|
|
|
+ //this.hotelmenu(); // 一级菜单
|
|
|
|
+ //this.gethoteil();
|
|
|
|
|
|
|
|
+ //},
|
|
|
|
+
|
|
// 获取商品详情
|
|
// 获取商品详情
|
|
getshopdetail(e) {
|
|
getshopdetail(e) {
|
|
this.request({
|
|
this.request({
|
|
@@ -416,6 +440,10 @@
|
|
gc_id_1: this.gc_id_1
|
|
gc_id_1: this.gc_id_1
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
|
+ if(this.firstloading == 0) {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ }
|
|
|
|
+ this.firstloading = 1;
|
|
if(e == 2) {
|
|
if(e == 2) {
|
|
this.goods_list = [];
|
|
this.goods_list = [];
|
|
}
|
|
}
|
|
@@ -423,6 +451,7 @@
|
|
if(res.data.data.goods_list.length < 10) {
|
|
if(res.data.data.goods_list.length < 10) {
|
|
this.isDetail = 2;
|
|
this.isDetail = 2;
|
|
}
|
|
}
|
|
|
|
+
|
|
},
|
|
},
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -459,6 +488,7 @@
|
|
},
|
|
},
|
|
// 获取酒店评价
|
|
// 获取酒店评价
|
|
getcomment() {
|
|
getcomment() {
|
|
|
|
+
|
|
this.request({
|
|
this.request({
|
|
url:'/v1/store/feedbackList',
|
|
url:'/v1/store/feedbackList',
|
|
method: 'POST',
|
|
method: 'POST',
|
|
@@ -472,6 +502,10 @@
|
|
if(res.data.data.feedback_list.length < 10) {
|
|
if(res.data.data.feedback_list.length < 10) {
|
|
this.isnexttwo = 2;
|
|
this.isnexttwo = 2;
|
|
}
|
|
}
|
|
|
|
+ if(this.firstloading == 0) {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ }
|
|
|
|
+ this.firstloading = 1;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -484,9 +518,14 @@
|
|
store_id: this.goodId
|
|
store_id: this.goodId
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
|
+ if(this.firstloading == 0) {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ }
|
|
|
|
+ this.firstloading = 1;
|
|
let { data } = res.data;
|
|
let { data } = res.data;
|
|
this.store_slide = [];
|
|
this.store_slide = [];
|
|
this.hoteldetail = data;
|
|
this.hoteldetail = data;
|
|
|
|
+ this.feedback_count = data.feedback_count;
|
|
this.hotelitle = data.store_name;
|
|
this.hotelitle = data.store_name;
|
|
data.store_slide.forEach(item => {
|
|
data.store_slide.forEach(item => {
|
|
if(item.indexOf('jpg')!= -1) {
|
|
if(item.indexOf('jpg')!= -1) {
|
|
@@ -495,20 +534,12 @@
|
|
})
|
|
})
|
|
this.storeinformation = data;
|
|
this.storeinformation = data;
|
|
this.store_summary = data.store_summary;
|
|
this.store_summary = data.store_summary;
|
|
-
|
|
|
|
- // const regex = new RegExp('<img', 'gi');
|
|
|
|
- // console.log(data.store_description);
|
|
|
|
- // data.store_description = data.store_description.replace(regex,
|
|
|
|
- // `<img style="width: 100%;height: auto;display: block;text-align: center;`);
|
|
|
|
- // this.store_description = data.store_description;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- //data.store_description = data.store_description.replace(/\(<img\)/ig, '');
|
|
|
|
const regex = new RegExp('<img', 'gi');
|
|
const regex = new RegExp('<img', 'gi');
|
|
data.store_description = data.store_description.replace(regex,
|
|
data.store_description = data.store_description.replace(regex,
|
|
`<img style="width: 100%;height: auto!important;display: block;text-align: center;"`);
|
|
`<img style="width: 100%;height: auto!important;display: block;text-align: center;"`);
|
|
this.store_description = data.store_description;
|
|
this.store_description = data.store_description;
|
|
this.has_collected = data.has_collected; // 是否收藏
|
|
this.has_collected = data.has_collected; // 是否收藏
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|