You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Sports/pages/index/index.vue

555 lines
11 KiB

<template>
<view class="oppo-box">
<image style="width: 100%;" src="@/static/bg (1).png"></image>
<view class="top">
弹射者|震东风华田径巡回赛
</view>
<view class="top1">
弹射者|震东风华田径巡回赛
</view>
<view class="content">
<view class="contenttext">
<image class="imgw" src="@/static/规程 (1).png"></image>
<view style="margin-top: -80upx;margin-left: 100upx;font-size: 30upx;">规程</view>
</view>
<view class="contenttext">
<image class="imgw" src="@/static/俱乐部.png"></image>
<view style="margin-top: -80upx;margin-left: 100upx;font-size: 30upx;">俱乐部</view>
</view>
<view class="contenttext">
<image class="imgw" src="@/static/消息.png"></image>
<view style="margin-top: -80upx;margin-left: 100upx;font-size: 30upx;">消息</view>
</view>
</view>
<view class="content1">
<view class="content11">
<view class="l"><image class="imgw12" src="@/static/huifang.png"></image><text style="padding:20upx;" >比赛回放</text> </view>
<view class="r">
<text style="line-height: 65upx;" @click="huifang">查看回放</text><image class="imgw13" src="@/static/jiantouyou@2x.png"></image>
</view>
</view>
<view class="content12">
<image class="imgw14" src="../../static/zhibo1.png" mode=""></image>
<text style="font-size: 28rpx;">炽能体育公开赛 邯郸站视频号 </text>
<view class="kaibo">
开播提醒
</view>
<view class="shijian">今天下午13:07直播</view>
</view>
<view class="content12">
<image class="imgw14" src="../../static/zhibo1.png" mode=""></image>
<text style="font-size: 28rpx;">炽能体育公开赛 邯郸站视频号 </text>
<view class="zhibo">
直播中
</view>
<view class="shijian">正在直播</view>
</view>
</view>
<view class="content3" style="margin-top: 20upx;" v-for="(item,idex) in 4" @click="competition">
<view class="content31">
<image class="img31" src="../../static/bg (1).png" mode=""></image>
</view>
<view class="content32" style="margin-top: 20upx;margin-right: 20upx;" >
<text>炽能体育公开赛 邯郸站炽能体 育公开赛 邯郸站</text>
<view class="text31">
比赛日期:2024年04月13日
</view>
<view class="text31">
截止日期:2024-04-03 23:59:59
</view>
<view class="icon32" style="margin-top: 20upx;margin-right: 20upx;">
<view class="text32">
报名中
</view>
<image class="img32" src="../../static/dingwei.png" mode=""></image>
</view>
</view>
</view>
<view class="content4">
<view class="text4">炽能体育 巡回赛</view>
<view class="contenttext">
<image class="imgw4" src="@/static/规程 (1).png"></image>
<view style="margin-top: -60upx;margin-left: 80upx;font-size: 30upx;">视频号</view>
</view>
<view class="contenttext">
<image class="imgw4" src="@/static/规程 (1).png"></image>
<view style="margin-top: -60upx;margin-left: 80upx;font-size: 30upx;">公众号</view>
</view>
<view class="contenttext">
<image class="imgw4" src="@/static/规程 (1).png"></image>
<view style="margin-top: -60upx;margin-left: 80upx;font-size: 30upx;">客服</view>
</view>
</view>
</view>
</template>
<script>
const systemInfo = uni.getSystemInfoSync();
export default {
data() {
return {
addWidth: systemInfo.screenWidth - 70,
addHeight: systemInfo.screenHeight - 150,
keyword: "",
list: [],
tabIndex: 0,
page: 1,
count: 1,
statusBarHeight: 0,
bgColor: '#dcdcdc'
}
},
onLoad() {
this.statusBarHeight = systemInfo.statusBarHeight
},
onShow() {
// this.get_api_cage_list(1);
},
onReachBottom() {
if (this.list.length <= this.count) {
this.page++;
this.get_api_cage_list();
}
},
methods: {
huifang(){
uni.navigateTo({
url: "/pages/index/detail"
})
},
competition(){
uni.navigateTo({
url: "/pages/index/competition/competition"
})
},
async get_api_cage_list(type) {
uni.showLoading({
title: "加载中"
})
if (type == 1) {
this.page = 1;
this.list = [];
this.keyword = ""
}
const {
errorcode,
data,
message
} = await this.$api.api_cage_list({
uid: uni.getStorageSync("userInfo").uid,
order: this.tabIndex == 0 ? 'strains' : this.tabIndex == 1 ? 'id' : this.tabIndex == 2 ?
'gene' : this.tabIndex == 3 ? 'type' : 'created',
keyword: this.keyword,
page: this.page
})
if (errorcode == 200) {
setTimeout(() => {
uni.hideLoading()
this.list = this.arrayUnique([...this.list, ...data.data], 'id');
this.count = data.count
}, 200)
} else {
uni.showToast({
title: message,
icon: "none"
})
}
},
//数组对象去重
arrayUnique(arr, name) {
var hash = {};
return arr.reduce(function(item, next) {
hash[next[name]] ?
"" :
(hash[next[name]] = true && item.push(next));
return item;
}, []);
},
tabItem(i) {
this.tabIndex = i;
this.get_api_cage_list(1);
},
toPage(i, o) {
if (i == 1) {
uni.navigateTo({
url: "/pages/index/detail?id=" + o.id + '&type=' + o.type + '&number=' + o.number
})
} else if (i == 2) {
uni.navigateTo({
url: "/pages/index/create"
})
} else {
uni.scanCode({
success() {
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.imgw4{
width: 74upx;
height: 74upx;
}
.content4{
margin-top: 20upx;
width: 750rpx;
height: 110rpx;
background: #FFFFFF;
display: flex;
justify-content:center;
.text4{
margin-top: 20upx;
margin-left: 20upx;
width: 183rpx;
height: 59rpx;
font-family: AliHYAiHei;
font-weight: 400;
font-size: 26rpx;
color: #333333;
line-height: 34rpx;
}
}
.content3{
width: 702rpx;
height: 236rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: 0 auto;
display: flex;
.content31{
.img31{
margin: 30upx;
width: 220rpx;
height: 180rpx;
border-radius: 10rpx;
}
}
}
.icon32{
display: flex;
justify-content:space-between;
}
.text31{
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #AAAAAA;
line-height: 40rpx;
}
.text32{
// width: 100rpx;
// height: 38rpx;
background: #FF8D2B;
border-radius: 5rpx;
}
.img32{
width: 40rpx;
height: 40rpx;
background: #CA151F;
border-radius: 50%;
}
.shijian{
margin-left: 30upx;
width: 207rpx;
height: 23rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #A8ABB3;
line-height: 60rpx;
}
.zhibo{
float: right;
width: 100rpx;
height: 46rpx;
background: #CA151F;
border-radius: 0rpx 10rpx 0rpx 20rpx;
}
.kaibo{
float: right;
width: 140rpx;
height: 46rpx;
background: #FF8D2B;
border-radius: 0rpx 10rpx 0rpx 20rpx;
}
.content1{
margin: 24rpx auto;
width: 702rpx;
height: 366rpx;
background: #FFFFFF;
border-radius: 20rpx;
.content11{
display: flex;
justify-content:space-between;
.imgw12{
width: 32upx;
height: 32upx;
margin-top: 20upx;
margin-left: 26upx;
margin-right: 6upx;
}
.imgw13{
width: 24upx;
height: 24upx;
margin-top: 16upx;
margin-right: 26upx;
}
}
.content12{
margin: 24upx auto;
width: 662rpx;
height: 106rpx;
background: #F9F9F9;
border-radius: 10rpx;
padding: 10upx;
.imgw14{
width: 21upx;
height: 24upx;
}
}
}
.imgw1{
width: 32upx;
height: 32upx;
}
.imgw {
width: 90upx;
height: 90upx;
border: 1px dashed #333333;
}
.contenttext {
width: 33.33%;
height: 100%;
justify-content: center;
margin-top: 20upx;
margin-left: 30upx;
}
.content {
display: flex;
margin: 24rpx auto;
width: 702rpx;
height: 130rpx;
background: #FFFFFF;
border-radius: 20rpx;
}
.top {
position: absolute;
top: 117upx;
left: 25upx;
font-family: PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #FFFFFF;
}
.top1 {
position: absolute;
top: 304upx;
left: 83upx;
font-family: PingFang SC;
font-weight: 500;
font-size: 50rpx;
color: #FFFFFF;
}
.home {
&-add {
pointer-events: none;
width: 100%;
height: calc(100vh - env(safe-area-inset-bottom) - 50px);
position: fixed;
left: 0;
top: 0;
z-index: 99;
.movableView {
pointer-events: auto;
width: 112rpx;
height: 112rpx;
image {
width: 100%;
height: 100%;
}
}
}
&-navbar {
image {
width: 45rpx;
height: 45rpx;
margin-left: 38rpx;
}
}
&-filter {
width: 100%;
background-color: #efefef;
display: flex;
align-items: center;
.item {
line-height: 85rpx;
width: 20%;
text-align: center;
color: #241b17;
font-size: 30rpx;
&-on {
background-color: #009944;
color: #ffffff;
}
}
}
&-search {
width: 100%;
background-color: #efefef;
padding: 15rpx 40rpx;
border: 1px solid #cacaca;
box-sizing: border-box;
.box {
display: flex;
align-items: center;
height: 85rpx;
width: 100%;
box-sizing: border-box;
padding: 0 25rpx;
text-align: center;
background-color: #ffffff;
border-radius: 10rpx;
.search {
width: 40rpx;
height: 40rpx;
}
input {
flex: 1;
color: #241b17;
font-size: 30rpx;
text-align: left;
margin-left: 25rpx;
}
.arrow {
width: 19rpx;
height: 33rpx;
}
}
}
&-list {
overflow: hidden;
padding: 0 0 40rpx;
display: flex;
flex-wrap: wrap;
.item {
width: 134rpx;
margin-top: 40rpx;
overflow: hidden;
margin-left: 40rpx;
.box {
width: 134rpx;
height: 134rpx;
background: url(@/static/icon-home-01.png) center top no-repeat;
background-size: 100% auto;
position: relative;
box-shadow: 0 8rpx 15rpx #999;
border-radius: 0 0 18rpx 18rpx;
overflow: hidden;
.title {
text-align: center;
font-size: 22rpx;
line-height: 50rpx;
color: #040909;
}
.desc {
margin-top: 12rpx;
text-align: center;
font-size: 22rpx;
line-height: 50rpx;
color: #040909;
}
image {
width: 124rpx;
height: 10rpx;
background: url(@/static/icon-home-01.png) center top no-repeat;
background-size: 100% auto;
position: absolute;
left: 50%;
margin-left: -62rpx;
bottom: 0;
z-index: 2;
}
}
.sort {
text-align: center;
padding: 10rpx 0 0;
font-size: 27rpx;
color: #040909;
}
&-1 {
.box {
background: url(@/static/icon-home-01.png) center top no-repeat;
background-size: 100% auto;
}
}
&-2 {
.box {
background: url(@/static/icon-home-02.png) center top no-repeat;
background-size: 100% auto;
}
}
&-3 {
.box {
background: url(@/static/icon-home-03.png) center top no-repeat;
background-size: 100% auto;
}
}
&-4 {
.box {
background: url(@/static/icon-home-04.png) center top no-repeat;
background-size: 100% auto;
}
}
&-5 {
.box {
background: url(@/static/icon-home-05.png) center top no-repeat;
background-size: 100% auto;
}
}
&-6 {
.box {
background: url(@/static/icon-home-06.png) center top no-repeat;
background-size: 100% auto;
}
}
}
}
}
</style>