Commit 70a06bdb authored by zhengke's avatar zhengke

修改

parent 4ed981d2
...@@ -42,6 +42,10 @@ ...@@ -42,6 +42,10 @@
HotelList: { HotelList: {
type: Array, type: Array,
default: null default: null
},
dayObj:{
type: Object,
default: null
} }
}, },
data() { data() {
...@@ -54,8 +58,9 @@ ...@@ -54,8 +58,9 @@
}, },
methods:{ methods:{
goHotelDetail(id){ goHotelDetail(id){
let myDayObj = JSON.stringify(this.dayObj);
uni.navigateTo({ uni.navigateTo({
url: "/pages/hotel/detail?id=" + id url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj
}); });
} }
} }
......
<template> <template>
<view class="room-good"> <view>
<view class="rm-left"> <view class="room-good" v-for="(item,index) in RoomList">
<image src="https://ak-d.tripcdn.com/images/0206l120008hti7x86A59_R_1080_808_R5_D.jpg" mode="aspectFill"> <view class="rm-left">
</image> <image src="https://ak-d.tripcdn.com/images/0206l120008hti7x86A59_R_1080_808_R5_D.jpg" mode="aspectFill">
<view class="mark">12</view> </image>
</view> <view class="mark">12</view>
<view class="rm-right">
<view class="room-name">藏韵高级双床房</view>
<view class="f11">
<text class="king" style="margin-right: 14rpx;">含早餐</text>
<text>1.5m大床 2人入住 24㎡ 有窗</text>
</view> </view>
<viwe class="give f11"> <view class="rm-right">
免费专辑接机 + 送沟口 + 1张情景演出票 <view class="room-name">{{item.RoomName}}</view>
</viwe> <view class="f11">
<view class="f11 king" style="margin-top:15rpx;">入住当天18:00前可免费取消</view> <text class="king" style="margin-right: 14rpx;">{{item.BreakfastTypeStr}}</text>
<view class="price"> <text>{{item.BedTypeStr}} {{item.ServiceNumber}}人入住 {{item.RoomSize}}{{item.HasWindowStr}}</text>
<text class="f11" style="margin-right: 10rpx;"></text> </view>
<text>889</text> <viwe class="give f11" v-if="item.Description">
{{item.Description}}
</viwe>
<view class="f11 king" style="margin-top:15rpx;">{{item.IsCancelStr}}</view>
<view class="price">
<text class="f11" style="margin-right: 10rpx;"></text>
<text>{{item.B2BPrice}}</text>
</view>
</view> </view>
</view> <view class="rm-opera" v-if="item.Inventory>0&&item.Inventory<5">
<view class="rm-opera"> <!-- 如果库存少于5显示 -->
<!-- 如果库存少于5显示 --> <view class="warm-count">{{item.Inventory}}</view>
<view class="warm-count">剩2间</view> <view class="buy" @click="previewOrder">
<view class="buy" @click="previewOrder"> <view class="buy-content"></view>
<view class="buy-content"></view> <view class="buy-tips">在线订</view>
<view class="buy-tips">在线订</view> </view>
</view>
<view class="rm-opera" v-if="item.Inventory==0">
<view class="buy disabled">
<view class="buy-content"></view>
<view class="buy-tips">已抢完</view>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -33,10 +41,16 @@ ...@@ -33,10 +41,16 @@
<script> <script>
export default { export default {
props: {
RoomList: {
type: Array,
default: null
}
},
methods: { methods: {
previewOrder(){ previewOrder() {
uni.navigateTo({ uni.navigateTo({
url:"/pages/hotel/order" url: "/pages/hotel/order"
}) })
}, },
}, },
...@@ -63,7 +77,8 @@ ...@@ -63,7 +77,8 @@
width: 1px; width: 1px;
flex: 1; flex: 1;
} }
.room-good .rm-opera{
.room-good .rm-opera {
margin-left: 10rpx; margin-left: 10rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -71,14 +86,16 @@ ...@@ -71,14 +86,16 @@
justify-items: center; justify-items: center;
align-items: center; align-items: center;
} }
.room-good .rm-opera .warm-count{
.room-good .rm-opera .warm-count {
text-align: center; text-align: center;
font-size: 18rpx; font-size: 18rpx;
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.room-good .rm-opera .buy{
.room-good .rm-opera .buy {
width: 70rpx; width: 70rpx;
height: 81rpx; height: 81rpx;
background: #FFFFFF; background: #FFFFFF;
...@@ -87,26 +104,31 @@ ...@@ -87,26 +104,31 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.room-good .rm-opera .buy.disabled{
.room-good .rm-opera .buy.disabled {
background: #EBEBEB; background: #EBEBEB;
border: 2rpx solid #DCDCDC; border: 2rpx solid #DCDCDC;
} }
.room-good .rm-opera .buy.disabled .buy-tips{
.room-good .rm-opera .buy.disabled .buy-tips {
background: #A09E9E; background: #A09E9E;
color: #fff; color: #fff;
} }
.room-good .rm-opera .buy.disabled .buy-content{
.room-good .rm-opera .buy.disabled .buy-content {
color: #A09E9E; color: #A09E9E;
} }
.room-good .rm-opera .buy .buy-tips{
.room-good .rm-opera .buy .buy-tips {
height: 27rpx; height: 27rpx;
background: #000000; background: #000000;
text-align: center; text-align: center;
color:#DFBE6E; color: #DFBE6E;
font-size: 18rpx; font-size: 18rpx;
line-height: 27rpx; line-height: 27rpx;
} }
.room-good .rm-opera .buy .buy-content{
.room-good .rm-opera .buy .buy-content {
height: 1px; height: 1px;
flex: 1; flex: 1;
text-align: center; text-align: center;
...@@ -117,6 +139,7 @@ ...@@ -117,6 +139,7 @@
font-weight: 800; font-weight: 800;
color: #111111; color: #111111;
} }
.room-good .rm-right .room-name { .room-good .rm-right .room-name {
font-size: 30rpx; font-size: 30rpx;
font-weight: 800; font-weight: 800;
...@@ -139,13 +162,13 @@ ...@@ -139,13 +162,13 @@
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
line-clamp: 2; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-top:15rpx; margin-top: 15rpx;
} }
.room-good .rm-right .price{ .room-good .rm-right .price {
font-weight: 800; font-weight: 800;
font-size: 40rpx; font-size: 40rpx;
color:#111; color: #111;
} }
.room-good .rm-left { .room-good .rm-left {
......
This diff is collapsed.
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</view> </view>
<scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop" <scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop"
@scroll="scroll" style="height: calc(100% - 224rpx); padding-bottom: 0px;"> @scroll="scroll" style="height: calc(100% - 224rpx); padding-bottom: 0px;">
<hotel-good :HotelList="HotelList"></hotel-good> <hotel-good :HotelList="HotelList" :dayObj="dayObj"></hotel-good>
<u-loadmore v-if="showLoading" :status="status" :load-text="loadText" :font-size="24" :margin-top="20" <u-loadmore v-if="showLoading" :status="status" :load-text="loadText" :font-size="24" :margin-top="20"
:margin-bottom="20" bg-color="#F5F5F5" color="#111" /> :margin-bottom="20" bg-color="#F5F5F5" color="#111" />
</scroll-view> </scroll-view>
...@@ -167,7 +167,8 @@ ...@@ -167,7 +167,8 @@
}, },
showLoading:false, showLoading:false,
status: "loadmore", status: "loadmore",
page_count:0 page_count:0,
dayObj:{}
} }
}, },
components: { components: {
...@@ -348,7 +349,6 @@ ...@@ -348,7 +349,6 @@
}, },
//获取查询条件 //获取查询条件
getSearchCondition(){ getSearchCondition(){
console.log('进入了111');
this.request2({ this.request2({
url: '/api/Hotel/GetHotelQuery', url: '/api/Hotel/GetHotelQuery',
data: {} data: {}
...@@ -372,9 +372,7 @@ ...@@ -372,9 +372,7 @@
} }
if(tempObj&&tempObj.StarList){ if(tempObj&&tempObj.StarList){
this.rates = tempObj.StarList; this.rates = tempObj.StarList;
console.log(this.rates,'this.rates');
} }
console.log(res,'查询条件');
} }
}, },
err => { err => {
...@@ -385,7 +383,9 @@ ...@@ -385,7 +383,9 @@
//获取列表数据 //获取列表数据
getList(type){ getList(type){
this.searchObj.QStars = this.tempRateAndPrice.rate.toString(); this.searchObj.QStars = this.tempRateAndPrice.rate.toString();
console.log(this.searchObj); this.dayObj.StartDate = this.searchObj.QStartDate;
this.dayObj.EndDate = this.searchObj.QEndDate;
this.dayObj.day = this.day;
if(type==1){ if(type==1){
this.HotelList=[]; this.HotelList=[];
} }
...@@ -395,7 +395,6 @@ ...@@ -395,7 +395,6 @@
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
console.log(res,'查询列表数据');
this.HotelList = this.HotelList.concat(res.data.pageData); this.HotelList = this.HotelList.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
} }
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<scroll-view scroll-y="true" class="hotel-pic"> <scroll-view scroll-y="true" class="hotel-pic">
<view class="content"> <view class="content">
<view class="left"> <view class="left">
<view v-for="(x,i) in jiList" :key="i" class="image-box" @click="previewImage(x.picUrl)"> <view v-for="(x,i) in jiList" :key="i" class="image-box" @click="previewImage(x.Path)">
<image :src="x.picUrl" mode="widthFix"></image> <image :src="x.Path" mode="widthFix"></image>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.picUrl)"> <view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.Path)">
<image :src="x.picUrl" mode="widthFix"></image> <image :src="x.Path" mode="widthFix"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -21,126 +21,37 @@ ...@@ -21,126 +21,37 @@
export default { export default {
data() { data() {
return { return {
imageList:[ imageList:[],
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
}
],
jiList:[], jiList:[],
ouList:[], ouList:[],
allImageSrc:[] allImageSrc:[]
} }
}, },
onLoad(options) {
if(options.imgObj){
this.imageList=JSON.parse(options.imgObj);
this.getSeperate();
}
},
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "酒店图片", title: "酒店图片",
}); });
this.imageList.forEach((x,i)=>{
this.allImageSrc.push(x.picUrl)
if(i%2==0){
this.jiList.push(x)
}else{
this.ouList.push(x)
}
})
console.log(this.jiList,this.ouList)
}, },
mounted () { mounted () {
}, },
methods: { methods: {
getSeperate(){
this.imageList.forEach((x,i)=>{
this.allImageSrc.push(x.Path)
if(i%2==0){
this.jiList.push(x)
}else{
this.ouList.push(x)
}
})
},
previewImage(src) { previewImage(src) {
uni.previewImage({ uni.previewImage({
urls: this.allImageSrc, urls: this.allImageSrc,
......
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