提交 84113a2f authored 作者: ling's avatar ling

change css style

上级 030f7b3a
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
v-model="activeName" v-model="activeName"
type="card" type="card"
@click="getFootballMatch" @click="getFootballMatch"
color="#ff976a"
> >
<van-tab :title="beforeyesterday" :name="beforeyesterday"></van-tab> <van-tab :title="beforeyesterday" :name="beforeyesterday"></van-tab>
<van-tab :title="yesterday" :name="yesterday"></van-tab> <van-tab :title="yesterday" :name="yesterday"></van-tab>
...@@ -17,14 +18,18 @@ ...@@ -17,14 +18,18 @@
<van-cell-group v-for="item in list" :key="item.id"> <van-cell-group v-for="item in list" :key="item.id">
<van-cell> <van-cell>
<span>{{ timeStamp1(item.time) }}</span> <div>
<span>{{ item.competition_name_zh }}</span> <van-tag color="#ff976a" size="medium">{{ item.competition_name_zh }}</van-tag>
<span>{{ item.home_team_name_zh }}</span> <van-tag v-if="item.status_str" color="#ff976a" size="medium">{{ item.status_str }}</van-tag>
<!-- <van-image width="15" :src="item.home_team_log" /> --> <span>{{ timeStamp1(item.time) }}</span>
<span>{{ item.home_score }}{{ item.away_score }}</span> </div>
<!-- <van-image width="15" :src="item.away_team_log" /> --> <div>
<span>{{ item.away_team_name_zh }}</span> <span>{{ item.home_team_name_zh }}</span>
<span>{{ item.status_str }}</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>
</van-cell-group> </van-cell-group>
</div> </div>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-menu-item index="/schedule">赛程</el-menu-item> <el-menu-item index="/schedule">赛程</el-menu-item>
</el-menu> --> </el-menu> -->
</div> </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="/"></van-tab>
<van-tab title="赛程" to="/schedule"></van-tab> <van-tab title="赛程" to="/schedule"></van-tab>
</van-tabs> </van-tabs>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
class="tab-nav" class="tab-nav"
v-model="activeName" v-model="activeName"
type="card" type="card"
color="#ff976a"
@click="scheduleList" @click="scheduleList"
> >
<van-tab :title="beforeyesterday" :name="beforeyesterday"></van-tab> <van-tab :title="beforeyesterday" :name="beforeyesterday"></van-tab>
...@@ -16,10 +17,10 @@ ...@@ -16,10 +17,10 @@
</van-tabs> </van-tabs>
<div class="search"> <div class="search">
<van-icon name="search" @click="show = true" /> <van-button @click="show = true" icon="search" hairline type="default">选择赛事</van-button>
</div> </div>
<van-action-sheet v-model="show" title="标题"> <van-action-sheet v-model="show" title="选择赛事">
<div> <div>
<van-field <van-field
class="content" class="content"
...@@ -87,133 +88,20 @@ ...@@ -87,133 +88,20 @@
<van-cell-group v-for="item in list" :key="item.id"> <van-cell-group v-for="item in list" :key="item.id">
<van-cell> <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>
<div class="schedule-title"> <van-tag color="#ff976a" size="medium">{{ item.competition }}</van-tag>
<div>赛事</div> <van-tag v-if="item.status_str" color="#ff976a" size="medium">{{ item.status_str }}</van-tag>
</div> <span>{{ item.match_time }}</span>
<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>
</div> </div>
<div>
<div v-if="matchType === 1"> <span>{{ item.home_team_name }}</span>
<div class="schedule-title"> <!-- <van-image width="15" :src="item.home_team_log" /> -->
<div>足球</div> <span style="margin: 0 10px;">{{ item.home_scores }}{{ item.away_scores }}</span>
<div>今日 {{ footballCount }} 场比赛</div> <!-- <van-image width="15" :src="item.away_team_log" /> -->
</div> <span>{{ item.away_team_name }}</span>
<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> </div>
</div> </van-cell>
</van-cell-group>
<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> -->
</div> </div>
</template> </template>
...@@ -275,8 +163,6 @@ export default { ...@@ -275,8 +163,6 @@ export default {
footballCount: "", footballCount: "",
basketball: [], basketball: [],
basketballCount: "", basketballCount: "",
basketballCompensation: 0,
footballCompensation: 0,
compensationId: 0, compensationId: 0,
compensationText: "", compensationText: "",
columns: [ columns: [
...@@ -305,8 +191,6 @@ export default { ...@@ -305,8 +191,6 @@ export default {
this.matchType = value.value; this.matchType = value.value;
this.activeName = this.today; this.activeName = this.today;
this.compensationId = 0; this.compensationId = 0;
this.footballCompensation = 0;
this.basketballCompensation = 0;
this.scheduleList(); this.scheduleList();
this.showMatchType = false; this.showMatchType = false;
this.compensationText = ""; this.compensationText = "";
...@@ -319,20 +203,6 @@ export default { ...@@ -319,20 +203,6 @@ export default {
this.showFootball = false; this.showFootball = false;
this.showBasketball = 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) { async scheduleList(name, title) {
const params = { const params = {
date: name ? name : this.today, date: name ? name : this.today,
...@@ -392,11 +262,7 @@ export default { ...@@ -392,11 +262,7 @@ export default {
} }
.content { .content {
padding: 15px; padding: 20px;
}
.list-item {
display: grid;
} }
.schedule-match { .schedule-match {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论