diff --git a/.env b/.env index b3d5b98..9acc359 100644 --- a/.env +++ b/.env @@ -1,3 +1,2 @@ -#TARO_APP_API=http://192.168.1.19:9898 TARO_APP_API=https://yjx.dev.yaojiankang.top #TARO_APP_API=https://playedu.yaojiankang.top diff --git a/src/api/request.ts b/src/api/request.ts index 25a13d9..03c57b2 100644 --- a/src/api/request.ts +++ b/src/api/request.ts @@ -74,6 +74,8 @@ export function request( if (!whitelist.includes(url)) { return new Promise((_, reject) => reject()) } + } else { + return new Promise((_, reject) => reject()) } } if (method === 'GET' && data) { diff --git a/src/pages/business/videoInfo/components/course.tsx b/src/pages/business/videoInfo/components/course.tsx index 8e3039e..cbe899f 100644 --- a/src/pages/business/videoInfo/components/course.tsx +++ b/src/pages/business/videoInfo/components/course.tsx @@ -196,7 +196,9 @@ const Course: FC = ({id, courseId, preview, curEnd}: Props) => { style={{height: "70vh"}} snapToEdge current={index} - onChange={(e) => setIndex((e.target as any).value)}> + onChange={(e) => { + setIndex((e.target as any).current) + }}> {examAll?.[time]?.map((d, index) => @@ -218,7 +220,7 @@ const Course: FC = ({id, courseId, preview, curEnd}: Props) => { data={d as ShareSubject} validate={validate} onAnswer={onAnswer} - end={index === examAll?.[time].length} + end={index === examAll?.[time].length - 1} />} {d.question_type === 3 && = ({id, courseId, preview, curEnd}: Props) => { onUpAndDown={(index) => setIndex(index)} index={index} validate={validate} - end={index === examAll?.[time].length} + end={index === examAll?.[time].length - 1} />} diff --git a/src/pages/business/videoInfo/videoInfo.tsx b/src/pages/business/videoInfo/videoInfo.tsx index e8f655e..a1939cc 100644 --- a/src/pages/business/videoInfo/videoInfo.tsx +++ b/src/pages/business/videoInfo/videoInfo.tsx @@ -88,7 +88,6 @@ const VideoInfo: FC = () => { }) - return ( @@ -105,7 +104,7 @@ const VideoInfo: FC = () => { {data?.course.title} - 学习进度{data?.learn_record?.finished_count || 0}/{data?.course.class_hour} + 学习进度{data?.learn_hour_records.length || 0}/{data?.course.class_hour} diff --git a/src/pages/manage/depAdmin/depAdmin.tsx b/src/pages/manage/depAdmin/depAdmin.tsx index c2349d4..0a42a22 100644 --- a/src/pages/manage/depAdmin/depAdmin.tsx +++ b/src/pages/manage/depAdmin/depAdmin.tsx @@ -56,7 +56,7 @@ const ChangeData: FC = ({putCompany, getDeps, parent_id}: Chang return ( - 添加部门 + {putCompany ? '修改' + putCompany.name : '添加部门'}
名称: @@ -119,7 +119,7 @@ const DepAdmin: FC = () => { Taro.showActionSheet({ itemList: [ '查看部门课程', - '查看子部门', + '查看子部门和学员', '修改', '删除' ],