|
@@ -2,7 +2,7 @@ import ColEmpty from '@/components/col-empty'
|
|
|
import Pagination from '@/components/pagination'
|
|
|
import request from '@/helpers/request'
|
|
|
import { state } from '@/state'
|
|
|
-import { ElSkeleton, ElSkeletonItem } from 'element-plus'
|
|
|
+import { ElMessage, ElMessageBox, ElSkeleton, ElSkeletonItem } from 'element-plus'
|
|
|
import { defineComponent } from 'vue'
|
|
|
import Item from '../components/item'
|
|
|
import styles from './index.module.less'
|
|
@@ -77,6 +77,25 @@ export default defineComponent({
|
|
|
} else {
|
|
|
// 跳转对应详情 个人中心不跳转到详情
|
|
|
}
|
|
|
+ },
|
|
|
+ async onOffCourse(item: any) {
|
|
|
+ ElMessageBox.confirm(`是否下架课程?`, '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ try {
|
|
|
+ await request.post('/api-website/videoLessonGroup/updateShelves', {
|
|
|
+ data: {
|
|
|
+ id: item.id,
|
|
|
+ shelvesFlag: 0
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ElMessage.success('下架成功')
|
|
|
+ this.pageInfo.page = 1
|
|
|
+ this.getList()
|
|
|
+ } catch {}
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
render() {
|
|
@@ -137,6 +156,7 @@ export default defineComponent({
|
|
|
<Item
|
|
|
item={{
|
|
|
type: 'video',
|
|
|
+ status: this.auditStatus,
|
|
|
id: item.id,
|
|
|
backgroundPic: item.lessonCoverUrl,
|
|
|
courseGroupName: item.lessonName,
|
|
@@ -147,6 +167,9 @@ export default defineComponent({
|
|
|
courseNum: item.lessonCount,
|
|
|
shelvesFlag: item.shelvesFlag
|
|
|
}}
|
|
|
+ onOffCourse={(item: any) => {
|
|
|
+ this.onOffCourse(item)
|
|
|
+ }}
|
|
|
/>
|
|
|
</div>
|
|
|
))}
|