部门课程样式

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

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

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

Loading…
Cancel
Save