|
|
@@ -6,10 +6,11 @@
|
|
|
|
|
|
<!-- 顶部图片区域 -->
|
|
|
<view class="header">
|
|
|
- <swiper class="header_swiper" circular :interval="3000">
|
|
|
+ <swiper class="header_swiper" autoplay circular :interval="3000">
|
|
|
<swiper-item v-for="banner in headerImgList" :key="banner.id" @click="handleClickBanner(banner)">
|
|
|
<img mode="aspectFill" class="img" :src="banner.imageUrl" />
|
|
|
- <img mode="aspectFill" class="img2" :src="banner.logoUrl" />
|
|
|
+ <img v-if="banner.logoUrl.indexOf('2.png') != -1" mode="aspectFill" class="img2" :src="banner.logoUrl" />
|
|
|
+ <img v-if="banner.logoUrl.indexOf('1.png') != -1" mode="aspectFill" class="img3" :src="banner.logoUrl" />
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
</view>
|
|
|
@@ -26,7 +27,7 @@
|
|
|
<!-- 关键词搜索和民宿级别区域 -->
|
|
|
<view class="search_center">
|
|
|
<view class="center_input">
|
|
|
- <input type="text" v-model="keywords" placeholder="民宿/地名/关键词" placeholder-style="color:#A6A6A6;font-weight:400;" />
|
|
|
+ <input type="text" v-model="keywords" placeholder="民宿/地名/关键词" placeholder-style="color:#808080;font-weight:400;" />
|
|
|
</view>
|
|
|
<img class="img" src="../../static/index/right2.png" />
|
|
|
|
|
|
|
@@ -74,29 +75,33 @@
|
|
|
<img src="https://chtech.ncjti.edu.cn/hotelReservation/image/13.png" />
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="body_list">
|
|
|
- <!-- 每一个民宿区域 -->
|
|
|
- <view class="list_item" v-for="(item, index) in hotelList_you" :key="index" @click="goPageDetail(item)">
|
|
|
- <image class="item-img" :src="item.coverImg" mode="scaleToFill"></image>
|
|
|
- <view class="descrition">
|
|
|
- <text class="title">{{ item.hotel_name }}</text>
|
|
|
- <text class="type">
|
|
|
- {{ item.hTypeName }}
|
|
|
- <text class="type_level" v-if="item.type == 1">银宿级</text>
|
|
|
- <text class="type_level" v-if="item.type == 2">金宿级</text>
|
|
|
- <text class="type_level" v-if="item.type == 3">白金级</text>
|
|
|
- </text>
|
|
|
- <text class="distance" v-if="showdDistance">距您直线{{ item.distance }}公里</text>
|
|
|
- <view class="detail">
|
|
|
- <img class="img" src="../../static/index/hotel.png" />
|
|
|
- <view class="price_home">
|
|
|
- <text class="txt1">¥{{ item.min_price }}</text>
|
|
|
- <text class="txt2">起</text>
|
|
|
+
|
|
|
+ <swiper class="body_swiper" indicator-dots circular indicator-color="#BBD8FE" indicator-active-color="#1E7DFB" interval="3000" v-if="hotelList_you.length">
|
|
|
+ <swiper-item v-for="(ele, index) in hotelList_you" :key="index">
|
|
|
+ <view class="swiper_box">
|
|
|
+ <view class="list_item" v-for="(item, index2) in ele" :key="item.id" @click="goPageDetail(item)">
|
|
|
+ <image class="item-img" :src="item.coverImg" mode="scaleToFill"></image>
|
|
|
+ <view class="descrition">
|
|
|
+ <text class="title">{{ item.hotel_name }}</text>
|
|
|
+ <text class="type">
|
|
|
+ {{ item.hTypeName }}
|
|
|
+ <text class="type_level" v-if="item.type == 1">银宿级</text>
|
|
|
+ <text class="type_level" v-if="item.type == 2">金宿级</text>
|
|
|
+ <text class="type_level" v-if="item.type == 3">白金级</text>
|
|
|
+ </text>
|
|
|
+ <text class="distance" v-if="showdDistance">距您直线{{ item.distance }}公里</text>
|
|
|
+ <view class="detail">
|
|
|
+ <img class="img" src="../../static/index/hotel.png" />
|
|
|
+ <view class="price_home">
|
|
|
+ <text class="txt1">¥{{ item.min_price }}</text>
|
|
|
+ <text class="txt2">起</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ </swiper-item>
|
|
|
+ </swiper>
|
|
|
</uv-skeletons>
|
|
|
|
|
|
<!-- 精选攻略区域 -->
|
|
|
@@ -271,7 +276,7 @@
|
|
|
</uv-popup>
|
|
|
|
|
|
<!-- 等级介绍弹窗区域 -->
|
|
|
- <uv-popup ref="popup_level" mode="center" :closeOnClickOverlay="false" bgColor="none">
|
|
|
+ <!-- <uv-popup ref="popup_level" mode="center" :closeOnClickOverlay="false" bgColor="none">
|
|
|
<view class="popupLevel">
|
|
|
<view class="level_header">
|
|
|
<view class="">民宿等级</view>
|
|
|
@@ -285,7 +290,7 @@
|
|
|
<view class="btn read" @click="handleCloseLevelPop">已读</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </uv-popup>
|
|
|
+ </uv-popup> -->
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -442,9 +447,9 @@ export default {
|
|
|
// 获取特产列表
|
|
|
this.getGoodsList()
|
|
|
|
|
|
- let isTip = uni.getStorageSync('isTip')
|
|
|
+ // let isTip = uni.getStorageSync('isTip')
|
|
|
|
|
|
- !isTip && this.$refs.popup_level.open()
|
|
|
+ // !isTip && this.$refs.popup_level.open()
|
|
|
},
|
|
|
methods: {
|
|
|
async getHeaderImgList() {
|
|
|
@@ -649,7 +654,9 @@ export default {
|
|
|
let lng = ele.hpositionWens.split(',')[1]
|
|
|
ele.distance = this.calculateDistance(lat, lng)
|
|
|
})
|
|
|
+ this.hotelList_you = this.changeList(this.hotelList_you, 2)
|
|
|
}
|
|
|
+
|
|
|
this.loading = false
|
|
|
}
|
|
|
},
|
|
|
@@ -724,14 +731,14 @@ export default {
|
|
|
},
|
|
|
handleChooseLv() {
|
|
|
uni.showActionSheet({
|
|
|
- itemList: ['白金', '金宿', '银宿'],
|
|
|
+ itemList: ['白金级', '金宿级', '银宿级'],
|
|
|
success: (res) => {
|
|
|
if (res.tapIndex === 0) {
|
|
|
- this.level = '白金'
|
|
|
+ this.level = '白金级'
|
|
|
} else if (res.tapIndex === 1) {
|
|
|
- this.level = '金宿'
|
|
|
+ this.level = '金宿级'
|
|
|
} else if (res.tapIndex === 2) {
|
|
|
- this.level = '银宿'
|
|
|
+ this.level = '银宿级'
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -799,13 +806,13 @@ export default {
|
|
|
changeDot(e) {
|
|
|
this.current = e.detail.current
|
|
|
},
|
|
|
- handleCloseLevelPop() {
|
|
|
- this.$refs.popup_level.close()
|
|
|
- },
|
|
|
- handleNoTip() {
|
|
|
- uni.setStorageSync('isTip', true)
|
|
|
- this.$refs.popup_level.close()
|
|
|
- },
|
|
|
+ // handleCloseLevelPop() {
|
|
|
+ // this.$refs.popup_level.close()
|
|
|
+ // },
|
|
|
+ // handleNoTip() {
|
|
|
+ // uni.setStorageSync('isTip', true)
|
|
|
+ // this.$refs.popup_level.close()
|
|
|
+ // },
|
|
|
// 点击顶部轮播图广告回调
|
|
|
handleClickBanner(banner) {
|
|
|
// console.log(banner)
|
|
|
@@ -816,35 +823,52 @@ export default {
|
|
|
})
|
|
|
break
|
|
|
case '小程序':
|
|
|
- if (banner.jumpDirection == '民宿') {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/detail/detail?id=${banner.jumpPoint}&distance=&town=${banner.townId}`
|
|
|
- })
|
|
|
- } else if (banner.jumpDirection == '商品') {
|
|
|
- if (banner.jumpPoint == '首页') {
|
|
|
+ let openid = uni.getStorageSync('openid')
|
|
|
+ let tokenId = uni.getStorageSync('tokenId')
|
|
|
+
|
|
|
+ if (openid && tokenId) {
|
|
|
+ if (banner.jumpDirection == '民宿') {
|
|
|
uni.navigateTo({
|
|
|
- url: '/packageShang/pages/tabbar/home'
|
|
|
+ url: `/pages/detail/detail?id=${banner.jumpPoint}&distance=&town=${banner.townId}`
|
|
|
})
|
|
|
- } else {
|
|
|
+ } else if (banner.jumpDirection == '商品') {
|
|
|
+ if (banner.jumpPoint == '首页') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/packageShang/pages/tabbar/home'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/packageShang/pages/goods/goods?id=${banner.jumpPoint}`
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (banner.jumpDirection == '攻略') {
|
|
|
+ if (banner.jumpPoint == '首页') {
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/community/community'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesSub/tweetDetail/tweetDetail?id=${banner.jumpPoint}&townId=${banner.townId}`
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (banner.jumpDirection == '优惠券') {
|
|
|
uni.navigateTo({
|
|
|
- url: `/packageShang/pages/goods/goods?id=${banner.jumpPoint}`
|
|
|
+ url: `/pagesSub/couponCenter/couponCenter?id=${banner.jumpPoint}`
|
|
|
})
|
|
|
}
|
|
|
- } else if (banner.jumpDirection == '攻略') {
|
|
|
- if (banner.jumpPoint == '首页') {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/community/community'
|
|
|
- })
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请先登录',
|
|
|
+ icon: 'none',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
+ setTimeout(() => {
|
|
|
uni.navigateTo({
|
|
|
- url: `/pagesSub/tweetDetail/tweetDetail?id=${banner.jumpPoint}&townId=${banner.townId}`
|
|
|
+ url: '/pages/login/login'
|
|
|
})
|
|
|
- }
|
|
|
- } else if (banner.jumpDirection == '优惠券') {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pagesSub/couponCenter/couponCenter?id=${banner.jumpPoint}`
|
|
|
- })
|
|
|
+ }, 1500)
|
|
|
}
|
|
|
+
|
|
|
break
|
|
|
default:
|
|
|
uni.previewImage({
|
|
|
@@ -883,9 +907,16 @@ export default {
|
|
|
position: absolute;
|
|
|
top: 175rpx;
|
|
|
left: 38rpx;
|
|
|
- width: 200rpx;
|
|
|
+ width: 208rpx;
|
|
|
height: 200rpx;
|
|
|
- border: 1rpx solid skyblue;
|
|
|
+ }
|
|
|
+
|
|
|
+ .img3 {
|
|
|
+ position: absolute;
|
|
|
+ top: 240rpx;
|
|
|
+ left: 38rpx;
|
|
|
+ width: 305rpx;
|
|
|
+ height: 80rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -907,7 +938,7 @@ export default {
|
|
|
|
|
|
.content {
|
|
|
z-index: 1;
|
|
|
- margin: -102rpx auto 0;
|
|
|
+ margin: -20rpx auto 0;
|
|
|
width: 690rpx;
|
|
|
border-radius: 12rpx 12rpx 0 0;
|
|
|
background-color: #f2f2f2;
|
|
|
@@ -925,7 +956,7 @@ export default {
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
height: 89rpx;
|
|
|
- color: #a6a6a6;
|
|
|
+ color: #808080;
|
|
|
font-size: 32rpx;
|
|
|
border-bottom: 1rpx solid #e6e6e6;
|
|
|
|
|
|
@@ -967,6 +998,7 @@ export default {
|
|
|
flex: 1;
|
|
|
margin-left: 24rpx;
|
|
|
font-weight: 400;
|
|
|
+ color: #808080;
|
|
|
}
|
|
|
|
|
|
.active {
|
|
|
@@ -1091,6 +1123,100 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .body_swiper {
|
|
|
+ height: 520rpx;
|
|
|
+ border-radius: 12rpx;
|
|
|
+
|
|
|
+ .swiper_box {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+
|
|
|
+ .list_item {
|
|
|
+ width: 335rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ .item-img {
|
|
|
+ width: 100%;
|
|
|
+ height: 223rpx;
|
|
|
+ border-radius: 18rpx 18rpx 0 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+
|
|
|
+ .descrition {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ width: 100%;
|
|
|
+ border-radius: 0 0 18rpx 18rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ margin-top: -10rpx;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: 600;
|
|
|
+ padding: 20rpx 20rpx 10rpx;
|
|
|
+ color: rgba(0, 0, 0, 1);
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+
|
|
|
+ .type {
|
|
|
+ padding: 5rpx 20rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #a6a6a6;
|
|
|
+
|
|
|
+ .type_level {
|
|
|
+ margin-left: 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .distance {
|
|
|
+ padding: 10rpx 20rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #a6a6a6;
|
|
|
+ }
|
|
|
+
|
|
|
+ .detail {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 20rpx 20rpx 20rpx;
|
|
|
+ color: rgba(0, 0, 0, 1);
|
|
|
+
|
|
|
+ .img {
|
|
|
+ width: 40rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .price_home {
|
|
|
+ .txt1 {
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: rgba(255, 87, 51, 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ .txt2 {
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #a6a6a6;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .score {
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ padding-top: 10rpx;
|
|
|
+ color: rgba(166, 166, 166, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.body_strategy {
|
|
|
display: flex;
|
|
|
box-sizing: border-box;
|