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
91514e48
Commit
91514e48
authored
Jan 16, 2022
by
Lyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页搜索bug 修改
parent
5598c095
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
111 additions
and
12 deletions
+111
-12
sousuo-list.vue
src/views/Home/comps/sousuo-list.vue
+31
-3
sousuo.vue
src/views/Home/sousuo.vue
+14
-8
Statuteinfo.vue
src/views/Knowledge/Statuteinfo.vue
+1
-0
msg.vue
src/views/News/msg.vue
+65
-1
No files found.
src/views/Home/comps/sousuo-list.vue
View file @
91514e48
...
...
@@ -2,7 +2,7 @@
<ul
class=
"sousuoList"
>
<li
v-for=
"(tmp, i) in list"
:key=
"i"
>
<div
class=
"sousuoList-top"
>
<span>
【资讯动态】
</span>
<span>
{{
tmp
.
type
==
1
?
'【标准科研】'
:
tmp
.
type
==
2
?
'【政策法规】'
:(
tmp
.
type
==
3
||
tmp
.
type
==
31
||
tmp
.
type
==
32
)?
'【资讯动态】'
:
tmp
.
type
==
5
?
'【应用领域】'
:
tmp
.
type
==
6
?
'【技术知识】'
:
''
}}
</span>
<span
v-html=
"tmp.title"
@
click=
"handelMsg(tmp.urlid,tmp.type)"
></span>
</div>
<div
class=
"sousuoList-middle"
v-html=
"changeText(tmp.content)"
></div>
...
...
@@ -26,20 +26,48 @@ export default {
props
:
[
'list'
],
data
()
{
return
{
typeName
:
''
}
},
methods
:
{
handelMsg
(
id
,
type
)
{
// this.InfoFn(id,type)
if
(
type
==
2
){
// 1 【标准科研】 /News/msg
// 2 【政策法规】 /Knowledge/Statuteinfo
// 3 【资讯动态】 /News/msg
// 5 【应用领域】 /News/msg
// 6 【技术知识】 /Knowledge/article
// 31 【资讯动态】/News/msg
// 32 【资讯动态】 /News/Video
if
(
type
==
1
){
this
.
$router
.
push
({
path
:
`/News/msg?id=
${
id
}
`
,
});
}
else
if
(
type
==
2
){
this
.
$router
.
push
({
path
:
`/Knowledge/Statuteinfo?id=
${
id
}
`
,
});
}
else
if
(
type
==
3
){
this
.
$router
.
push
({
path
:
`/News/msg?id=
${
id
}
`
,
});
}
else
if
(
type
==
5
){
this
.
$router
.
push
({
path
:
`/News/msg?id=
${
id
}
`
,
});
}
else
if
(
type
==
6
){
this
.
$router
.
push
({
path
:
`/Knowledge/article?id=
${
id
}
`
,
});
}
else
if
(
type
==
31
){
this
.
$router
.
push
({
path
:
`/News/viewsub?id=
${
id
}
`
,
});
}
else
if
(
type
==
32
){
this
.
$router
.
push
({
path
:
`/News/msgVideo?id=
${
id
}
`
,
});
}
else
{
this
.
$router
.
push
({
path
:
`/News/msg?id=
${
id
}
`
,
...
...
src/views/Home/sousuo.vue
View file @
91514e48
...
...
@@ -24,7 +24,7 @@
<div
class=
"sousuo-bottom"
>
<div
class=
"container"
>
<ul
class=
"nav nav-tabs"
id=
"myTab"
role=
"tablist"
>
<li
class=
"nav-item"
role=
"presentation"
@
click=
"initListFn(1,'')"
>
<li
class=
"nav-item"
role=
"presentation"
@
click=
"initListFn
2
(1,'')"
>
<button
class=
"nav-link active"
href=
"#qbwt"
...
...
@@ -33,7 +33,7 @@
<span>
全部问题
</span>
</button>
</li>
<li
class=
"nav-item"
role=
"presentation"
@
click=
"initListFn(1,'1')"
>
<li
class=
"nav-item"
role=
"presentation"
@
click=
"initListFn
2
(1,'1')"
>
<button
class=
"nav-link"
href=
"#bzky"
...
...
@@ -42,7 +42,7 @@
<span>
标准科研
</span>
</button>
</li>
<li
class=
"nav-item"
role=
"presentation"
@
click=
"initListFn(1,'2')"
>
<li
class=
"nav-item"
role=
"presentation"
@
click=
"initListFn
2
(1,'2')"
>
<button
class=
"nav-link"
href=
"#zcfg"
...
...
@@ -51,7 +51,7 @@
<span>
政策法规
</span>
</button>
</li>
<li
class=
"nav-item"
role=
"presentation"
@
click=
"initListFn(1,'3,31,32')"
>
<li
class=
"nav-item"
role=
"presentation"
@
click=
"initListFn
2
(1,'3,31,32')"
>
<button
class=
"nav-link"
href=
"#zxdt"
...
...
@@ -60,7 +60,7 @@
<span>
资讯动态
</span>
</button>
</li>
<li
class=
"nav-item"
role=
"presentation"
@
click=
"initListFn(1,'5')"
>
<li
class=
"nav-item"
role=
"presentation"
@
click=
"initListFn
2
(1,'5')"
>
<button
class=
"nav-link"
href=
"#yyly"
...
...
@@ -130,6 +130,7 @@ export default {
pageSize
:
10
,
totalCount
:
0
,
},
typeStr
:
''
,
pickerOptions
:
{
shortcuts
:
[
{
...
...
@@ -167,12 +168,17 @@ export default {
this
.
initListFn
(
this
.
pageParams
.
currPage
);
},
methods
:{
initListFn2
(
page
,
type
){
this
.
typeStr
=
type
this
.
initListFn
(
page
)
},
// 列表
async
initListFn
(
page
,
type
)
{
async
initListFn
(
page
)
{
const
params
=
{
page
:
page
,
size
:
this
.
pageParams
.
pageSize
,
type
:
t
ype
,
size
:
this
.
pageParams
.
pageSize
,
type
:
t
his
.
typeStr
,
name
:
this
.
search
.
keywords
};
const
listRes
=
...
...
src/views/Knowledge/Statuteinfo.vue
View file @
91514e48
...
...
@@ -69,6 +69,7 @@ export default {
.org
{
padding-bottom
:
20px
;
.title-style
{
width
:
100%
;
font-size
:
24px
;
text-align
:
center
;
padding
:
30px
;
...
...
src/views/News/msg.vue
View file @
91514e48
...
...
@@ -95,7 +95,7 @@
</div>
</
template
>
<
script
>
import
{
mapState
}
from
"vuex"
;
import
{
mapState
,
mapMutations
}
from
"vuex"
;
import
breadcrumb
from
"../comps/breadcrumb.vue"
;
import
list
from
"./comps/list.vue"
;
import
list2
from
"./comps/list2.vue"
;
...
...
@@ -148,6 +148,58 @@ export default {
zttjListListArr
:
[],
url
:
window
.
location
.
href
,
sharesinastring
:
null
,
matcheList
:[
{
classid
:
4
,
name
:
"图片资讯"
,
path
:
"/News/PicNews"
,
},
{
classid
:
5
,
name
:
"综合报道"
,
path
:
"/News/Composite"
,
},
{
classid
:
6
,
name
:
"中心活动"
,
path
:
"/News/Center"
,
},
{
classid
:
7
,
name
:
"地方动态"
,
path
:
"/News/Local"
,
},
{
classid
:
8
,
name
:
"国际追踪"
,
path
:
"/News/International"
,
},
{
classid
:
24
,
name
:
"行业应用"
,
path
:
"/News/Application"
,
},
{
classid
:
14
,
name
:
"零售"
,
path
:
"/News/Retail"
,
},
{
classid
:
15
,
name
:
"物流"
,
path
:
"/News/Logistics"
,
},{
classid
:
16
,
name
:
"食品安全追溯"
,
path
:
"/News/FoodSafety"
,
},
{
classid
:
31
,
name
:
"标准科研动态"
,
path
:
"/News/Research"
,
},
]
};
},
created
()
{
...
...
@@ -155,8 +207,12 @@ export default {
this
.
newsTop10
();
this
.
announceList
();
this
.
zttjList
();
},
methods
:
{
...
mapMutations
({
setMatche
:
"setMatche"
,
}),
async
InfoFn
()
{
const
params
=
{
id
:
this
.
id
,
...
...
@@ -164,6 +220,14 @@ export default {
const
listRes
=
await
this
.
$api
.
news
.
newsInfo
(
params
);
const
{
returnCode
,
data
}
=
listRes
;
if
(
returnCode
===
"0"
)
{
let
matche
=
this
.
matcheList
.
filter
((
item
)
=>
item
.
classid
===
data
.
classid
)[
0
];
if
(
typeof
(
matche
)
===
'undefined'
){
matche
=
[{
name
:
'资讯中心'
,
path
:
'/News/index'
}]
}
this
.
setMatche
(
matche
);
this
.
content
=
data
.
content
;
this
.
title
=
data
.
title
;
this
.
showtime
=
data
.
showtime
;
...
...
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