Commit 7e05c2d7 authored by 黄奎's avatar 黄奎

页面修改

parent 022c8cac
<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">{{goodItem.Name}}</view>
</view> </view>
</template> </template>
<script> <script>
export default {
props: {
goodItem: {
type: Object,
default: null
},
goodType: {
type: Number,
default: 0
}
},
data() {
},
created() {
},
methods: {
//页面跳转
goDetail() {
// let myDayObj = JSON.stringify(this.dayObj);
// uni.navigateTo({
// url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj
// });
}
}
}
</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;
......
<template> <template>
<view style="height: 100vh;"> <view style="height: 100vh;">
<view style="padding:0 45rpx;"> <view style="padding:0 45rpx;">
<u-tabs :is-scroll="false" name="Name" :list="navs" active-color="#DFBE6E" :current="active" @change="changeHandler" <u-tabs :is-scroll="false" name="Name" :list="navs" active-color="#DFBE6E" :current="active" @change="changeHandler"
:show-bar="true" :activeFontSize="32" inactive-color="#111111" :bold="true" height="100" duration="0" font-size="28"></u-tabs> :show-bar="true" :activeFontSize="32" inactive-color="#111111" :bold="true" height="100" duration="0" font-size="28"></u-tabs>
</view> </view>
<scroll-view scroll-y="true" class="hotel-descr" @scroll="scroll"> <scroll-view scroll-y="true" class="hotel-descr" @scroll="scroll">
<view class="content"> <view class="content">
<view class="flex"> <view class="flex">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622085515000_731.png" mode="widthFix" style="width: 32rpx;"></image> <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622085515000_731.png" mode="widthFix"
style="width: 32rpx;"></image>
<view class="h-name">九寨沟星宇国际大酒店</view> <view class="h-name">九寨沟星宇国际大酒店</view>
</view> </view>
<view class="base-box flex flex-wrap"> <view class="base-box flex flex-wrap">
...@@ -39,7 +40,8 @@ ...@@ -39,7 +40,8 @@
</view> </view>
<view class="empty-block"></view> <view class="empty-block"></view>
<view class="flex" style="margin-top: 50rpx;"> <view class="flex" style="margin-top: 50rpx;">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622086795000_201.png" mode="widthFix" style="width: 32rpx;"></image> <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622086795000_201.png" mode="widthFix"
style="width: 32rpx;"></image>
<view class="h-name">店内设施</view> <view class="h-name">店内设施</view>
</view> </view>
<view class="sheshi"> <view class="sheshi">
...@@ -88,7 +90,8 @@ ...@@ -88,7 +90,8 @@
</view> </view>
<view class="empty-block"></view> <view class="empty-block"></view>
<view class="flex" style="margin-top: 50rpx;"> <view class="flex" style="margin-top: 50rpx;">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622094594000_166.png" mode="widthFix" style="width: 32rpx;"></image> <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622094594000_166.png" mode="widthFix"
style="width: 32rpx;"></image>
<view class="h-name">订房须知</view> <view class="h-name">订房须知</view>
</view> </view>
<ul class="title-style-one"> <ul class="title-style-one">
...@@ -111,7 +114,8 @@ ...@@ -111,7 +114,8 @@
</ul> </ul>
<view class="empty-block"></view> <view class="empty-block"></view>
<view class="flex" style="margin-top: 50rpx;"> <view class="flex" style="margin-top: 50rpx;">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622094594000_166.png" mode="widthFix" style="width: 32rpx;"></image> <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622094594000_166.png" mode="widthFix"
style="width: 32rpx;"></image>
<view class="h-name">周边交通</view> <view class="h-name">周边交通</view>
</view> </view>
<view class="sheshi"> <view class="sheshi">
...@@ -129,29 +133,37 @@ ...@@ -129,29 +133,37 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
navs:[{ navs: [{
Id:0, Id: 0,
Name:"酒店信息", Name: "酒店信息",
position:0 position: 0
},{ }, {
Id:1, Id: 1,
Name:"规则设施", Name: "规则设施",
position:691 position: 691
},{ }, {
Id:2, Id: 2,
Name:"周边交通", Name: "周边交通",
position:1038 position: 1038
}], }],
active:0, active: 0,
scrollTop:0, scrollTop: 0,
oldScrollTop:0 oldScrollTop: 0,
hotelObj: {}, //酒店信息
}
},
onLoad() {
if (options.hotelObj) {
this.hotelObj = JSON.parse(options.hotelObj);
console.log("this.hotelObj", this.hotelObj)
} }
}, },
created() { created() {
...@@ -166,19 +178,19 @@ ...@@ -166,19 +178,19 @@
this.changeActive() this.changeActive()
}, },
goToPosition(posi) { goToPosition(posi) {
this.scrollTop = posi;//this.oldScrollTop; this.scrollTop = posi; //this.oldScrollTop;
this.$nextTick(function() { this.$nextTick(function() {
this.scrollTop = posi; this.scrollTop = posi;
}); });
}, },
changeActive(){ changeActive() {
let t=0 let t = 0
this.navs.forEach((x,i)=>{ this.navs.forEach((x, i) => {
if(x.position<=this.oldScrollTop){ if (x.position <= this.oldScrollTop) {
t=i t = i
} }
}) })
this.active=t this.active = t
}, },
changeHandler(i) { changeHandler(i) {
this.active = i; this.active = i;
...@@ -194,92 +206,109 @@ ...@@ -194,92 +206,109 @@
</script> </script>
<style> <style>
.hotel-descr{ .hotel-descr {
height: calc(100% - 50px); height: calc(100% - 50px);
width: 100vw; width: 100vw;
color:#111; color: #111;
} }
.hotel-descr .king { .hotel-descr .king {
color: #DFBE6E !important; color: #DFBE6E !important;
} }
.hotel-descr .regular { .hotel-descr .regular {
font-weight: 500 !important; font-weight: 500 !important;
} }
.hotel-descr .flex{
.hotel-descr .flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.hotel-descr .empty-block{
.hotel-descr .empty-block {
height: 20rpx; height: 20rpx;
background: #ECF1F4; background: #ECF1F4;
margin: 0 -45rpx; margin: 0 -45rpx;
} }
.hotel-descr .flex-wrap{
.hotel-descr .flex-wrap {
flex-wrap: wrap; flex-wrap: wrap;
} }
.hotel-descr .content{
.hotel-descr .content {
padding: 45rpx; padding: 45rpx;
} }
.hotel-descr .content .h-name{
.hotel-descr .content .h-name {
font-size: 36rpx; font-size: 36rpx;
font-weight: 800; font-weight: 800;
margin-left: 13rpx; margin-left: 13rpx;
} }
.hotel-descr .content .base-box{
.hotel-descr .content .base-box {
margin: 26rpx 0 56rpx 0; margin: 26rpx 0 56rpx 0;
} }
.hotel-descr .content .base-box .item{
.hotel-descr .content .base-box .item {
width: 50%; width: 50%;
margin-top: 30rpx; margin-top: 30rpx;
flex-shrink: 0; flex-shrink: 0;
} }
.hotel-descr .content .base-box .item .val{
.hotel-descr .content .base-box .item .val {
font-size: 30rpx; font-size: 30rpx;
font-weight: bold; font-weight: bold;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.hotel-descr .content .base-box .item .label{
.hotel-descr .content .base-box .item .label {
font-size: 20rpx; font-size: 20rpx;
color: #878787; color: #878787;
} }
.hotel-descr .content .desc{
.hotel-descr .content .desc {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
color: #4B4949; color: #4B4949;
line-height: 48rpx; line-height: 48rpx;
padding-bottom: 50rpx; padding-bottom: 50rpx;
} }
.hotel-descr .content .sheshi{
.hotel-descr .content .sheshi {
margin-top: 50rpx; margin-top: 50rpx;
} }
.hotel-descr .content .sheshi .she-title{
.hotel-descr .content .sheshi .she-title {
font-size: 28rpx; font-size: 28rpx;
font-weight: 800; font-weight: 800;
} }
.hotel-descr .content .sheshi .she-content{
.hotel-descr .content .sheshi .she-content {
margin-top: 24rpx; margin-top: 24rpx;
} }
.hotel-descr .content .sheshi .she-content text{
.hotel-descr .content .sheshi .she-content text {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
color: #4A4A4A; color: #4A4A4A;
line-height: 40rpx; line-height: 40rpx;
margin-right: 24rpx; margin-right: 24rpx;
} }
.hotel-descr .content .title-style-one { .hotel-descr .content .title-style-one {
padding: 0; padding: 0;
margin: 50rpx 0; margin: 50rpx 0;
display: block; display: block;
} }
.hotel-descr .content .title-style-one li { .hotel-descr .content .title-style-one li {
list-style: none; list-style: none;
margin-bottom: 40rpx; margin-bottom: 40rpx;
padding-left: 33rpx; padding-left: 33rpx;
position: relative; position: relative;
} }
.hotel-descr .content .title-style-one li::before { .hotel-descr .content .title-style-one li::before {
content: ' '; content: ' ';
display: block; display: block;
...@@ -287,23 +316,23 @@ ...@@ -287,23 +316,23 @@
height: 10rpx; height: 10rpx;
background: #111111; background: #111111;
border-radius: 50%; border-radius: 50%;
position: absolute; position: absolute;
left: 0; left: 0;
top: 15rpx; top: 15rpx;
} }
.hotel-descr .content .title-style-one li:last-child { .hotel-descr .content .title-style-one li:last-child {
margin-bottom: 0px; margin-bottom: 0px;
} }
.hotel-descr .content .title-style-one li .item-title { .hotel-descr .content .title-style-one li .item-title {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #1F1F1F; color: #1F1F1F;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.hotel-descr .content .title-style-one li .item-content { .hotel-descr .content .title-style-one li .item-content {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
......
...@@ -158,12 +158,16 @@ ...@@ -158,12 +158,16 @@
</view> </view>
</view> </view>
<view class="flex" style="margin: 50rpx 0;overflow-x: auto;"> <view class="flex" style="margin: 50rpx 0;overflow-x: auto;">
<near-good></near-good> <template v-if="nearbyType==0">
<near-good></near-good> <template v-if="dataList.TicketList" v-for="subItem in dataList.TicketList">
<near-good></near-good> <near-good :goodItem="subItem" :goodType="3"></near-good>
<near-good></near-good> </template>
<near-good></near-good> </template>
<near-good></near-good> <template v-if="nearbyType==1">
<template v-if="dataList.DinnerList" v-for="subItem in dataList.DinnerList">
<near-good :goodItem="subItem" :goodType="2"></near-good>
</template>
</template>
</view> </view>
<view class="flex"> <view class="flex">
<view class="big-title"> <view class="big-title">
...@@ -188,7 +192,7 @@ ...@@ -188,7 +192,7 @@
<script> <script>
import roomGood from './components/room-good.vue'; import roomGood from './components/room-good.vue';
import roomGoodTest from './components/room-good2.vue';
import nearGood from './components/near-good.vue'; import nearGood from './components/near-good.vue';
import recommedHotel from './components/recommed-hotel.vue'; import recommedHotel from './components/recommed-hotel.vue';
import canlendar from "./components/time/index.vue" import canlendar from "./components/time/index.vue"
...@@ -216,14 +220,14 @@ ...@@ -216,14 +220,14 @@
searchObj: { searchObj: {
date: {} date: {}
}, },
roomMsg:{ roomMsg: {
HotelId:0, HotelId: 0,
StartDate:'', StartDate: '',
EndDate:'' EndDate: ''
}, },
startWeek:'', startWeek: '',
endWeek:'', endWeek: '',
day:0, day: 0,
threeLevelList: [{ threeLevelList: [{
name: "单人床", name: "单人床",
id: 1, id: 1,
...@@ -257,17 +261,16 @@ ...@@ -257,17 +261,16 @@
}, },
components: { components: {
roomGood, roomGood,
roomGoodTest,
nearGood, nearGood,
recommedHotel, recommedHotel,
canlendar canlendar
}, },
created() { created() {
}, },
onLoad(options) { onLoad(options) {
this.id = options.id this.id = options.id
// this.ProjectType=options.type
let that = this let that = this
uni.getSystemInfo({ uni.getSystemInfo({
success(res) { success(res) {
...@@ -282,7 +285,7 @@ ...@@ -282,7 +285,7 @@
if (this.id > 0) { if (this.id > 0) {
this.getHotelDetail(this.id); this.getHotelDetail(this.id);
} }
if(options.dayObj){ if (options.dayObj) {
var tempDay = JSON.parse(options.dayObj); var tempDay = JSON.parse(options.dayObj);
this.roomMsg.StartDate = tempDay.StartDate; this.roomMsg.StartDate = tempDay.StartDate;
this.roomMsg.EndDate = tempDay.EndDate; this.roomMsg.EndDate = tempDay.EndDate;
...@@ -314,19 +317,20 @@ ...@@ -314,19 +317,20 @@
}) })
}, },
openDescription() { openDescription() {
let hotelObj = JSON.stringify(this.dataList);
uni.navigateTo({ uni.navigateTo({
url: "/pages/hotel/description" url: "/pages/hotel/description?hotelObj="+hotelObj
}) })
}, },
//返回周几 //返回周几
getWeek(date){ getWeek(date) {
console.log(date,'date'); console.log(date, 'date');
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六"); var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
var week = weekArray[new Date(date).getDay()];//注意此处必须是先new一个Date var week = weekArray[new Date(date).getDay()]; //注意此处必须是先new一个Date
return '周'+week; return '周' + week;
}, },
chosenDateResult(obj) { chosenDateResult(obj) {
console.log(obj,'objjjj'); console.log(obj, 'objjjj');
obj.startDay = this.formatMonthDay(obj.startDay) obj.startDay = this.formatMonthDay(obj.startDay)
obj.endDay = this.formatMonthDay(obj.endDay) obj.endDay = this.formatMonthDay(obj.endDay)
this.searchObj.date = obj this.searchObj.date = obj
...@@ -478,7 +482,6 @@ ...@@ -478,7 +482,6 @@
console.log(res, '详情数据'); console.log(res, '详情数据');
this.dataList = res.data; this.dataList = res.data;
this.RoomList = this.dataList.RoomList; this.RoomList = this.dataList.RoomList;
} }
} }
); );
......
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