diff --git a/src/api/request.ts b/src/api/request.ts index b7b0f1a..8778bc9 100644 --- a/src/api/request.ts +++ b/src/api/request.ts @@ -86,8 +86,9 @@ export function request( Taro.showModal({ title: "登录过期,需重新登陆", showCancel: false, - success({confirm}) { - confirm && Taro.reLaunch({url: '/pages/login/login'}) + success() { + Taro.clearStorageSync() + Taro.reLaunch({url: '/pages/login/login'}) } }) } else { diff --git a/src/components/lineChart/lineChart.tsx b/src/components/lineChart/lineChart.tsx index f29b97b..ac54ac7 100644 --- a/src/components/lineChart/lineChart.tsx +++ b/src/components/lineChart/lineChart.tsx @@ -24,14 +24,13 @@ const LineChart: FC = ({data}) => { return cur } return pre - }, maxHeight)) + }, {time: '', value: 0})) }, [data]) return ( <> {maxHeight.time}日最努力,学习了{formatMinute(maxHeight.value)} - {!maxHeight.value && 暂无数据} { diff --git a/src/pages/business/courType/courType.tsx b/src/pages/business/courType/courType.tsx index cc7cba0..40de350 100644 --- a/src/pages/business/courType/courType.tsx +++ b/src/pages/business/courType/courType.tsx @@ -5,6 +5,7 @@ import {courseApi} from "@/api"; import VideoCover from "@/components/videoCover/videoCover"; import {formatMinute} from "@/utils/time"; import Empty from "@/components/empty/empty"; +import eventsIndex from "@/hooks/eventsIndex"; const CourType: FC = () => { const params = useRouter().params @@ -45,6 +46,16 @@ const CourType: FC = () => { } } + eventsIndex.on(({id}) => { + if (id == null && params.type === "4") return; + for (const [index, notFinished] of data.entries()) { + if (notFinished.id === id) { + data.splice(index, 1) + return + } + } + }) + useEffect(() => { getData() diff --git a/src/pages/login/login.module.scss b/src/pages/login/login.module.scss index cb7109f..d371305 100644 --- a/src/pages/login/login.module.scss +++ b/src/pages/login/login.module.scss @@ -1,6 +1,12 @@ .container { - position: relative; + position: fixed; padding: 0 30rpx; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + background: #FFFFFF; } .navbar, @@ -19,14 +25,14 @@ .brand { width: 140px; - height: 140px; - background: #fff; - border-radius: 20px; margin: 250px auto 145px; image { - width: 100px; - height: 100px; + overflow: hidden; + border-radius: 25px; + background: #fff; + width: 140px; + height: 140px; } } diff --git a/src/pages/login/login.tsx b/src/pages/login/login.tsx index 73a0533..1788d06 100644 --- a/src/pages/login/login.tsx +++ b/src/pages/login/login.tsx @@ -188,7 +188,10 @@ const Login: FC = () => { + 医学道 + + 请完成微信授权以继续使用! diff --git a/src/pages/manage/courseAdmin/components/search.tsx b/src/pages/manage/courseAdmin/components/search.tsx index 4f70c80..9c45ba8 100644 --- a/src/pages/manage/courseAdmin/components/search.tsx +++ b/src/pages/manage/courseAdmin/components/search.tsx @@ -55,10 +55,13 @@ export const Search: FC = ({param, setParam}) => { setParam({ + onConfirm={(e) => setParam({ ...param, title: e.detail.value, page: 1 diff --git a/src/pages/manage/courseAdmin/courseAdmin.module.scss b/src/pages/manage/courseAdmin/courseAdmin.module.scss index d13faf8..277d30b 100644 --- a/src/pages/manage/courseAdmin/courseAdmin.module.scss +++ b/src/pages/manage/courseAdmin/courseAdmin.module.scss @@ -51,7 +51,17 @@ .Operation { display: flex; justify-content: space-around; - padding: 30rpx 0; + + taro-view-core { + padding: 20rpx 0; + flex: 1; + width: 100%; + text-align: center; + + &:last-child{ + border: 1px solid #F5F8F7; + } + } } .curList {