Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
dance-pc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
dd3fa06d
authored
2024-07-25 17:54:52 +0800
by
杨炀
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
e6381328
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
13 deletions
src/viewsPc/match/components/matchNews.vue
src/viewsPc/news/list.vue
src/viewsPc/match/components/matchNews.vue
View file @
dd3fa06
...
...
@@ -9,18 +9,23 @@
<div
class=
"indexTitle"
>
<h3
class=
"leftboderTT"
>
{{
language
==
0
?
'赛事报道'
:
'Special reports'
}}
</h3>
<!--
<a
class=
"more"
@
click=
"goList(query2.sortId,'专题报道')"
>
MORE
</a>
--
>
<a
class=
"more"
v-if=
"newsList2.length>3"
@
click=
"goList(query2.code,'专题报道')"
>
MORE
</a
>
</div>
<div>
<div
class=
"item"
v-for=
"n in newsList2"
:key=
"n.id"
@
click=
"goDetail(n)"
>
<p
class=
"esp"
>
{{
n
.
name
}}
</p>
<div
class=
"item news2"
v-for=
"(n,index) in newsList2"
v-show=
"index
<3
"
:key=
"n.id"
@
click=
"goDetail(n)"
>
<div
class=
"imgbox"
v-if=
"n.picUrl"
@
click=
"goDetail(n)"
>
<img
:src=
"fillImgUrl(n.picUrl)"
>
</div>
<div>
<p
class=
"esp_2"
>
{{
n
.
name
}}
</p>
</div>
</div>
</div>
<div
class=
"indexTitle"
><h3
class=
"leftboderTT"
>
{{
language
==
0
?
'赛事视频'
:
'VEDIOS'
}}
</h3>
<!--
<a
class=
"more"
@
click=
"goList(10000006,'赛事视频')"
>
MORE
</a>
-->
</div>
<div
class=
"item"
v-for=
"
n in newsList
"
:key=
"n.id"
@
click=
"goDetail(n)"
>
<div
class=
"item"
v-for=
"
(n,index) in newsList"
v-show=
"index
<3
"
:key=
"n.id"
@
click=
"goDetail(n)"
>
<div
class=
"videoImgbox"
@
click=
"goDetail(n)"
>
<img
:src=
"fillImgUrl(n.picUrl)"
>
</div>
...
...
@@ -28,7 +33,7 @@
<div
class=
"indexTitle"
><h3
class=
"leftboderTT"
>
{{
language
==
0
?
'赛事图片'
:
'PHOTOS'
}}
</h3>
<!--
<a
class=
"more"
@
click=
"goList(10000007,'赛事图片')"
>
MORE
</a>
-->
</div>
<div
v-for=
"
n in newsList
3"
:key=
"n.id"
@
click=
"goDetail(n)"
>
<div
v-for=
"
(n,index) in newsList3"
v-show=
"index
<
3
"
:key=
"n.id"
@
click=
"goDetail(n)"
>
<div
class=
"picbox"
><img
:src=
"fillImgUrl(n.picUrl)"
/></div>
</div>
</el-card>
...
...
@@ -51,17 +56,17 @@ const newsList = ref([])
const
newsList2
=
ref
([])
const
newsList3
=
ref
([])
const
query1
=
ref
({
pageSize
:
1
,
pageSize
:
5
,
pageNum
:
1
,
code
:
`
${
props
.
matchId
}${
language
.
value
==
0
?
'100'
:
'101'
}
2`
})
const
query2
=
ref
({
pageSize
:
3
,
pageSize
:
5
,
pageNum
:
1
,
code
:
`
${
props
.
matchId
}${
language
.
value
==
0
?
'100'
:
'101'
}
1`
})
const
query3
=
ref
({
pageSize
:
1
,
pageSize
:
5
,
pageNum
:
1
,
code
:
`
${
props
.
matchId
}${
language
.
value
==
0
?
'100'
:
'101'
}
3`
})
...
...
@@ -90,7 +95,8 @@ const goList = (sortId,name) => {
router
.
push
({
path
:
`/news/list/
${
sortId
}
`
,
query
:{
kindName
:
name
kindName
:
name
,
code
:
sortId
}
})
}
...
...
@@ -106,6 +112,12 @@ const goDetail = (n) => {
</
script
>
<
style
scoped
lang=
"scss"
>
.news2
{
display
:
flex
;
margin
:
0
0
20px
;
.imgbox{
margin-right
:
15px
;
height
:
calc
(
900px
/
16
);
width
:
100px
;
img{
object-fit
:
cover
;
width
:
100px
;
height
:
100%
;}
}
.esp_2
{
margin
:
0
;}
}
.indexTitle
{
margin
:
20px
0
12px
;
h3{
font-size
:
20px
;
...
...
src/viewsPc/news/list.vue
View file @
dd3fa06
...
...
@@ -13,7 +13,8 @@
<p>
{{
n
.
belongTime
?.
substring
(
0
,
7
).
replace
(
/-/g
,
'/'
)
}}
</p>
</div>
<div
v-if=
"n.picUrl"
class=
"imgbox"
>
<img
:src=
"fillImgUrl_webSite(n.picUrl)"
>
<img
v-if=
"query.code"
:src=
"fillImgUrl(n.picUrl)"
>
<img
v-else
:src=
"fillImgUrl_webSite(n.picUrl)"
>
</div>
<div
class=
"item-body"
>
<h3
class=
"esp_2"
v-html=
"n.name"
/>
...
...
@@ -42,7 +43,7 @@
<
script
setup
>
import
{
ArrowRight
,
Search
}
from
'@element-plus/icons-vue'
import
{
onMounted
,
ref
}
from
'vue'
import
{
getNewsListById
}
from
'@/apiPc/webSite'
import
{
getNewsListById
,
getnoteListcptid
}
from
'@/apiPc/webSite'
import
{
useRoute
,
useRouter
}
from
'vue-router'
import
{
useStorage
}
from
"@vueuse/core/index"
;
const
language
=
useStorage
(
'language'
,
0
)
...
...
@@ -58,11 +59,22 @@ const query = ref({
})
onMounted
(()
=>
{
console
.
log
(
route
)
query
.
value
.
sortId
=
route
.
params
.
id
kindName
.
value
=
route
.
query
.
kindName
if
(
route
.
query
.
code
){
query
.
value
.
code
=
route
.
query
.
code
getnotebycode
()
}
else
{
query
.
value
.
sortId
=
route
.
params
.
id
getList
()
}
})
const
getnotebycode
=
()
=>
{
getnoteListcptid
(
query
.
value
).
then
(
res
=>
{
newsList
.
value
=
res
.
rows
total
.
value
=
res
.
total
})
}
const
getList
=
()
=>
{
console
.
log
(
query
.
value
)
getNewsListById
(
query
.
value
).
then
(
res
=>
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment