Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
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
吴迪
gs1
Commits
9e1e6ab8
Commit
9e1e6ab8
authored
Nov 29, 2023
by
Jianli Ou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
境外条码查询 链接至其他网站增加 企业首页
parent
c84c8975
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
external.vue
src/views/Search/external.vue
+25
-3
No files found.
src/views/Search/external.vue
View file @
9e1e6ab8
...
@@ -105,8 +105,15 @@
...
@@ -105,8 +105,15 @@
<p
style=
"font-size:13px;margin:15px 0 0 0 ;"
>
该数据由Active Test Account企业提供,并于2023年5月2日最新更新
</p>
<p
style=
"font-size:13px;margin:15px 0 0 0 ;"
>
该数据由Active Test Account企业提供,并于2023年5月2日最新更新
</p>
<p
style=
"font-size:13px;"
>
该GTIN信息完整
</p>
<p
style=
"font-size:13px;"
>
该GTIN信息完整
</p>
</div>
</div>
<div
v-if=
"GtinResultData.linkset"
class=
"hrefInfo "
>
<div
v-if=
"GtinResultData.linkset
&& (GtinResultData.links.homepage || GtinResultData.links.hasRetailers || GtinResultData.links.sustainabilityInfo || GtinResultData.links.productSustainabilityInfo || GtinResultData.links.recipeInfo)
"
class=
"hrefInfo "
>
<p>
链接至其他产品信息
</p>
<p>
链接至其他产品信息
</p>
<div
v-if=
"GtinResultData.links.homepage"
class=
"hrefInfoList"
>
<p>
企业网站
</p>
<div
v-for=
"(link, index) in GtinResultData.links.homepage"
:key=
"index"
class=
"hrefInfoList-list"
>
<p><span
@
click=
"openHref(link.href)"
>
{{
link
.
title
}}
</span><span>
{{
link
.
type
}}
</span></p>
<P>
语言:
{{
link
.
hreflang
}}
</P>
</div>
</div>
<div
v-if=
"GtinResultData.links.hasRetailers"
class=
"hrefInfoList"
>
<div
v-if=
"GtinResultData.links.hasRetailers"
class=
"hrefInfoList"
>
<p>
有零售商
</p>
<p>
有零售商
</p>
<div
v-for=
"(link, index) in GtinResultData.links.hasRetailers"
:key=
"index"
class=
"hrefInfoList-list"
>
<div
v-for=
"(link, index) in GtinResultData.links.hasRetailers"
:key=
"index"
class=
"hrefInfoList-list"
>
...
@@ -391,6 +398,11 @@
...
@@ -391,6 +398,11 @@
<p
style=
"font-size:13px;color:#696D73;margin-top:15px"
>
该数据由GS1 Demo Account企业提供,并于2023年5月2日最新更新
</p>
<p
style=
"font-size:13px;color:#696D73;margin-top:15px"
>
该数据由GS1 Demo Account企业提供,并于2023年5月2日最新更新
</p>
</el-collapse-item>
</el-collapse-item>
<el-collapse-item
title=
"链接至其他信息"
name=
"4"
>
<el-collapse-item
title=
"链接至其他信息"
name=
"4"
>
<p
v-if=
"glnResultData.links.homepage"
>
企业网站
</p>
<div
v-for=
"(link, index) in glnResultData.links.homepage"
:key=
"index"
class=
"hrefInfoList-list"
>
<p><span
@
click=
"openHref(link.href)"
>
{{
link
.
title
}}
</span><span>
{{
link
.
type
}}
</span></p>
<P>
语言:
{{
link
.
hreflang
}}
</P>
</div>
<p
style=
"font-size:16px;color:#002C6C;"
>
有零售商
</p>
<p
style=
"font-size:16px;color:#002C6C;"
>
有零售商
</p>
<div
v-for=
"(link, index) in glnResultData.links.hasRetailers"
:key=
"index"
>
<div
v-for=
"(link, index) in glnResultData.links.hasRetailers"
:key=
"index"
>
<p><span
@
click=
"openHref(link.href)"
style=
"color:#00799E; cursor: pointer;"
>
{{
link
.
title
}}
</span><span
style=
"color:#F26335;margin-left:8px"
>
{{
link
.
type
}}
</span></p>
<p><span
@
click=
"openHref(link.href)"
style=
"color:#00799E; cursor: pointer;"
>
{{
link
.
title
}}
</span><span
style=
"color:#F26335;margin-left:8px"
>
{{
link
.
type
}}
</span></p>
...
@@ -768,6 +780,7 @@ export default {
...
@@ -768,6 +780,7 @@ export default {
if
(
returnCode
===
"0"
)
{
if
(
returnCode
===
"0"
)
{
if
(
data
)
{
if
(
data
)
{
data
[
0
].
links
=
{
data
[
0
].
links
=
{
homepage
:
''
,
// 企业网站
hasRetailers
:
''
,
// 有零售商
hasRetailers
:
''
,
// 有零售商
sustainabilityInfo
:
''
,
// 产品信息页
sustainabilityInfo
:
''
,
// 产品信息页
productSustainabilityInfo
:
''
,
// 可持续性和回收(不建议使用)
productSustainabilityInfo
:
''
,
// 可持续性和回收(不建议使用)
...
@@ -778,7 +791,11 @@ export default {
...
@@ -778,7 +791,11 @@ export default {
const
linkDataStructure
=
(
linkObj
)
=>
{
const
linkDataStructure
=
(
linkObj
)
=>
{
return
{
href
:
linkObj
.
href
,
hreflang
:
linkObj
.
hreflang
[
0
],
title
:
linkObj
.
title
,
type
:
linkObj
.
type
}
return
{
href
:
linkObj
.
href
,
hreflang
:
linkObj
.
hreflang
[
0
],
title
:
linkObj
.
title
,
type
:
linkObj
.
type
}
}
}
if
(
item
.
indexOf
(
'hasRetailers'
)
>=
0
)
{
if
(
item
.
indexOf
(
'homepage'
)
>=
0
)
{
data
[
0
].
links
.
homepage
=
data
[
0
].
linkset
[
item
].
map
(
linkObj
=>
{
return
linkDataStructure
(
linkObj
)
})
}
else
if
(
item
.
indexOf
(
'hasRetailers'
)
>=
0
)
{
data
[
0
].
links
.
hasRetailers
=
data
[
0
].
linkset
[
item
].
map
(
linkObj
=>
{
data
[
0
].
links
.
hasRetailers
=
data
[
0
].
linkset
[
item
].
map
(
linkObj
=>
{
return
linkDataStructure
(
linkObj
)
return
linkDataStructure
(
linkObj
)
})
})
...
@@ -842,6 +859,7 @@ export default {
...
@@ -842,6 +859,7 @@ export default {
})
})
}
}
data
[
0
].
links
=
{
data
[
0
].
links
=
{
homepage
:
''
,
// 企业网站
hasRetailers
:
''
,
// 有零售商
hasRetailers
:
''
,
// 有零售商
sustainabilityInfo
:
''
,
// 产品信息页
sustainabilityInfo
:
''
,
// 产品信息页
productSustainabilityInfo
:
''
,
// 可持续性和回收(不建议使用)
productSustainabilityInfo
:
''
,
// 可持续性和回收(不建议使用)
...
@@ -852,7 +870,11 @@ export default {
...
@@ -852,7 +870,11 @@ export default {
const
linkDataStructure
=
(
linkObj
)
=>
{
const
linkDataStructure
=
(
linkObj
)
=>
{
return
{
href
:
linkObj
.
href
,
hreflang
:
linkObj
.
hreflang
[
0
],
title
:
linkObj
.
title
,
type
:
linkObj
.
type
}
return
{
href
:
linkObj
.
href
,
hreflang
:
linkObj
.
hreflang
[
0
],
title
:
linkObj
.
title
,
type
:
linkObj
.
type
}
}
}
if
(
item
.
indexOf
(
'hasRetailers'
)
>=
0
)
{
if
(
item
.
indexOf
(
'homepage'
)
>=
0
)
{
data
[
0
].
links
.
homepage
=
data
[
0
].
linkset
[
item
].
map
(
linkObj
=>
{
return
linkDataStructure
(
linkObj
)
})
}
else
if
(
item
.
indexOf
(
'hasRetailers'
)
>=
0
)
{
data
[
0
].
links
.
hasRetailers
=
data
[
0
].
linkset
[
0
][
item
].
map
(
linkObj
=>
{
data
[
0
].
links
.
hasRetailers
=
data
[
0
].
linkset
[
0
][
item
].
map
(
linkObj
=>
{
return
linkDataStructure
(
linkObj
)
return
linkDataStructure
(
linkObj
)
})
})
...
...
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