From 9d934feaa21802eddeb479e722430d426c429570 Mon Sep 17 00:00:00 2001 From: king <2229249788@qq.com> Date: Mon, 28 Aug 2023 15:03:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home.ts | 8 ++++++-- .../home/components/feature_recommended.tsx | 4 +--- src/pages/home/home.tsx | 6 ++---- src/static/img/arrow-right.png | Bin 0 -> 2871 bytes 4 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 src/static/img/arrow-right.png diff --git a/src/api/home.ts b/src/api/home.ts index aa884b5..70ee5e3 100644 --- a/src/api/home.ts +++ b/src/api/home.ts @@ -33,8 +33,12 @@ export interface HomeData { adverts: AdwareType[] skill: Kill[] health: Health[] - brand: Brand[] - illness: Illness[] + brand: { + list: Brand[] + } + illness: { + list: Illness[] + } } export const HomeApi = { diff --git a/src/pages/home/components/feature_recommended.tsx b/src/pages/home/components/feature_recommended.tsx index 936de39..6283013 100644 --- a/src/pages/home/components/feature_recommended.tsx +++ b/src/pages/home/components/feature_recommended.tsx @@ -75,9 +75,7 @@ const FeatureRecommended: FC = (props) => { description: d.graphic_introduction, path: `?id=${d.id}`, })) - } catch (e) { - console.log(e) - } + } catch (e) {} return [] } diff --git a/src/pages/home/home.tsx b/src/pages/home/home.tsx index acc1adf..2cd8a6c 100644 --- a/src/pages/home/home.tsx +++ b/src/pages/home/home.tsx @@ -1,7 +1,6 @@ import {FC, useEffect, useState} from "react"; import {View} from "@tarojs/components"; import styles from "./home.module.scss"; -// import {Search} from "@/pages/home/components/search"; import Adware from "@/pages/home/components/adware"; import Feature from "@/pages/home/components/feature"; import FeatureRecommended from "@/pages/home/components/feature_recommended"; @@ -29,13 +28,12 @@ const Home: FC = () => { return ( - {/**/} diff --git a/src/static/img/arrow-right.png b/src/static/img/arrow-right.png new file mode 100644 index 0000000000000000000000000000000000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$F$S{xoX`wWLk z6#0xhs(;{6rit{9=D}c8tBJs8x17i>yfEx|#KYiRR$zPsEbFV#fZk6#-B<|)Ue4T# z^^4G&cN_MZljX$WregSZPC)k<$@asGv zP8h)sq6r(jHb?xwOedwUKe95)cEdr!o7Xp!2c$4HI&Q{bGr9LK4VNouF~X0OUIk2& zQOERhTh#K&u1sTqunz04F0^Ub$vyw8qXsW2i!MZj4V7pUBg@qDBF>=v3R{cd=R%c# z6>Zib(0E8t;>C+I;cdV5!BHNx^1Z|z zkOD~*BWX^))Wf3Kc(}>GN?U|~1V5WUDT Date: Mon, 28 Aug 2023 15:47:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 4 ++-- src/pages/manage/courseAdmin/components/search.tsx | 2 +- src/pages/manage/courseAdmin/courseAdmin.tsx | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8afdb16..2b130cf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.0' +lockfileVersion: '6.1' settings: autoInstallPeers: true @@ -12444,7 +12444,7 @@ packages: dependencies: object-assign: 4.1.1 react: 18.0.0 - react-is: 16.13.1 + react-is: 18.2.0 dev: false /react@18.0.0: diff --git a/src/pages/manage/courseAdmin/components/search.tsx b/src/pages/manage/courseAdmin/components/search.tsx index 367a088..43f9fd7 100644 --- a/src/pages/manage/courseAdmin/components/search.tsx +++ b/src/pages/manage/courseAdmin/components/search.tsx @@ -88,7 +88,7 @@ export const Search: FC = ({param, setParam}) => { {deps.length ? <> { - deps.map(dep => changeDepId(dep.id)}> diff --git a/src/pages/manage/courseAdmin/courseAdmin.tsx b/src/pages/manage/courseAdmin/courseAdmin.tsx index 6eb09f5..6f9b245 100644 --- a/src/pages/manage/courseAdmin/courseAdmin.tsx +++ b/src/pages/manage/courseAdmin/courseAdmin.tsx @@ -26,7 +26,7 @@ const CourseAdmin: FC = () => { courseApi.getCourseAll({...param, page_size: param.page_size * (replace ? param.page : 1)}).then(res => { setTotal(res.total) if (param.page === 1 || replace) { - setData(res.data) + setData(res.data || []) } else { setData([ ...data, @@ -53,7 +53,7 @@ const CourseAdmin: FC = () => { if (curs.length === data.length) { setCurs([]) } else { - setCurs(data.map(d => d.id)) + setCurs(data?.map(d => d.id)) } } @@ -72,7 +72,7 @@ const CourseAdmin: FC = () => { Taro.showModal({ title: '删除警告', content: "删除后所有部门不可查看", - confirmText:'删除', + confirmText: '删除', async success({confirm}) { if (confirm) { try { @@ -108,7 +108,7 @@ const CourseAdmin: FC = () => { * @param required 批量添加为[] */ function batchChangDep(ids: number[], depList = [], required = []) { - if (!ids.length) { + if (!ids?.length) { Taro.showToast({title: '请选择课程', icon: 'none'}) return } @@ -153,7 +153,7 @@ const CourseAdmin: FC = () => { { - data.map((d, index) => + data?.map((d, index) => addCurs(d.id)}> {batch && Date: Mon, 28 Aug 2023 16:55:10 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E8=80=83=E9=A2=98=E5=BC=80=E5=A7=8B=E5=92=8C=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/video/video.tsx | 4 +-- .../videoInfo/components/catalogue.tsx | 5 ++-- .../business/videoInfo/components/course.tsx | 26 +++++++++---------- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/components/video/video.tsx b/src/components/video/video.tsx index 9924471..e324452 100644 --- a/src/components/video/video.tsx +++ b/src/components/video/video.tsx @@ -45,12 +45,10 @@ const HVideo: FC = (opt: HVideoOptions) => { opt.breakpoint.forEach(d => { if (time < d + deviation && time > d - deviation) { video?.pause() - video?.seek(d - deviation) if (process.env.TARO_ENV === 'h5') { try { document?.exitFullscreen().then() - } catch (e) { - } + } catch (e) {} } video?.exitFullScreen() opt.onBreakpoint(d) diff --git a/src/pages/business/videoInfo/components/catalogue.tsx b/src/pages/business/videoInfo/components/catalogue.tsx index 601d885..fd8df74 100644 --- a/src/pages/business/videoInfo/components/catalogue.tsx +++ b/src/pages/business/videoInfo/components/catalogue.tsx @@ -175,10 +175,9 @@ const Catalogue: FC = ({data, setHors, id, playId}) => { { - playing ? {JSON.stringify(playing)}暂停 - : {JSON.stringify(playing)}立即学习 + playing ? 暂停 + : 立即学习 } - setShow(true)}>... diff --git a/src/pages/business/videoInfo/components/course.tsx b/src/pages/business/videoInfo/components/course.tsx index b001118..b8df4c7 100644 --- a/src/pages/business/videoInfo/components/course.tsx +++ b/src/pages/business/videoInfo/components/course.tsx @@ -129,24 +129,22 @@ const Course: FC = ({id, courseId, preview, curEnd}) => { setTime={videoSeek} /> - + {formatMinute(time)}考题 - {examAll?.[time]?.slice(0, 1)?.map((d) => - - {d.question_type === 2 && - setRecord([isAnswer])} - />} - - )} + { + examAll?.[time]?.slice(0, 1)?.map((d) => + + {d.question_type === 2 && + setRecord([isAnswer])} + />} + ) + }