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
70a06bdb
Commit
70a06bdb
authored
May 31, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
4ed981d2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
259 additions
and
293 deletions
+259
-293
hotel-good.vue
pages/hotel/components/hotel-good.vue
+6
-1
room-good.vue
pages/hotel/components/room-good.vue
+63
-40
detail.vue
pages/hotel/detail.vue
+162
-134
list.vue
pages/hotel/list.vue
+6
-7
picture.vue
pages/hotel/picture.vue
+22
-111
No files found.
pages/hotel/components/hotel-good.vue
View file @
70a06bdb
...
...
@@ -42,6 +42,10 @@
HotelList
:
{
type
:
Array
,
default
:
null
},
dayObj
:{
type
:
Object
,
default
:
null
}
},
data
()
{
...
...
@@ -54,8 +58,9 @@
},
methods
:{
goHotelDetail
(
id
){
let
myDayObj
=
JSON
.
stringify
(
this
.
dayObj
);
uni
.
navigateTo
({
url
:
"/pages/hotel/detail?id="
+
id
url
:
"/pages/hotel/detail?id="
+
id
+
'&dayObj='
+
myDayObj
});
}
}
...
...
pages/hotel/components/room-good.vue
View file @
70a06bdb
<
template
>
<view
class=
"room-good"
>
<view
class=
"rm-left"
>
<image
src=
"https://ak-d.tripcdn.com/images/0206l120008hti7x86A59_R_1080_808_R5_D.jpg"
mode=
"aspectFill"
>
</image>
<view
class=
"mark"
>
12
</view>
</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
class=
"room-good"
v-for=
"(item,index) in RoomList"
>
<view
class=
"rm-left"
>
<image
src=
"https://ak-d.tripcdn.com/images/0206l120008hti7x86A59_R_1080_808_R5_D.jpg"
mode=
"aspectFill"
>
</image>
<view
class=
"mark"
>
12
</view>
</view>
<viwe
class=
"give f11"
>
免费专辑接机 + 送沟口 + 1张情景演出票
</viwe>
<view
class=
"f11 king"
style=
"margin-top:15rpx;"
>
入住当天18:00前可免费取消
</view>
<view
class=
"price"
>
<text
class=
"f11"
style=
"margin-right: 10rpx;"
>
¥
</text>
<text>
889
</text>
<view
class=
"rm-right"
>
<view
class=
"room-name"
>
{{
item
.
RoomName
}}
</view>
<view
class=
"f11"
>
<text
class=
"king"
style=
"margin-right: 14rpx;"
>
{{
item
.
BreakfastTypeStr
}}
</text>
<text>
{{
item
.
BedTypeStr
}}
{{
item
.
ServiceNumber
}}
人入住
{{
item
.
RoomSize
}}
㎡
{{
item
.
HasWindowStr
}}
</text>
</view>
<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
class=
"rm-opera"
>
<!-- 如果库存少于5显示 -->
<view
class=
"warm-count"
>
剩2间
</view>
<view
class=
"buy"
@
click=
"previewOrder"
>
<view
class=
"buy-content"
>
抢
</view>
<view
class=
"buy-tips"
>
在线订
</view>
<view
class=
"rm-opera"
v-if=
"item.Inventory>0&&item.Inventory
<5
"
>
<!-- 如果库存少于5显示 -->
<view
class=
"warm-count"
>
剩
{{
item
.
Inventory
}}
间
</view>
<view
class=
"buy"
@
click=
"previewOrder"
>
<view
class=
"buy-content"
>
抢
</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>
...
...
@@ -33,10 +41,16 @@
<
script
>
export
default
{
props
:
{
RoomList
:
{
type
:
Array
,
default
:
null
}
},
methods
:
{
previewOrder
(){
previewOrder
()
{
uni
.
navigateTo
({
url
:
"/pages/hotel/order"
url
:
"/pages/hotel/order"
})
},
},
...
...
@@ -63,7 +77,8 @@
width
:
1px
;
flex
:
1
;
}
.room-good
.rm-opera
{
.room-good
.rm-opera
{
margin-left
:
10
rpx
;
display
:
flex
;
flex-direction
:
column
;
...
...
@@ -71,14 +86,16 @@
justify-items
:
center
;
align-items
:
center
;
}
.room-good
.rm-opera
.warm-count
{
.room-good
.rm-opera
.warm-count
{
text-align
:
center
;
font-size
:
18
rpx
;
font-weight
:
500
;
color
:
#111111
;
margin-bottom
:
10
rpx
;
}
.room-good
.rm-opera
.buy
{
.room-good
.rm-opera
.buy
{
width
:
70
rpx
;
height
:
81
rpx
;
background
:
#FFFFFF
;
...
...
@@ -87,26 +104,31 @@
display
:
flex
;
flex-direction
:
column
;
}
.room-good
.rm-opera
.buy.disabled
{
.room-good
.rm-opera
.buy.disabled
{
background
:
#EBEBEB
;
border
:
2
rpx
solid
#DCDCDC
;
}
.room-good
.rm-opera
.buy.disabled
.buy-tips
{
.room-good
.rm-opera
.buy.disabled
.buy-tips
{
background
:
#A09E9E
;
color
:
#fff
;
}
.room-good
.rm-opera
.buy.disabled
.buy-content
{
.room-good
.rm-opera
.buy.disabled
.buy-content
{
color
:
#A09E9E
;
}
.room-good
.rm-opera
.buy
.buy-tips
{
.room-good
.rm-opera
.buy
.buy-tips
{
height
:
27
rpx
;
background
:
#000000
;
text-align
:
center
;
color
:
#DFBE6E
;
color
:
#DFBE6E
;
font-size
:
18
rpx
;
line-height
:
27
rpx
;
}
.room-good
.rm-opera
.buy
.buy-content
{
.room-good
.rm-opera
.buy
.buy-content
{
height
:
1px
;
flex
:
1
;
text-align
:
center
;
...
...
@@ -117,6 +139,7 @@
font-weight
:
800
;
color
:
#111111
;
}
.room-good
.rm-right
.room-name
{
font-size
:
30
rpx
;
font-weight
:
800
;
...
...
@@ -139,13 +162,13 @@
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-top
:
15
rpx
;
margin-top
:
15
rpx
;
}
.room-good
.rm-right
.price
{
.room-good
.rm-right
.price
{
font-weight
:
800
;
font-size
:
40
rpx
;
color
:
#111
;
color
:
#111
;
}
.room-good
.rm-left
{
...
...
pages/hotel/detail.vue
View file @
70a06bdb
This diff is collapsed.
Click to expand it.
pages/hotel/list.vue
View file @
70a06bdb
...
...
@@ -56,7 +56,7 @@
</view>
<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;"
>
<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"
:margin-bottom=
"20"
bg-color=
"#F5F5F5"
color=
"#111"
/>
</scroll-view>
...
...
@@ -167,7 +167,8 @@
},
showLoading
:
false
,
status
:
"loadmore"
,
page_count
:
0
page_count
:
0
,
dayObj
:{}
}
},
components
:
{
...
...
@@ -348,7 +349,6 @@
},
//获取查询条件
getSearchCondition
(){
console
.
log
(
'进入了111'
);
this
.
request2
({
url
:
'/api/Hotel/GetHotelQuery'
,
data
:
{}
...
...
@@ -372,9 +372,7 @@
}
if
(
tempObj
&&
tempObj
.
StarList
){
this
.
rates
=
tempObj
.
StarList
;
console
.
log
(
this
.
rates
,
'this.rates'
);
}
console
.
log
(
res
,
'查询条件'
);
}
},
err
=>
{
...
...
@@ -385,7 +383,9 @@
//获取列表数据
getList
(
type
){
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
){
this
.
HotelList
=
[];
}
...
...
@@ -395,7 +395,6 @@
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'查询列表数据'
);
this
.
HotelList
=
this
.
HotelList
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
}
...
...
pages/hotel/picture.vue
View file @
70a06bdb
...
...
@@ -3,13 +3,13 @@
<scroll-view
scroll-y=
"true"
class=
"hotel-pic"
>
<view
class=
"content"
>
<view
class=
"left"
>
<view
v-for=
"(x,i) in jiList"
:key=
"i"
class=
"image-box"
@
click=
"previewImage(x.
picUrl
)"
>
<image
:src=
"x.
picUrl
"
mode=
"widthFix"
></image>
<view
v-for=
"(x,i) in jiList"
:key=
"i"
class=
"image-box"
@
click=
"previewImage(x.
Path
)"
>
<image
:src=
"x.
Path
"
mode=
"widthFix"
></image>
</view>
</view>
<view
class=
"right"
>
<view
v-for=
"(x,i) in ouList"
:key=
"i"
class=
"image-box"
@
click=
"previewImage(x.
picUrl
)"
>
<image
:src=
"x.
picUrl
"
mode=
"widthFix"
></image>
<view
v-for=
"(x,i) in ouList"
:key=
"i"
class=
"image-box"
@
click=
"previewImage(x.
Path
)"
>
<image
:src=
"x.
Path
"
mode=
"widthFix"
></image>
</view>
</view>
</view>
...
...
@@ -21,126 +21,37 @@
export
default
{
data
()
{
return
{
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
:
"酒店"
}
],
imageList
:[],
jiList
:[],
ouList
:[],
allImageSrc
:[]
}
},
onLoad
(
options
)
{
if
(
options
.
imgObj
){
this
.
imageList
=
JSON
.
parse
(
options
.
imgObj
);
this
.
getSeperate
();
}
},
created
()
{
uni
.
setNavigationBarTitle
({
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
()
{
},
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
)
{
uni
.
previewImage
({
urls
:
this
.
allImageSrc
,
...
...
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