黄琪勇 vor 1 Jahr
Ursprung
Commit
b6f82a2c11

+ 4 - 1
src/api/coursewarePlay.api.ts

@@ -15,7 +15,10 @@ export const getCoursewarePlayTime_gyt = (id: string) => {
 export const coursewarePlayTime_gyt = (id: string, time: number) => {
    return httpAxios_gyt.axioseRquest({
       method: "post",
-      url: `/api-teacher/courseSchedule/coursewarePlayTime?courseScheduleId=${id}&playTime=${time}`
+      url: `/api-teacher/courseSchedule/coursewarePlayTime?courseScheduleId=${id}&playTime=${time}`,
+      params: {
+         playFrom: "WEB"
+      }
    })
 }
 // 判断是否签退

+ 3 - 3
src/views/coursewarePlay/coursewarePlay.vue

@@ -100,7 +100,7 @@
 import videoPlay from "./videoPlay"
 import { getLessonCourseDetail_gym, getLessonCoursewareDetail_gyt } from "@/api/cloudTextbooks.api"
 import { checkWebCourse_gyt } from "@/api/coursewarePlay.api"
-import { httpAjaxErrMsg } from "@/plugin/httpAjax"
+import { httpAjaxErrMsg, httpAjaxLoadingErrMsg } from "@/plugin/httpAjax"
 import userStore from "@/store/modules/user"
 import { useRoute } from "vue-router"
 import { shallowRef, ref, computed, watchEffect, onUnmounted, onMounted } from "vue"
@@ -241,7 +241,7 @@ function handleGoBack() {
 function handleCoursewareEnd() {
    if (route.query.modeId) {
       if (userStoreHook.roles === "GYM") {
-         httpAjaxErrMsg(getRecentCourseSchedule_gym, route.query.modeId as string).then(res => {
+         httpAjaxLoadingErrMsg(getRecentCourseSchedule_gym, route.query.modeId as string).then(res => {
             if (res.code === 200) {
                if (res.data?.signOutStatusEnum === 3) {
                   useDialogConfirm({
@@ -258,7 +258,7 @@ function handleCoursewareEnd() {
             }
          })
       } else {
-         httpAjaxErrMsg(checkWebCourse_gyt, route.query.modeId as string).then(res => {
+         httpAjaxLoadingErrMsg(checkWebCourse_gyt, route.query.modeId as string).then(res => {
             if (res.code === 200) {
                if (res.data?.signOut === false) {
                   useDialogConfirm({

+ 5 - 5
src/views/curriculum/hooks/useStartClass.ts

@@ -1,13 +1,13 @@
 import { getCourseScheduleDetail_gyt } from "@/api/curriculum.api"
 import { getRecentCourseSchedule_gym } from "@/api/homePage.api"
-import { httpAjaxErrMsg } from "@/plugin/httpAjax"
+import { httpAjaxLoadingErrMsg } from "@/plugin/httpAjax"
 import useDialogConfirm from "@/hooks/useDialogConfirm"
 import { format } from "@/libs/tools"
 import router from "@/router"
 
 /* 管乐迷 开始上课 */
 export function handleStartClass_gym(id: string) {
-   httpAjaxErrMsg(getRecentCourseSchedule_gym, id).then(res => {
+   httpAjaxLoadingErrMsg(getRecentCourseSchedule_gym, id).then(res => {
       if (res.code === 200) {
          const { signInStatusEnum, isCallNames, coursewareDetailId, startClassTime, endClassTime, status } = res.data
          if (status === "OVER") {
@@ -60,9 +60,9 @@ export function isONLINE_gym(teachMode: string) {
 }
 /* 管乐团 开始上课 */
 export function handleStartClass_gyt(id: string) {
-   httpAjaxErrMsg(getCourseScheduleDetail_gyt, id).then(res => {
+   httpAjaxLoadingErrMsg(getCourseScheduleDetail_gyt, id).then(res => {
       if (res.code === 200) {
-         const { signIn, rollCall, lessonCoursewareDetailId, startTime, endTime, status } = res.data
+         const { signIn, rollCall, lessonCoursewareDetailId, startTime, endTime, status, needSignIn } = res.data
          if (status === "COMPLETE") {
             useDialogConfirm({
                headImg: require("@/img/curriculum/ts4.png"),
@@ -71,7 +71,7 @@ export function handleStartClass_gyt(id: string) {
             })
             return
          }
-         if (!signIn) {
+         if (!signIn && needSignIn) {
             useDialogConfirm({
                headImg: require("@/img/curriculum/ts2.png"),
                text: `您当前${format(startTime, "hh:ii")}-${format(endTime, "hh:ii")}的课程暂未签到,为避免考勤异常,请到APP进行签到。`,