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

1

parent 1c09b3ed
......@@ -285,6 +285,7 @@
this.Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;
},
onLoad(options) {
console.log(options)
this.id = options.id;
this.roomMsg.HotelId = options.id;
let that = this
......
<template>
<view class="near-good">
<image src="https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg" mode="aspectFill"></image>
<view class="good-name">上海宋城</view>
<view class="near-good" @click="goDetail">
<image :src="goodItem.CoverImg" mode="aspectFill"></image>
<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>
</template>
<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>
<style>
.near-good{
.near-good {
margin-right: 20rpx;
flex-shrink: 0;
}
.near-good image{
.near-good image {
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
margin-bottom: 29rpx;
}
.near-good .good-name{
.near-good .good-name {
font-weight: bold;
color: #1F1F1F;
font-size: 28rpx;
......
......@@ -50,7 +50,7 @@
<view class="loc-left">
<view class="loc-name">
<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"
color="#ffffff" v-if="details.BusinessState===1" />
</view>
......@@ -107,43 +107,49 @@
<!-- <package-good-test></package-good-test> -->
</view>
</view>
</view>
<!-- <view class="empty-block"></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 class="empty-block" style="margin-bottom: 20rpx;"></view>
<view class="">
<view class="flex">
<view class="big-title">
<text>发现周边</text>
</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 class="flex" style="margin: 50rpx 0;overflow-x: auto;">
<near-good></near-good>
<near-good></near-good>
<near-good></near-good>
<near-good></near-good>
<near-good></near-good>
<near-good></near-good>
</view> -->
<!-- <view class="flex">
<view class="big-title">
<text>精选推荐</text>
<view class="flex" style="margin: 50rpx 0;overflow-x: auto;">
<template v-if="nearbyType==0">
<template v-if="details.TicketCouponsList" v-for="subItem in details.TicketCouponsList">
<near-good :goodItem="subItem" :goodType="2"></near-good>
</template>
</template>
<template v-if="nearbyType==1">
<template v-if="details.HotelList" v-for="subItem in details.HotelList">
<near-good :goodItem="subItem" :goodType="1"></near-good>
</template>
</template>
</view>
<view class="flex" style="margin-left: 64rpx;">
<view class="nearby-type active">附近满足条件酒店(2)</view>
<view class="flex">
<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>
<recommed-restaurant></recommed-restaurant>
<recommed-restaurant></recommed-restaurant>
</view> -->
</view>
<u-popup v-model="showTimePopup" mode="bottom" border-radius="40"
:safe-area-inset-bottom="true">
<view class="" style="margin-top: 40rpx;">
......@@ -163,6 +169,7 @@
import packageGood from './components/package-good.vue';
import packageGoodTest from './components/package-good2.vue';
import nearGood from './components/near-good.vue';
import recommedHotel from './components/recommed-hotel.vue';
import recommedRestaurant from './components/recommed-restaurant.vue';
import calendar from "./components/uni-calendar/uni-calendar.vue"
export default {
......@@ -204,7 +211,9 @@
info: ''
}],
Date: "",
up:""
up:"",
nearbyType:0,
foodArr: [], //推荐景点
}
},
components: {
......@@ -212,7 +221,8 @@
packageGoodTest,
nearGood,
recommedRestaurant,
calendar
calendar,
recommedHotel
},
created() {
let d3 = new Date();
......@@ -294,6 +304,7 @@
},
});
this.mainColor = this.$uiConfig.mainColor;
this.getRecomHotel()
},
methods: {
chooseDate() {
......@@ -429,7 +440,38 @@
uni.navigateTo({
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>
......@@ -571,7 +613,7 @@
padding: 50rpx;
}
.restaurant-detail .restaurant-content .detail-box .nearby-type {
.restaurant-detail .restaurant-content .nearby-type {
padding: 0 16rpx;
height: 40rpx;
......@@ -584,7 +626,7 @@
color: #1F1F1F;
}
.restaurant-detail .restaurant-content .detail-box .nearby-type.active {
.restaurant-detail .restaurant-content .nearby-type.active {
color: #DFBE6E;
background: rgba(223, 190, 110, .2);
}
......
......@@ -10,7 +10,7 @@
<view>
<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"
@change="getFoodList">
@change="orderChange">
</u-dropdown-item>
<u-dropdown-item :title="optionsTitle[1]">
......@@ -33,7 +33,7 @@
<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':msg.DiningPriceType===x.ID}" @click="setRestaurantPrice(x.ID)">
:class="{'active':msg.DiningPriceType===x.ID}" @click="setRestaurantPrice(x.ID,x.Name)">
{{x.Name}}</view>
</view>
<view
......@@ -214,6 +214,11 @@
});
},
methods: {
orderChange(val){
this.getFoodList();
let res= this.options1.filter(i=>{return i.value==val})
this.optionsTitle[0]=res[0].label
},
searchList() {
this.msg.pageIndex = 1
this.getFoodList();
......@@ -236,8 +241,9 @@
this.status = "nomore";
}
},
setRestaurantPrice(rateId) {
setRestaurantPrice(rateId,name) {
this.msg.DiningPriceType = rateId
this.optionsTitle[2]=name
// if(rateId==-1){
// this.tempRateAndPrice.rate=[-1]
// }else{
......@@ -268,7 +274,7 @@
// }
// },
resetPrice() {
// this.optionsTitle[2]="筛选"
this.optionsTitle[2]="筛选"
// this.searchObj.rateAndPrice={
// types:[-1],
// priceText:"不限",
......@@ -306,7 +312,11 @@
},
sureType(item) {
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.closeDropdown();
},
......
......@@ -174,6 +174,12 @@
let that=this
uni.requestSubscribeMessage({
tmplIds: res.data.template_message_list,
success:res=>{
console.log('订阅成功',res)
},
fail:err=>{
console.log('订阅失败',err)
},
complete(_res) {
if(data.Final_Price===0){
uni.redirectTo({
......@@ -238,11 +244,11 @@
title: "支付失败",
icon:'none'
})
setTimeout(()=>{
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
}, 100 )
// setTimeout(()=>{
// uni.redirectTo({
// url: '/pages/jiuzhai/allorderList'
// });
// }, 100 )
}
});
},
......
......@@ -48,8 +48,8 @@
<text v-if="details.BusinessState===0">暂未开发</text>
</view>
<view class="commenticon-box">
0条点评
<u-icon name="arrow" color="#6E6E6E" size="20rpx" class="icon"></u-icon>
<!-- 0条点评
<u-icon name="arrow" color="#6E6E6E" size="20rpx" class="icon"></u-icon> -->
</view>
</view>
......@@ -160,7 +160,7 @@
</view>
</view>
</view>
<!-- <view class="empty"></view> -->
<view class="empty"></view>
<!-- 旅客点评 -->
<!-- <view class="comment-box">
<view class="ticket-title">
......@@ -182,6 +182,46 @@
</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>
<!-- 购票须知弹出层 -->
......@@ -209,11 +249,15 @@
import calendar from "./components/uni-calendar/uni-calendar.vue"
import buyNotice from "./components/buyNotice.vue"
import subscribeTicket from "./components/subscribeTicket.vue"
import nearGood from './components/near-good.vue';
import recommedHotel from './components/recommed-hotel.vue';
export default {
components: {
calendar,
buyNotice,
subscribeTicket,
nearGood,
recommedHotel,
},
data() {
return {
......@@ -239,7 +283,9 @@
TicketName: "",
otherDate: "其他日期",
msgPath: "",
up: ""
up: "",
nearbyType: 0,
scenicArr: [], //推荐景点
}
},
onShareTimeline() {
......@@ -330,7 +376,7 @@
let today = year + '-' + month + '-' + day
this.Date = today
this.calendar.date = today
this.getRecomHotel();
},
methods: {
......@@ -340,7 +386,7 @@
this.calendar[0].date = e.fulldate
this.otherDate = e.fulldate
this.getDetailByDate();
this.$forceUpdate()
this.$forceUpdate();
},
openBuyNotice(item) {
this.curTicketData = item
......@@ -359,7 +405,7 @@
//获取详情
getDetail() {
uni.showLoading({
title: '加载中...'
title: '加载中...'
});
this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails',
......@@ -375,7 +421,7 @@
this.details = res.data;
}
},
err=>{
err => {
uni.hideLoading();
}
);
......@@ -416,7 +462,6 @@
},
goMap(name, lon, lat) {
console.log(name, lon, lat)
let newLat = parseFloat(lat)
let newLon = parseFloat(lon)
wx.openLocation({
......@@ -475,7 +520,40 @@
successBuyNotice() {
this.showPop = false
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 @@
}
}
.popUp {
width: 750rpx;
height: 100vh;
.detail-box {
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>
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