From 7947e6266361096199d93f5636d208aa5702944b Mon Sep 17 00:00:00 2001 From: king <2229249788@qq.com> Date: Fri, 4 Aug 2023 10:24:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=81=E9=9D=A2=E4=BC=9A=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/components/search.tsx | 6 ++--- src/pages/index/index.module.scss | 26 ++++++++------------ src/pages/index/index.tsx | 5 ++-- src/pages/manage/meetings/meetings.tsx | 8 ++++-- src/pages/manage/spotMeeting/spotMeeting.tsx | 16 +++++++----- 5 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/pages/index/components/search.tsx b/src/pages/index/components/search.tsx index bb1475d..1517300 100644 --- a/src/pages/index/components/search.tsx +++ b/src/pages/index/components/search.tsx @@ -5,11 +5,9 @@ import Icon from "@/components/icon"; export const Search: FC = () => { return ( - - + - 搜索课程 + 搜索课程 - ) } diff --git a/src/pages/index/index.module.scss b/src/pages/index/index.module.scss index 3f703d2..fe83aa1 100644 --- a/src/pages/index/index.module.scss +++ b/src/pages/index/index.module.scss @@ -23,22 +23,16 @@ } .search { - View { - width: 710rpx; - margin: 34rpx 0 0; - background: #fff; - border-radius: 100px; - line-height: 68rpx; - color: #bbb; - font-size: 28rpx; - display: flex; - align-items: center; - justify-content: center; - - Text { - padding-right: 20px; - } - } + width: 710rpx; + margin: 34rpx 0 0; + background: #fff; + border-radius: 100px; + line-height: 68rpx; + color: #bbb; + font-size: 28rpx; + display: flex; + align-items: center; + justify-content: center; } .videoListBox { diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 6d3c813..e90f21a 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -6,7 +6,7 @@ import Tabs, {OnChangOpt, TabList} from "@/components/tabs/tabs"; import {CoursesKey} from "@/api/public"; import Taro from '@tarojs/taro' import {Profile} from '@/store' -// import {Search} from "@/pages/index/components/search"; +import {Search} from "./components/search"; const Index: FC = () => { @@ -28,8 +28,7 @@ const Index: FC = () => { <> {process.env.TARO_ENV !== "h5" && 医学道} - - {/**/} + diff --git a/src/pages/manage/meetings/meetings.tsx b/src/pages/manage/meetings/meetings.tsx index ab574cf..4fb31f0 100644 --- a/src/pages/manage/meetings/meetings.tsx +++ b/src/pages/manage/meetings/meetings.tsx @@ -41,6 +41,10 @@ const MeetingsConfig: FC = () => { } } + function jumpInfo(id: number) { + Taro.navigateTo({url: `/pages/manage/spotMeeting/spotMeeting?id=${id}`}) + } + useReachBottom(useCallback(() => { if (meeting?.length < total) { setPage(page + 1) @@ -56,8 +60,8 @@ const MeetingsConfig: FC = () => { { meeting.length ? - meeting.map((d, index) => - + meeting.map((d, index) => + jumpInfo(d.id)}> {d.name} {formatDate(new Date(d.estimate_start_time), "MM-dd")} 至 {formatDate(new Date(d.estimate_start_time), "MM-dd")} diff --git a/src/pages/manage/spotMeeting/spotMeeting.tsx b/src/pages/manage/spotMeeting/spotMeeting.tsx index 79428e7..d11f483 100644 --- a/src/pages/manage/spotMeeting/spotMeeting.tsx +++ b/src/pages/manage/spotMeeting/spotMeeting.tsx @@ -133,17 +133,20 @@ const SpotMeeting: FC = () => { } }, fail() { + Taro.hideLoading() Taro.showModal({title: '二维码生成失败'}) }, complete() { setLoading(false) - Taro.hideLoading() } }) } else { - setTimeout(() => {setImgUrl(url)}) - if (down) {handleSaveCode()} - Taro.hideLoading() + setTimeout(() => { + setImgUrl(url) + }) + if (down) { + handleSaveCode() + } setLoading(false) } } @@ -182,7 +185,7 @@ const SpotMeeting: FC = () => { setLoading(false) } - function jumpMeeings() { + function jumpMeetings() { Taro.navigateTo({url: '/pages/manage/meetings/meetings'}) } @@ -273,7 +276,8 @@ const SpotMeeting: FC = () => { - 历史列表 + + {!params.id && 历史列表 }