Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Athena
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
华国豪
Athena
Commits
72bfc71a
Commit
72bfc71a
authored
Jul 23, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
b2b首页新增酒店显示
parent
bc1c8749
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
162 additions
and
67 deletions
+162
-67
home.css
src/assets/css/home.css
+13
-2
Home.vue
src/components/Home.vue
+149
-65
No files found.
src/assets/css/home.css
View file @
72bfc71a
...
...
@@ -590,8 +590,8 @@ a{
.Home
.hotel
.hotel_right_item
.hotel_remake
{
width
:
116px
;
height
:
116px
;
background
:
rgba
(
0
,
0
,
0
,
1
);
opacity
:
0.75
;
background
:
rgba
(
0
,
0
,
0
,
0.45
);
/* opacity:0.75; */
border-radius
:
50%
;
position
:
absolute
;
text-align
:
center
;
...
...
@@ -803,4 +803,15 @@ a{
.Home
.cztm
.el-tabs__nav-wrap
::after
{
height
:
1px
;
background-color
:
#ededed
;
}
.Home
.Home_HtName
{
display
:
inline-block
;
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
padding
:
0
5px
;
-webkit-box-orient
:
vertical
;
}
\ No newline at end of file
src/components/Home.vue
View file @
72bfc71a
...
...
@@ -545,85 +545,39 @@
</el-col>
</el-row>
<!-- 酒店 -->
<
!--
<
div
class=
"Grouptour hotel"
>
<div
class=
"Grouptour hotel"
>
<div
class=
"tour_left"
>
<p>
酒店
</p>
<div
class=
"tour_left_content hotel_left_content"
>
<p
style=
"font-size:14px;font-weight:700"
>
临期促销
</p>
<span>
曼谷
</span>
<span>
土耳其
</span>
<span>
土耳其
</span>
<span>
曼谷
</span>
<span
@
click=
"goSearchDetail('名古屋')"
>
名古屋
</span>
<span
@
click=
"goSearchDetail('大分县')"
>
别府
</span>
<span
@
click=
"goSearchDetail('北海道')"
>
洞爷.登别.苫小牧
</span>
<span
@
click=
"goSearchDetail('东京都')"
>
上野.浅草两国
</span>
<span
@
click=
"goSearchDetail('兵库县')"
>
神户.有马.明石
</span>
<span
@
click=
"goSearchDetail('神奈川县')"
>
箱根
</span>
<span
@
click=
"goSearchDetail('京都府')"
>
京都站周边
</span>
</div>
</div>
<div
class=
"tour_right"
>
<ul
class=
"common_ul_tab"
>
<li
:class=
"liActive==0?'li_active':''"
>
海外酒店
</li>
<li
:class=
"liActive==1?'li_active':''"
>
国内酒店
</li>
<span
style=
"float:right;color:#999999;font-size:12px"
>
查看更多
</span>
<li
:class=
"liActive==0?'li_active':''"
@
click=
"getHotelList('东京'),liActive=0"
>
东京
</li>
<li
:class=
"liActive==1?'li_active':''"
@
click=
"getHotelList('大阪'),liActive=1"
>
大阪
</li>
<li
:class=
"liActive==2?'li_active':''"
@
click=
"getHotelList('京都'),liActive=2"
>
京都
</li>
<span
style=
"float:right;color:#999999;font-size:12px"
@
click=
"SearchHotelMore"
>
查看更多
</span>
</ul>
<div
class=
"hotel_right"
>
<div
class=
"hotel_right_item"
>
<img
src=
"../assets/img/home/tour1.png"
alt=
""
>
<div
class=
"hotel_right"
v-loading=
"hotelLoading"
>
<div
class=
"hotel_right_item"
v-for=
"item in HotelList"
@
click=
"goHotelDetail(item)"
>
<img
:src=
"item.hotelImageUrl"
alt=
""
/
>
<div
class=
"hotel_remake"
>
<p
style=
"font-size:16px;font-weight:bold"
>
新加坡
</p>
<p>
15家酒店
</p>
<p
class=
"Home_HtName"
>
{{
item
.
hotelName
}}
</p>
<p
style=
"margin-left: 22px;width:68px;height:2px;background:rgba(245,245,245,1);opacity:0.25;dispaly:inline-block"
></p>
<p
style=
"color:#FF6600"
>
¥
<span
style=
"font-size:18px;font-weight:bold"
>
310
</span>
起
</p>
</div>
</div>
<div
class=
"hotel_right_item"
>
<img
src=
"../assets/img/home/tour1.png"
alt=
""
>
<div
class=
"hotel_remake"
>
<p
style=
"font-size:16px;font-weight:bold"
>
新加坡
</p>
<p>
15家酒店
</p>
<p
style=
"margin-left: 22px;width:68px;height:2px;background:rgba(245,245,245,1);opacity:0.25;dispaly:inline-block"
></p>
<p
style=
"color:#FF6600"
>
¥
<span
style=
"font-size:18px;font-weight:bold"
>
310
</span>
起
</p>
</div>
</div><div
class=
"hotel_right_item"
>
<img
src=
"../assets/img/home/tour1.png"
alt=
""
>
<div
class=
"hotel_remake"
>
<p
style=
"font-size:16px;font-weight:bold"
>
新加坡
</p>
<p>
15家酒店
</p>
<p
style=
"margin-left: 22px;width:68px;height:2px;background:rgba(245,245,245,1);opacity:0.25;dispaly:inline-block"
></p>
<p
style=
"color:#FF6600"
>
¥
<span
style=
"font-size:18px;font-weight:bold"
>
310
</span>
起
</p>
</div>
</div><div
class=
"hotel_right_item"
>
<img
src=
"../assets/img/home/tour1.png"
alt=
""
>
<div
class=
"hotel_remake"
>
<p
style=
"font-size:16px;font-weight:bold"
>
新加坡
</p>
<p>
15家酒店
</p>
<p
style=
"margin-left: 22px;width:68px;height:2px;background:rgba(245,245,245,1);opacity:0.25;dispaly:inline-block"
></p>
<p
style=
"color:#FF6600"
>
¥
<span
style=
"font-size:18px;font-weight:bold"
>
310
</span>
起
</p>
</div>
</div><div
class=
"hotel_right_item"
>
<img
src=
"../assets/img/home/tour1.png"
alt=
""
>
<div
class=
"hotel_remake"
>
<p
style=
"font-size:16px;font-weight:bold"
>
新加坡
</p>
<p>
15家酒店
</p>
<p
style=
"margin-left: 22px;width:68px;height:2px;background:rgba(245,245,245,1);opacity:0.25;dispaly:inline-block"
></p>
<p
style=
"color:#FF6600"
>
¥
<span
style=
"font-size:18px;font-weight:bold"
>
310
</span>
起
</p>
</div>
</div><div
class=
"hotel_right_item"
>
<img
src=
"../assets/img/home/tour1.png"
alt=
""
>
<div
class=
"hotel_remake"
>
<p
style=
"font-size:16px;font-weight:bold"
>
新加坡
</p>
<p>
15家酒店
</p>
<p
style=
"margin-left: 22px;width:68px;height:2px;background:rgba(245,245,245,1);opacity:0.25;dispaly:inline-block"
></p>
<p
style=
"color:#FF6600"
>
¥
<span
style=
"font-size:18px;font-weight:bold"
>
310
</span>
起
</p>
</div>
</div><div
class=
"hotel_right_item"
>
<img
src=
"../assets/img/home/tour1.png"
alt=
""
>
<div
class=
"hotel_remake"
>
<p
style=
"font-size:16px;font-weight:bold"
>
新加坡
</p>
<p>
15家酒店
</p>
<p
style=
"margin-left: 22px;width:68px;height:2px;background:rgba(245,245,245,1);opacity:0.25;dispaly:inline-block"
></p>
<p
style=
"color:#FF6600"
>
¥
<span
style=
"font-size:18px;font-weight:bold"
>
310
</span>
起
</p>
<p
style=
"color:#FF6600"
>
¥
<span
style=
"font-size:18px;font-weight:bold"
>
{{
item
.
lowrateBySetCurrency
}}
</span>
起
</p>
</div>
</div>
</div>
</div>
</div>
-->
</div>
<!-- 特价机票 -->
...
...
@@ -840,6 +794,18 @@ export default {
isLogin
:
0
,
cityId
:
262
,
companyId
:
0
,
//酒店数据
HotelList
:[],
hotelLoading
:
false
,
//酒店详情传过去参数
PassMsg
:{
hotelId
:
''
,
groupBookingFlg
:
''
,
arrivalDate
:
''
,
departureDate
:
''
,
searchroomGroup
:[],
lowrateBySetCurrency
:
''
},
pickerOptions0
:
{
disabledDate
(
time
)
{
let
today_after7
=
moment
().
add
(
8
,
'days'
).
format
(
'YYYY-MM-DD'
);
...
...
@@ -865,6 +831,8 @@ export default {
mounted
()
{
this
.
cityId
=
localStorage
.
cityId
;
this
.
companyId
=
parseInt
(
localStorage
.
site
);
this
.
getHotelList
(
'东京都'
);
},
created
()
{
this
.
loadSize
();
...
...
@@ -1270,7 +1238,123 @@ export default {
path
:
"HotelList"
});
window
.
open
(
routeData
.
href
,
'_blank'
);
}
},
//初始化酒店列表
getHotelList
(
keyWord
){
let
msg
=
{
arrivalDate
:
moment
().
format
(
"YYYY-MM-DD"
),
departureDate
:
moment
().
add
(
1
,
'days'
).
format
(
'YYYY-MM-DD'
),
displayFrom
:
1
,
freeword
:
keyWord
,
freewordType
:
1
,
numberOfResults
:
8
,
reviewRatingLowerLimits
:
0
,
reviewRatingUpperLimits
:
0
,
searchHotelCategory
:
[],
searchHotelFeatures
:
[],
searchHotelIdList
:
[],
searchMaxRate
:
0
,
searchMealType
:
[],
searchMinRate
:
0
,
searchRoomType
:
[],
searchroomGroup
:
[{
roomNum
:
1
,
numberOfAdults
:
1
,
numberOfChildren
:
0
,
childAges
:
0
}],
sort
:
0
}
this
.
hotelLoading
=
true
;
this
.
apipost
(
"dmc_post_Get_GetJAPAN_HotelList"
,
msg
,
res
=>
{
this
.
hotelLoading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
Object
.
prototype
.
toString
.
call
(
res
.
data
.
data
.
hotelSummary
)
==
'[object Object]'
){
this
.
HotelList
.
push
(
res
.
data
.
data
.
hotelSummary
);
}
else
{
this
.
HotelList
=
res
.
data
.
data
.
hotelSummary
;
}
this
.
PassMsg
.
groupBookingFlg
=
res
.
data
.
data
.
groupBookingFlg
;
console
.
log
(
this
.
HotelList
,
'Hotellist'
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//首页点击跳转
goSearchDetail
(
keywords
){
let
msg
=
{
place
:
keywords
,
StartDate
:
moment
().
format
(
"YYYY-MM-DD"
),
EndDate
:
moment
().
add
(
1
,
'days'
).
format
(
'YYYY-MM-DD'
),
room
:
1
,
roomList
:[
{
roomNum
:
1
,
numberOfAdults
:
1
,
numberOfChildren
:
0
,
childAges
:
0
}
],
}
sessionStorage
.
setItem
(
"HotelInfo"
,
JSON
.
stringify
(
msg
));
this
.
$router
.
push
({
path
:
"/HotelList"
,
})
},
//查看更多
SearchHotelMore
()
{
let
msg
=
{
place
:
''
,
StartDate
:
moment
().
format
(
"YYYY-MM-DD"
),
EndDate
:
moment
().
add
(
1
,
'days'
).
format
(
'YYYY-MM-DD'
),
auditNum
:
1
,
childNum
:
0
,
room
:
1
,
roomList
:[
{
roomNum
:
1
,
numberOfAdults
:
1
,
numberOfChildren
:
0
,
childAges
:
0
}
],
}
switch
(
this
.
liActive
){
case
0
:
msg
.
place
=
'东京都'
;
break
;
case
1
:
msg
.
place
=
'大阪府'
;
break
;
case
2
:
msg
.
place
=
'京都府'
;
break
;
}
sessionStorage
.
setItem
(
"HotelInfo"
,
JSON
.
stringify
(
msg
));
this
.
$router
.
push
({
path
:
"/HotelList"
})
},
//跳转详情
goHotelDetail
(
item
){
this
.
PassMsg
.
hotelId
=
item
.
hotelId
,
this
.
PassMsg
.
arrivalDate
=
moment
().
format
(
"YYYY-MM-DD"
);
this
.
PassMsg
.
departureDate
=
moment
().
add
(
1
,
'days'
).
format
(
'YYYY-MM-DD'
);
this
.
PassMsg
.
searchroomGroup
=
[{
roomNum
:
1
,
numberOfAdults
:
1
,
numberOfChildren
:
0
,
childAges
:
0
}],
this
.
PassMsg
.
lowrateBySetCurrency
=
item
.
lowrateBySetCurrency
;
this
.
PassMsg
.
room
=
1
sessionStorage
.
setItem
(
"HotelDetail"
,
JSON
.
stringify
(
this
.
PassMsg
));
this
.
$router
.
push
({
path
:
"/HotelDetail"
})
},
}
};
</
script
>
...
...
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