Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mh-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ling
mh-h5
Commits
84113a2f
提交
84113a2f
authored
1月 11, 2023
作者:
ling
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change css style
上级
030f7b3a
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
29 行增加
和
158 行删除
+29
-158
Match.vue
components/Match.vue
+13
-8
default.vue
layouts/default.vue
+1
-1
Schedule.vue
pages/Schedule.vue
+15
-149
没有找到文件。
components/Match.vue
浏览文件 @
84113a2f
...
...
@@ -6,6 +6,7 @@
v-model=
"activeName"
type=
"card"
@
click=
"getFootballMatch"
color=
"#ff976a"
>
<van-tab
:title=
"beforeyesterday"
:name=
"beforeyesterday"
></van-tab>
<van-tab
:title=
"yesterday"
:name=
"yesterday"
></van-tab>
...
...
@@ -17,14 +18,18 @@
<van-cell-group
v-for=
"item in list"
:key=
"item.id"
>
<van-cell>
<span>
{{
timeStamp1
(
item
.
time
)
}}
</span>
<span>
{{
item
.
competition_name_zh
}}
</span>
<span>
{{
item
.
home_team_name_zh
}}
</span>
<!--
<van-image
width=
"15"
:src=
"item.home_team_log"
/>
-->
<span>
{{
item
.
home_score
}}
:
{{
item
.
away_score
}}
</span>
<!--
<van-image
width=
"15"
:src=
"item.away_team_log"
/>
-->
<span>
{{
item
.
away_team_name_zh
}}
</span>
<span>
{{
item
.
status_str
}}
</span>
<div>
<van-tag
color=
"#ff976a"
size=
"medium"
>
{{
item
.
competition_name_zh
}}
</van-tag>
<van-tag
v-if=
"item.status_str"
color=
"#ff976a"
size=
"medium"
>
{{
item
.
status_str
}}
</van-tag>
<span>
{{
timeStamp1
(
item
.
time
)
}}
</span>
</div>
<div>
<span>
{{
item
.
home_team_name_zh
}}
</span>
<!--
<van-image
width=
"15"
:src=
"item.home_team_log"
/>
-->
<span
style=
"margin: 0 10px;"
>
{{
item
.
home_score
}}
:
{{
item
.
away_score
}}
</span>
<!--
<van-image
width=
"15"
:src=
"item.away_team_log"
/>
-->
<span>
{{
item
.
away_team_name_zh
}}
</span>
</div>
</van-cell>
</van-cell-group>
</div>
...
...
layouts/default.vue
浏览文件 @
84113a2f
...
...
@@ -14,7 +14,7 @@
<el-menu-item
index=
"/schedule"
>
赛程
</el-menu-item>
</el-menu>
-->
</div>
<van-tabs
class=
"tab"
v-model=
"activeIndex"
>
<van-tabs
class=
"tab"
color=
"#ff976a"
v-model=
"activeIndex"
>
<van-tab
title=
"即时比分"
to=
"/"
></van-tab>
<van-tab
title=
"赛程"
to=
"/schedule"
></van-tab>
</van-tabs>
...
...
pages/Schedule.vue
浏览文件 @
84113a2f
...
...
@@ -5,6 +5,7 @@
class=
"tab-nav"
v-model=
"activeName"
type=
"card"
color=
"#ff976a"
@
click=
"scheduleList"
>
<van-tab
:title=
"beforeyesterday"
:name=
"beforeyesterday"
></van-tab>
...
...
@@ -16,10 +17,10 @@
</van-tabs>
<div
class=
"search"
>
<van-
icon
name=
"search"
@
click=
"show = true"
/
>
<van-
button
@
click=
"show = true"
icon=
"search"
hairline
type=
"default"
>
选择赛事
</van-button
>
</div>
<van-action-sheet
v-model=
"show"
title=
"
标题
"
>
<van-action-sheet
v-model=
"show"
title=
"
选择赛事
"
>
<div>
<van-field
class=
"content"
...
...
@@ -87,133 +88,20 @@
<van-cell-group
v-for=
"item in list"
:key=
"item.id"
>
<van-cell>
<!--
<span>
{{
timeStamp1
(
item
.
time
)
}}
</span>
<span>
{{
item
.
competition_name_zh
}}
</span>
<span>
{{
item
.
home_team_name_zh
}}
</span>
<span>
{{
item
.
home_score
}}
:
{{
item
.
away_score
}}
</span>
<van-image
width=
"15"
:src=
"item.away_team_log"
/>
<span>
{{
item
.
away_team_name_zh
}}
</span>
<span>
{{
item
.
status_str
}}
</span>
-->
<div
style=
"display: flex"
>
<div
class=
"list-item"
style=
"width: 10%;"
>
<van-image
:src=
"item.away_team_logo"
/>
<van-image
:src=
"item.home_team_logo"
/>
</div>
<div
class=
"list-item"
style=
"width: 40%;"
>
<div>
{{
item
.
away_team_name
}}
</div>
<div>
{{
item
.
home_team_name
}}
</div>
</div>
<div
class=
"list-item"
style=
"width: 25%;"
>
<div>
{{
item
.
away_scores
}}
</div>
<div>
{{
item
.
home_scores
}}
</div>
</div>
<div
class=
"list-item"
style=
"width: 25%;"
>
<div>
{{
item
.
competition
}}
</div>
<div>
{{
item
.
match_time
}}
</div>
<div>
{{
item
.
status_str
}}
</div>
</div>
</div>
</van-cell>
</van-cell-group>
<!--
<div
class=
"schedule"
>
<div
class=
"schedule-match"
>
<div>
<div
class=
"schedule-title"
>
<div>
赛事
</div>
</div>
<el-select
v-model=
"matchType"
placeholder=
"请选择"
@
change=
"getAllMatchType"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<van-tag
color=
"#ff976a"
size=
"medium"
>
{{
item
.
competition
}}
</van-tag>
<van-tag
v-if=
"item.status_str"
color=
"#ff976a"
size=
"medium"
>
{{
item
.
status_str
}}
</van-tag>
<span>
{{
item
.
match_time
}}
</span>
</div>
<div
v-if=
"matchType === 1"
>
<div
class=
"schedule-title"
>
<div>
足球
</div>
<div>
今日
{{
footballCount
}}
场比赛
</div>
</div>
<el-select
v-model=
"footballCompensation"
placeholder=
"请选择"
@
change=
"getMatchType"
>
<el-option
v-for=
"item in football"
:key=
"item.sourceid"
:label=
"item.short_name_zh"
:value=
"item.sourceid"
>
</el-option>
</el-select>
</div>
<div
v-if=
"matchType === 2"
>
<div
class=
"schedule-title"
>
<div>
篮球
</div>
<div>
今日
{{
basketballCount
}}
场比赛
</div>
</div>
<el-select
v-model=
"basketballCompensation"
placeholder=
"请选择"
@
change=
"getMatchType"
>
<el-option
v-for=
"item in basketball"
:key=
"item.sourceid"
:label=
"item.short_name_zh"
:value=
"item.sourceid"
>
</el-option>
</el-select>
<div>
<span>
{{
item
.
home_team_name
}}
</span>
<!--
<van-image
width=
"15"
:src=
"item.home_team_log"
/>
-->
<span
style=
"margin: 0 10px;"
>
{{
item
.
home_scores
}}
:
{{
item
.
away_scores
}}
</span>
<!--
<van-image
width=
"15"
:src=
"item.away_team_log"
/>
-->
<span>
{{
item
.
away_team_name
}}
</span>
</div>
</div>
<el-table
:data=
"list"
style=
"width: 100%"
:show-header=
"false"
>
<el-table-column
class=
"row"
width=
"45"
>
<template
slot-scope=
"scope"
>
<div
style=
"display: grid"
>
<el-image
style=
"width: 30px"
:src=
"scope.row.away_team_logo"
></el-image>
<el-image
style=
"width: 30px"
:src=
"scope.row.home_team_logo"
></el-image>
</div>
</
template
>
</el-table-column>
<el-table-column
class=
"row"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
away_team_name
}}
</div>
<div>
{{
scope
.
row
.
home_team_name
}}
</div>
</
template
>
</el-table-column>
<el-table-column
class=
"row"
width=
"160"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
away_scores
}}
</div>
<div>
{{
scope
.
row
.
home_scores
}}
</div>
</
template
>
</el-table-column>
<el-table-column
class=
"row"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
competition
}}
</div>
<div>
{{
scope
.
row
.
match_time
}}
</div>
<div>
{{
scope
.
row
.
status_str
}}
</div>
</
template
>
</el-table-column>
</el-table>
</div>
-->
</van-cell>
</van-cell-group>
</div>
</
template
>
...
...
@@ -275,8 +163,6 @@ export default {
footballCount
:
""
,
basketball
:
[],
basketballCount
:
""
,
basketballCompensation
:
0
,
footballCompensation
:
0
,
compensationId
:
0
,
compensationText
:
""
,
columns
:
[
...
...
@@ -305,8 +191,6 @@ export default {
this
.
matchType
=
value
.
value
;
this
.
activeName
=
this
.
today
;
this
.
compensationId
=
0
;
this
.
footballCompensation
=
0
;
this
.
basketballCompensation
=
0
;
this
.
scheduleList
();
this
.
showMatchType
=
false
;
this
.
compensationText
=
""
;
...
...
@@ -319,20 +203,6 @@ export default {
this
.
showFootball
=
false
;
this
.
showBasketball
=
false
;
},
timeStamp1
(
value
)
{
var
date
=
new
Date
(
value
*
1000
);
//时间戳为10位需*1000,时间戳为13位的话不需乘1000
var
year
=
date
.
getFullYear
();
var
month
=
(
"0"
+
(
date
.
getMonth
()
+
1
)).
slice
(
-
2
);
var
sdate
=
(
"0"
+
date
.
getDate
()).
slice
(
-
2
);
var
hour
=
(
"0"
+
date
.
getHours
()).
slice
(
-
2
);
var
minute
=
(
"0"
+
date
.
getMinutes
()).
slice
(
-
2
);
var
second
=
(
"0"
+
date
.
getSeconds
()).
slice
(
-
2
);
// 拼接
// var result = year + '-' + month + '-' + sdate + ' ' + hour + ":" + minute; //+ ":" + second;
var
result
=
hour
+
":"
+
minute
;
//+ ":" + second;
// 返回
return
result
;
},
async
scheduleList
(
name
,
title
)
{
const
params
=
{
date
:
name
?
name
:
this
.
today
,
...
...
@@ -392,11 +262,7 @@ export default {
}
.content
{
padding
:
15px
;
}
.list-item
{
display
:
grid
;
padding
:
20px
;
}
.schedule-match
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论