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
2f067831
Commit
2f067831
authored
Aug 22, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绑定首页数据
parent
7eaedfcf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
120 deletions
+98
-120
FreeHome.vue
src/components/FreeTravel/FreeHome.vue
+75
-119
FreeList.vue
src/components/FreeTravel/FreeList.vue
+23
-1
No files found.
src/components/FreeTravel/FreeHome.vue
View file @
2f067831
...
...
@@ -290,6 +290,8 @@
}
.content-item-box-item
.img-box
{
position
:
relative
;
height
:
183px
;
background-color
:
#e0e0e0
}
.content-item-box-item
.img-box
img
{
width
:
100%
;
...
...
@@ -319,7 +321,7 @@
left
:
10px
;
bottom
:
20px
;
}
.content-item-box-item
.img-box
.tag
span
{
.content-item-box-item
.img-box
.tag
>
span
{
padding
:
8px
;
background
:
rgba
(
0
,
0
,
0
,
.4
);
border-radius
:
4px
;
...
...
@@ -637,100 +639,19 @@
<div
v-show=
"inputActive"
class=
"inputActive"
@
click
.
stop
>
<el-row>
<el-col
:span=
"6"
>
<div
class=
"city-tag active __cp"
>
<p>
东亚
</p>
<div
class=
"f12 text2"
>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
</div>
<div
class=
"triangle-up"
></div>
</div>
<div
class=
"city-tag __cp"
>
<p
class=
"f16"
>
北美
</p>
<div
class=
"f12 text2"
>
<span>
成都
</span>
<span>
四川阿坝
</span>
<span>
好好还会
</span>
<span>
上课抵抗力
</span>
</div>
<div
class=
"triangle-up"
></div>
</div>
<div
class=
"city-tag __cp"
>
<p
class=
"f16"
>
中东非
</p>
<div
class=
"city-tag __cp"
v-for=
"(item, index) in CCList"
@
click=
"CCListActive = index"
:class=
"
{'active': CCListActive == index}" :key="index">
<p>
{{
item
.
name
}}
</p>
<div
class=
"f12 text2"
>
<span>
菲律宾啊
</span>
<span>
日本掉啊
</span>
<span>
嗷嗷待食多
</span>
<span>
阿斯达是的
</span>
<span>
市发改委
</span>
</div>
<div
class=
"triangle-up"
></div>
</div>
<div
class=
"city-tag __cp"
>
<p
class=
"f16"
>
西伯利亚
</p>
<div
class=
"f12 text2"
>
<span>
小从v四碗饭
</span>
<span>
阿萨德群二
</span>
<span>
哒哒
</span>
<span>
阿斯达是的
</span>
<span>
阿萨德
</span>
<span
v-for=
"(s, sIndex) in item.cities"
:key=
"sIndex"
>
{{
s
.
name
}}
</span>
</div>
<div
class=
"triangle-up"
></div>
</div>
</el-col>
<el-col
:span=
"18"
>
<div
class=
"city-list"
>
<span
class=
"PingFangR"
>
成都
&
成都
</span>
<p>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
<span>
成都
</span>
</p>
</div>
<div
class=
"city-list"
>
<span
class=
"PingFangR"
>
河南
</span>
<span
class=
"PingFangR"
>
{{
CCList
[
CCListActive
].
name
}}
</span>
<p>
<span>
郑州
</span>
<span>
郑州
</span>
<span>
郑州
</span>
<span>
郑州
</span>
<span>
郑州
</span>
<span>
郑州
</span>
<span>
郑州
</span>
<span>
郑州
</span>
<span>
郑州
</span>
<span>
郑州
</span>
<span>
郑州
</span>
<span>
郑州
</span>
</p>
</div>
<div
class=
"city-list"
>
<span
class=
"PingFangR"
>
重庆
</span>
<p>
<span>
合川
</span>
<span>
合川
</span>
<span>
合川
</span>
<span>
合川
</span>
<span>
合川
</span>
<span>
合川
</span>
<span>
合川
</span>
<span>
合川
</span>
<span>
合川
</span>
<span>
合川
</span>
<span>
合川
</span>
<span>
合川
</span>
<span
v-for=
"(item, index) in CCList[CCListActive].cities"
:key=
"index"
>
{{
item
.
name
}}
</span>
</p>
</div>
</el-col>
...
...
@@ -815,12 +736,12 @@
<p
class=
"content-item-tit"
>
餐食就在这里解决吧~
</p>
<div
class=
"content-item-box"
>
<div
class=
"content-item-box-hover"
>
<div
class=
"content-item-box-item"
v-for=
"(item, index) in list1"
@
click=
"goDetails(item)"
>
<div
class=
"content-item-box-item"
v-for=
"(item, index) in list1"
@
click=
"goDetails(item)"
v-if=
"index
<
4
"
>
<div
class=
"img-box"
>
<div
class=
"price price3"
>
<p
class=
"now-p"
>
¥
<strong>
{{
item
.
b2c_price
}}
</strong>
/人
</p>
</div>
<img
src=
"../../assets/img/country1.png
"
alt=
""
>
<img
:src=
"KkdayDomain+item.prod_img_url
"
alt=
""
>
<div
class=
"tag"
>
<span><i
class=
"iconfont icon-mudedi"
></i>
<span
class=
"PingFangR"
>
{{
item
.
countries
[
0
].
name
+
'-'
+
item
.
countries
[
0
].
cities
[
0
].
name
}}
</span>
</span>
</div>
...
...
@@ -886,12 +807,12 @@
<p
class=
"content-item-tit"
>
放轻松,甩手一日游~
</p>
<div
class=
"content-item-box"
>
<div
class=
"content-item-box-hover"
>
<div
class=
"content-item-box-item"
v-for=
"(item, index) in list2"
@
click=
"goDetails(item)"
>
<div
class=
"content-item-box-item"
v-for=
"(item, index) in list2"
@
click=
"goDetails(item)"
v-if=
"index
<
4
"
>
<div
class=
"img-box"
>
<div
class=
"price price2"
>
<p
class=
"now-p"
>
¥
<strong>
{{
item
.
b2c_price
}}
</strong>
/人
</p>
</div>
<img
src=
"../../assets/img/country1.png
"
alt=
""
>
<img
:src=
"KkdayDomain+item.prod_img_url
"
alt=
""
>
<div
class=
"tag"
>
<span><i
class=
"iconfont icon-mudedi"
></i>
<span
class=
"PingFangR"
>
{{
item
.
countries
[
0
].
name
+
'-'
+
item
.
countries
[
0
].
cities
[
0
].
name
}}
</span>
</span>
</div>
...
...
@@ -913,12 +834,12 @@
<p
class=
"content-item-tit"
>
车程快慢,你来定~
</p>
<div
class=
"content-item-box"
>
<div
class=
"content-item-box-hover"
>
<div
class=
"content-item-box-item"
v-for=
"(item, index) in list3"
@
click=
"goDetails(item)"
>
<div
class=
"content-item-box-item"
v-for=
"(item, index) in list3"
@
click=
"goDetails(item)"
v-if=
"index
<
4
"
>
<div
class=
"img-box"
>
<div
class=
"price"
>
<p
class=
"now-p"
>
¥
<strong>
{{
item
.
b2c_price
}}
</strong>
/人
</p>
</div>
<img
src=
"../../assets/img/country1.png
"
alt=
""
>
<img
:src=
"KkdayDomain+item.prod_img_url
"
alt=
""
>
<div
class=
"tag"
>
<span
class=
"PingFangR"
><i
class=
"iconfont icon-mudedi"
></i>
<span
class=
"PingFangR"
>
{{
item
.
countries
[
0
].
name
+
'-'
+
item
.
countries
[
0
].
cities
[
0
].
name
}}
</span>
</span>
</div>
...
...
@@ -940,12 +861,12 @@
<p
class=
"content-item-tit"
>
游玩门票,看过来~
</p>
<div
class=
"content-item-box"
>
<div
class=
"content-item-box-hover"
>
<div
class=
"content-item-box-item"
v-for=
"(item, index) in menPiaoList"
@
click=
"goDetails(item)"
>
<div
class=
"content-item-box-item"
v-for=
"(item, index) in menPiaoList"
@
click=
"goDetails(item)"
v-if=
"index
<
4
"
>
<div
class=
"img-box"
>
<div
class=
"price price4"
>
<p
class=
"now-p"
>
¥
<strong>
{{
item
.
b2c_price
}}
</strong>
/人
</p>
</div>
<img
src=
"../../assets/img/country1.png
"
alt=
""
>
<img
:src=
"KkdayDomain+item.prod_img_url
"
alt=
""
>
<div
class=
"tag"
>
<span
class=
"PingFangR"
><i
class=
"iconfont icon-mudedi"
></i>
<span
class=
"PingFangR"
>
{{
item
.
countries
[
0
].
name
+
'-'
+
item
.
countries
[
0
].
cities
[
0
].
name
}}
</span>
</span>
</div>
...
...
@@ -1036,6 +957,7 @@ export default {
list2
:
[],
list3
:
[],
topCityActive
:
0
,
CCListActive
:
0
,
topCityList
:
[{
name
:
'东京'
,
src
:
"http://imgfile.oytour.com/New/Upload/Cloud/2019-08/20190821052335633.jpg"
,
...
...
@@ -1056,16 +978,37 @@ export default {
name
:
'曼谷'
,
src
:
"http://imgfile.oytour.com/New/Upload/Cloud/2019-08/20190821052335631.jpg"
,
id
:
4
,
}]
}],
KkdayDomain
:
""
,
CCList
:
[],
}
},
mounted
()
{
this
.
scrollobj
=
document
.
getElementsByClassName
(
'el-scrollbar__wrap'
)[
0
];
this
.
scrollobj
.
addEventListener
(
'scroll'
,
this
.
handleScroll
);
this
.
getDataList
()
this
.
getDataCanList
()
this
.
getTaocanList
()
this
.
getCCList
()
},
methods
:
{
//获取国家 城市
getCCList
(){
//http://efficient.oytour.com/api/kkday/searchCity
this
.
apiJavaPost
(
"/api/kkday/searchCity"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
.
countries
this
.
CCList
=
data
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
goDetails
(
obj
){
this
.
$router
.
push
({
name
:
"FreeDetail"
,
...
...
@@ -1077,32 +1020,45 @@ export default {
goList
(){
this
.
$router
.
push
({
name
:
"FreeList"
});
},
getDataCanList
(){
this
.
apiJavaPost
(
"/api/kkday/commodityList"
,
{
"locale"
:
"zh-cn"
,
"state"
:
"TW"
,
"cat_main_keys"
:
[
"TAG_3"
],
"cat_sub_keys"
:
[
"TAG_3_2"
],
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
.
prods
,
list1
=
[];
this
.
list1
=
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
getDataList
(){
// http://efficient.oytour.com/api/kkday/commodityList
this
.
apiJavaPost
(
"/api/kkday/commodityList"
,
{
"cat_sub_keys"
:[
"TAG_1_3"
],
"cat_main_keys"
:[
"TAG_1"
],
"page_size"
:
"8"
,
"date_from"
:
"20180101"
,
"date_to"
:
"20191231"
,
"guide_langs"
:[
"English"
],
"price_from"
:
"0"
,
"price_to"
:
"1000"
,
"keywords"
:
"ski"
,
"sort"
:
"PAESC"
,
"start"
:
"0"
,
"durations"
:[
"24,48"
],
"stats"
:[
"price"
],
"locale"
:
"zh-cn"
,
"voucher_type"
:
"01"
,
"state"
:
"tw"
{
"locale"
:
"zh-cn"
,
"state"
:
"TW"
,
"cat_sub_keys"
:
[
"TAG_1_3"
],
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
.
prods
,
menPiaoList
=
[],
list1
=
[],
list2
=
[],
list3
=
[];
console
.
log
(
data
)
this
.
KkdayDomain
=
res
.
data
.
data
.
KkdayDomain
;
// M01 一日遊
// M02 多日遊
// M03 機場接送
...
...
@@ -1111,25 +1067,25 @@ export default {
// M06 半日遊
// M07 私人導遊
// M08 點對點接送
data
.
map
(
x
=>
{
data
.
map
(
(
x
,
index
)
=>
{
if
(
x
.
countries
[
0
].
name
.
indexOf
(
'台灣'
)
!==
-
1
||
x
.
countries
[
0
].
name
.
indexOf
(
'香港'
)
!==
-
1
||
x
.
countries
[
0
].
name
.
indexOf
(
'澳門'
)
!==
-
1
||
x
.
countries
[
0
].
name
.
indexOf
(
'澳门'
)
!==
-
1
){
x
.
countries
[
0
].
name
=
`中国-
${
x
.
countries
[
0
].
name
}
`
}
if
(
x
.
prod_type
==
'M05'
)
{
// M05 票券
menPiaoList
.
push
(
x
)
}
else
if
(
x
.
prod_type
==
'M0
6
'
)
{
}
else
if
(
x
.
prod_type
==
'M0
2
'
)
{
// list1.push(x)
}
else
if
(
x
.
prod_type
==
'M01'
||
x
.
prod_type
==
'M0
2
'
)
{
// M01 一日遊 M06 半日遊
}
else
if
(
x
.
prod_type
==
'M01'
||
x
.
prod_type
==
'M0
6
'
)
{
// M01 一日遊 M06 半日遊
list2
.
push
(
x
)
}
else
if
(
x
.
prod_type
==
'M04'
||
x
.
prod_type
==
'M08'
||
x
.
prod_type
==
'M03'
)
{
// M04 司機/交通 M03 機場接送 M08 點對點接送
list3
.
push
(
x
)
}
})
this
.
list1
=
list1
;
this
.
list2
=
list2
;
this
.
list3
=
list
2
;
this
.
list3
=
list
3
;
this
.
dataList
=
data
this
.
menPiaoList
=
menPiaoList
this
.
getTaoCan
()
this
.
$forceUpdate
()
}
else
{
this
.
Error
(
res
.
data
.
message
);
...
...
src/components/FreeTravel/FreeList.vue
View file @
2f067831
...
...
@@ -727,7 +727,29 @@ export default {
},
methods
:
{
// 获取列表
getTaocanList
(){
//http://efficient.oytour.com/api/kkday/commodityList
this
.
apiJavaPost
(
"/api/kkday/commodityList"
,
{
"locale"
:
"zh-cn"
,
"state"
:
"TW"
,
"cat_sub_keys"
:
[
"TAG_1_3"
]
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
.
prods
console
.
log
(
data
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
}
}
</
script
>
\ No newline at end of file
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