登录 & 课程管理样式更改

main
king 1 year ago
parent e190ccf3c4
commit 8687fab500
  1. 5
      src/api/request.ts
  2. 3
      src/components/lineChart/lineChart.tsx
  3. 11
      src/pages/business/courType/courType.tsx
  4. 18
      src/pages/login/login.module.scss
  5. 3
      src/pages/login/login.tsx
  6. 5
      src/pages/manage/courseAdmin/components/search.tsx
  7. 12
      src/pages/manage/courseAdmin/courseAdmin.module.scss

@ -86,8 +86,9 @@ export function request<T = unknown>(
Taro.showModal({ Taro.showModal({
title: "登录过期,需重新登陆", title: "登录过期,需重新登陆",
showCancel: false, showCancel: false,
success({confirm}) { success() {
confirm && Taro.reLaunch({url: '/pages/login/login'}) Taro.clearStorageSync()
Taro.reLaunch({url: '/pages/login/login'})
} }
}) })
} else { } else {

@ -24,14 +24,13 @@ const LineChart: FC<Props> = ({data}) => {
return cur return cur
} }
return pre return pre
}, maxHeight)) }, {time: '', value: 0}))
}, [data]) }, [data])
return ( return (
<> <>
<ScrollView scrollX={!!maxHeight.value}> <ScrollView scrollX={!!maxHeight.value}>
<View style={{marginBottom: '30px'}}>{maxHeight.time}{formatMinute(maxHeight.value)}</View> <View style={{marginBottom: '30px'}}>{maxHeight.time}{formatMinute(maxHeight.value)}</View>
<View className={style.lineChart}> <View className={style.lineChart}>
{!maxHeight.value && <View className={style.empty}></View>} {!maxHeight.value && <View className={style.empty}></View>}
{ {

@ -5,6 +5,7 @@ import {courseApi} from "@/api";
import VideoCover from "@/components/videoCover/videoCover"; import VideoCover from "@/components/videoCover/videoCover";
import {formatMinute} from "@/utils/time"; import {formatMinute} from "@/utils/time";
import Empty from "@/components/empty/empty"; import Empty from "@/components/empty/empty";
import eventsIndex from "@/hooks/eventsIndex";
const CourType: FC = () => { const CourType: FC = () => {
const params = useRouter().params 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(() => { useEffect(() => {
getData() getData()

@ -1,6 +1,12 @@
.container { .container {
position: relative; position: fixed;
padding: 0 30rpx; padding: 0 30rpx;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
background: #FFFFFF;
} }
.navbar, .navbar,
@ -19,14 +25,14 @@
.brand { .brand {
width: 140px; width: 140px;
height: 140px;
background: #fff;
border-radius: 20px;
margin: 250px auto 145px; margin: 250px auto 145px;
image { image {
width: 100px; overflow: hidden;
height: 100px; border-radius: 25px;
background: #fff;
width: 140px;
height: 140px;
} }
} }

@ -188,7 +188,10 @@ const Login: FC = () => {
<View className={styles.brand}> <View className={styles.brand}>
<Image mode={'scaleToFill'} src="https://playedu.yaojiankang.top/favicon.ico"/> <Image mode={'scaleToFill'} src="https://playedu.yaojiankang.top/favicon.ico"/>
<View className='mt-3'></View>
</View> </View>
<View className={styles.loginTips}> <View className={styles.loginTips}>
<Text>使</Text> <Text>使</Text>
</View> </View>

@ -55,10 +55,13 @@ export const Search: FC<Props> = ({param, setParam}) => {
<View className={styles.searchInput}> <View className={styles.searchInput}>
<Icon name='search' size={18}/> <Icon name='search' size={18}/>
<Input <Input
adjustPosition={false}
type='text'
confirmType='search'
placeholder='搜索名称' placeholder='搜索名称'
className='ml-1 flex-1' className='ml-1 flex-1'
value={param.title} value={param.title}
onBlur={(e) => setParam({ onConfirm={(e) => setParam({
...param, ...param,
title: e.detail.value, title: e.detail.value,
page: 1 page: 1

@ -51,7 +51,17 @@
.Operation { .Operation {
display: flex; display: flex;
justify-content: space-around; 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 { .curList {

Loading…
Cancel
Save