提交 3da81e11 authored 作者: 王鹏飞's avatar 王鹏飞

fix: 个别课程不显示签到状态

上级 0a136047
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
<div class="time" v-if="item1.type === 5"> <div class="time" v-if="item1.type === 5">
<template> <template>
{{ item1.live.start_time }} {{ item1.live.statusStr }} {{ item1.live.start_time }} {{ item1.live.statusStr }}
<template v-if="hasSignInStatus">
<el-button v-if="[-1, 0].includes(item1.live.sign_status)" class="in-btn" type="primary" size="mini" round @click.stop="handleSignIn(item1)">签到</el-button> <el-button v-if="[-1, 0].includes(item1.live.sign_status)" class="in-btn" type="primary" size="mini" round @click.stop="handleSignIn(item1)">签到</el-button>
<el-tag v-if="item1.live.sign_status === 1" type="success" size="small">已签到</el-tag> <el-tag v-if="item1.live.sign_status === 1" type="success" size="small">已签到</el-tag>
<el-tag v-if="item1.live.sign_status === 2" type="danger" size="small">迟到</el-tag> <el-tag v-if="item1.live.sign_status === 2" type="danger" size="small">迟到</el-tag>
...@@ -98,6 +99,7 @@ ...@@ -98,6 +99,7 @@
<el-tag v-if="item1.live.sign_status === 3" type="danger" size="small">缺课</el-tag> <el-tag v-if="item1.live.sign_status === 3" type="danger" size="small">缺课</el-tag>
</template> </template>
</template> </template>
</template>
</div> </div>
<div class="time" v-else>{{ item1.live.start_time }} {{ item1.live.statusStr }}</div> <div class="time" v-else>{{ item1.live.start_time }} {{ item1.live.statusStr }}</div>
</template> </template>
...@@ -524,6 +526,13 @@ export default { ...@@ -524,6 +526,13 @@ export default {
firstVideo: {} firstVideo: {}
} }
}, },
computed: {
// 是否显示签到状态
hasSignInStatus() {
// 这几个课程不显示签到
return !['6806463135130583040'].includes(this.cid)
}
},
mounted() { mounted() {
/* 获取云课堂所有地址 */ /* 获取云课堂所有地址 */
cAction.Player.getCloudUrl().then(json => { cAction.Player.getCloudUrl().then(json => {
......
...@@ -32,12 +32,14 @@ ...@@ -32,12 +32,14 @@
<div class="live-item-content__time">{{ subitem.start_time }}</div> <div class="live-item-content__time">{{ subitem.start_time }}</div>
<div class="live-item-content__status"> <div class="live-item-content__status">
{{ calcTimeText(subitem) }} {{ calcTimeText(subitem) }}
<template v-if="hasSignInStatus(item)">
<el-tag v-if="[-1, 0].includes(subitem.sign_status)" style="float:right;" size="small" @click.stop="handleSignIn(subitem, item.course_id)"> </el-tag> <el-tag v-if="[-1, 0].includes(subitem.sign_status)" style="float:right;" size="small" @click.stop="handleSignIn(subitem, item.course_id)"> </el-tag>
<el-tag v-if="subitem.sign_status === 2" type="danger" style="float:right;" size="small">迟到</el-tag> <el-tag v-if="subitem.sign_status === 2" type="danger" style="float:right;" size="small">迟到</el-tag>
<el-tag v-if="subitem.sign_status === 1" type="success" size="small" style="float:right;">已签到</el-tag> <el-tag v-if="subitem.sign_status === 1" type="success" size="small" style="float:right;">已签到</el-tag>
<template v-if="[3, 5].includes(subitem.live_status)"> <template v-if="[3, 5].includes(subitem.live_status)">
<el-tag v-if="subitem.sign_status === 3" type="danger" size="small" style="float:right;">缺课</el-tag> <el-tag v-if="subitem.sign_status === 3" type="danger" size="small" style="float:right;">缺课</el-tag>
</template> </template>
</template>
</div> </div>
</div> </div>
</div> </div>
...@@ -87,6 +89,11 @@ export default { ...@@ -87,6 +89,11 @@ export default {
} }
}, },
methods: { methods: {
// 是否显示签到状态
hasSignInStatus(item) {
// 这几个课程不显示签到
return !['6806463135130583040'].includes(item.course_id)
},
handleSignIn(item, courseId) { handleSignIn(item, courseId) {
if (item.sign_status === -1) { if (item.sign_status === -1) {
// this.$message.error('直播未开始,请提前10分钟进入签到') // this.$message.error('直播未开始,请提前10分钟进入签到')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论