Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
emergency-project
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
吴春元
emergency-project
Commits
af7382ab
Commit
af7382ab
authored
Jan 22, 2025
by
York
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部分代码提交
parent
5beeac2e
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
874 additions
and
524 deletions
+874
-524
wm.js
src/api/wm/wm.js
+28
-0
BreadCrumb.vue
src/components/breadcrumb/BreadCrumb.vue
+26
-0
PyNewsList.vue
src/components/news/PyNewsList.vue
+71
-89
NewsList.vue
src/components/py/NewsList.vue
+23
-36
news.vue
src/layout/news.vue
+23
-39
py.vue
src/layout/py.vue
+25
-114
wm.vue
src/layout/wm.vue
+5
-2
index.ts
src/router/index.ts
+6
-0
config.js
src/utils/config.js
+2
-1
Announcements.vue
src/views/home/announcements/Announcements.vue
+9
-1
NewsDetail.vue
src/views/home/detail/NewsDetail.vue
+18
-10
HomeView.vue
src/views/home/home/HomeView.vue
+4
-4
News.vue
src/views/home/hotnews/News.vue
+10
-1
SearchList.vue
src/views/home/search/SearchList.vue
+275
-0
ShanxiNews.vue
src/views/home/sxnews/ShanxiNews.vue
+10
-0
TaiyuanNews.vue
src/views/home/tynews/TaiyuanNews.vue
+10
-0
Authority.vue
src/views/py/authority/Authority.vue
+4
-1
NewsDetail.vue
src/views/py/detail/NewsDetail.vue
+51
-43
Expert.vue
src/views/py/expert/Expert.vue
+2
-2
PyHome.vue
src/views/py/home/PyHome.vue
+151
-104
Law.vue
src/views/py/law/Law.vue
+2
-2
Reading.vue
src/views/py/reading/Reading.vue
+16
-1
Rumor.vue
src/views/py/rumor/Rumor.vue
+2
-2
WmHome.vue
src/views/wm/home/WmHome.vue
+35
-14
IMessage.vue
src/views/wm/imessage/IMessage.vue
+8
-8
MessageDetail.vue
src/views/wm/message/MessageDetail.vue
+20
-17
MessageList.vue
src/views/wm/message/MessageList.vue
+10
-8
RecoverDetail.vue
src/views/wm/recover/RecoverDetail.vue
+20
-16
RecoverList.vue
src/views/wm/recover/RecoverList.vue
+8
-9
No files found.
src/api/wm/wm.js
0 → 100644
View file @
af7382ab
import
request
from
"@/utils/request"
;
// 热点留言列表
export
function
getHotList
(
data
)
{
return
request
({
url
:
"/cms/content/list"
,
method
:
"get"
,
params
:
data
,
});
}
// 最新回复列表
export
function
getRecoverList
(
data
)
{
return
request
({
url
:
"/cms/content/list"
,
method
:
"get"
,
params
:
data
,
});
}
// 我要留言
export
function
getWantMessage
(
data
)
{
return
request
({
url
:
"/cms/content/list"
,
method
:
"post"
,
params
:
data
,
});
}
src/components/breadcrumb/BreadCrumb.vue
0 → 100644
View file @
af7382ab
<
template
>
<div
class=
"mb-4"
>
<el-breadcrumb
:separator-class=
"'el-icon-arrow-right'"
>
<el-breadcrumb-item
v-for=
"(item, index) in breadcrumbItems"
:key=
"index"
:to=
"
{ path: item.path }"
>
{{
item
.
title
}}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
</
template
>
<
script
setup
>
import
{
ref
}
from
"vue"
;
import
{
useRoute
}
from
"vue-router"
;
const
route
=
useRoute
();
const
props
=
defineProps
({
breadcrumbItems
:
Array
,
});
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/components/news/
DetailRigh
t.vue
→
src/components/news/
PyNewsLis
t.vue
View file @
af7382ab
<!-- 代码已包含 CSS:使用 TailwindCSS , 安装 TailwindCSS 后方可看到布局样式效果 -->
<!-- 代码已包含 CSS:使用 TailwindCSS , 安装 TailwindCSS 后方可看到布局样式效果 -->
<
template
>
<
template
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"container mx-auto px-
4 py-8
w-[1440px]"
>
<div
class=
"container mx-auto px-
0 py-5
w-[1440px]"
>
<div
class=
"flex gap-6"
>
<div
class=
"flex gap-6"
>
<div
class=
"flex-1"
>
<div
class=
"flex-1"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
...
@@ -12,7 +12,11 @@
...
@@ -12,7 +12,11 @@
@
click=
"getToDetail(news.id)"
@
click=
"getToDetail(news.id)"
>
>
<div
class=
"w-32 h-32 flex-shrink-0 overflow-hidden rounded-lg"
>
<div
class=
"w-32 h-32 flex-shrink-0 overflow-hidden rounded-lg"
>
<img
:src=
"news.images"
class=
"w-full h-full object-cover"
/>
<el-image
class=
"w-full h-full object-cover"
:src=
"news.images"
fit=
"fill"
/>
</div>
</div>
<div
class=
"flex-grow px-6"
>
<div
class=
"flex-grow px-6"
>
<h2
<h2
...
@@ -38,18 +42,28 @@
...
@@ -38,18 +42,28 @@
</span>
</span>
</div>
</div>
</div>
</div>
<
!--
<div
class=
"w-24 flex-shrink-0 text-right
"
>
<
div
class=
"w-24 flex-shrink-0 text-right text-blue-500
"
>
<el-tag
<el-tag
:type=
"news.c
ategory.type
"
:type=
"news.c
ontentTags
"
size=
"small"
size=
"small"
class=
"whitespace-nowrap"
class=
"whitespace-nowrap"
>
>
{{
news
.
c
ategory
.
name
}}
{{
news
.
c
ontentTags
}}
</el-tag>
</el-tag>
</div>
-->
</div>
</div>
</div>
</div>
</div>
<div
class=
"flex justify-center mt-8"
>
<div
class=
"flex justify-center mt-8"
>
<!--
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage4"
:page-sizes=
"[100, 200, 300, 400]"
:page-size=
"100"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"400"
>
</el-pagination>
-->
<el-pagination
<el-pagination
v-model:current-page=
"pageNo"
v-model:current-page=
"pageNo"
v-model:page-size=
"pageSize"
v-model:page-size=
"pageSize"
...
@@ -62,47 +76,31 @@
...
@@ -62,47 +76,31 @@
/>
/>
</div>
</div>
</div>
</div>
<div
class=
"w-80 flex-shrink-0 space-y-6"
>
<div
class=
"w-80 flex-shrink-0 space-y-6"
>
<!-- 辟谣专区 -->
<!-- 本地新闻 -->
<div
class=
"bg-white rounded-lg shadow-sm p-4"
>
<h2
class=
"text-xl font-bold mb-4 flex items-center text-black"
>
<el-icon
class=
"mr-2 text-red-500"
><Star
/></el-icon>
辟谣专区
</h2>
<div
class=
"space-y-4"
>
<div
v-for=
"(item, index) in pyNews"
:key=
"index"
class=
"group cursor-pointer"
@
click=
"getToDetail(item.id)"
>
<div
class=
"text-sm font-medium group-hover:text-blue-600 line-clamp-2 text-black"
>
{{
item
.
contentTitle
}}
</div>
<div
class=
"text-xs text-gray-500 mt-1"
>
{{
item
.
contentHit
}}
阅读
</div>
</div>
</div>
</div>
<!-- 专家解读-->
<div
class=
"bg-white rounded-lg shadow-sm p-4"
>
<div
class=
"bg-white rounded-lg shadow-sm p-4"
>
<h2
class=
"text-xl font-bold mb-4 flex items-center text-black"
>
<h2
class=
"text-xl font-bold mb-4 flex items-center text-black"
>
<el-icon
class=
"mr-2 text-blue-500"
><Location
/></el-icon>
<el-icon
class=
"mr-2 text-blue-500"
><Location
/></el-icon>
专家解读
太原新闻
</h2>
</h2>
<div
class=
"space-y-4"
>
<div
class=
"space-y-4"
>
<div
<div
v-for=
"(item, index) in
zj
News"
v-for=
"(item, index) in
ty
News"
:key=
"index"
:key=
"index"
class=
"group cursor-pointer"
class=
"group cursor-pointer"
@
click=
"getToDetail(item.id)"
@
click=
"getToDetail(item.id)"
>
>
<div
class=
"h-32 mb-2 overflow-hidden rounded-lg"
>
<div
class=
"h-32 mb-2 overflow-hidden rounded-lg"
>
<img
:src=
"item.images"
class=
"w-full h-full object-cover"
/>
<!--
<el-image
class=
"w-full h-full object-cover"
:src=
"item.images"
:fit=
"fit"
></el-image>
-->
<img
:src=
"item.images"
:alt=
"item.title"
class=
"w-full h-full object-cover"
/>
</div>
</div>
<div
<div
class=
"text-sm font-medium group-hover:text-blue-600 line-clamp-2 text-black"
class=
"text-sm font-medium group-hover:text-blue-600 line-clamp-2 text-black"
...
@@ -112,28 +110,24 @@
...
@@ -112,28 +110,24 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 通知公告 -->
<!-- 法律法规 -->
<div
class=
"bg-white rounded-lg shadow-sm p-4"
>
<div
class=
"bg-white rounded-lg shadow-sm p-4"
>
<h2
class=
"text-xl font-bold mb-4 flex items-center text-black"
>
<h2
class=
"text-xl font-bold mb-4 flex items-center text-black"
>
<el-icon
class=
"mr-2 text-
blue-500"
><Location
/></el-icon>
<el-icon
class=
"mr-2 text-
orange-500"
><Bell
/></el-icon>
法律法规
通知公告
</h2>
</h2>
<div
class=
"space-y-
4
"
>
<div
class=
"space-y-
3
"
>
<div
<div
v-for=
"(item, index) in
flNew
s"
v-for=
"(item, index) in
announcement
s"
:key=
"index"
:key=
"index"
class=
"group cursor-pointer"
class=
"
flex items-center space-x-2
group cursor-pointer"
@
click=
"getToDetail(item.id)"
@
click=
"getToDetail(item.id)"
>
>
<div
class=
"h-32 mb-2 overflow-hidden rounded-lg"
>
<el-tag
size=
"small"
:type=
"item.type"
>
公告
</el-tag>
<img
:src=
"item.images"
class=
"w-full h-full object-cover"
/>
<span
</div>
class=
"text-sm group-hover:text-blue-600 flex-1 line-clamp-1 text-black"
<div
>
{{
item
.
contentTitle
}}
</span
class=
"text-sm font-medium group-hover:text-blue-600 line-clamp-2 text-black"
>
>
{{
item
.
contentTitle
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -144,6 +138,8 @@
...
@@ -144,6 +138,8 @@
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
baseImageUrl
,
rdxw
,
tyxw
,
tzgg
}
from
"@/utils/config"
;
import
{
import
{
Clock
,
Clock
,
Document
,
Document
,
...
@@ -153,10 +149,7 @@ import {
...
@@ -153,10 +149,7 @@ import {
Bell
,
Bell
,
ArrowRight
,
ArrowRight
,
}
from
"@element-plus/icons-vue"
;
}
from
"@element-plus/icons-vue"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
baseImageUrl
,
pyzq
,
qwfb
,
zjjd
,
flfg
}
from
"@/utils/config"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
DetailRight
from
"@/components/news/DetailRight.vue"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
route
=
useRoute
();
...
@@ -174,16 +167,15 @@ const handleCurrentChange = (val: number) => {
...
@@ -174,16 +167,15 @@ const handleCurrentChange = (val: number) => {
getList
(
pageSize
.
value
,
pageNo
.
value
);
getList
(
pageSize
.
value
,
pageNo
.
value
);
};
};
const
newsList
=
ref
([]);
const
newsList
=
ref
([]);
const
pyNews
=
ref
([]);
const
tyNews
=
ref
([]);
const
zjNews
=
ref
([]);
const
announcements
=
ref
([]);
const
flNews
=
ref
([]);
get
List
(
10
,
1
);
get
TyNewsList
(
3
,
1
);
//获取
权威发布
//获取
太原新闻
function
getList
(
pageSize
:
number
,
pageNo
:
number
)
{
function
get
TyNews
List
(
pageSize
:
number
,
pageNo
:
number
)
{
const
datas
=
{
const
datas
=
{
contentType
:
qwfb
,
contentType
:
tyxw
,
pageSize
:
pageSize
,
pageSize
:
pageSize
,
pageNo
:
pageNo
,
pageNo
:
pageNo
,
};
};
...
@@ -195,18 +187,18 @@ function getList(pageSize: number, pageNo: number) {
...
@@ -195,18 +187,18 @@ function getList(pageSize: number, pageNo: number) {
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
}
}
});
});
newsList
.
value
=
rowsList
;
tyNews
.
value
=
rowsList
;
});
});
}
}
get
PyList
(
);
get
TzGgNewsList
(
5
,
1
);
//获取
辟谣专区
//获取
通知公告
function
get
PyList
(
)
{
function
get
TzGgNewsList
(
pageSize
:
number
,
pageNo
:
number
)
{
const
datas
=
{
const
datas
=
{
contentType
:
pyzq
,
contentType
:
tzgg
,
pageSize
:
5
,
pageSize
:
pageSize
,
pageNo
:
1
,
pageNo
:
pageNo
,
};
};
getNewsList
(
datas
).
then
((
response
)
=>
{
getNewsList
(
datas
).
then
((
response
)
=>
{
const
data
=
response
.
data
;
const
data
=
response
.
data
;
...
@@ -216,48 +208,38 @@ function getPyList() {
...
@@ -216,48 +208,38 @@ function getPyList() {
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
}
}
});
});
pyNew
s
.
value
=
rowsList
;
announcement
s
.
value
=
rowsList
;
});
});
}
}
get
ZjList
(
);
get
List
(
pageSize
.
value
,
pageNo
.
value
);
//获取专家解读
//获取新闻热点列表
function
getZjList
()
{
function
getList
(
pageSize
:
number
,
pageNo
:
number
)
{
// newsList.value = [];
const
datas
=
{
const
datas
=
{
contentType
:
zjjd
,
contentType
:
rdxw
,
pageSize
:
2
,
pageSize
:
pageSize
,
pageNo
:
1
,
pageNo
:
pageNo
,
};
};
getNewsList
(
datas
).
then
((
response
)
=>
{
getNewsList
(
datas
).
then
((
response
)
=>
{
const
data
=
response
.
data
;
const
data
=
response
.
data
;
const
rowsList
=
data
.
rows
;
const
rowsList
=
data
.
rows
;
rowsList
.
forEach
((
item
:
any
)
=>
{
rowsList
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
contentImg
)
{
if
(
item
.
contentImg
)
{
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
}
}
});
});
zjNews
.
value
=
rowsList
;
total
.
value
=
data
.
total
;
});
newsList
.
value
=
rowsList
;
}
// console.log(newsList.value);
getFlList
();
//获取法律法规
function
getFlList
()
{
const
datas
=
{
contentType
:
flfg
,
pageSize
:
2
,
pageNo
:
1
,
};
getNewsList
(
datas
).
then
((
response
)
=>
{
flNews
.
value
=
response
.
data
.
rows
;
});
});
}
}
function
getToDetail
(
id
:
number
)
{
function
getToDetail
(
id
:
number
)
{
router
.
push
({
router
.
push
({
path
:
"/
py
/news/detail"
,
path
:
"/
home
/news/detail"
,
query
:
{
query
:
{
type
:
1
,
type
:
1
,
id
:
id
,
id
:
id
,
...
...
src/components/py/NewsList.vue
View file @
af7382ab
...
@@ -2,16 +2,8 @@
...
@@ -2,16 +2,8 @@
<
template
>
<
template
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<div
<bread-crumb
:breadcrumbItems=
"breadcrumbItems"
/>
class=
"flex items-center text-sm text-gray-500 mb-5"
v-if=
"homeMoreType == '-1'"
>
<router-link
to=
"/py/pyhome"
class=
"text-gray-500 hover:text-blue-500"
>
首页
</router-link
>
<el-icon
class=
"mx-2"
><ArrowRight
/></el-icon>
<span
class=
"text-gray-900"
>
{{
getTitleLink
()
}}
</span>
</div>
<div
class=
"flex gap-6"
>
<div
class=
"flex gap-6"
>
<div
class=
"flex-1"
>
<div
class=
"flex-1"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
...
@@ -167,6 +159,7 @@ import { getNewsList } from "@/api/home/news/list";
...
@@ -167,6 +159,7 @@ import { getNewsList } from "@/api/home/news/list";
import
{
baseImageUrl
,
pyzq
,
qwfb
,
zjjd
,
flfg
}
from
"@/utils/config"
;
import
{
baseImageUrl
,
pyzq
,
qwfb
,
zjjd
,
flfg
}
from
"@/utils/config"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
ca
}
from
"element-plus/es/locales.mjs"
;
import
{
ca
}
from
"element-plus/es/locales.mjs"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
route
=
useRoute
();
...
@@ -174,6 +167,23 @@ const pageNo = ref(1);
...
@@ -174,6 +167,23 @@ const pageNo = ref(1);
const
pageSize
=
ref
(
10
);
const
pageSize
=
ref
(
10
);
const
total
=
ref
(
0
);
const
total
=
ref
(
0
);
const
props
=
defineProps
({
title
:
String
,
pathType
:
String
,
type0
:
String
,
type1
:
String
,
type2
:
String
,
type3
:
String
,
title1
:
String
,
title2
:
String
,
title3
:
String
,
});
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/py/pyhome"
},
{
title
:
props
.
title
},
]);
const
handleSizeChange
=
(
val
:
number
)
=>
{
const
handleSizeChange
=
(
val
:
number
)
=>
{
pageSize
.
value
=
val
;
pageSize
.
value
=
val
;
pageNo
.
value
=
pageNo
.
value
;
pageNo
.
value
=
pageNo
.
value
;
...
@@ -187,31 +197,6 @@ const list = ref([]);
...
@@ -187,31 +197,6 @@ const list = ref([]);
const
list1
=
ref
([]);
const
list1
=
ref
([]);
const
list2
=
ref
([]);
const
list2
=
ref
([]);
const
list3
=
ref
([]);
const
list3
=
ref
([]);
const
props
=
defineProps
({
typePage
:
String
,
type0
:
String
,
type1
:
String
,
type2
:
String
,
type3
:
String
,
title1
:
String
,
title2
:
String
,
title3
:
String
,
homeMoreType
:
String
,
});
function
getTitleLink
()
{
switch
(
props
.
typePage
)
{
case
"3"
:
{
return
"专家解读"
;
}
case
"2"
:
{
return
"辟谣专区"
;
}
case
"4"
:
{
return
"法律法规"
;
}
}
}
getList
(
10
,
1
);
getList
(
10
,
1
);
getList1
();
getList1
();
...
@@ -297,12 +282,14 @@ function getToDetail(id: number) {
...
@@ -297,12 +282,14 @@ function getToDetail(id: number) {
router
.
push
({
router
.
push
({
path
:
"/py/news/detail"
,
path
:
"/py/news/detail"
,
query
:
{
query
:
{
type
:
props
.
typePage
,
title
:
props
.
title
,
pathType
:
props
.
pathType
,
type1
:
props
.
type1
,
type1
:
props
.
type1
,
type2
:
props
.
type2
,
type2
:
props
.
type2
,
title1
:
props
.
title1
,
title1
:
props
.
title1
,
title2
:
props
.
title2
,
title2
:
props
.
title2
,
id
:
id
,
id
:
id
,
page
:
route
.
query
.
page
,
},
},
});
});
}
}
...
...
src/layout/news.vue
View file @
af7382ab
...
@@ -12,13 +12,23 @@
...
@@ -12,13 +12,23 @@
<h1
class=
"text-2xl font-bold text-black"
>
<h1
class=
"text-2xl font-bold text-black"
>
太原市互联网应急指挥和举报中心
太原市互联网应急指挥和举报中心
</h1>
</h1>
<div
class=
"
relative w-[360px]
"
>
<div
class=
"
flex relative w-[360px] gap-4
"
>
<el-input
<el-input
v-model=
"searchQuery"
v-model=
"searchQuery"
class=
"!rounded-full"
class=
"!rounded-full"
placeholder=
"搜索新闻、通知、政策文件..."
placeholder=
"搜索新闻、通知、政策文件..."
:prefix-icon=
"Search"
:prefix-icon=
"Search"
@
keyup
.
enter=
"handleSearch"
/>
/>
<button
class=
"flex items-center px-4 py-[9px] bg-blue-500 text-white rounded-[10px] hover:bg-blue-600 transition-colors whitespace-nowrap"
style=
"border: none"
@
click=
"handleSearch"
>
<el-icon
class=
"mr-1"
><Search
/></el-icon>
<span>
搜索
</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -73,24 +83,14 @@
...
@@ -73,24 +83,14 @@
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
{
Swiper
,
SwiperSlide
}
from
"swiper/vue"
;
import
{
Pagination
,
Autoplay
}
from
"swiper/modules"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
import
{
Message
,
Share
,
Link
,
Search
}
from
"@element-plus/icons-vue"
;
VideoPlay
,
Message
,
Share
,
Link
,
Search
,
Document
,
}
from
"@element-plus/icons-vue"
;
import
{
getTab
}
from
"@/api/home/home"
;
import
{
getTab
}
from
"@/api/home/home"
;
import
{
HLW_YJZH_JBZX
}
from
"@/utils/config"
;
import
{
HLW_YJZH_JBZX
}
from
"@/utils/config"
;
import
{
ElMessage
}
from
"element-plus"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
swiperModules
=
[
Pagination
,
Autoplay
];
const
searchQuery
=
ref
(
""
);
const
searchQuery
=
ref
(
""
);
const
activeNav
=
ref
(
0
);
const
activeNav
=
ref
(
0
);
// const navItems = ["首页", "新闻热点", "太原新闻", "山西新闻", "通知公告"];
const
navItems
=
ref
([]);
const
navItems
=
ref
([]);
const
data
=
{
const
data
=
{
...
@@ -119,32 +119,16 @@ function navigateTo(index, item) {
...
@@ -119,32 +119,16 @@ function navigateTo(index, item) {
activeNav
.
value
=
index
;
activeNav
.
value
=
index
;
}
}
const
hotNews
=
[
function
handleSearch
()
{
{
if
(
searchQuery
.
value
)
{
title
:
'太原市获评"2023年度网络安全示范城市"'
,
router
.
push
({
path
:
"/home/search"
,
query
:
{
searchQuery
:
searchQuery
.
value
}
});
date
:
"2024-01-13"
,
}
else
{
},
ElMessage
({
{
message
:
"请输入搜索内容"
,
title
:
"我市开展网络安全专项整治行动"
,
type
:
"warning"
,
date
:
"2024-01-12"
,
});
},
}
{
}
title
:
"太原互联网企业助力乡村振兴"
,
date
:
"2024-01-11"
,
},
];
const
videoNews
=
[
{
title
:
"2024太原网络安全周开幕式"
,
cover
:
"https://ai-public.mastergo.com/ai/img_res/c127709d932c688f0fd802b468fbeb1b.jpg"
,
},
{
title
:
"太原智慧城市建设成果展示"
,
cover
:
"https://ai-public.mastergo.com/ai/img_res/04b4d2ca1d91d73dac6a0f4316b13165.jpg"
,
},
];
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.line-clamp-2
{
.line-clamp-2
{
...
...
src/layout/py.vue
View file @
af7382ab
...
@@ -15,13 +15,13 @@
...
@@ -15,13 +15,13 @@
<div
class=
"container mx-auto px-8"
>
<div
class=
"container mx-auto px-8"
>
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex justify-between items-center"
>
<div
<div
v-for=
"(item, index) in
menu
Items"
v-for=
"(item, index) in
nav
Items"
:key=
"index"
:key=
"index"
class=
"py-4 px-6 cursor-pointer hover:bg-white/10 transition-colors"
class=
"py-4 px-6 cursor-pointer hover:bg-white/10 transition-colors"
:class=
"
{ 'bg-white/10': activeIndex === index }"
:class=
"
{ 'bg-white/10': activeIndex === index }"
@click="navigateTo(index)"
@click="navigateTo(index)"
>
>
<span
class=
"text-white"
>
{{
item
}}
</span>
<span
class=
"text-white"
>
{{
item
.
categoryTitle
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -57,17 +57,31 @@ import {
...
@@ -57,17 +57,31 @@ import {
Bell
,
Bell
,
Collection
,
Collection
,
}
from
"@element-plus/icons-vue"
;
}
from
"@element-plus/icons-vue"
;
import
{
HLW_LH_PYPT
}
from
"@/utils/config"
;
import
{
getTab
}
from
"@/api/home/home"
;
const
activeIndex
=
ref
(
"0"
);
const
activeIndex
=
ref
(
"0"
);
const
router
=
useRouter
();
const
router
=
useRouter
();
const
swiperModules
=
[
Pagination
,
Navigation
,
Autoplay
];
const
menuItems
=
[
const
navItems
=
ref
([]);
"首页"
,
"权威发布"
,
const
data
=
{
"辟谣专区"
,
categoryFlag
:
HLW_LH_PYPT
,
"专家解读"
,
};
"法律法规"
,
"读图识谣"
,
getTab
(
data
).
then
((
res
)
=>
{
];
console
.
log
(
res
);
const
data
=
res
.
data
.
rows
;
// //用data内的categorySort排序
data
.
sort
((
a
,
b
)
=>
a
.
categorySort
-
b
.
categorySort
);
//将data内categoryTitle等于“权威发布”和“辟谣专区”和“轮播图”的数据过滤不在navItems.value中显示
const
filterData
=
data
.
filter
(
(
item
)
=>
item
.
categoryTitle
!==
"轮播图"
&&
item
.
categoryTitle
!==
"山西互联网联合辟谣平台"
);
navItems
.
value
=
filterData
;
});
function
navigateTo
(
index
)
{
function
navigateTo
(
index
)
{
const
routes
=
[
const
routes
=
[
...
@@ -81,109 +95,6 @@ function navigateTo(index) {
...
@@ -81,109 +95,6 @@ function navigateTo(index) {
router
.
push
(
routes
[
index
].
path
).
catch
((
err
)
=>
{});
router
.
push
(
routes
[
index
].
path
).
catch
((
err
)
=>
{});
activeIndex
.
value
=
index
;
activeIndex
.
value
=
index
;
}
}
const
slides
=
[
{
src
:
"https://ai-public.mastergo.com/ai/img_res/a6c6b005094da8f76e79def3225b4ea0.jpg"
,
},
{
src
:
"https://ai-public.mastergo.com/ai/img_res/cc20fdfc4e9bcd53c4f517b03036c8a2.jpg"
,
},
{
src
:
"https://ai-public.mastergo.com/ai/img_res/40e648e87a974e8fe013b6f4b9b0ac2b.jpg"
,
},
];
const
quickLinks
=
[
{
icon
:
Document
,
title
:
"最新辟谣"
},
{
icon
:
UserFilled
,
title
:
"举报入口"
},
{
icon
:
Lock
,
title
:
"安全提醒"
},
{
icon
:
List
,
title
:
"政策法规"
},
{
icon
:
Service
,
title
:
"在线咨询"
},
{
icon
:
Bell
,
title
:
"举报中心"
},
{
icon
:
Collection
,
title
:
"知识库"
},
];
const
sections
=
[
{
title
:
"专家解读"
,
items
:
[
"专家详解:新冠病毒变异株的特点与防护要点"
,
"权威专家谈饮食健康:科学认识营养补充剂"
,
"医学专家解读:常见慢性病的预防与管理"
,
"专家视角:解读最新公共卫生政策"
,
"心理健康专家:如何应对现代生活压力"
,
"环境卫生专家:空气污染与健康防护"
,
"运动医学专家:科学健身指南"
,
"营养学专家:平衡饮食的重要性"
,
"中医专家:传统养生之道的现代价值"
,
"公共卫生专家:群体免疫的科学认识"
,
],
},
{
title
:
"辟谣专区"
,
items
:
[
"辟谣:喝热水可以预防新冠病毒感染?"
,
"谣言粉碎:5G基站会传播病毒"
,
"假新闻核实:某食品添加剂致癌?"
,
"事实核查:网传特效药可治百病"
,
"辟谣:转发朋友圈可以赚钱?"
,
"真相:某款保健品包治百病"
,
"谣言终结:吃某水果可预防癌症"
,
"揭秘:网传养生方法的科学依据"
,
],
},
{
title
:
"法律法规"
,
items
:
[
"《中华人民共和国网络安全法》解读"
,
"《互联网信息服务管理办法》要点"
,
"《网络谣言治理规定》重点条款"
,
"《个人信息保护法》主要内容"
,
"《数据安全法》核心要义"
,
"《未成年人网络保护条例》解析"
,
"《网络信息内容生态治理规定》"
,
"《网络安全审查办法》要点"
,
"《互联网新闻信息服务管理规定》"
,
"《网络直播营销管理办法》解读"
,
],
},
];
const
serviceCards
=
[
{
image
:
"https://ai-public.mastergo.com/ai/img_res/2655e0a0acf47c07b9c8ff060c82bbc1.jpg"
,
title
:
"健康科普讲堂"
,
description
:
"权威专家为您解读健康知识"
,
},
{
image
:
"https://ai-public.mastergo.com/ai/img_res/2f71d88aad56bf2fd7cf852bb161fa9a.jpg"
,
title
:
"食品安全专区"
,
description
:
"关注食品安全 守护健康生活"
,
},
{
image
:
"https://ai-public.mastergo.com/ai/img_res/96a618b8d32896b05bbf19a1e237bb5c.jpg"
,
title
:
"网络安全知识"
,
description
:
"提高网络安全意识"
,
},
{
image
:
"https://ai-public.mastergo.com/ai/img_res/7f28f51c022005811277c6aeb56a604e.jpg"
,
title
:
"法律咨询服务"
,
description
:
"专业律师在线解答"
,
},
{
image
:
"https://ai-public.mastergo.com/ai/img_res/eca0048f8f7939e3dacd3026bdb7cebb.jpg"
,
title
:
"科技辟谣"
,
description
:
"揭穿科技谣言真相"
,
},
{
image
:
"https://ai-public.mastergo.com/ai/img_res/067a33b74280646e216710bf650a909f.jpg"
,
title
:
"环保真相"
,
description
:
"环保谣言不再迷惑"
,
},
];
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.hero-bg
{
.hero-bg
{
...
...
src/layout/wm.vue
View file @
af7382ab
...
@@ -45,15 +45,18 @@
...
@@ -45,15 +45,18 @@
<el-icon><Search
/></el-icon>
<el-icon><Search
/></el-icon>
</
template
>
</
template
>
</el-input>
</el-input>
<button
<button
class=
"flex items-center px-4 py-[9px] bg-blue-500 text-white hover:bg-blue-600 transition-colors !rounded-button whitespace-nowrap"
class=
"flex items-center px-4 py-[9px] bg-blue-500 text-white rounded-[10px] hover:bg-blue-600 transition-colors whitespace-nowrap"
style=
"border: none"
>
>
<el-icon
class=
"mr-1"
><Search
/></el-icon>
<el-icon
class=
"mr-1"
><Search
/></el-icon>
<span>
搜索
</span>
<span>
搜索
</span>
</button>
</button>
<button
<button
@
click=
"iMessageClick"
@
click=
"iMessageClick"
class=
"flex items-center px-6 py-[9px] bg-white text-blue-800 hover:bg-blue-50 transition-colors !rounded-button whitespace-nowrap"
class=
"flex items-center px-6 py-[9px] bg-white text-blue-800 rounded-[10px] hover:bg-blue-50 transition-colors !rounded-button whitespace-nowrap"
style=
"border: none"
>
>
<span>
我要留言
</span>
<span>
我要留言
</span>
<el-icon
class=
"ml-1"
><ArrowRight
/></el-icon>
<el-icon
class=
"ml-1"
><ArrowRight
/></el-icon>
...
...
src/router/index.ts
View file @
af7382ab
...
@@ -9,6 +9,7 @@ import ShanxiNews from "../views/home/sxnews/ShanxiNews.vue";
...
@@ -9,6 +9,7 @@ import ShanxiNews from "../views/home/sxnews/ShanxiNews.vue";
import
Announcements
from
"../views/home/announcements/Announcements.vue"
;
import
Announcements
from
"../views/home/announcements/Announcements.vue"
;
import
Jb
from
"../views/home/jb/Jb.vue"
;
import
Jb
from
"../views/home/jb/Jb.vue"
;
import
NewsDetail
from
"../views/home/detail/NewsDetail.vue"
;
import
NewsDetail
from
"../views/home/detail/NewsDetail.vue"
;
import
SearchList
from
"../views/home/search/SearchList.vue"
;
//辟谣
//辟谣
import
PyLayout
from
"../layout/py.vue"
;
import
PyLayout
from
"../layout/py.vue"
;
...
@@ -73,6 +74,11 @@ const router = createRouter({
...
@@ -73,6 +74,11 @@ const router = createRouter({
path
:
"/home/news/detail"
,
path
:
"/home/news/detail"
,
component
:
NewsDetail
,
component
:
NewsDetail
,
},
},
{
name
:
"SearchList"
,
path
:
"/home/search"
,
component
:
SearchList
,
},
],
],
},
},
{
{
...
...
src/utils/config.js
View file @
af7382ab
...
@@ -23,12 +23,13 @@ export const PY_ZQ_ID = "1876540606213939201"; //辟谣专区
...
@@ -23,12 +23,13 @@ export const PY_ZQ_ID = "1876540606213939201"; //辟谣专区
export
const
LBT_ID
=
"1876561611942682626"
;
//轮播图
export
const
LBT_ID
=
"1876561611942682626"
;
//轮播图
//文章类型
//文章类型
export
const
lbt
=
"
lbt"
;
// 轮播图
export
const
yjjblbt
=
"yjjb
lbt"
;
// 轮播图
export
const
rdxw
=
"rdxw"
;
// 热点新闻
export
const
rdxw
=
"rdxw"
;
// 热点新闻
export
const
tyxw
=
"tyxw"
;
// 太原新闻
export
const
tyxw
=
"tyxw"
;
// 太原新闻
export
const
sxxw
=
"sxxw"
;
// 山西新闻
export
const
sxxw
=
"sxxw"
;
// 山西新闻
export
const
tzgg
=
"tzgg"
;
// 通知公告
export
const
tzgg
=
"tzgg"
;
// 通知公告
export
const
lhpylbt
=
"lhpylbt"
;
// 轮播图
export
const
qwfb
=
"qwfb"
;
// 权威发布
export
const
qwfb
=
"qwfb"
;
// 权威发布
export
const
pyzq
=
"pyzq"
;
// 辟谣专区
export
const
pyzq
=
"pyzq"
;
// 辟谣专区
export
const
zjjd
=
"zjjd"
;
// 专家解读
export
const
zjjd
=
"zjjd"
;
// 专家解读
...
...
src/views/home/announcements/Announcements.vue
View file @
af7382ab
<!-- 代码已包含 CSS:使用 TailwindCSS , 安装 TailwindCSS 后方可看到布局样式效果 -->
<!-- 代码已包含 CSS:使用 TailwindCSS , 安装 TailwindCSS 后方可看到布局样式效果 -->
<
template
>
<
template
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"container mx-auto px-0 py-5 w-[1440px]"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<bread-crumb
:breadcrumbItems=
"breadcrumbItems"
/>
<div
class=
"flex gap-6"
>
<div
class=
"flex gap-6"
>
<div
class=
"flex-1"
>
<div
class=
"flex-1"
>
<!-- 列表区域 -->
<!-- 列表区域 -->
...
@@ -117,6 +118,7 @@ import { Search, Refresh, View } from "@element-plus/icons-vue";
...
@@ -117,6 +118,7 @@ import { Search, Refresh, View } from "@element-plus/icons-vue";
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
baseImageUrl
,
rdxw
,
sxxw
,
tzgg
,
tyxw
}
from
"@/utils/config"
;
import
{
baseImageUrl
,
rdxw
,
sxxw
,
tzgg
,
tyxw
}
from
"@/utils/config"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
route
=
useRoute
();
...
@@ -129,6 +131,10 @@ const total = ref(100);
...
@@ -129,6 +131,10 @@ const total = ref(100);
const
tableData
=
ref
([]);
const
tableData
=
ref
([]);
const
tyNews
=
ref
([]);
const
tyNews
=
ref
([]);
const
announcements
=
ref
([]);
const
announcements
=
ref
([]);
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/home/home"
},
{
title
:
"通知公告"
},
]);
const
handleSizeChange
=
(
val
:
number
)
=>
{
const
handleSizeChange
=
(
val
:
number
)
=>
{
pageSize
.
value
=
val
;
pageSize
.
value
=
val
;
...
@@ -165,6 +171,8 @@ function goToDetail(id: number) {
...
@@ -165,6 +171,8 @@ function goToDetail(id: number) {
router
.
push
({
router
.
push
({
path
:
"/home/news/detail"
,
path
:
"/home/news/detail"
,
query
:
{
query
:
{
title
:
"通知公告"
,
titlePath
:
"/home/announcements"
,
type
:
4
,
type
:
4
,
id
:
id
,
id
:
id
,
},
},
...
...
src/views/home/detail/NewsDetail.vue
View file @
af7382ab
<
template
>
<
template
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"w-[1440px] mx-auto px-0 py-5"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<div
class=
"flex items-center text-sm text-gray-500 mb-2"
>
<bread-crumb
<router-link
:breadcrumbItems=
"
:to=
"toRoute()"
route.query.titlePath == '-1' ? breadcrumbItems2 : breadcrumbItems
class=
"text-gray-500 hover:text-blue-500"
"
>
{{
toRouteName
()
}}
</router-link
/>
>
<el-icon
class=
"mx-2"
><ArrowRight
/></el-icon>
<span
class=
"text-gray-900"
>
新闻详情
</span>
</div>
<!-- 主要内容区 -->
<!-- 主要内容区 -->
<div
class=
"grid grid-cols-3 gap-8"
>
<div
class=
"grid grid-cols-3 gap-8"
>
<!-- 左侧主要新闻内容 -->
<!-- 左侧主要新闻内容 -->
...
@@ -117,10 +113,22 @@ import {
...
@@ -117,10 +113,22 @@ import {
TZ_GG_ID
,
TZ_GG_ID
,
}
from
"@/utils/config"
;
}
from
"@/utils/config"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
route
=
useRoute
();
const
route
=
useRoute
();
const
router
=
useRouter
();
const
router
=
useRouter
();
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/home/home"
},
{
title
:
route
.
query
.
title
,
path
:
route
.
query
.
titlePath
},
{
title
:
"详情"
,
path
:
""
},
]);
const
breadcrumbItems2
=
ref
([
{
title
:
"首页"
,
path
:
"/home/home"
},
{
title
:
"详情"
,
path
:
""
},
]);
function
toRouteName
()
{
function
toRouteName
()
{
switch
(
route
.
query
.
type
)
{
switch
(
route
.
query
.
type
)
{
case
"0"
:
case
"0"
:
...
...
src/views/home/home/HomeView.vue
View file @
af7382ab
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
</div>
</div>
</div>
</div>
<!-- 权威发布与辟谣专区 -->
<!-- 权威发布与辟谣专区 -->
<div
class=
"container mx-auto px-4 mt-0 w-[1440px]"
>
<div
class=
"container mx-auto px-4 mt-
1
0 w-[1440px]"
>
<div
class=
"grid grid-cols-2 gap-6"
>
<div
class=
"grid grid-cols-2 gap-6"
>
<!-- 权威发布 -->
<!-- 权威发布 -->
<div
class=
"bg-white rounded-lg p-6 shadow-sm"
>
<div
class=
"bg-white rounded-lg p-6 shadow-sm"
>
...
@@ -276,7 +276,7 @@ import {
...
@@ -276,7 +276,7 @@ import {
sxxw
,
sxxw
,
tzgg
,
tzgg
,
tyxw
,
tyxw
,
lbt
,
yjjb
lbt
,
pyzq
,
pyzq
,
qwfb
,
qwfb
,
}
from
"@/utils/config"
;
}
from
"@/utils/config"
;
...
@@ -285,7 +285,6 @@ const router = useRouter();
...
@@ -285,7 +285,6 @@ const router = useRouter();
const
swiperModules
=
[
Pagination
,
Autoplay
];
const
swiperModules
=
[
Pagination
,
Autoplay
];
const
searchQuery
=
ref
(
""
);
const
searchQuery
=
ref
(
""
);
const
activeNav
=
ref
(
0
);
const
activeNav
=
ref
(
0
);
const
navItems
=
[
"首页"
,
"新闻热点"
,
"太原新闻"
,
"山西新闻"
,
"通知公告"
];
const
handleClick
=
(
index
:
number
,
entry
:
any
)
=>
{
const
handleClick
=
(
index
:
number
,
entry
:
any
)
=>
{
switch
(
index
)
{
switch
(
index
)
{
case
0
:
case
0
:
...
@@ -336,6 +335,7 @@ function goToDetail(id: number) {
...
@@ -336,6 +335,7 @@ function goToDetail(id: number) {
router
.
push
({
router
.
push
({
path
:
"/home/news/detail"
,
path
:
"/home/news/detail"
,
query
:
{
query
:
{
titlePath
:
"-1"
,
type
:
0
,
type
:
0
,
id
:
id
,
id
:
id
,
},
},
...
@@ -409,7 +409,7 @@ getLbtList(5, 1);
...
@@ -409,7 +409,7 @@ getLbtList(5, 1);
//获取首页轮播图
//获取首页轮播图
function
getLbtList
(
pageSize
:
number
,
pageNo
:
number
)
{
function
getLbtList
(
pageSize
:
number
,
pageNo
:
number
)
{
const
datas
=
{
const
datas
=
{
contentType
:
lbt
,
contentType
:
yjjb
lbt
,
pageSize
:
pageSize
,
pageSize
:
pageSize
,
pageNo
:
pageNo
,
pageNo
:
pageNo
,
};
};
...
...
src/views/home/hotnews/News.vue
View file @
af7382ab
<!-- 代码已包含 CSS:使用 TailwindCSS , 安装 TailwindCSS 后方可看到布局样式效果 -->
<!-- 代码已包含 CSS:使用 TailwindCSS , 安装 TailwindCSS 后方可看到布局样式效果 -->
<
template
>
<
template
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"container mx-auto px-0 py-5 w-[1440px]"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<bread-crumb
:breadcrumbItems=
"breadcrumbItems"
/>
<div
class=
"flex gap-6"
>
<div
class=
"flex gap-6"
>
<div
class=
"flex-1"
>
<div
class=
"flex-1"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
...
@@ -150,12 +152,17 @@ import {
...
@@ -150,12 +152,17 @@ import {
ArrowRight
,
ArrowRight
,
}
from
"@element-plus/icons-vue"
;
}
from
"@element-plus/icons-vue"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
route
=
useRoute
();
const
pageNo
=
ref
(
1
);
const
pageNo
=
ref
(
1
);
const
pageSize
=
ref
(
10
);
const
pageSize
=
ref
(
10
);
const
total
=
ref
(
0
);
const
total
=
ref
(
0
);
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/home/home"
},
{
title
:
"热点新闻"
},
]);
const
handleSizeChange
=
(
val
:
number
)
=>
{
const
handleSizeChange
=
(
val
:
number
)
=>
{
pageSize
.
value
=
val
;
pageSize
.
value
=
val
;
...
@@ -241,6 +248,8 @@ function getToDetail(id: number) {
...
@@ -241,6 +248,8 @@ function getToDetail(id: number) {
router
.
push
({
router
.
push
({
path
:
"/home/news/detail"
,
path
:
"/home/news/detail"
,
query
:
{
query
:
{
title
:
"热点新闻"
,
titlePath
:
"/home/news"
,
type
:
1
,
type
:
1
,
id
:
id
,
id
:
id
,
},
},
...
...
src/views/home/search/SearchList.vue
0 → 100644
View file @
af7382ab
<!-- 代码已包含 CSS:使用 TailwindCSS , 安装 TailwindCSS 后方可看到布局样式效果 -->
<
template
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<bread-crumb
:breadcrumbItems=
"breadcrumbItems"
/>
<div
class=
"flex gap-6"
>
<div
class=
"flex-1"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
<div
v-for=
"(news, index) in newsList"
:key=
"index"
class=
"group p-4 flex items-start border-b border-gray-100 hover:bg-gray-50 transition-colors cursor-pointer"
@
click=
"getToDetail(news.id)"
>
<div
class=
"w-32 h-32 flex-shrink-0 overflow-hidden rounded-lg"
>
<el-image
class=
"w-full h-full object-cover"
:src=
"news.images"
fit=
"fill"
/>
</div>
<div
class=
"flex-grow px-6"
>
<h2
class=
"text-lg font-semibold mb-2 group-hover:text-blue-600 line-clamp-2 text-black"
>
{{
news
.
contentTitle
}}
</h2>
<p
class=
"text-gray-600 text-sm line-clamp-2"
>
{{
news
.
contentDescription
}}
</p>
<div
class=
"mt-3 flex items-center space-x-4"
>
<span
class=
"text-sm text-gray-500 flex items-center"
>
<el-icon
class=
"mr-1"
><Clock
/></el-icon>
{{
news
.
contentDatetime
}}
</span>
<span
class=
"text-sm text-gray-500 flex items-center"
>
<el-icon
class=
"mr-1"
><Document
/></el-icon>
{{
news
.
contentTags
}}
</span>
<span
class=
"text-sm text-gray-500 flex items-center"
>
<el-icon
class=
"mr-1"
><View
/></el-icon>
{{
news
.
contentHit
}}
</span>
</div>
</div>
<div
class=
"w-24 flex-shrink-0 text-right text-blue-500"
>
<el-tag
:type=
"news.contentTags"
size=
"small"
class=
"whitespace-nowrap"
>
{{
news
.
contentTags
}}
</el-tag>
</div>
</div>
</div>
<div
class=
"flex justify-center mt-8"
>
<!--
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage4"
:page-sizes=
"[100, 200, 300, 400]"
:page-size=
"100"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"400"
>
</el-pagination>
-->
<el-pagination
v-model:current-page=
"pageNo"
v-model:page-size=
"pageSize"
background
:total=
"total"
:page-sizes=
"[10, 20, 30, 40]"
layout=
"prev, pager, next"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</div>
<div
class=
"w-80 flex-shrink-0 space-y-6"
>
<!-- 本地新闻 -->
<div
class=
"bg-white rounded-lg shadow-sm p-4"
>
<h2
class=
"text-xl font-bold mb-4 flex items-center text-black"
>
<el-icon
class=
"mr-2 text-blue-500"
><Location
/></el-icon>
太原新闻
</h2>
<div
class=
"space-y-4"
>
<div
v-for=
"(item, index) in tyNews"
:key=
"index"
class=
"group cursor-pointer"
@
click=
"getToDetail(item.id)"
>
<div
class=
"h-32 mb-2 overflow-hidden rounded-lg"
>
<!--
<el-image
class=
"w-full h-full object-cover"
:src=
"item.images"
:fit=
"fit"
></el-image>
-->
<img
:src=
"item.images"
:alt=
"item.title"
class=
"w-full h-full object-cover"
/>
</div>
<div
class=
"text-sm font-medium group-hover:text-blue-600 line-clamp-2 text-black"
>
{{
item
.
contentTitle
}}
</div>
</div>
</div>
</div>
<!-- 通知公告 -->
<div
class=
"bg-white rounded-lg shadow-sm p-4"
>
<h2
class=
"text-xl font-bold mb-4 flex items-center text-black"
>
<el-icon
class=
"mr-2 text-orange-500"
><Bell
/></el-icon>
通知公告
</h2>
<div
class=
"space-y-3"
>
<div
v-for=
"(item, index) in announcements"
:key=
"index"
class=
"flex items-center space-x-2 group cursor-pointer"
@
click=
"getToDetail(item.id)"
>
<el-tag
size=
"small"
:type=
"item.type"
>
公告
</el-tag>
<span
class=
"text-sm group-hover:text-blue-600 flex-1 line-clamp-1 text-black"
>
{{
item
.
contentTitle
}}
</span
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
"vue"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
baseImageUrl
,
rdxw
,
tyxw
,
tzgg
}
from
"@/utils/config"
;
import
{
Clock
,
Document
,
View
,
Star
,
Location
,
Bell
,
ArrowRight
,
}
from
"@element-plus/icons-vue"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
router
=
useRouter
();
const
route
=
useRoute
();
const
pageNo
=
ref
(
1
);
const
pageSize
=
ref
(
10
);
const
total
=
ref
(
0
);
//搜索内容
const
searchQuery
=
route
.
query
.
searchQuery
;
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/home/home"
},
{
title
:
"搜索结果"
},
]);
const
handleSizeChange
=
(
val
:
number
)
=>
{
pageSize
.
value
=
val
;
pageNo
.
value
=
pageNo
.
value
;
};
const
handleCurrentChange
=
(
val
:
number
)
=>
{
pageSize
.
value
=
pageSize
.
value
;
pageNo
.
value
=
val
;
getList
(
pageSize
.
value
,
pageNo
.
value
);
};
const
newsList
=
ref
([]);
const
tyNews
=
ref
([]);
const
announcements
=
ref
([]);
getTyNewsList
(
3
,
1
);
//获取太原新闻
function
getTyNewsList
(
pageSize
:
number
,
pageNo
:
number
)
{
const
datas
=
{
contentType
:
tyxw
,
pageSize
:
pageSize
,
pageNo
:
pageNo
,
};
getNewsList
(
datas
).
then
((
response
)
=>
{
const
data
=
response
.
data
;
const
rowsList
=
data
.
rows
;
rowsList
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
contentImg
)
{
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
}
});
tyNews
.
value
=
rowsList
;
});
}
getTzGgNewsList
(
5
,
1
);
//获取通知公告
function
getTzGgNewsList
(
pageSize
:
number
,
pageNo
:
number
)
{
const
datas
=
{
contentType
:
tzgg
,
pageSize
:
pageSize
,
pageNo
:
pageNo
,
};
getNewsList
(
datas
).
then
((
response
)
=>
{
const
data
=
response
.
data
;
const
rowsList
=
data
.
rows
;
rowsList
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
contentImg
)
{
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
}
});
announcements
.
value
=
rowsList
;
});
}
getList
(
pageSize
.
value
,
pageNo
.
value
);
//获取新闻热点列表
function
getList
(
pageSize
:
number
,
pageNo
:
number
)
{
// newsList.value = [];
const
datas
=
{
contentType
:
rdxw
,
pageSize
:
pageSize
,
pageNo
:
pageNo
,
};
getNewsList
(
datas
).
then
((
response
)
=>
{
const
data
=
response
.
data
;
const
rowsList
=
data
.
rows
;
rowsList
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
contentImg
)
{
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
}
});
total
.
value
=
data
.
total
;
newsList
.
value
=
rowsList
;
// console.log(newsList.value);
});
}
function
getToDetail
(
id
:
number
)
{
router
.
push
({
path
:
"/home/news/detail"
,
query
:
{
title
:
"搜索结果"
,
titlePath
:
"/home/search"
,
type
:
1
,
id
:
id
,
},
});
}
</
script
>
<
style
scoped
>
.line-clamp-2
{
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
}
.line-clamp-1
{
display
:
-webkit-box
;
-webkit-line-clamp
:
1
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
}
</
style
>
src/views/home/sxnews/ShanxiNews.vue
View file @
af7382ab
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
<
template
>
<
template
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<bread-crumb
:breadcrumbItems=
"breadcrumbItems"
/>
<div
class=
"flex gap-6"
>
<div
class=
"flex gap-6"
>
<div
class=
"flex-1"
>
<div
class=
"flex-1"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
...
@@ -133,6 +135,7 @@ import {
...
@@ -133,6 +135,7 @@ import {
ArrowRight
,
ArrowRight
,
}
from
"@element-plus/icons-vue"
;
}
from
"@element-plus/icons-vue"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
route
=
useRoute
();
...
@@ -140,6 +143,11 @@ const pageNo = ref(1);
...
@@ -140,6 +143,11 @@ const pageNo = ref(1);
const
pageSize
=
ref
(
10
);
const
pageSize
=
ref
(
10
);
const
total
=
ref
(
0
);
const
total
=
ref
(
0
);
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/home/home"
},
{
title
:
"山西新闻"
},
]);
const
handleSizeChange
=
(
val
:
number
)
=>
{
const
handleSizeChange
=
(
val
:
number
)
=>
{
pageSize
.
value
=
val
;
pageSize
.
value
=
val
;
pageNo
.
value
=
pageNo
.
value
;
pageNo
.
value
=
pageNo
.
value
;
...
@@ -220,6 +228,8 @@ function getToDetail(id: number, contentDetails: string) {
...
@@ -220,6 +228,8 @@ function getToDetail(id: number, contentDetails: string) {
router
.
push
({
router
.
push
({
path
:
"/home/news/detail"
,
path
:
"/home/news/detail"
,
query
:
{
query
:
{
title
:
"山西新闻"
,
titlePath
:
"/home/sxnews"
,
type
:
3
,
type
:
3
,
id
:
id
,
id
:
id
,
},
},
...
...
src/views/home/tynews/TaiyuanNews.vue
View file @
af7382ab
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
<
template
>
<
template
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<bread-crumb
:breadcrumbItems=
"breadcrumbItems"
/>
<div
class=
"flex gap-6"
>
<div
class=
"flex gap-6"
>
<div
class=
"flex-1"
>
<div
class=
"flex-1"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
<div
class=
"bg-white rounded-lg shadow-sm"
>
...
@@ -133,6 +135,7 @@ import {
...
@@ -133,6 +135,7 @@ import {
ArrowRight
,
ArrowRight
,
}
from
"@element-plus/icons-vue"
;
}
from
"@element-plus/icons-vue"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
route
=
useRoute
();
...
@@ -140,6 +143,11 @@ const pageNo = ref(1);
...
@@ -140,6 +143,11 @@ const pageNo = ref(1);
const
pageSize
=
ref
(
10
);
const
pageSize
=
ref
(
10
);
const
total
=
ref
(
0
);
const
total
=
ref
(
0
);
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/home/home"
},
{
title
:
"太原新闻"
},
]);
const
handleSizeChange
=
(
val
:
number
)
=>
{
const
handleSizeChange
=
(
val
:
number
)
=>
{
pageSize
.
value
=
val
;
pageSize
.
value
=
val
;
pageNo
.
value
=
pageNo
.
value
;
pageNo
.
value
=
pageNo
.
value
;
...
@@ -220,6 +228,8 @@ function getToDetail(id: number) {
...
@@ -220,6 +228,8 @@ function getToDetail(id: number) {
router
.
push
({
router
.
push
({
path
:
"/home/news/detail"
,
path
:
"/home/news/detail"
,
query
:
{
query
:
{
title
:
"太原新闻"
,
titlePath
:
"/home/tynews"
,
type
:
2
,
type
:
2
,
id
:
id
,
id
:
id
,
},
},
...
...
src/views/py/authority/Authority.vue
View file @
af7382ab
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
<
template
>
<
template
>
<div>
<div>
<news-list
<news-list
typePage=
"1"
title=
"权威发布"
pathType=
"/py/authority"
title1=
"辟谣专区"
title1=
"辟谣专区"
title2=
"专家解读"
title2=
"专家解读"
title3=
"法律法规"
title3=
"法律法规"
...
@@ -16,5 +17,7 @@
...
@@ -16,5 +17,7 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
pyzq
,
qwfb
,
zjjd
,
flfg
}
from
"@/utils/config"
;
import
{
pyzq
,
qwfb
,
zjjd
,
flfg
}
from
"@/utils/config"
;
import
NewsList
from
"@/components/py/NewsList.vue"
;
import
NewsList
from
"@/components/py/NewsList.vue"
;
import
{
useRoute
}
from
"vue-router"
;
const
route
=
useRoute
();
</
script
>
</
script
>
<
style
scoped
></
style
>
<
style
scoped
></
style
>
src/views/py/detail/NewsDetail.vue
View file @
af7382ab
<
template
>
<
template
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"w-[1440px] mx-auto px-0 py-5"
>
<div
class=
"w-[1440px] mx-auto px-0 py-5"
>
<div
class=
"flex items-center text-sm text-gray-500 mb-2"
>
<bread-crumb
<router-link
:breadcrumbItems=
"
:to=
"toRoute()"
route.query.pathType == '-1' ? breadcrumbItems2 : breadcrumbItems
class=
"text-gray-500 hover:text-blue-500"
"
>
{{
toRouteName
()
}}
</router-link
/>
>
<el-icon
class=
"mx-2"
><ArrowRight
/></el-icon>
<span
class=
"text-gray-900"
>
新闻详情
</span>
</div>
<!-- 主要内容区 -->
<div
class=
"grid grid-cols-3 gap-8"
>
<div
class=
"grid grid-cols-3 gap-8"
>
<!-- 左侧主要新闻内容 -->
<!-- 左侧主要新闻内容 -->
<div
class=
"col-span-2 bg-white rounded-lg shadow-sm p-6"
>
<div
class=
"col-span-2 bg-white rounded-lg shadow-sm p-6"
>
...
@@ -111,6 +107,7 @@ import { getHit } from "@/api/home/news/list";
...
@@ -111,6 +107,7 @@ import { getHit } from "@/api/home/news/list";
import
{
getNewsDetail
}
from
"@/api/home/news/details"
;
import
{
getNewsDetail
}
from
"@/api/home/news/details"
;
import
{
baseImageUrl
}
from
"@/utils/config"
;
import
{
baseImageUrl
}
from
"@/utils/config"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
route
=
useRoute
();
const
route
=
useRoute
();
const
router
=
useRouter
();
const
router
=
useRouter
();
...
@@ -118,39 +115,50 @@ const details = ref({});
...
@@ -118,39 +115,50 @@ const details = ref({});
const
list1
=
ref
([]);
const
list1
=
ref
([]);
const
list2
=
ref
([]);
const
list2
=
ref
([]);
function
toRouteName
()
{
const
breadcrumbItems
=
ref
([
switch
(
route
.
query
.
type
)
{
{
title
:
"首页"
,
path
:
"/py/pyhome"
},
case
"0"
:
{
title
:
route
.
query
.
title
,
path
:
route
.
query
.
pathType
},
return
"首页"
;
{
title
:
"详情"
,
path
:
""
},
case
"1"
:
]);
return
"权威发布"
;
case
"2"
:
const
breadcrumbItems2
=
ref
([
return
"辟谣专区"
;
{
title
:
"首页"
,
path
:
"/py/pyhome"
},
case
"3"
:
{
title
:
"详情"
,
path
:
""
},
return
"专家解读"
;
]);
case
"4"
:
return
"法律法规"
;
// function toRouteName() {
case
"5"
:
// switch (route.query.type) {
return
"读图识谣"
;
// case "0":
}
// return "首页";
}
// case "1":
// return "权威发布";
function
toRoute
()
{
// case "2":
switch
(
route
.
query
.
type
)
{
// return "辟谣专区";
case
"0"
:
// case "3":
return
"/py/pyhome"
;
// return "专家解读";
case
"1"
:
// case "4":
return
"/py/authority"
;
// return "法律法规";
case
"2"
:
// case "5":
return
"/py/rumor"
;
// return "读图识谣";
case
"3"
:
// }
return
"/py/expert"
;
// }
case
"4"
:
return
"/py/law"
;
// function toRoute() {
case
"5"
:
// switch (route.query.type) {
return
"/py/reading"
;
// case "0":
}
// return "/py/pyhome";
}
// case "1":
// return "/py/authority";
// case "2":
// return "/py/rumor";
// case "3":
// return "/py/expert";
// case "4":
// return "/py/law";
// case "5":
// return "/py/reading";
// }
// }
getList1
(
3
,
1
);
getList1
(
3
,
1
);
getList2
(
5
,
1
);
getList2
(
5
,
1
);
...
...
src/views/py/expert/Expert.vue
View file @
af7382ab
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
<
template
>
<
template
>
<div>
<div>
<news-list
<news-list
typePage=
"3"
title=
"专家解读"
pathType=
"/py/expert"
title1=
"权威发布"
title1=
"权威发布"
title2=
"辟谣专区"
title2=
"辟谣专区"
title3=
"法律法规"
title3=
"法律法规"
...
@@ -10,7 +11,6 @@
...
@@ -10,7 +11,6 @@
:type1=
"qwfb"
:type1=
"qwfb"
:type2=
"pyzq"
:type2=
"pyzq"
:type3=
"flfg"
:type3=
"flfg"
:homeMoreType=
"route.query.homeMoreType"
/>
/>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/py/home/PyHome.vue
View file @
af7382ab
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<main
class=
"container mx-auto px-8 py-8"
>
<main
class=
"container mx-auto px-8 py-8"
>
<div
class=
"bg-white rounded-lg shadow-lg p-6 mb-8"
>
<div
class=
"bg-white rounded-lg shadow-lg p-6 mb-8"
>
<h2
class=
"text-2xl font-bold mb-4 text-black"
>
<h2
class=
"text-2xl font-bold mb-4 text-black"
>
全国网络辟谣联动机制第三次全体会议召开
{{
title
}}
</h2>
</h2>
<p
class=
"text-gray-600 mb-4"
>
<p
class=
"text-gray-600 mb-4"
>
网络谣言是当前网上政治安全和国家安全的重要考验,是开展网上舆论工作的重要课题,是深化网络综合治理的重要内容。
{{
description
}}
</p>
</p>
<div
class=
"flex gap-8 mb-8"
>
<div
class=
"flex gap-8 mb-8"
>
<div
class=
"relative w-2/3 rounded-lg overflow-hidden"
>
<div
class=
"relative w-2/3 rounded-lg overflow-hidden"
>
...
@@ -16,13 +16,16 @@
...
@@ -16,13 +16,16 @@
:pagination=
"
{ clickable: true }"
:pagination=
"
{ clickable: true }"
:navigation="true"
:navigation="true"
:autoplay="{ delay: 3000, disableOnInteraction: false }"
:autoplay="{ delay: 3000, disableOnInteraction: false }"
class="w-full h-full"
class="swiper-container w-full h-full"
@swiper="onSwiper"
@slideChange="onSlideChange"
>
>
<swiper-slide
v-for=
"(slide, index) in
slides
"
:key=
"index"
>
<swiper-slide
v-for=
"(slide, index) in
list3
"
:key=
"index"
>
<el-image
<el-image
:src=
"slide.
src
"
:src=
"slide.
images
"
fit=
"cover"
fit=
"cover"
class=
"w-full h-full object-cover"
class=
"w-full h-full object-cover"
@
click=
"getToDetail(slide.id)"
/>
/>
<!-- 使用 el-image 组件显示图片,并设置图片填充方式为覆盖 -->
<!-- 使用 el-image 组件显示图片,并设置图片填充方式为覆盖 -->
</swiper-slide>
</swiper-slide>
...
@@ -36,16 +39,25 @@
...
@@ -36,16 +39,25 @@
class=
"hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1 cursor-pointer"
class=
"hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1 cursor-pointer"
shadow=
"hover"
shadow=
"hover"
>
>
<a
:href=
"item.url"
target=
"_blank"
class=
"flex items-center gap-4 p-1 bg-gradient-to-r from-blue-50 to-white rounded-lg"
>
<div
<div
class=
"flex items-center gap-4 p-2
bg-gradient-to-r from-blue-50 to-white rounded-lg"
class=
"flex items-center gap-0 p-0
bg-gradient-to-r from-blue-50 to-white rounded-lg"
>
>
<el-icon
:size=
"24"
class=
"text-blue-600"
>
<el-icon
:size=
"24"
class=
"text-blue-600"
>
<component
:is=
"item.icon"
/>
<component
:is=
"item.icon"
/>
</el-icon>
</el-icon>
<h4
class=
"font-bold text-base text-blue-900 flex items-center"
>
<h4
:style=
"
{ whiteSpace: 'pre-line' }"
class="font-bold text-base text-blue-900 flex items-center ml-5"
>
{{
item
.
title
}}
{{
item
.
title
}}
</h4>
</h4>
</div>
</div>
</a>
</el-card>
</el-card>
</div>
</div>
</div>
</div>
...
@@ -76,6 +88,7 @@
...
@@ -76,6 +88,7 @@
<el-link
<el-link
:underline=
"false"
:underline=
"false"
class=
"text-gray-700 hover:text-primary truncate"
class=
"text-gray-700 hover:text-primary truncate"
@
click=
"getToDetail(item.id)"
>
{{ item.contentTitle }}
</el-link
>
{{ item.contentTitle }}
</el-link
>
>
</li>
</li>
...
@@ -87,7 +100,9 @@
...
@@ -87,7 +100,9 @@
<div
class=
"bg-white rounded-lg shadow-lg p-6 mt-8"
>
<div
class=
"bg-white rounded-lg shadow-lg p-6 mt-8"
>
<div
class=
"flex justify-between items-center mb-6"
>
<div
class=
"flex justify-between items-center mb-6"
>
<h3
class=
"text-xl font-bold text-primary"
>
读图识谣
</h3>
<h3
class=
"text-xl font-bold text-primary"
>
读图识谣
</h3>
<el-button
type=
"primary"
text
>
更多 >
</el-button>
<el-button
type=
"primary"
text
@
click=
"goToTyMoreList(3)"
>
更多 >
</el-button
>
</div>
</div>
<div
class=
"relative"
>
<div
class=
"relative"
>
<swiper
<swiper
...
@@ -98,15 +113,22 @@
...
@@ -98,15 +113,22 @@
:autoplay=
"{ delay: 3000 }"
:autoplay=
"{ delay: 3000 }"
class=
"service-swiper"
class=
"service-swiper"
>
>
<swiper-slide
v-for=
"(card, index) in serviceCards"
:key=
"index"
>
<swiper-slide
v-for=
"(item, index) in list2"
:key=
"index"
>
<el-card
class=
"h-full hover:shadow-lg transition-shadow"
>
<el-card
<el-image
class=
"h-full hover:shadow-lg transition-shadow"
:src=
"card.image"
@
click=
"getToDetail(item.id)"
>
<img
:src=
"item.images"
class=
"w-full h-full object-cover"
/>
<!-- <el-image
:src="item.images"
fit="cover"
fit="cover"
class="w-full h-40 rounded mb-4"
class="w-full h-40 rounded mb-4"
/>
/> -->
<h4
class=
"font-bold mb-2"
>
{{ card.title }}
</h4>
<h4
class=
"font-bold mb-2"
>
{{ item.contentTitle }}
</h4>
<p
class=
"text-sm text-gray-600"
>
{{ card.description }}
</p>
<p
class=
"text-sm text-gray-600"
>
{{ item.contentDescription }}
</p>
</el-card>
</el-card>
</swiper-slide>
</swiper-slide>
</swiper>
</swiper>
...
@@ -133,21 +155,42 @@ import "swiper/css/pagination";
...
@@ -133,21 +155,42 @@ import "swiper/css/pagination";
import
"swiper/css/autoplay"
;
import
"swiper/css/autoplay"
;
import
"swiper/css/navigation"
;
import
"swiper/css/navigation"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
baseImageUrl
,
dtsy
,
zjjd
,
pyzq
,
flfg
}
from
"@/utils/config"
;
import
{
baseImageUrl
,
lhpylbt
,
dtsy
,
zjjd
,
pyzq
,
flfg
}
from
"@/utils/config"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
const
title
=
ref
();
const
description
=
ref
();
const
list1
=
ref
([
{
title
:
"专家解读"
,
items
:
[],
},
{
title
:
"辟谣专区"
,
items
:
[],
},
{
title
:
"法律法规"
,
items
:
[],
},
]);
const
list2
=
ref
([]);
const
list3
=
ref
([]);
const
router
=
useRouter
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
route
=
useRoute
();
const
activeIndex
=
ref
(
"0"
);
const
swiperModules
=
[
Pagination
,
Navigation
,
Autoplay
];
const
swiperModules
=
[
Pagination
,
Navigation
,
Autoplay
];
const
menuItems
=
[
"首页"
,
const
onSwiper
=
(
swiper
)
=>
{
"权威发布"
,
const
index
=
swiper
.
activeIndex
;
"辟谣专区"
,
title
.
value
=
list3
.
value
[
index
]?.
contentTitle
;
"专家解读"
,
description
.
value
=
list3
.
value
[
index
]?.
contentDescription
;
"法律法规"
,
};
"读图识谣"
,
const
onSlideChange
=
(
swiper
)
=>
{
];
console
.
log
(
swiper
.
activeIndex
);
const
index
=
swiper
.
activeIndex
;
title
.
value
=
list3
.
value
[
index
]?.
contentTitle
;
description
.
value
=
list3
.
value
[
index
]?.
contentDescription
;
};
//专家解读、辟谣专区、法律法规 更多
//专家解读、辟谣专区、法律法规 更多
function
goToTyMoreList
(
index
:
number
)
{
function
goToTyMoreList
(
index
:
number
)
{
...
@@ -155,80 +198,71 @@ function goToTyMoreList(index: number) {
...
@@ -155,80 +198,71 @@ function goToTyMoreList(index: number) {
case
0
:
//专家解读
case
0
:
//专家解读
router
.
push
({
router
.
push
({
path
:
"/py/expert"
,
path
:
"/py/expert"
,
query
:
{
homeMoreType
:
"-1"
,
},
});
});
break
;
break
;
case
1
:
//辟谣专区
case
1
:
//辟谣专区
router
.
push
({
router
.
push
({
path
:
"/py/rumor"
,
path
:
"/py/rumor"
,
query
:
{
homeMoreType
:
"-1"
,
},
});
});
break
;
break
;
case
2
:
//法律法规
case
2
:
//法律法规
router
.
push
({
router
.
push
({
path
:
"/py/law"
,
path
:
"/py/law"
,
query
:
{
});
homeMoreType
:
"-1"
,
break
;
},
case
3
:
//读图识谣
router
.
push
({
path
:
"/py/reading"
,
});
});
break
;
break
;
}
}
}
}
// function getToDetail(section: any) {
const
quickLinks
=
[
// router.push({
// path: "/py/news/detail",
// query: {
// type: 5,
// id: id,
// },
// });
// }
const
slides
=
[
{
{
src
:
"https://ai-public.mastergo.com/ai/img_res/a6c6b005094da8f76e79def3225b4ea0.jpg"
,
icon
:
Document
,
title
:
"网络谣言曝光台"
,
url
:
"https://www.piyao.org.cn/yybgt/index.htm"
,
},
},
{
{
src
:
"https://ai-public.mastergo.com/ai/img_res/cc20fdfc4e9bcd53c4f517b03036c8a2.jpg"
,
icon
:
UserFilled
,
title
:
"中央网信办举报中心官网违法和不良信息举报入口"
,
url
:
"https://www.12377.cn"
,
},
},
{
{
src
:
"https://ai-public.mastergo.com/ai/img_res/40e648e87a974e8fe013b6f4b9b0ac2b.jpg"
,
icon
:
Lock
,
title
:
"辟谣求证入口"
,
url
:
"https://www.piyao.org.cn/2020yqpy"
,
},
},
];
const
quickLinks
=
[
{
icon
:
Document
,
title
:
"最新辟谣"
},
{
icon
:
UserFilled
,
title
:
"举报入口"
},
{
icon
:
Lock
,
title
:
"安全提醒"
},
{
icon
:
List
,
title
:
"政策法规"
},
{
icon
:
Service
,
title
:
"在线咨询"
},
{
icon
:
Bell
,
title
:
"举报中心"
},
{
icon
:
Collection
,
title
:
"知识库"
},
];
const
list1
=
ref
([
{
{
title
:
"专家解读"
,
icon
:
List
,
items
:
[],
title
:
"山西省互联网违法和不良信息举报中心举报入口"
,
url
:
"https://www.sxgov.cn/node_280205.htm"
,
},
},
{
{
title
:
"辟谣专区"
,
icon
:
Service
,
items
:
[],
title
:
"涉企侵权举报专区"
,
url
:
"https://www.sxgov.cn/node_319806.htm"
,
},
},
{
{
title
:
"法律法规"
,
icon
:
Bell
,
items
:
[],
title
:
"涉历史虚无主义有害信息举报专区"
,
url
:
"https://topic.sxgov.cn/node_319310.htm"
,
},
},
]);
{
icon
:
Collection
,
title
:
"网络谣言和虚假信息举报专区"
,
url
:
"https://topic.sxgov.cn/node_319499.htm"
,
},
];
getList
(
zjjd
,
10
,
1
);
getList
(
zjjd
,
10
,
1
);
getList
(
pyzq
,
10
,
1
);
getList
(
pyzq
,
10
,
1
);
getList
(
flfg
,
10
,
1
);
getList
(
flfg
,
10
,
1
);
getList2
(
dtsy
,
10
,
1
);
getList3
(
5
,
1
);
//轮播图
//获取专家解读
//获取专家解读
、辟谣专区、法律法规
function
getList
(
value
:
string
,
pageSize
:
number
,
pageNo
:
number
)
{
function
getList
(
value
:
string
,
pageSize
:
number
,
pageNo
:
number
)
{
const
datas
=
{
const
datas
=
{
contentType
:
value
,
contentType
:
value
,
...
@@ -250,44 +284,57 @@ function getList(value: string, pageSize: number, pageNo: number) {
...
@@ -250,44 +284,57 @@ function getList(value: string, pageSize: number, pageNo: number) {
});
});
}
}
const
serviceCards
=
[
//获取读图识谣
{
function
getList2
(
value
:
string
,
pageSize
:
number
,
pageNo
:
number
)
{
image
:
const
datas
=
{
"https://ai-public.mastergo.com/ai/img_res/2655e0a0acf47c07b9c8ff060c82bbc1.jpg"
,
contentType
:
value
,
title
:
"健康科普讲堂"
,
pageSize
:
pageSize
,
description
:
"权威专家为您解读健康知识"
,
pageNo
:
pageNo
,
},
};
{
getNewsList
(
datas
).
then
((
response
)
=>
{
image
:
const
data
=
response
.
data
;
"https://ai-public.mastergo.com/ai/img_res/2f71d88aad56bf2fd7cf852bb161fa9a.jpg"
,
const
rowsList
=
data
.
rows
;
title
:
"食品安全专区"
,
rowsList
.
forEach
((
item
:
any
)
=>
{
description
:
"关注食品安全 守护健康生活"
,
if
(
item
.
contentImg
)
{
},
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
{
}
image
:
});
"https://ai-public.mastergo.com/ai/img_res/96a618b8d32896b05bbf19a1e237bb5c.jpg"
,
list2
.
value
=
rowsList
;
title
:
"网络安全知识"
,
});
description
:
"提高网络安全意识"
,
}
},
{
//获取首页轮播图
image
:
function
getList3
(
pageSize
:
number
,
pageNo
:
number
)
{
"https://ai-public.mastergo.com/ai/img_res/7f28f51c022005811277c6aeb56a604e.jpg"
,
const
datas
=
{
title
:
"法律咨询服务"
,
contentType
:
lhpylbt
,
description
:
"专业律师在线解答"
,
pageSize
:
pageSize
,
},
pageNo
:
pageNo
,
{
};
image
:
getNewsList
(
datas
).
then
((
response
)
=>
{
"https://ai-public.mastergo.com/ai/img_res/eca0048f8f7939e3dacd3026bdb7cebb.jpg"
,
const
data
=
response
.
data
;
title
:
"科技辟谣"
,
const
rowsList
=
data
.
rows
;
description
:
"揭穿科技谣言真相"
,
rowsList
.
forEach
((
item
:
any
)
=>
{
},
if
(
item
.
contentImg
)
{
{
item
.
images
=
baseImageUrl
(
JSON
.
parse
(
item
.
contentImg
)[
0
].
path
);
image
:
}
"https://ai-public.mastergo.com/ai/img_res/067a33b74280646e216710bf650a909f.jpg"
,
});
title
:
"环保真相"
,
list3
.
value
=
rowsList
;
description
:
"环保谣言不再迷惑"
,
});
}
function
getToDetail
(
id
:
number
)
{
router
.
push
({
path
:
"/py/news/detail"
,
query
:
{
pathType
:
"-1"
,
type1
:
zjjd
,
type2
:
pyzq
,
title1
:
"辟谣专区"
,
title2
:
"专家解读"
,
id
:
id
,
},
},
];
});
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.hero-bg
{
.hero-bg
{
...
...
src/views/py/law/Law.vue
View file @
af7382ab
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
<
template
>
<
template
>
<div>
<div>
<news-list
<news-list
typePage=
"4"
title=
"法律法规"
pathType=
"/py/law"
title1=
"辟谣专区"
title1=
"辟谣专区"
title2=
"专家解读"
title2=
"专家解读"
title3=
"权威发布"
title3=
"权威发布"
...
@@ -10,7 +11,6 @@
...
@@ -10,7 +11,6 @@
:type1=
"pyzq"
:type1=
"pyzq"
:type2=
"zjjd"
:type2=
"zjjd"
:type3=
"qwfb"
:type3=
"qwfb"
:homeMoreType=
"route.query.homeMoreType"
/>
/>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/py/reading/Reading.vue
View file @
af7382ab
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
<
template
>
<
template
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"min-h-screen bg-gray-50"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<div
class=
"container mx-auto px-4 py-8 w-[1440px]"
>
<bread-crumb
:breadcrumbItems=
"breadcrumbItems"
/>
<div
class=
"grid grid-cols-1 gap-8"
>
<div
class=
"grid grid-cols-1 gap-8"
>
<!-- 分类卡片 -->
<!-- 分类卡片 -->
<div
class=
"grid grid-cols-4 gap-6"
>
<div
class=
"grid grid-cols-4 gap-6"
>
...
@@ -9,6 +11,7 @@
...
@@ -9,6 +11,7 @@
v-for=
"(card, index) in newsList"
v-for=
"(card, index) in newsList"
:key=
"index"
:key=
"index"
class=
"bg-white rounded-lg shadow-lg p-6 transition-transform hover:scale-105"
class=
"bg-white rounded-lg shadow-lg p-6 transition-transform hover:scale-105"
@
click=
"getToDetail(card.id)"
>
>
<div
class=
"h-48 w-full mb-4 overflow-hidden rounded-lg"
>
<div
class=
"h-48 w-full mb-4 overflow-hidden rounded-lg"
>
<img
<img
...
@@ -44,6 +47,8 @@ import { ref, computed } from "vue";
...
@@ -44,6 +47,8 @@ import { ref, computed } from "vue";
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
getNewsList
}
from
"@/api/home/news/list"
;
import
{
baseImageUrl
,
dtsy
}
from
"@/utils/config"
;
import
{
baseImageUrl
,
dtsy
}
from
"@/utils/config"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
route
=
useRoute
();
...
@@ -52,6 +57,11 @@ const pageSize = ref(10);
...
@@ -52,6 +57,11 @@ const pageSize = ref(10);
const
total
=
ref
(
0
);
const
total
=
ref
(
0
);
const
newsList
=
ref
([]);
const
newsList
=
ref
([]);
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/py/pyhome"
},
{
title
:
"读图识谣"
},
]);
const
handleSizeChange
=
(
val
:
number
)
=>
{
const
handleSizeChange
=
(
val
:
number
)
=>
{
pageSize
.
value
=
val
;
pageSize
.
value
=
val
;
pageNo
.
value
=
pageNo
.
value
;
pageNo
.
value
=
pageNo
.
value
;
...
@@ -86,7 +96,12 @@ function getToDetail(id: number) {
...
@@ -86,7 +96,12 @@ function getToDetail(id: number) {
router
.
push
({
router
.
push
({
path
:
"/py/news/detail"
,
path
:
"/py/news/detail"
,
query
:
{
query
:
{
type
:
5
,
title
:
"读图识谣"
,
pathType
:
"/py/reading"
,
title1
:
"辟谣专区"
,
title2
:
"专家解读"
,
type1
:
"pyzq"
,
type2
:
"zjjd"
,
id
:
id
,
id
:
id
,
},
},
});
});
...
...
src/views/py/rumor/Rumor.vue
View file @
af7382ab
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
<
template
>
<
template
>
<div>
<div>
<news-list
<news-list
typePage=
"2"
title=
"辟谣专区"
pathType=
"/py/rumor"
title1=
"权威发布"
title1=
"权威发布"
title2=
"专家解读"
title2=
"专家解读"
title3=
"法律法规"
title3=
"法律法规"
...
@@ -10,7 +11,6 @@
...
@@ -10,7 +11,6 @@
:type1=
"qwfb"
:type1=
"qwfb"
:type2=
"zjjd"
:type2=
"zjjd"
:type3=
"flfg"
:type3=
"flfg"
:homeMoreType=
"route.query.homeMoreType"
/>
/>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/wm/home/WmHome.vue
View file @
af7382ab
...
@@ -14,12 +14,6 @@
...
@@ -14,12 +14,6 @@
to=
"/wm/messagelist"
to=
"/wm/messagelist"
>
更多留言
<el-icon
class=
"ml-1"
><ArrowRight
/></el-icon
>
更多留言
<el-icon
class=
"ml-1"
><ArrowRight
/></el-icon
></router-link>
></router-link>
<!--
<div
class=
"text-sm text-blue-600 hover:text-blue-300 flex items-center"
@
click=
"moreMessageClick"
>
更多留言
<el-icon
class=
"ml-1"
><ArrowRight
/></el-icon>
</div>
-->
</div>
</div>
<div
class=
"space-y-3"
>
<div
class=
"space-y-3"
>
<div
<div
...
@@ -53,12 +47,6 @@
...
@@ -53,12 +47,6 @@
to=
"/wm/recoverlist"
to=
"/wm/recoverlist"
>
更多回复
<el-icon
class=
"ml-1"
><ArrowRight
/></el-icon
>
更多回复
<el-icon
class=
"ml-1"
><ArrowRight
/></el-icon
></router-link>
></router-link>
<!--
<div
class=
"text-sm text-blue-600 hover:text-blue-300 flex items-center"
@
click=
"moreRecoverClick"
>
更多回复
<el-icon
class=
"ml-1"
><ArrowRight
/></el-icon>
</div>
-->
</div>
</div>
<div
class=
"space-y-3"
>
<div
class=
"space-y-3"
>
<div
<div
...
@@ -96,6 +84,8 @@ import {
...
@@ -96,6 +84,8 @@ import {
Message
,
Message
,
}
from
"@element-plus/icons-vue"
;
}
from
"@element-plus/icons-vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
getHotList
,
getRecoverList
}
from
"@/api/wm/wm"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
hotTopics
=
ref
([
const
hotTopics
=
ref
([
{
{
...
@@ -174,11 +164,42 @@ const replies = ref([
...
@@ -174,11 +164,42 @@ const replies = ref([
// });
// });
// }
// }
getList1
(
6
,
1
);
getList2
(
5
,
1
);
//热点留言
function
getList1
(
pageSize
:
number
,
pageNo
:
number
)
{
const
datas
=
{
contentType
:
""
,
pageSize
:
pageSize
,
pageNo
:
pageNo
,
};
getHotList
(
datas
).
then
((
response
)
=>
{
const
data
=
response
.
data
;
const
rowsList
=
data
.
rows
;
// list1.value = rowsList;
});
}
//热点留言
function
getList2
(
pageSize
:
number
,
pageNo
:
number
)
{
const
datas
=
{
contentType
:
""
,
pageSize
:
pageSize
,
pageNo
:
pageNo
,
};
getRecoverList
(
datas
).
then
((
response
)
=>
{
const
data
=
response
.
data
;
const
rowsList
=
data
.
rows
;
// list1.value = rowsList;
});
}
function
messageClick
(
id
:
number
)
{
function
messageClick
(
id
:
number
)
{
router
.
push
({
router
.
push
({
path
:
"/wm/messagedetail"
,
path
:
"/wm/messagedetail"
,
query
:
{
query
:
{
type
:
0
,
pathType
:
"-1"
,
id
:
id
,
id
:
id
,
},
},
});
});
...
@@ -187,7 +208,7 @@ function recoverClick(id: number) {
...
@@ -187,7 +208,7 @@ function recoverClick(id: number) {
router
.
push
({
router
.
push
({
path
:
"/wm/recoverdetail"
,
path
:
"/wm/recoverdetail"
,
query
:
{
query
:
{
type
:
0
,
pathType
:
"-1"
,
id
:
id
,
id
:
id
,
},
},
});
});
...
...
src/views/wm/imessage/IMessage.vue
View file @
af7382ab
...
@@ -3,15 +3,9 @@
...
@@ -3,15 +3,9 @@
<div
class=
"bg-gray-50"
>
<div
class=
"bg-gray-50"
>
<!-- 主要内容区域 -->
<!-- 主要内容区域 -->
<div
class=
"container mx-auto px-0 py-0 w-[1440px]"
>
<div
class=
"container mx-auto px-0 py-0 w-[1440px]"
>
<div
class=
"flex items-center text-sm text-gray-500 mb-5"
>
<bread-crumb
:breadcrumbItems=
"breadcrumbItems"
/>
<router-link
to=
"/wm/wmhome"
class=
"text-gray-500 hover:text-blue-500"
>
首页
</router-link
>
<el-icon
class=
"mx-2"
><ArrowRight
/></el-icon>
<span
class=
"text-gray-900"
>
我要留言
</span>
</div>
<div
class=
"grid grid-cols-12 gap-8"
>
<div
class=
"grid grid-cols-12 gap-8
mt-5
"
>
<!-- 左侧导航 -->
<!-- 左侧导航 -->
<div
class=
"col-span-4"
>
<div
class=
"col-span-4"
>
<div
class=
"bg-yellow-50 rounded-lg shadow-sm p-6"
>
<div
class=
"bg-yellow-50 rounded-lg shadow-sm p-6"
>
...
@@ -181,6 +175,12 @@
...
@@ -181,6 +175,12 @@
import
{
ref
,
onMounted
}
from
"vue"
;
import
{
ref
,
onMounted
}
from
"vue"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
Warning
,
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
{
Warning
,
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/wm/wmhome"
},
{
title
:
"我要留言"
},
]);
const
letters
=
Array
.
from
(
"ABCDEFGHJKLMNPQRSTUVWXYZ23456789"
);
const
letters
=
Array
.
from
(
"ABCDEFGHJKLMNPQRSTUVWXYZ23456789"
);
const
generateCaptcha
=
()
=>
{
const
generateCaptcha
=
()
=>
{
...
...
src/views/wm/message/MessageDetail.vue
View file @
af7382ab
...
@@ -3,21 +3,11 @@
...
@@ -3,21 +3,11 @@
<
template
>
<
template
>
<div
class=
"bg-gray-50"
>
<div
class=
"bg-gray-50"
>
<div
class=
"mx-auto w-[1440px] px-4 py-0"
>
<div
class=
"mx-auto w-[1440px] px-4 py-0"
>
<!-- 面包屑导航 -->
<bread-crumb
<div
class=
"mb-6 flex items-center text-sm text-gray-500"
>
:breadcrumbItems=
"
<router-link
to=
"/wm/wmhome"
class=
"hover:text-gray-600 text-gray-500"
route.query.pathType == '-1' ? breadcrumbItems2 : breadcrumbItems
>
首页
</router-link
"
>
/>
<el-icon
v-if=
"type == 1"
class=
"mx-2"
><ArrowRight
/></el-icon>
<router-link
v-if=
"type == 1"
to=
"/wm/messagelist"
class=
"hover:text-gray-600 text-gray-500"
>
留言列表
</router-link
>
<el-icon
class=
"mx-2"
><ArrowRight
/></el-icon>
<span
class=
"text-gray-900"
>
留言详情
</span>
</div>
<!-- 主要内容卡片 -->
<!-- 主要内容卡片 -->
<div
class=
"rounded-lg bg-white p-6 shadow-sm"
>
<div
class=
"rounded-lg bg-white p-6 shadow-sm"
>
...
@@ -83,8 +73,21 @@
...
@@ -83,8 +73,21 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
{
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
useRoute
}
from
"vue-router"
;
const
router
=
useRoute
();
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
type
=
router
.
query
.
type
;
import
{
ref
}
from
"vue"
;
const
route
=
useRoute
();
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/wm/wmhome"
},
{
title
:
route
.
query
.
title
,
path
:
route
.
query
.
pathType
},
{
title
:
"详情"
,
path
:
""
},
]);
const
breadcrumbItems2
=
ref
([
{
title
:
"首页"
,
path
:
"/wm/wmhome"
},
{
title
:
"详情"
,
path
:
""
},
]);
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/views/wm/message/MessageList.vue
View file @
af7382ab
...
@@ -4,13 +4,7 @@
...
@@ -4,13 +4,7 @@
<div
class=
"w-[1440px] mx-auto px-4"
>
<div
class=
"w-[1440px] mx-auto px-4"
>
<!-- 面包屑导航 -->
<!-- 面包屑导航 -->
<div
class=
"flex items-center justify-between py-2 border-b mb-5"
>
<div
class=
"flex items-center justify-between py-2 border-b mb-5"
>
<div
class=
"flex items-center text-sm text-gray-500"
>
<bread-crumb
:breadcrumbItems=
"breadcrumbItems"
/>
<router-link
to=
"/wm/wmhome"
class=
"text-gray-500 hover:text-blue-500"
>
首页
</router-link
>
<el-icon
class=
"mx-2"
><ArrowRight
/></el-icon>
<span
class=
"text-gray-900"
>
留言列表
</span>
</div>
<!-- 搜索框 -->
<!-- 搜索框 -->
<div
class=
"relative"
>
<div
class=
"relative"
>
...
@@ -62,10 +56,17 @@
...
@@ -62,10 +56,17 @@
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
Search
,
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
{
Search
,
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
searchText
=
ref
(
""
);
const
searchText
=
ref
(
""
);
const
currentPage
=
ref
(
1
);
const
currentPage
=
ref
(
1
);
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/wm/wmhome"
},
{
title
:
"留言列表"
},
]);
const
messageList
=
ref
([
const
messageList
=
ref
([
{
{
title
:
"反映某建筑公司拖欠农民工工资问题"
,
title
:
"反映某建筑公司拖欠农民工工资问题"
,
...
@@ -100,7 +101,8 @@ function clickList(id: number) {
...
@@ -100,7 +101,8 @@ function clickList(id: number) {
router
.
push
({
router
.
push
({
path
:
"/wm/messagedetail"
,
path
:
"/wm/messagedetail"
,
query
:
{
query
:
{
type
:
1
,
title
:
"留言列表"
,
pathType
:
"/wm/messagelist"
,
id
:
id
,
id
:
id
,
},
},
});
});
...
...
src/views/wm/recover/RecoverDetail.vue
View file @
af7382ab
...
@@ -4,20 +4,11 @@
...
@@ -4,20 +4,11 @@
<div
class=
"bg-gray-50"
>
<div
class=
"bg-gray-50"
>
<div
class=
"mx-auto w-[1440px] px-4 py-0"
>
<div
class=
"mx-auto w-[1440px] px-4 py-0"
>
<!-- 面包屑导航 -->
<!-- 面包屑导航 -->
<div
class=
"mb-6 flex items-center text-sm text-gray-500"
>
<bread-crumb
<router-link
to=
"/wm/wmhome"
class=
"hover:text-gray-600 text-gray-500"
:breadcrumbItems=
"
>
首页
</router-link
route.query.pathType == '-1' ? breadcrumbItems2 : breadcrumbItems
>
"
<el-icon
v-if=
"type == 1"
class=
"mx-2"
><ArrowRight
/></el-icon>
/>
<router-link
v-if=
"type == 1"
to=
"/wm/recoverlist"
class=
"hover:text-gray-600 text-gray-500"
>
回复列表
</router-link
>
<el-icon
class=
"mx-2"
><ArrowRight
/></el-icon>
<span
class=
"text-gray-900"
>
回复详情
</span>
</div>
<!-- 主要内容卡片 -->
<!-- 主要内容卡片 -->
<div
class=
"rounded-lg bg-white p-6 shadow-sm"
>
<div
class=
"rounded-lg bg-white p-6 shadow-sm"
>
...
@@ -83,8 +74,21 @@
...
@@ -83,8 +74,21 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
{
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
useRoute
}
from
"vue-router"
;
const
router
=
useRoute
();
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
type
=
router
.
query
.
type
;
import
{
ref
}
from
"vue"
;
const
route
=
useRoute
();
const
type
=
route
.
query
.
type
;
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/wm/wmhome"
},
{
title
:
route
.
query
.
title
,
path
:
route
.
query
.
pathType
},
{
title
:
"详情"
,
path
:
""
},
]);
const
breadcrumbItems2
=
ref
([
{
title
:
"首页"
,
path
:
"/wm/wmhome"
},
{
title
:
"详情"
,
path
:
""
},
]);
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/views/wm/recover/RecoverList.vue
View file @
af7382ab
...
@@ -5,13 +5,7 @@
...
@@ -5,13 +5,7 @@
<div
class=
"mx-auto w-[1440px] px-4"
>
<div
class=
"mx-auto w-[1440px] px-4"
>
<!-- 面包屑导航 -->
<!-- 面包屑导航 -->
<div
class=
"flex items-center justify-between py-2 border-b mb-5"
>
<div
class=
"flex items-center justify-between py-2 border-b mb-5"
>
<div
class=
"flex items-center text-sm text-gray-500"
>
<bread-crumb
:breadcrumbItems=
"breadcrumbItems"
/>
<router-link
to=
"/wm/wmhome"
class=
"text-gray-500 hover:text-blue-500"
>
首页
</router-link
>
<el-icon
class=
"mx-2"
><ArrowRight
/></el-icon>
<span
class=
"text-gray-900"
>
回复列表
</span>
</div>
<!-- 搜索框 -->
<!-- 搜索框 -->
<div
class=
"relative"
>
<div
class=
"relative"
>
...
@@ -71,12 +65,16 @@
...
@@ -71,12 +65,16 @@
import
{
ref
,
computed
}
from
"vue"
;
import
{
ref
,
computed
}
from
"vue"
;
import
{
Search
,
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
{
Search
,
ArrowRight
}
from
"@element-plus/icons-vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useRouter
}
from
"vue-router"
;
import
BreadCrumb
from
"@/components/breadcrumb/BreadCrumb.vue"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
searchText
=
ref
(
""
);
const
searchText
=
ref
(
""
);
const
currentPage
=
ref
(
1
);
const
currentPage
=
ref
(
1
);
const
pageSize
=
ref
(
5
);
const
pageSize
=
ref
(
5
);
const
breadcrumbItems
=
ref
([
{
title
:
"首页"
,
path
:
"/wm/wmhome"
},
{
title
:
"回复列表"
},
]);
const
allItems
=
[
const
allItems
=
[
{
{
title
:
"关于东湖公园设施改善的回复"
,
title
:
"关于东湖公园设施改善的回复"
,
...
@@ -130,7 +128,8 @@ function clickList(id: number) {
...
@@ -130,7 +128,8 @@ function clickList(id: number) {
router
.
push
({
router
.
push
({
path
:
"/wm/recoverdetail"
,
path
:
"/wm/recoverdetail"
,
query
:
{
query
:
{
type
:
1
,
title
:
"回复列表"
,
pathType
:
"/wm/recoverlist"
,
id
:
id
,
id
:
id
,
},
},
});
});
...
...
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