登录 & 课程管理样式更改

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({
title: "登录过期,需重新登陆",
showCancel: false,
success({confirm}) {
confirm && Taro.reLaunch({url: '/pages/login/login'})
success() {
Taro.clearStorageSync()
Taro.reLaunch({url: '/pages/login/login'})
}
})
} else {

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

@ -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()

@ -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;
}
}

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

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

@ -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 {

Loading…
Cancel
Save