Commit 82424c68 authored by 罗超's avatar 罗超

1

parent 1c09b3ed
...@@ -285,6 +285,7 @@ ...@@ -285,6 +285,7 @@
this.Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0; this.Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;
}, },
onLoad(options) { onLoad(options) {
console.log(options)
this.id = options.id; this.id = options.id;
this.roomMsg.HotelId = options.id; this.roomMsg.HotelId = options.id;
let that = this let that = this
......
<template> <template>
<view class="near-good"> <view class="near-good" @click="goDetail">
<image src="https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg" mode="aspectFill"></image> <image :src="goodItem.CoverImg" mode="aspectFill"></image>
<view class="good-name">上海宋城</view> <view class="good-name" v-if="goodType===1">{{goodItem.HotelName.substring(0,6)+'...'}}</view>
<view class="good-name" v-if="goodType===2">{{goodItem.Name.substring(0,6)+'...'}}</view>
</view> </view>
</template> </template>
<script> <script>
export default {
props: {
goodItem: {
type: Object,
default: {}
},
goodType: {
type: Number,
default: 0
}
},
data() {
return{
}
},
created() {
},
methods: {
//页面跳转
goDetail() {
//2 酒店
if(this.goodType==1){
uni.navigateTo({
url: "/pages/hotel/detail?id="+this.goodItem.HotelId,
});
}
//2 景区
if(this.goodType==2){
uni.navigateTo({
url:"/pages/ticketCoupons/detail?id="+this.goodItem.ID
});
}
}
}
}
</script> </script>
<style> <style>
.near-good{ .near-good {
margin-right: 20rpx; margin-right: 20rpx;
flex-shrink: 0; flex-shrink: 0;
} }
.near-good image{
.near-good image {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
border-radius: 20rpx; border-radius: 20rpx;
margin-bottom: 29rpx; margin-bottom: 29rpx;
} }
.near-good .good-name{
.near-good .good-name {
font-weight: bold; font-weight: bold;
color: #1F1F1F; color: #1F1F1F;
font-size: 28rpx; font-size: 28rpx;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<view class="loc-left"> <view class="loc-left">
<view class="loc-name"> <view class="loc-name">
<u-icon name="clock" size="28" /> <u-icon name="clock" size="28" />
<text style="margin-left: 14rpx;">营业时间 {{details.OpeningHours}}</text> <text style="margin-left: 14rpx;width: 70%;">营业时间 {{details.OpeningHours}}</text>
<u-tag style="margin-left: 22rpx;" text="营业中" bg-color="#DFBE6E" border-color="#DFBE6E" <u-tag style="margin-left: 22rpx;" text="营业中" bg-color="#DFBE6E" border-color="#DFBE6E"
color="#ffffff" v-if="details.BusinessState===1" /> color="#ffffff" v-if="details.BusinessState===1" />
</view> </view>
...@@ -107,43 +107,49 @@ ...@@ -107,43 +107,49 @@
<!-- <package-good-test></package-good-test> --> <!-- <package-good-test></package-good-test> -->
</view> </view>
</view> </view>
</view> <view class="empty-block" style="margin-bottom: 20rpx;"></view>
<!-- <view class="empty-block"></view> --> <view class="">
<view class="flex">
<view class="big-title">
<view class="detail-box"> <text>发现周边</text>
<!-- <view class="flex">
<view class="big-title">
<text>发现周边</text>
</view>
<view class="flex" style="margin-left: 64rpx;">
<view class="nearby-type" :class="{'active':nearbyType==0}" @click="changeNearbyType(0)">景区
</view> </view>
<view class="nearby-type" :class="{'active':nearbyType==1}" @click="changeNearbyType(1)">美食 <view class="flex" style="margin-left: 64rpx;">
<view class="nearby-type" :class="{'active':nearbyType==0}" @click="changeNearbyType(0)">景区
</view>
<view class="nearby-type" :class="{'active':nearbyType==1}" @click="changeNearbyType(1)">酒店
</view>
</view> </view>
</view> </view>
</view> <view class="flex" style="margin: 50rpx 0;overflow-x: auto;">
<view class="flex" style="margin: 50rpx 0;overflow-x: auto;"> <template v-if="nearbyType==0">
<near-good></near-good> <template v-if="details.TicketCouponsList" v-for="subItem in details.TicketCouponsList">
<near-good></near-good> <near-good :goodItem="subItem" :goodType="2"></near-good>
<near-good></near-good> </template>
<near-good></near-good> </template>
<near-good></near-good> <template v-if="nearbyType==1">
<near-good></near-good> <template v-if="details.HotelList" v-for="subItem in details.HotelList">
</view> --> <near-good :goodItem="subItem" :goodType="1"></near-good>
<!-- <view class="flex"> </template>
<view class="big-title"> </template>
<text>精选推荐</text>
</view> </view>
<view class="flex" style="margin-left: 64rpx;"> <view class="flex">
<view class="nearby-type active">附近满足条件酒店(2)</view> <view class="big-title">
<text>精选推荐</text>
</view>
<view class="flex" style="margin-left: 64rpx;">
<view class="nearby-type active">附近满足条件美食({{foodArr.length}})</view>
</view>
</view>
<view>
<recommed-hotel :foodArr="foodArr" :dayObj="dayObj" :searchObj="searchObj">
</recommed-hotel>
</view> </view>
</view> </view>
<view>
<recommed-restaurant></recommed-restaurant>
<recommed-restaurant></recommed-restaurant>
</view> -->
</view> </view>
<u-popup v-model="showTimePopup" mode="bottom" border-radius="40" <u-popup v-model="showTimePopup" mode="bottom" border-radius="40"
:safe-area-inset-bottom="true"> :safe-area-inset-bottom="true">
<view class="" style="margin-top: 40rpx;"> <view class="" style="margin-top: 40rpx;">
...@@ -163,6 +169,7 @@ ...@@ -163,6 +169,7 @@
import packageGood from './components/package-good.vue'; import packageGood from './components/package-good.vue';
import packageGoodTest from './components/package-good2.vue'; import packageGoodTest from './components/package-good2.vue';
import nearGood from './components/near-good.vue'; import nearGood from './components/near-good.vue';
import recommedHotel from './components/recommed-hotel.vue';
import recommedRestaurant from './components/recommed-restaurant.vue'; import recommedRestaurant from './components/recommed-restaurant.vue';
import calendar from "./components/uni-calendar/uni-calendar.vue" import calendar from "./components/uni-calendar/uni-calendar.vue"
export default { export default {
...@@ -204,7 +211,9 @@ ...@@ -204,7 +211,9 @@
info: '' info: ''
}], }],
Date: "", Date: "",
up:"" up:"",
nearbyType:0,
foodArr: [], //推荐景点
} }
}, },
components: { components: {
...@@ -212,7 +221,8 @@ ...@@ -212,7 +221,8 @@
packageGoodTest, packageGoodTest,
nearGood, nearGood,
recommedRestaurant, recommedRestaurant,
calendar calendar,
recommedHotel
}, },
created() { created() {
let d3 = new Date(); let d3 = new Date();
...@@ -294,6 +304,7 @@ ...@@ -294,6 +304,7 @@
}, },
}); });
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.getRecomHotel()
}, },
methods: { methods: {
chooseDate() { chooseDate() {
...@@ -429,7 +440,38 @@ ...@@ -429,7 +440,38 @@
uni.navigateTo({ uni.navigateTo({
url: "/pages/restaurant/order?data=" + encodeURIComponent(JSON.stringify(data)), url: "/pages/restaurant/order?data=" + encodeURIComponent(JSON.stringify(data)),
}); });
} },
changeNearbyType(t) {
this.nearbyType = t
},
//获取推餐食
getRecomHotel() {
this.request2({
url: '/api/AppletDining/GetDiningPage',
data: {
pageIndex: 1,
pageSize: 10,
Name: "",
OrderBy: 3,
FoodTypeIds: 0,
DiningPriceType: 0 ,
ID: parseInt(this.ID)
},
},
res => {
if (res.resultCode == 1) {
console.log(res, '推荐景点');
this.foodArr = [];
let tempHotel = res.data.pageData;
tempHotel.forEach(x => {
if (this.foodArr.length < 2) {
this.foodArr.push(x);
}
})
}
}
);
},
}, },
} }
</script> </script>
...@@ -571,7 +613,7 @@ ...@@ -571,7 +613,7 @@
padding: 50rpx; padding: 50rpx;
} }
.restaurant-detail .restaurant-content .detail-box .nearby-type { .restaurant-detail .restaurant-content .nearby-type {
padding: 0 16rpx; padding: 0 16rpx;
height: 40rpx; height: 40rpx;
...@@ -584,7 +626,7 @@ ...@@ -584,7 +626,7 @@
color: #1F1F1F; color: #1F1F1F;
} }
.restaurant-detail .restaurant-content .detail-box .nearby-type.active { .restaurant-detail .restaurant-content .nearby-type.active {
color: #DFBE6E; color: #DFBE6E;
background: rgba(223, 190, 110, .2); background: rgba(223, 190, 110, .2);
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<view> <view>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444"> <u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444">
<u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="options1" <u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="options1"
@change="getFoodList"> @change="orderChange">
</u-dropdown-item> </u-dropdown-item>
<u-dropdown-item :title="optionsTitle[1]"> <u-dropdown-item :title="optionsTitle[1]">
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<view class="hotel-rate-box"> <view class="hotel-rate-box">
<!-- <view v-for="(x,i) in rates" class="hotel-rate" :class="{'active':tempRateAndPrice.rate.indexOf(x.ID)!=-1}" @click="setRestaurantPrice(x.ID)">{{x.Name}}</view> --> <!-- <view v-for="(x,i) in rates" class="hotel-rate" :class="{'active':tempRateAndPrice.rate.indexOf(x.ID)!=-1}" @click="setRestaurantPrice(x.ID)">{{x.Name}}</view> -->
<view v-for="(x,i) in rates" class="hotel-rate" <view v-for="(x,i) in rates" class="hotel-rate"
:class="{'active':msg.DiningPriceType===x.ID}" @click="setRestaurantPrice(x.ID)"> :class="{'active':msg.DiningPriceType===x.ID}" @click="setRestaurantPrice(x.ID,x.Name)">
{{x.Name}}</view> {{x.Name}}</view>
</view> </view>
<view <view
...@@ -214,6 +214,11 @@ ...@@ -214,6 +214,11 @@
}); });
}, },
methods: { methods: {
orderChange(val){
this.getFoodList();
let res= this.options1.filter(i=>{return i.value==val})
this.optionsTitle[0]=res[0].label
},
searchList() { searchList() {
this.msg.pageIndex = 1 this.msg.pageIndex = 1
this.getFoodList(); this.getFoodList();
...@@ -236,8 +241,9 @@ ...@@ -236,8 +241,9 @@
this.status = "nomore"; this.status = "nomore";
} }
}, },
setRestaurantPrice(rateId) { setRestaurantPrice(rateId,name) {
this.msg.DiningPriceType = rateId this.msg.DiningPriceType = rateId
this.optionsTitle[2]=name
// if(rateId==-1){ // if(rateId==-1){
// this.tempRateAndPrice.rate=[-1] // this.tempRateAndPrice.rate=[-1]
// }else{ // }else{
...@@ -268,7 +274,7 @@ ...@@ -268,7 +274,7 @@
// } // }
// }, // },
resetPrice() { resetPrice() {
// this.optionsTitle[2]="筛选" this.optionsTitle[2]="筛选"
// this.searchObj.rateAndPrice={ // this.searchObj.rateAndPrice={
// types:[-1], // types:[-1],
// priceText:"不限", // priceText:"不限",
...@@ -306,7 +312,11 @@ ...@@ -306,7 +312,11 @@
}, },
sureType(item) { sureType(item) {
this.msg.FoodTypeIds = item.ID; this.msg.FoodTypeIds = item.ID;
console.log(this.msg,item) this.optionsTitle[1]=item.Name
if(!this.optionsTitle[1]){
this.optionsTitle[1]="分类"
this.msg.FoodTypeIds=0
}
this.getFoodList(); this.getFoodList();
this.closeDropdown(); this.closeDropdown();
}, },
......
...@@ -174,6 +174,12 @@ ...@@ -174,6 +174,12 @@
let that=this let that=this
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: res.data.template_message_list, tmplIds: res.data.template_message_list,
success:res=>{
console.log('订阅成功',res)
},
fail:err=>{
console.log('订阅失败',err)
},
complete(_res) { complete(_res) {
if(data.Final_Price===0){ if(data.Final_Price===0){
uni.redirectTo({ uni.redirectTo({
...@@ -238,11 +244,11 @@ ...@@ -238,11 +244,11 @@
title: "支付失败", title: "支付失败",
icon:'none' icon:'none'
}) })
setTimeout(()=>{ // setTimeout(()=>{
uni.redirectTo({ // uni.redirectTo({
url: '/pages/jiuzhai/allorderList' // url: '/pages/jiuzhai/allorderList'
}); // });
}, 100 ) // }, 100 )
} }
}); });
}, },
......
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
<text v-if="details.BusinessState===0">暂未开发</text> <text v-if="details.BusinessState===0">暂未开发</text>
</view> </view>
<view class="commenticon-box"> <view class="commenticon-box">
0条点评 <!-- 0条点评
<u-icon name="arrow" color="#6E6E6E" size="20rpx" class="icon"></u-icon> <u-icon name="arrow" color="#6E6E6E" size="20rpx" class="icon"></u-icon> -->
</view> </view>
</view> </view>
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="empty"></view> --> <view class="empty"></view>
<!-- 旅客点评 --> <!-- 旅客点评 -->
<!-- <view class="comment-box"> <!-- <view class="comment-box">
<view class="ticket-title"> <view class="ticket-title">
...@@ -182,6 +182,46 @@ ...@@ -182,6 +182,46 @@
</view> </view>
</view> </view>
</view> --> </view> -->
<view class="detail-box">
<view class="flex">
<view class="big-title">
<text>发现周边</text>
</view>
<view class="flex" style="margin-left: 64rpx;">
<view class="nearby-type" :class="{'active':nearbyType==0}"
@click="changeNearbyType(0)">酒店
</view>
<view class="nearby-type" :class="{'active':nearbyType==1}"
@click="changeNearbyType(1)">美食
</view>
</view>
</view>
<view class="flex" style="margin: 50rpx 0;overflow-x: auto;">
<template v-if="nearbyType==0">
<template v-if="details.HotelList" v-for="subItem in details.HotelList">
<near-good :goodItem="subItem" :goodType="1"></near-good>
</template>
</template>
<template v-if="nearbyType==1">
<template v-if="details.DiningList" v-for="subItem in details.DiningList">
<near-good :goodItem="subItem" :goodType="2"></near-good>
</template>
</template>
</view>
<view class="flex">
<view class="big-title">
<text>精选推荐</text>
</view>
<view class="flex" style="margin-left: 64rpx;">
<view class="nearby-type active">附近满足条件景点({{scenicArr.length}})</view>
</view>
</view>
<view>
<recommed-hotel :scenicArr="scenicArr" :dayObj="dayObj" :searchObj="searchObj">
</recommed-hotel>
<!-- <recommed-hotel :hotelType="1"></recommed-hotel> -->
</view>
</view>
</view> </view>
<!-- 购票须知弹出层 --> <!-- 购票须知弹出层 -->
...@@ -209,11 +249,15 @@ ...@@ -209,11 +249,15 @@
import calendar from "./components/uni-calendar/uni-calendar.vue" import calendar from "./components/uni-calendar/uni-calendar.vue"
import buyNotice from "./components/buyNotice.vue" import buyNotice from "./components/buyNotice.vue"
import subscribeTicket from "./components/subscribeTicket.vue" import subscribeTicket from "./components/subscribeTicket.vue"
import nearGood from './components/near-good.vue';
import recommedHotel from './components/recommed-hotel.vue';
export default { export default {
components: { components: {
calendar, calendar,
buyNotice, buyNotice,
subscribeTicket, subscribeTicket,
nearGood,
recommedHotel,
}, },
data() { data() {
return { return {
...@@ -239,7 +283,9 @@ ...@@ -239,7 +283,9 @@
TicketName: "", TicketName: "",
otherDate: "其他日期", otherDate: "其他日期",
msgPath: "", msgPath: "",
up: "" up: "",
nearbyType: 0,
scenicArr: [], //推荐景点
} }
}, },
onShareTimeline() { onShareTimeline() {
...@@ -330,7 +376,7 @@ ...@@ -330,7 +376,7 @@
let today = year + '-' + month + '-' + day let today = year + '-' + month + '-' + day
this.Date = today this.Date = today
this.calendar.date = today this.calendar.date = today
this.getRecomHotel();
}, },
methods: { methods: {
...@@ -340,7 +386,7 @@ ...@@ -340,7 +386,7 @@
this.calendar[0].date = e.fulldate this.calendar[0].date = e.fulldate
this.otherDate = e.fulldate this.otherDate = e.fulldate
this.getDetailByDate(); this.getDetailByDate();
this.$forceUpdate() this.$forceUpdate();
}, },
openBuyNotice(item) { openBuyNotice(item) {
this.curTicketData = item this.curTicketData = item
...@@ -359,7 +405,7 @@ ...@@ -359,7 +405,7 @@
//获取详情 //获取详情
getDetail() { getDetail() {
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
}); });
this.request2({ this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails', url: '/api/AppletDining/GetTicketCouponsDetails',
...@@ -375,7 +421,7 @@ ...@@ -375,7 +421,7 @@
this.details = res.data; this.details = res.data;
} }
}, },
err=>{ err => {
uni.hideLoading(); uni.hideLoading();
} }
); );
...@@ -416,7 +462,6 @@ ...@@ -416,7 +462,6 @@
}, },
goMap(name, lon, lat) { goMap(name, lon, lat) {
console.log(name, lon, lat)
let newLat = parseFloat(lat) let newLat = parseFloat(lat)
let newLon = parseFloat(lon) let newLon = parseFloat(lon)
wx.openLocation({ wx.openLocation({
...@@ -475,7 +520,40 @@ ...@@ -475,7 +520,40 @@
successBuyNotice() { successBuyNotice() {
this.showPop = false this.showPop = false
this.showSubscribeTicketPop = true this.showSubscribeTicketPop = true
} },
changeNearbyType(t) {
this.nearbyType = t
},
//获取推荐景点
getRecomHotel() {
this.request2({
url: '/api/AppletDining/GetTicketCouponsPage',
data: {
pageIndex: 1,
pageSize: 10,
Name: "",
FoodTypeIds: 0,
IsFree: -1,
IsSameDayBuy: -1,
IsWorryFreeRefund: -1,
OrderBy: 3,
ID:parseInt(this.ID)
},
},
res => {
if (res.resultCode == 1) {
console.log(res, '推荐景点');
this.scenicArr = [];
let tempHotel = res.data.pageData;
tempHotel.forEach(x => {
if (this.scenicArr.length < 2) {
this.scenicArr.push(x);
}
})
}
}
);
},
} }
} }
...@@ -992,8 +1070,75 @@ ...@@ -992,8 +1070,75 @@
} }
} }
.popUp {
width: 750rpx; .detail-box {
height: 100vh; padding: 50rpx;
}
.detail-box .nearby-type {
padding: 0 16rpx;
height: 40rpx;
background: #FFF;
border-radius: 20rpx;
margin-right: 10rpx;
font-size: 28rpx;
font-weight: 500;
color: #1F1F1F;
}
.detail-box .nearby-type.active {
color: #DFBE6E;
background: rgba(223, 190, 110, .2);
}
.big-title {
position: relative;
}
.big-title::before {
display: block;
width: 71rpx;
height: 12rpx;
background: #DFBE6E;
border-radius: 4rpx;
content: ' ';
position: absolute;
left: 0;
bottom: 6rpx;
z-index: 1;
}
.big-title text {
font-size: 34rpx;
font-weight: bold;
color: #1F1F1F;
position: relative;
z-index: 2;
}
.flex {
display: flex;
align-items: center;
}
.nearby-type {
padding: 0 16rpx;
height: 40rpx;
background: #FFF;
border-radius: 20rpx;
margin-right: 10rpx;
font-size: 28rpx;
font-weight: 500;
color: #1F1F1F;
}
.active {
color: #DFBE6E;
background: rgba(223, 190, 110, .2);
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment