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

页面修改

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