|
|
@ -53,9 +53,10 @@ |
|
|
|
<image class="pic" :src="item.coverUrl"></image> |
|
|
|
<image class="pic" :src="item.coverUrl"></image> |
|
|
|
<view class="texts"> |
|
|
|
<view class="texts"> |
|
|
|
<view class="name ell">{{ item.competitionName }}</view> |
|
|
|
<view class="name ell">{{ item.competitionName }}</view> |
|
|
|
<view class="meta">报名时间:{{ item.signUpStartTime }}</view> |
|
|
|
<view v-if="item.signUpStartTime" class="meta">报名时间:{{ item.signUpStartTime.substr(0, 16) }}</view> |
|
|
|
<view class="meta ell">主办方:{{ item.sponsor }}</view> |
|
|
|
<view class="meta ell">主办方:{{ item.sponsor }}</view> |
|
|
|
<view v-if="item.whetherToShowApplicants === '1'" class="meta ell">{{ item.applicantNum }}/{{ item.quantityLimit }}人已报名</view> |
|
|
|
<view v-if="item.whetherToShowApplicants === '1'" class="meta ell">{{ item.applicantNum }}/{{ item.quantityLimit }}人已报名</view> |
|
|
|
|
|
|
|
<view v-if="item.status !== '' && item.whetherToSignUp" class="status">{{ statusList[item.status] }}</view> |
|
|
|
<view v-if="item.signing" class="sign" @click.stop="presign(item)">报名</view> |
|
|
|
<view v-if="item.signing" class="sign" @click.stop="presign(item)">报名</view> |
|
|
|
<view v-if="!item.whetherToSignUp" class="signed">已报名</view> |
|
|
|
<view v-if="!item.whetherToSignUp" class="signed">已报名</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -79,6 +80,8 @@ |
|
|
|
return { |
|
|
|
return { |
|
|
|
per: true, // 是否有权限 |
|
|
|
per: true, // 是否有权限 |
|
|
|
teamId: uni.getStorageSync('teamId') || '', |
|
|
|
teamId: uni.getStorageSync('teamId') || '', |
|
|
|
|
|
|
|
platformId: uni.getStorageSync('platformId'), |
|
|
|
|
|
|
|
statusList: ['待开始', '已截止报名', '已结束'], |
|
|
|
curBanner: 0, |
|
|
|
curBanner: 0, |
|
|
|
dotsStyles: { |
|
|
|
dotsStyles: { |
|
|
|
backgroundColor: 'rgba(83, 200, 249,0.3)', |
|
|
|
backgroundColor: 'rgba(83, 200, 249,0.3)', |
|
|
@ -148,7 +151,8 @@ |
|
|
|
listType: 0, |
|
|
|
listType: 0, |
|
|
|
keyWord: this.keyword, |
|
|
|
keyWord: this.keyword, |
|
|
|
classificationId: this.curTab, |
|
|
|
classificationId: this.curTab, |
|
|
|
platformSource: '' |
|
|
|
platformSource: '', |
|
|
|
|
|
|
|
// platformSource: this.platformId === 7 ? 1 : this.platformId, |
|
|
|
}).then(async ({ data }) => { |
|
|
|
}).then(async ({ data }) => { |
|
|
|
this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records |
|
|
|
this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records |
|
|
|
this.page++ // 每次获取了数据后page+1 |
|
|
|
this.page++ // 每次获取了数据后page+1 |
|
|
@ -176,15 +180,28 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 定时处理时间及状态 |
|
|
|
// 定时处理时间及状态 |
|
|
|
handleStatus (item) { |
|
|
|
handleStatus (item) { |
|
|
|
|
|
|
|
let status = '' |
|
|
|
let signing = 0 |
|
|
|
let signing = 0 |
|
|
|
const signUpStartTime = new Date(item.signUpStartTime) // 报名开始时间 |
|
|
|
const signUpStartTime = new Date(item.signUpStartTime) // 报名开始时间 |
|
|
|
const signUpEndTime = new Date(item.signUpEndTime) // 报名结束时间 |
|
|
|
const signUpEndTime = new Date(item.signUpEndTime) // 报名结束时间 |
|
|
|
|
|
|
|
const playStartTime = new Date(item.playStartTime) // 活动开始时间 |
|
|
|
|
|
|
|
const playEndTime = new Date(item.playEndTime) // 活动结束时间 |
|
|
|
const { now } = this |
|
|
|
const { now } = this |
|
|
|
// 报名中(whetherToSignUp 是否已报名 0为已报名 1为未报名) |
|
|
|
// 报名中(whetherToSignUp 是否已报名 0为已报名 1为未报名) |
|
|
|
if (item.whetherToSignUp && now > signUpStartTime && now < signUpEndTime) { |
|
|
|
if (now < signUpStartTime) { |
|
|
|
signing = 1 |
|
|
|
// 待开始 |
|
|
|
|
|
|
|
status = 0 |
|
|
|
|
|
|
|
} else if (now > signUpStartTime && now < signUpEndTime) { |
|
|
|
|
|
|
|
if (item.whetherToSignUp) signing = 1 |
|
|
|
|
|
|
|
} else if (now > signUpEndTime && now < playEndTime) { |
|
|
|
|
|
|
|
// 已截止报名 |
|
|
|
|
|
|
|
status = 1 |
|
|
|
|
|
|
|
} else if (now > playEndTime) { |
|
|
|
|
|
|
|
// 已结束 |
|
|
|
|
|
|
|
status = 2 |
|
|
|
} |
|
|
|
} |
|
|
|
this.$set(item, 'signing', signing) |
|
|
|
this.$set(item, 'signing', signing) |
|
|
|
|
|
|
|
this.$set(item, 'status', status) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取分类 |
|
|
|
// 获取分类 |
|
|
|
async getCategory() { |
|
|
|
async getCategory() { |
|
|
@ -278,7 +295,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
@ -340,13 +357,15 @@ |
|
|
|
overflow: hidden; |
|
|
|
overflow: hidden; |
|
|
|
} |
|
|
|
} |
|
|
|
.pic { |
|
|
|
.pic { |
|
|
|
|
|
|
|
min-width: 280rpx; |
|
|
|
width: 280rpx; |
|
|
|
width: 280rpx; |
|
|
|
height: 180rpx; |
|
|
|
height: 180rpx; |
|
|
|
margin-right: 20rpx; |
|
|
|
margin-right: 20rpx; |
|
|
|
border-radius: 8px; |
|
|
|
border-radius: 8px; |
|
|
|
} |
|
|
|
} |
|
|
|
.texts { |
|
|
|
.texts { |
|
|
|
width: calc(100% - 240rpx); |
|
|
|
position: relative; |
|
|
|
|
|
|
|
width: calc(100% - 300rpx); |
|
|
|
} |
|
|
|
} |
|
|
|
.name { |
|
|
|
.name { |
|
|
|
font-size: 28rpx; |
|
|
|
font-size: 28rpx; |
|
|
@ -358,6 +377,13 @@ |
|
|
|
font-size: 24rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
color: #999; |
|
|
|
color: #999; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.status { |
|
|
|
|
|
|
|
position: absolute; |
|
|
|
|
|
|
|
bottom: 17rpx; |
|
|
|
|
|
|
|
right: 0; |
|
|
|
|
|
|
|
font-size: 24rpx; |
|
|
|
|
|
|
|
color: #b9b9b9; |
|
|
|
|
|
|
|
} |
|
|
|
.sign { |
|
|
|
.sign { |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
bottom: 0; |
|
|
|
bottom: 0; |
|
|
|