部门课程样式

main
king 1 year ago
parent 1caed4d11e
commit 77a58a6135
  1. 2
      src/pages/manage/depAdmin/depAdmin.tsx
  2. 43
      src/pages/manage/depCur/depCur.module.scss
  3. 68
      src/pages/manage/depCur/depCur.tsx
  4. 6
      src/pages/manage/spotMeeting/spotMeeting.module.scss
  5. 7
      src/static/css/module.scss

@ -209,8 +209,6 @@ const DepAdmin: FC = () => {
content={['学员', '管理员', '超级管理员'][d.role_type]} content={['学员', '管理员', '超级管理员'][d.role_type]}
/>)} />)}
<View className='text-center text-muted mt-3'>- -</View>
<View className='operation'> <View className='operation'>
<View className='safeAreaInsetBottom'> <View className='safeAreaInsetBottom'>
<View onClick={jumpAddStudent}></View> <View onClick={jumpAddStudent}></View>

@ -0,0 +1,43 @@
.page {
padding-bottom: 80rpx;
}
.curBox {
background: #fff;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #F5F8F7;
padding: 20rpx 0 20rpx 20rpx;
font-size: 28rpx;
}
.imageBox {
position: relative;
display: flex;
}
.image {
vertical-align: middle;
border-radius: 10rpx;
margin-right: 10rpx;
width: 280rpx;
height: 150rpx;
}
.del {
display: flex;
align-items: center;
justify-content: center;
background: red;
color: #fff;
width: 100rpx;
}
.flexdButton {
position: fixed;
width: 100%;
padding: 20rpx;
left: 0;
box-sizing: border-box;
bottom: env(safe-area-inset-bottom);
}

@ -2,29 +2,12 @@ import {getCurrentInstance} from "@tarojs/runtime";
import Taro, {useReachBottom} from "@tarojs/taro"; import Taro, {useReachBottom} from "@tarojs/taro";
import {ManageApi} from "@/api/manage"; import {ManageApi} from "@/api/manage";
import React, {FC, useState} from "react"; import React, {FC, useState} from "react";
import {Button, CustomWrapper, View} from "@tarojs/components"; import {Image, View} from "@tarojs/components";
import VideoCover from "@/components/videoCover/videoCover";
import {curriculum} from "@/api"; import {curriculum} from "@/api";
import MyButton from "@/components/button/MyButton";
import styles from './depCur.module.scss'
import Empty from "@/components/empty/empty";
interface DelOpt {
id: number
findDel: (id: number) => Promise<void>
}
const Del: FC<DelOpt> = ({id, findDel}: DelOpt) => {
function del() {
Taro.showModal({
title: "是否删除课程",
success({confirm}) {
confirm && findDel(id)
}
})
}
return (
<View className='text-center p-2' onClick={del}></View>
)
}
let page = 1 let page = 1
const DepCur: FC = () => { const DepCur: FC = () => {
@ -72,6 +55,15 @@ const DepCur: FC = () => {
} }
} }
function del(id: number) {
Taro.showModal({
title: "是否删除课程",
success({confirm}) {
confirm && findDel(id)
}
})
}
function jumpAddCur() { function jumpAddCur() {
Taro.navigateTo({url: "/pages/manage/addCur/addCur?id=" + id}) Taro.navigateTo({url: "/pages/manage/addCur/addCur?id=" + id})
} }
@ -84,20 +76,28 @@ const DepCur: FC = () => {
}) })
return ( return (
<CustomWrapper> <View className={styles.page}>
<View className='flex p-1 flex-wrap'> {
{data.map(d => <VideoCover data.length ?
key={d.id} data.map(d => <View className={styles.curBox}>
thumb={d.thumb} <View className={styles.imageBox}>
title={<Del id={d.id} findDel={findDel}/>} <Image src={d.thumb} className={styles.image} mode='aspectFill'/>
id={d.id} <View>{d.title}</View>
depId={id} </View>
content={d.title} <View
/>)} className={styles.del}
onClick={() => del(d.id)}>
</View>
</View>)
: <Empty name='部门无课程'/>
}
<View className={styles.flexdButton}>
<MyButton onClick={jumpAddCur}></MyButton>
</View> </View>
<View className='text-center p-3'>- -</View> </View>
<Button className='button mt-3' onClick={jumpAddCur}></Button>
</CustomWrapper>
) )
} }
export default DepCur export default DepCur

@ -3,9 +3,3 @@
min-height: 100vh; min-height: 100vh;
padding: 20px; padding: 20px;
} }
//.time {
// border-bottom: 1px solid #ddd;
// padding: 30px 15px;
// border-radius: 10px;
//}

@ -1,6 +1,6 @@
page, page,
.taro_router .taro_page { .taro_router .taro_page {
background-color: #efeff7 !important; background-color: #f1f8f6 !important;
font-family: PingFang SC-Bold, PingFang SC; font-family: PingFang SC-Bold, PingFang SC;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
box-sizing: border-box; box-sizing: border-box;
@ -41,9 +41,9 @@ body {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #F5F8F7;
padding: 0 20rpx; padding: 0 20rpx;
font-size: 35rpx; font-size: 30rpx;
&-content { &-content {
@ -57,7 +57,6 @@ body {
.image { .image {
width: 68px; width: 68px;
height: 68px; height: 68px;
background: #ddd;
} }
} }

Loading…
Cancel
Save