Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengke
jz_Travel
Commits
7e05c2d7
Commit
7e05c2d7
authored
Jun 01, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
022c8cac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
144 additions
and
83 deletions
+144
-83
near-good.vue
pages/hotel/components/near-good.vue
+35
-6
description.vue
pages/hotel/description.vue
+80
-51
detail.vue
pages/hotel/detail.vue
+29
-26
No files found.
pages/hotel/components/near-good.vue
View file @
7e05c2d7
<
template
>
<view
class=
"near-good"
>
<image
src=
"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jp
g"
mode=
"aspectFill"
></image>
<view
class=
"good-name"
>
上海宋城
</view>
<view
class=
"near-good"
@
click=
"goDetail"
>
<image
:src=
"goodItem.CoverIm
g"
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
:
20
rpx
;
flex-shrink
:
0
;
}
.near-good
image
{
.near-good
image
{
width
:
200
rpx
;
height
:
200
rpx
;
border-radius
:
20
rpx
;
margin-bottom
:
29
rpx
;
}
.near-good
.good-name
{
.near-good
.good-name
{
font-weight
:
bold
;
color
:
#1F1F1F
;
font-size
:
28
rpx
;
...
...
pages/hotel/description.vue
View file @
7e05c2d7
<
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
:
20
rpx
;
background
:
#ECF1F4
;
margin
:
0
-45
rpx
;
}
.hotel-descr
.flex-wrap
{
.hotel-descr
.flex-wrap
{
flex-wrap
:
wrap
;
}
.hotel-descr
.content
{
.hotel-descr
.content
{
padding
:
45
rpx
;
}
.hotel-descr
.content
.h-name
{
.hotel-descr
.content
.h-name
{
font-size
:
36
rpx
;
font-weight
:
800
;
margin-left
:
13
rpx
;
}
.hotel-descr
.content
.base-box
{
.hotel-descr
.content
.base-box
{
margin
:
26
rpx
0
56
rpx
0
;
}
.hotel-descr
.content
.base-box
.item
{
.hotel-descr
.content
.base-box
.item
{
width
:
50%
;
margin-top
:
30
rpx
;
flex-shrink
:
0
;
}
.hotel-descr
.content
.base-box
.item
.val
{
.hotel-descr
.content
.base-box
.item
.val
{
font-size
:
30
rpx
;
font-weight
:
bold
;
margin-bottom
:
10
rpx
;
}
.hotel-descr
.content
.base-box
.item
.label
{
.hotel-descr
.content
.base-box
.item
.label
{
font-size
:
20
rpx
;
color
:
#878787
;
}
.hotel-descr
.content
.desc
{
.hotel-descr
.content
.desc
{
font-size
:
24
rpx
;
font-weight
:
500
;
color
:
#4B4949
;
line-height
:
48
rpx
;
padding-bottom
:
50
rpx
;
}
.hotel-descr
.content
.sheshi
{
.hotel-descr
.content
.sheshi
{
margin-top
:
50
rpx
;
}
.hotel-descr
.content
.sheshi
.she-title
{
.hotel-descr
.content
.sheshi
.she-title
{
font-size
:
28
rpx
;
font-weight
:
800
;
}
.hotel-descr
.content
.sheshi
.she-content
{
.hotel-descr
.content
.sheshi
.she-content
{
margin-top
:
24
rpx
;
}
.hotel-descr
.content
.sheshi
.she-content
text
{
.hotel-descr
.content
.sheshi
.she-content
text
{
font-size
:
24
rpx
;
font-weight
:
500
;
color
:
#4A4A4A
;
line-height
:
40
rpx
;
margin-right
:
24
rpx
;
}
.hotel-descr
.content
.title-style-one
{
padding
:
0
;
margin
:
50
rpx
0
;
display
:
block
;
}
.hotel-descr
.content
.title-style-one
li
{
list-style
:
none
;
margin-bottom
:
40
rpx
;
padding-left
:
33
rpx
;
position
:
relative
;
}
.hotel-descr
.content
.title-style-one
li
::before
{
content
:
' '
;
display
:
block
;
...
...
@@ -287,23 +316,23 @@
height
:
10
rpx
;
background
:
#111111
;
border-radius
:
50%
;
position
:
absolute
;
left
:
0
;
top
:
15
rpx
;
}
.hotel-descr
.content
.title-style-one
li
:last-child
{
margin-bottom
:
0px
;
}
.hotel-descr
.content
.title-style-one
li
.item-title
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#1F1F1F
;
margin-bottom
:
20
rpx
;
}
.hotel-descr
.content
.title-style-one
li
.item-content
{
font-size
:
24
rpx
;
font-weight
:
500
;
...
...
pages/hotel/detail.vue
View file @
7e05c2d7
...
...
@@ -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
;
}
}
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment