+
{
setTabKey(Number(key));
@@ -166,7 +167,7 @@ const CoursePage = () => {
"--active-title-color": "rgba(0,0,0,0.88)",
"--active-line-border-radius": "2px",
"--title-font-size": "16px",
-
+ "--content-padding":"18px"
}}
>
{items.map((item) => (
From 6cc81ea6b7678394e70402a420023a94326b7e16 Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Sun, 30 Jul 2023 14:06:16 +0800
Subject: [PATCH 09/22] =?UTF-8?q?=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/member/index.module.scss | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/pages/member/index.module.scss b/src/pages/member/index.module.scss
index 9985024..769b8ae 100644
--- a/src/pages/member/index.module.scss
+++ b/src/pages/member/index.module.scss
@@ -157,10 +157,15 @@
.dialog-body {
position: fixed;
- bottom: 0px;
+ bottom: 53px;
left: 20px;
right: 20px;
- height: 253px;
+ min-height: 253px;
+ // box-sizing: border-box;
+ // padding-bottom: calc(
+ // 53px + constant(safe-area-inset-bottom)
+ // ); /* 兼容iOS 11.0 - 11.2 */
+ // padding-bottom: calc(53px + env(safe-area-inset-bottom)); /* 兼容iOS 11.2+ */
.dialog-box {
width: 100%;
height: 162px;
From 89974cb611cb3177b115461f80e0630e9ba4478d Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Sun, 30 Jul 2023 14:09:33 +0800
Subject: [PATCH 10/22] =?UTF-8?q?=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/member/index.module.scss | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pages/member/index.module.scss b/src/pages/member/index.module.scss
index 769b8ae..6f64006 100644
--- a/src/pages/member/index.module.scss
+++ b/src/pages/member/index.module.scss
@@ -7,6 +7,7 @@
background-image: url("../../assets/images/login/bg.png");
background-repeat: no-repeat;
background-size: 100%;
+ z-index: 120;
.support-box {
position: fixed;
top: 87%;
@@ -157,7 +158,7 @@
.dialog-body {
position: fixed;
- bottom: 53px;
+ bottom: 0px;
left: 20px;
right: 20px;
min-height: 253px;
From 6218a0104278acb678b3d1cdd7a35d1d7fc02b5f Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Sun, 30 Jul 2023 14:16:51 +0800
Subject: [PATCH 11/22] =?UTF-8?q?=E8=AF=BE=E4=BB=B6=E4=B8=8B=E8=BD=BD?=
=?UTF-8?q?=E5=A4=8D=E5=88=B6=E5=88=B0=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=8B?=
=?UTF-8?q?=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.tsx | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx
index 5b23f3c..7559a97 100644
--- a/src/pages/course/index.tsx
+++ b/src/pages/course/index.tsx
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
-import { Image, ProgressCircle, Tabs } from "antd-mobile";
+import { Image, ProgressCircle, Tabs, Toast } from "antd-mobile";
import styles from "./index.module.scss";
import { useNavigate, useLocation, useParams } from "react-router-dom";
import backIcon from "../../assets/images/commen/icon-back-n.png";
@@ -105,14 +105,25 @@ const CoursePage = () => {
navigate(`/course/${cid}/hour/${id}`);
};
- const onChange = (key: number) => {
- setTabKey(key);
- // navigate("/course/" + courseId + "?tab=" + key);
+ const isAndroid = () => {
+ const u = navigator.userAgent;
+
+ if (u.indexOf("Android") > -1 || u.indexOf("Linux") > -1) {
+ return true;
+ }
+
+ return false;
};
const downLoadFile = (cid: number, id: number) => {
vod.downloadAttachment(cid, id).then((res: any) => {
- window.open(res.data.download_url);
+ var input = document.createElement("input");
+ input.value = res.data.download_url;
+ document.body.appendChild(input);
+ input.select();
+ document.execCommand("Copy");
+ document.body.removeChild(input);
+ Toast.show("下载链接已复制,请在浏览器中粘贴下载");
});
};
@@ -167,7 +178,7 @@ const CoursePage = () => {
"--active-title-color": "rgba(0,0,0,0.88)",
"--active-line-border-radius": "2px",
"--title-font-size": "16px",
- "--content-padding":"18px"
+ "--content-padding": "18px",
}}
>
{items.map((item) => (
From 22533dc82820839941f835414c68d10675b00522 Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Sun, 30 Jul 2023 15:36:51 +0800
Subject: [PATCH 12/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E8=AF=BE=E4=BB=B6=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.module.scss | 5 +++--
src/pages/course/index.tsx | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/pages/course/index.module.scss b/src/pages/course/index.module.scss
index a7bb7ae..7110bbe 100644
--- a/src/pages/course/index.module.scss
+++ b/src/pages/course/index.module.scss
@@ -161,11 +161,12 @@
margin-bottom: 0px;
}
.left-cont {
- flex: 1;
+ width: calc(100% - 34px);
display: flex;
flex-direction: column;
margin-right: 10px;
.label {
+ width: 100%;
height: 16px;
display: flex;
align-items: center;
@@ -178,7 +179,7 @@
}
}
.title {
- width: 276px;
+ width: 100%;
margin-top: 14px;
height: 16px;
font-size: 14px;
diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx
index 7559a97..c1d5d6f 100644
--- a/src/pages/course/index.tsx
+++ b/src/pages/course/index.tsx
@@ -261,9 +261,9 @@ const CoursePage = () => {
/>
课件
-
+
{item.title}({item.type})
-
+
Date: Sun, 30 Jul 2023 15:43:47 +0800
Subject: [PATCH 13/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E8=AF=BE=E4=BB=B6=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.tsx | 22 ++++++++++++++--------
src/utils/index.ts | 5 +++++
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx
index c1d5d6f..0dd8afc 100644
--- a/src/pages/course/index.tsx
+++ b/src/pages/course/index.tsx
@@ -4,7 +4,7 @@ import styles from "./index.module.scss";
import { useNavigate, useLocation, useParams } from "react-router-dom";
import backIcon from "../../assets/images/commen/icon-back-n.png";
import { course as vod } from "../../api/index";
-import { isEmptyObject } from "../../utils/index";
+import { isEmptyObject, isWechat } from "../../utils/index";
import { Empty } from "../../components";
import { HourCompenent } from "./compenents/hour";
@@ -117,13 +117,19 @@ const CoursePage = () => {
const downLoadFile = (cid: number, id: number) => {
vod.downloadAttachment(cid, id).then((res: any) => {
- var input = document.createElement("input");
- input.value = res.data.download_url;
- document.body.appendChild(input);
- input.select();
- document.execCommand("Copy");
- document.body.removeChild(input);
- Toast.show("下载链接已复制,请在浏览器中粘贴下载");
+ if (isWechat()) {
+ const input = document.createElement("input");
+ document.body.appendChild(input);
+ input.setAttribute("value", res.data.download_url);
+ input.select();
+ if (document.execCommand("copy")) {
+ document.execCommand("copy");
+ Toast.show("下载链接已复制,请在浏览器中粘贴下载");
+ }
+ document.body.removeChild(input);
+ } else {
+ window.open(res.data.download_url);
+ }
});
};
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 4b06c5e..be86612 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -80,3 +80,8 @@ export function isMobile() {
export function isEmptyObject(obj: Object) {
return Object.keys(obj).length === 0;
}
+
+export function isWechat() {
+ let ua = window.navigator.userAgent.toLowerCase();
+ return /micromessenger/.test(ua);
+}
From dbab0780fe034da5a9a480b405956f5852befab6 Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Sun, 30 Jul 2023 15:45:36 +0800
Subject: [PATCH 14/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E8=AF=BE=E4=BB=B6=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx
index 0dd8afc..a20404f 100644
--- a/src/pages/course/index.tsx
+++ b/src/pages/course/index.tsx
@@ -124,7 +124,7 @@ const CoursePage = () => {
input.select();
if (document.execCommand("copy")) {
document.execCommand("copy");
- Toast.show("下载链接已复制,请在浏览器中粘贴下载");
+ Toast.show("请点击右上角···浏览器打开下载");
}
document.body.removeChild(input);
} else {
From 457fb0a0671ae4d7695d15b23ca6f1577443964a Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Sun, 30 Jul 2023 15:47:31 +0800
Subject: [PATCH 15/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E8=AF=BE=E4=BB=B6=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.tsx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx
index a20404f..1ab7800 100644
--- a/src/pages/course/index.tsx
+++ b/src/pages/course/index.tsx
@@ -118,15 +118,14 @@ const CoursePage = () => {
const downLoadFile = (cid: number, id: number) => {
vod.downloadAttachment(cid, id).then((res: any) => {
if (isWechat()) {
- const input = document.createElement("input");
+ Toast.show("请点击右上角···浏览器打开下载");
+ var input = document.createElement("input");
+ input.value = res.data.download_url;
document.body.appendChild(input);
- input.setAttribute("value", res.data.download_url);
input.select();
- if (document.execCommand("copy")) {
- document.execCommand("copy");
- Toast.show("请点击右上角···浏览器打开下载");
- }
+ document.execCommand("Copy");
document.body.removeChild(input);
+ window.open(res.data.download_url);
} else {
window.open(res.data.download_url);
}
From 061e9a7057c1016cdbc6a3eb9a438fbc466c761d Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Sun, 30 Jul 2023 15:52:03 +0800
Subject: [PATCH 16/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E8=AF=BE=E4=BB=B6=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.tsx | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx
index 1ab7800..1637475 100644
--- a/src/pages/course/index.tsx
+++ b/src/pages/course/index.tsx
@@ -118,7 +118,6 @@ const CoursePage = () => {
const downLoadFile = (cid: number, id: number) => {
vod.downloadAttachment(cid, id).then((res: any) => {
if (isWechat()) {
- Toast.show("请点击右上角···浏览器打开下载");
var input = document.createElement("input");
input.value = res.data.download_url;
document.body.appendChild(input);
From cf1fc2519c3d0c0c1e3fa204fd59a0d13074e12a Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Sun, 30 Jul 2023 16:00:34 +0800
Subject: [PATCH 17/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E8=AF=BE=E4=BB=B6=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.tsx | 15 +++++++++++++--
src/utils/index.ts | 5 +++++
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx
index 1637475..51f82b2 100644
--- a/src/pages/course/index.tsx
+++ b/src/pages/course/index.tsx
@@ -4,7 +4,7 @@ import styles from "./index.module.scss";
import { useNavigate, useLocation, useParams } from "react-router-dom";
import backIcon from "../../assets/images/commen/icon-back-n.png";
import { course as vod } from "../../api/index";
-import { isEmptyObject, isWechat } from "../../utils/index";
+import { isEmptyObject, isWechat, isIOS } from "../../utils/index";
import { Empty } from "../../components";
import { HourCompenent } from "./compenents/hour";
@@ -126,7 +126,18 @@ const CoursePage = () => {
document.body.removeChild(input);
window.open(res.data.download_url);
} else {
- window.open(res.data.download_url);
+ if (isIOS()) {
+ Toast.show("请点击右上角···浏览器打开下载");
+ var input = document.createElement("input");
+ input.value = res.data.download_url;
+ document.body.appendChild(input);
+ input.select();
+ document.execCommand("Copy");
+ document.body.removeChild(input);
+ window.open(res.data.download_url);
+ } else {
+ window.open(res.data.download_url);
+ }
}
});
};
diff --git a/src/utils/index.ts b/src/utils/index.ts
index be86612..fa64b91 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -85,3 +85,8 @@ export function isWechat() {
let ua = window.navigator.userAgent.toLowerCase();
return /micromessenger/.test(ua);
}
+
+export function isIOS() {
+ var u = navigator.userAgent;
+ return !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
+}
From b3cd899b70b48669b50730c720e3d7d74235b1c7 Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Sun, 30 Jul 2023 16:14:37 +0800
Subject: [PATCH 18/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E8=AF=BE=E4=BB=B6=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.tsx | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx
index 51f82b2..4c8ebfa 100644
--- a/src/pages/course/index.tsx
+++ b/src/pages/course/index.tsx
@@ -49,6 +49,7 @@ const CoursePage = () => {
const [tabKey, setTabKey] = useState(Number(result.get("tab") || 1));
const [attachments, setAttachments] = useState
([]);
const [items, setItems] = useState([]);
+ const [downLoadTemplateURL, setDownLoadTemplateURL] = useState("");
useEffect(() => {
getDetail();
@@ -105,19 +106,12 @@ const CoursePage = () => {
navigate(`/course/${cid}/hour/${id}`);
};
- const isAndroid = () => {
- const u = navigator.userAgent;
-
- if (u.indexOf("Android") > -1 || u.indexOf("Linux") > -1) {
- return true;
- }
-
- return false;
- };
-
const downLoadFile = (cid: number, id: number) => {
vod.downloadAttachment(cid, id).then((res: any) => {
if (isWechat()) {
+ if (isIOS()) {
+ Toast.show("请点击右上角···浏览器打开下载");
+ }
var input = document.createElement("input");
input.value = res.data.download_url;
document.body.appendChild(input);
@@ -127,14 +121,11 @@ const CoursePage = () => {
window.open(res.data.download_url);
} else {
if (isIOS()) {
- Toast.show("请点击右上角···浏览器打开下载");
- var input = document.createElement("input");
- input.value = res.data.download_url;
- document.body.appendChild(input);
- input.select();
- document.execCommand("Copy");
- document.body.removeChild(input);
- window.open(res.data.download_url);
+ setDownLoadTemplateURL(res.data.download_url);
+ setTimeout(() => {
+ let $do: any = document.querySelector("#downLoadExcel");
+ $do.click();
+ }, 500);
} else {
window.open(res.data.download_url);
}
@@ -144,6 +135,12 @@ const CoursePage = () => {
return (
+
Date: Sun, 30 Jul 2023 16:16:27 +0800
Subject: [PATCH 19/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E8=AF=BE=E4=BB=B6=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx
index 4c8ebfa..b071e7a 100644
--- a/src/pages/course/index.tsx
+++ b/src/pages/course/index.tsx
@@ -274,7 +274,7 @@ const CoursePage = () => {
课件
- {item.title}({item.type})
+ {item.title}.{item.ext}
Date: Sun, 30 Jul 2023 16:32:03 +0800
Subject: [PATCH 20/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E8=AF=BE=E4=BB=B6=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.module.scss | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pages/course/index.module.scss b/src/pages/course/index.module.scss
index 7110bbe..c6cd58e 100644
--- a/src/pages/course/index.module.scss
+++ b/src/pages/course/index.module.scss
@@ -164,7 +164,6 @@
width: calc(100% - 34px);
display: flex;
flex-direction: column;
- margin-right: 10px;
.label {
width: 100%;
height: 16px;
@@ -192,11 +191,12 @@
}
}
.download {
- width: auto;
+ width: 34px;
font-size: 12px;
font-weight: 400;
color: #ff4d4f;
line-height: 16px;
+ text-align: right;
}
}
}
From 951d2489d6eec3b42d836ee24addb04ad5d300af Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Mon, 31 Jul 2023 10:59:39 +0800
Subject: [PATCH 21/22] =?UTF-8?q?=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E5=AF=BC=E8=88=AA=E6=A0=8F=E8=B7=B3=E8=BD=AC?=
=?UTF-8?q?=E5=85=B6=E4=BB=96=E9=A1=B5=E6=97=A0=E5=93=8D=E5=BA=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/member/index.module.scss | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/pages/member/index.module.scss b/src/pages/member/index.module.scss
index 6f64006..8d3aa6c 100644
--- a/src/pages/member/index.module.scss
+++ b/src/pages/member/index.module.scss
@@ -1,5 +1,5 @@
.main-body {
- position: fixed;
+ position: absolute;
bottom: 0;
left: 0;
right: 0;
@@ -7,7 +7,6 @@
background-image: url("../../assets/images/login/bg.png");
background-repeat: no-repeat;
background-size: 100%;
- z-index: 120;
.support-box {
position: fixed;
top: 87%;
From b01a392b5a47d9ead6313b1542159bc9978003e9 Mon Sep 17 00:00:00 2001
From: unknown <18119604035@163.com>
Date: Mon, 31 Jul 2023 11:28:29 +0800
Subject: [PATCH 22/22] =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E6=89=93?=
=?UTF-8?q?=E5=BC=80=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85=E9=A1=B5=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/index.tsx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx
index b071e7a..23dfe08 100644
--- a/src/pages/course/index.tsx
+++ b/src/pages/course/index.tsx
@@ -145,7 +145,15 @@ const CoursePage = () => {
navigate(-1)}
+ onClick={() => {
+ if (window.history.length <= 1) {
+ // 将页面跳转到首页
+ navigate("/");
+ } else {
+ // 返回到前一个页面
+ navigate(-1);
+ }
+ }}
/>