|
|
@ -15,7 +15,7 @@ |
|
|
|
}}</span>/<span class="font-size14">{{ item.participants }}人</span> |
|
|
|
</div> |
|
|
|
<van-button type="info" size="small" round @click="handelClickJump('activityDetail', item)" |
|
|
|
:disabled="new Date(item.cutOffTime.replace(/-/g, '/')).getTime() < Date.now() || item.currentParticipants >= item.participants">{{ recordFlag(item) ? '已报名' : '报名' }}</van-button> |
|
|
|
:disabled="disabledRecord(item)">{{ recordFlag(item) ? '已报名' : '报名' }}</van-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -85,6 +85,14 @@ export default { |
|
|
|
return item.recordList.findIndex(itemC => itemC.mobile === this.$store.state.app.userInfo.mobile) != -1 |
|
|
|
} |
|
|
|
}, |
|
|
|
disabledRecord() { |
|
|
|
return (item) => { |
|
|
|
if (!item.cutOffTime) return false |
|
|
|
let flag = new Date(item.cutOffTime.replace(/-/g, '/')).getTime() < Date.now() || item.currentParticipants >= item.participants; |
|
|
|
return flag || false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
watch: {}, |
|
|
|
} |
|
|
|