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
241cf99b
Commit
241cf99b
authored
Aug 28, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c33a9b56
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
12 deletions
+76
-12
FreeDetail.vue
src/components/FreeTravel/FreeDetail.vue
+1
-1
FreeHome.vue
src/components/FreeTravel/FreeHome.vue
+75
-11
No files found.
src/components/FreeTravel/FreeDetail.vue
View file @
241cf99b
...
...
@@ -239,7 +239,7 @@
<img
v-for=
"(item,index) in images"
:src=
"item.img_url"
:key=
"index+5000"
>
</viewer>
</div>
<div
class=
"empty-data"
v-else
>
<div
class=
"empty-data"
v-else
>
<i
class=
"iconfont icon-kong"
></i>
很抱歉,此商品已经下架了,客官看看别的吧~
</div>
...
...
src/components/FreeTravel/FreeHome.vue
View file @
241cf99b
...
...
@@ -667,13 +667,13 @@
:key=
"item.prod_no"
:label=
"item.prod_name"
:value=
"item"
>
<div
v-if=
"item.type == 2"
>
<div
v-if=
"item.type == 2
|| item.type == 1
"
>
<i
style=
"padding-right: 15px"
class=
"iconfont icon-lvseqizi"
></i>
<span
class=
"PingFangR"
>
{{
item
.
prod_name
.
replace
(
/KKday/g
,
'印象之旅'
)
}}
</span>
<span
class=
"PingFangR"
>
{{
item
.
prod_name
}}
</span>
</div>
<div
v-else
>
<span
style=
"float: left; width: 370px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
>
{{
item
.
prod_name
.
replace
(
/KKday/g
,
'印象之旅'
)
}}
</span>
<span
v-if=
"item.countries && item.countries.length > 0"
style=
"float: right"
>
{{
item
.
countries
[
0
].
name
+
item
.
countries
[
0
].
cities
[
0
].
name
}}
</span>
<span
style=
"float: left; width: 370px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
>
{{
item
.
prod_name
}}
</span>
<span
v-if=
"item.countries && item.countries.length > 0"
style=
"float: right"
>
{{
item
.
countries
[
0
].
name
}}
{{
item
.
countries
[
0
].
cities
[
0
].
name
}}
</span>
<i
style=
"float: right;color: rgb(204, 204, 204)"
class=
"iconfont icon-ico_dingwei"
></i>
</div>
</el-option>
...
...
@@ -957,9 +957,9 @@ export default {
},
methods
:
{
getSelect
(
e
){
if
(
e
.
prod_no
&&
e
.
type
==
2
)
{
if
(
e
.
prod_no
&&
(
e
.
type
==
2
||
e
.
type
==
1
)
)
{
let
dom
=
document
.
querySelector
(
"#blankLink"
)
let
fullPath
=
`/FreeList?id=
${
e
.
prod_no
}
&name=
${
e
.
prod_name
}
&CCListActive=
${
0
}
&type=
${
1
}
`
;
let
fullPath
=
`/FreeList?id=
${
e
.
prod_no
}
&name=
${
e
.
prod_name
}
&CCListActive=
${
this
.
CCListActive
}
&type=
${
e
.
type
}
`
;
dom
.
href
=
`http://
${
window
.
location
.
host
}
/#
${
fullPath
}
`
dom
.
click
()
}
else
if
(
e
.
prod_no
&&
!
e
.
type
){
...
...
@@ -969,9 +969,55 @@ export default {
this
.
queryStr
=
''
this
.
searchList
=
[]
},
getIndex
(
query
){
let
ok
=
false
for
(
let
i
=
0
;
i
<
this
.
CCList
.
length
;
i
++
){
if
(
ok
)
break
;
let
ff
=
this
.
CCList
[
i
]
if
(
ff
.
Country_Name
==
query
)
{
this
.
CCListActive
=
i
ok
=
true
break
;
}
for
(
let
y
=
0
;
y
<
ff
.
Cities
.
length
;
y
++
){
let
cc
=
ff
.
Cities
[
y
]
if
(
cc
.
City_Name
==
query
)
{
this
.
CCListActive
=
i
ok
=
true
break
;
}
}
}
},
searchKey
(
query
){
this
.
queryStr2
=
query
if
(
query
!==
''
)
{
let
ct
=
null
for
(
let
i
=
0
;
i
<
this
.
CCList
.
length
;
i
++
){
let
ff
=
this
.
CCList
[
i
]
if
(
ff
.
Country_Name
==
query
)
{
this
.
CCListActive
=
i
ct
=
{
type
:
1
,
name
:
query
,
id
:
ff
.
Country_Code
}
break
}
for
(
let
y
=
0
;
y
<
ff
.
Cities
.
length
;
y
++
){
let
cc
=
ff
.
Cities
[
y
]
if
(
cc
.
City_Name
==
query
)
{
this
.
CCListActive
=
i
ct
=
{
type
:
2
,
name
:
query
,
id
:
cc
.
City_Code
}
break
}
}
}
console
.
log
(
this
.
CCListActive
)
this
.
queryStr
=
query
this
.
loading2
=
true
;
this
.
apiJavaPost
(
...
...
@@ -986,13 +1032,31 @@ export default {
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
.
prods
;
let
no1
=
data
.
length
>
0
?
data
[
0
].
countries
:
''
//
let no1 = data.length > 0 ? data[0].countries : ''
this
.
loading2
=
false
;
if
(
no1
){
if
(
!
ct
){
let
cc
=
null
,
tt
=
null
;
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
(
cc
&&
tt
)
break
;
cc
=
data
[
i
].
countries
[
0
];
if
(
data
[
i
].
countries
[
0
].
cities
[
0
].
name
!==
'所有城市'
){
tt
=
data
[
i
].
countries
[
0
].
cities
[
0
];
}
}
console
.
log
(
cc
,
tt
)
let
obj
=
{
type
:
cc
&&
tt
?
2
:
1
,
prod_name
:
cc
&&
tt
?
tt
.
name
:
cc
.
name
,
prod_no
:
cc
&&
tt
?
tt
.
id
:
cc
.
id
,
}
let
name
=
cc
&&
tt
?
tt
.
name
:
cc
.
name
this
.
getIndex
(
name
)
data
.
unshift
(
obj
)
}
else
if
(
ct
){
let
obj
=
{
type
:
2
,
prod_name
:
no1
?
no1
[
0
].
name
:
''
,
prod_no
:
no1
?
no1
[
0
].
id
:
''
,
type
:
ct
.
type
,
prod_name
:
ct
.
name
,
prod_no
:
ct
.
id
}
data
.
unshift
(
obj
)
}
...
...
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