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

change css style

上级 030f7b3a
......@@ -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>
......
......@@ -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>
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论