mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 19:36:48 +08:00
--demand 面授课开课
This commit is contained in:
@@ -34,13 +34,13 @@
|
|||||||
<img style="width: 16px; height: 18px" src="../../assets/image/position.png"/>
|
<img style="width: 16px; height: 18px" src="../../assets/image/position.png"/>
|
||||||
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
|
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="time" style="margin-top: 37px">
|
<div class="time" style="margin-top: 37px" v-if="!isCourseEnd">
|
||||||
<botton
|
<botton
|
||||||
class="btn"
|
class="btn"
|
||||||
style="margin-right: 20px;width: 160px;height: 46px;"
|
style="margin-right: 20px;width: 160px;height: 46px;"
|
||||||
v-if="data.planDto.applyFlag"
|
v-if="data.planDto.applyFlag"
|
||||||
@click="onLineSignUp(false)"
|
@click="onLineSignUp(false)"
|
||||||
:style="{ background: isAllowSign?data.isSignUp || data.isRefused ? '#999' : 'rgb(57, 146, 249)':'#999'}">
|
:style="{ background: (data.isSignUp || data.isRefused) ? '#999' : 'rgb(57, 146, 249)'}">
|
||||||
{{
|
{{
|
||||||
data.isRefused ? '审核拒绝' : data.isSignUp? '已报名' :'立即报名'
|
data.isRefused ? '审核拒绝' : data.isSignUp? '已报名' :'立即报名'
|
||||||
}}
|
}}
|
||||||
@@ -348,16 +348,7 @@ const { query: {courseId} } = useRoute();
|
|||||||
const {data = {}} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
const {data = {}} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||||
const teacherInfo = useUserInfo( computed(() => data.value?.planDto?.teacherId));
|
const teacherInfo = useUserInfo( computed(() => data.value?.planDto?.teacherId));
|
||||||
const activeName = ref("first");
|
const activeName = ref("first");
|
||||||
// const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.beforeStart || 0, "minute"), dayjs(data.value.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.afterStart || 0, "minute")));
|
const isCourseEnd = computed(() => dayjs(data.value.planDto?.endTime).isBefore(dayjs()));
|
||||||
const isAllowSign = computed(() => {
|
|
||||||
let nowTime = new Date().getTime();
|
|
||||||
let courseBeginTime = new Date(data.value.planDto?.beginTime).getTime();
|
|
||||||
if(nowTime>courseBeginTime){
|
|
||||||
return false
|
|
||||||
}else{
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const handleClick = (tab, event) => {
|
const handleClick = (tab, event) => {
|
||||||
console.log("附件", tab, event);
|
console.log("附件", tab, event);
|
||||||
@@ -525,8 +516,8 @@ function submitReplayComment() {
|
|||||||
}
|
}
|
||||||
// 报名
|
// 报名
|
||||||
function onLineSignUp(isAgain) {
|
function onLineSignUp(isAgain) {
|
||||||
if (!isAllowSign.value) {
|
if (isCourseEnd.value) {
|
||||||
ElMessage.warning("未在允许报名时间范围内");
|
ElMessage.warning("该课程已经结束无法报名");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(data.value.isSignUp && !isAgain){
|
if(data.value.isSignUp && !isAgain){
|
||||||
|
|||||||
Reference in New Issue
Block a user