develoop
于鹏飞 5 months ago
parent 2a9bdecef6
commit efa4a910ab
  1. 7
      .env.development
  2. 1605
      pnpm-lock.yaml
  3. 4
      src/store/modules/user.ts
  4. 5
      src/views/MyCourseStudy/ContainerCla.vue
  5. 133
      src/views/MyCourseStudy/courseCollections.vue

@ -1,8 +1,5 @@
# 变量必须以 VITE_ 为前缀才能暴露给外部读取 # 变量必须以 VITE_ 为前缀才能暴露给外部读取
NODE_ENV = 'development' NODE_ENV = 'development'
VITE_APP_TITLE = '无糖运营平台' VITE_APP_TITLE = '无糖运营平台'
<<<<<<< HEAD VITE_APP_BASE_API = 'http://127.0.0.1:8080'
VITE_APP_BASE_API = 'http://127.0.0.1:8008' # VITE_APP_BASE_API = 'http://39.106.16.162:8080'
=======
VITE_APP_BASE_API = 'http://39.106.16.162:8080'
>>>>>>> 991fa5ab08c56c84c5a276226f8fbc2ec78f859a

File diff suppressed because it is too large Load Diff

@ -116,9 +116,7 @@ const useUserStore = defineStore(
// this.avatar = result.data.checkUser.avatar // this.avatar = result.data.checkUser.avatar
// @ts-expect-error // @ts-expect-error
this.routes = result.data.menus.map((item: any) => { this.routes = result.data.permissions
return item.name
})
return { return {
result, result,
} }

@ -194,18 +194,19 @@ const handleCurrentChange = (page: any) => {
.ClassGd { .ClassGd {
position: absolute; position: absolute;
right: 0;
background-color: rgb(217, 217, 217, 0.5); background-color: rgb(217, 217, 217, 0.5);
display: none; display: none;
margin-left: 85%;
padding: 3px 5px; padding: 3px 5px;
cursor: pointer; cursor: pointer;
border-radius: 20%; border-radius: 6px;
& > p { & > p {
margin-top: 3px; margin-top: 3px;
margin-bottom: 3px; margin-bottom: 3px;
font-size: 10px; font-size: 10px;
font-weight: 350; font-weight: 350;
color: black; color: black;
white-space:nowrap;
&:hover { &:hover {
color: #2952f6; color: #2952f6;
font-weight: 35s0; font-weight: 35s0;

@ -42,42 +42,42 @@
</ul> </ul>
</div> </div>
<!-- 切换栏对应的小页面 --> <!-- 切换栏对应的小页面 -->
<!-- 页面-1 --> <!-- 简介页面-1 -->
<div class="Res_con" v-show="activeIndex == 1"> <div class="Res_con" v-show="activeIndex == 1">
<div class="item_2-1" v-for="(item, index) in 5" :key="index"> <div class="item_2-1" v-for="(item, index) in datalist" :key="item.id">
<div class="ResImg-1"> <div class="ResImg-1">
<img src="../../assets/images/kctp.png" /> <img src="../../assets/images/kctp.png" />
</div> </div>
<div class="ResClaDic"> <div class="ResClaDic-1">
<p>课程名称-----{{ item }}</p> <p>{{index + 1}}.&nbsp;{{ item.name }}</p>
<P>课程描述-----{{ item }}</P> <p style="color: rgb(180,180 ,180 );">&nbsp;{{ item.description }}</p>
</div> </div>
</div> </div>
</div> </div>
<!-- 页面-2 --> <!-- PPT页面-2 -->
<div class="Res_con" v-show="activeIndex == 2"> <div class="Res_con" v-show="activeIndex == 2">
<div class="item_2-2" v-for="(item, index) in 7" :key="index"> <div class="item_2-2" v-for="(item, index) in datalist" :key="item.id">
<div class="ResImg-2"> <div class="ResImg-2">
<div class="Img"> <div class="Img">
<img src="../../assets/icons/ppt.png" /> <img :src="item.img" />
</div> </div>
</div> </div>
<div class="ResClaDic"> <div class="ResClaDic">
<p>PPT名称-----{{ item }}</p> <p>{{ index + 1 }}.&nbsp;{{ item.name }}</p>
</div> </div>
</div> </div>
</div> </div>
<!-- 页面-3 --> <!-- 视频页面-3 -->
<div class="Res_con" v-show="activeIndex == 3"> <div class="Res_con" v-show="activeIndex == 3">
<div class="item_2-3" v-for="(item, index) in 8" :key="index"> <div class="item_2-3" v-for="(item, index) in datalist" :key="index">
<div class="ResImg-2"> <div class="ResImg-2">
<div class="Img"> <div class="Img">
<img src="../../assets/icons/视频.png" /> <img src="../../assets/icons/视频.png" />
</div> </div>
</div> </div>
<div class="ResClaDic"> <div class="ResClaDic">
<p>{{ item }}</p> <p>{{ index + 1 }}.&nbsp;{{ item.name }}</p>
<el-button plain @click="centerDialogVisible = true"> <el-button plain @click="hand1(item)">
点击播放 点击播放
</el-button> </el-button>
</div> </div>
@ -85,20 +85,20 @@
</div> </div>
<el-dialog <el-dialog
v-model="centerDialogVisible" v-model="centerDialogVisible"
title="视频播放中" :title="`${data.name}`"
width="1000" width="1000"
style="height:600px;"
align-center align-center
class="adad"
> >
<span>点击开了一个弹框</span> <!-- <span>点击开了一个弹框</span> -->
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<video <video width="300" height="200" :src="data.img"></video>
src="https://www.bilibili.com/video/BV1HV4y1a7n4?p=50&vd_source=9e99d3200788d6043e077de463ef019b"
></video>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<!-- 页面-4 --> <!-- 文本页面-4 -->
<div class="Res_con" v-show="activeIndex == 4"> <div class="Res_con" v-show="activeIndex == 4">
<div class="item_2-4" v-for="(item, index) in 8" :key="index"> <div class="item_2-4" v-for="(item, index) in 8" :key="index">
<div class="ResImg-2"> <div class="ResImg-2">
@ -112,7 +112,7 @@
</div> </div>
</div> </div>
<!-- 页面-5 --> <!-- 音频页面-5 -->
<div class="Res_con" v-show="activeIndex == 5"> <div class="Res_con" v-show="activeIndex == 5">
<div class="item_2-5" v-for="(item, index) in 10" :key="index"> <div class="item_2-5" v-for="(item, index) in 10" :key="index">
<div class="ResImg-2"> <div class="ResImg-2">
@ -122,9 +122,6 @@
</div> </div>
<div class="ResClaDic"> <div class="ResClaDic">
<p>音频名称-----{{ item }}</p> <p>音频名称-----{{ item }}</p>
<el-button plain @click="centerDialogVisible = true">
点击播放
</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -149,26 +146,23 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch } from 'vue' import { ref, watch,reactive } from 'vue'
import type { TabsPaneContext } from 'element-plus' import type { TabsPaneContext } from 'element-plus'
import ContainerCla from './ContainerCla.vue' import ContainerCla from './ContainerCla.vue'
import ContainerKno from './ContainerKno.vue' import ContainerKno from './ContainerKno.vue'
// import { getAssApi } from '@/api/courseChaptersApi'
import { SeResourceFavourControllerService } from '../../../generated/services/SeResourceFavourControllerService' import { SeResourceFavourControllerService } from '../../../generated/services/SeResourceFavourControllerService'
const centerDialogVisible = ref(false) const centerDialogVisible = ref(false)
const data = ref<any>({})
function hand1(item:any){
centerDialogVisible.value = true
data.value= item
console.log(data.value);
}
const activeIndex = ref(1) const activeIndex = ref(1)
function hsndelShow(index: number) { function hsndelShow(index: number) {
activeIndex.value = index activeIndex.value = index
} }
// //=========================
// function handleApi(params) {
// getAssApi(params).then(res => {
// arr.value = res.data.records
// total.value = res.data.total
// console.log(arr.value, '-', total.value)
// })
// }
const arr = ref([]) const arr = ref([])
const total = ref(0) const total = ref(0)
// //
@ -193,19 +187,8 @@ watch(activeIndex, () => {
initFenYie() initFenYie()
getDatalist() getDatalist()
}) })
// function hand() {
// console.log(res)
// // handleApi(params)
// }
const params = {
current: currentPage1.value,
type: activeIndex.value,
pageSize: pageSize1.value,
sortField: '',
sortOrder: '',
userId: '3',
}
const datalist = ref([ const datalist = ref([
{ {
@ -221,6 +204,14 @@ const datalist = ref([
]) ])
const getDatalist = async () => { const getDatalist = async () => {
const params = {
current: currentPage1.value,
type: activeIndex.value,
pageSize: pageSize1.value,
sortField: '',
sortOrder: '',
userId: '3',
}
const res = const res =
await SeResourceFavourControllerService.listPostByPageUsingPost3(params) await SeResourceFavourControllerService.listPostByPageUsingPost3(params)
datalist.value = res.data.records datalist.value = res.data.records
@ -228,17 +219,6 @@ const getDatalist = async () => {
console.log(datalist.value[0]) console.log(datalist.value[0])
} }
getDatalist() getDatalist()
// hand()
// const obj = {
// type: activeIndex.value,
// page: currentPage1.value,
// pageSize: pageSize1.value,
// sortField:'',
// sortOrder:'',
// resourceIdList: ''
// }
// handleApi(obj)
//=========================
const activeName = ref('first') const activeName = ref('first')
const handleClick = (tab: TabsPaneContext, event: Event) => { const handleClick = (tab: TabsPaneContext, event: Event) => {
@ -354,20 +334,20 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
// //
.ResImg-1 { .ResImg-1 {
width: 100%; width: 100%;
height: 60%; height: 215px;
border-bottom: 1px solid rgb(229, 227, 227); border-bottom: 1px solid rgb(229, 227, 227);
overflow: hidden; overflow: hidden;
img { &>img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
// //
.ResClaDic { .ResClaDic-1 {
width: 100%; width: 100%;
height: 40%; height: 85px;
padding: 2%; padding: 2%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -376,19 +356,25 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
.ResImg-2 { .ResImg-2 {
width: 100%; width: 100%;
height: 60%; height: 225px;
border-bottom: 1px solid rgb(214, 214, 214); border-bottom: 1px solid rgb(214, 214, 214);
} }
.Img { .Img {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 5%;
&>img{
height: 95%;
width: 65%;
}
} }
.ResClaDic > p { .ResClaDic-1 > p {
font-family: Inter, Inter; font-family: Inter, Inter;
font-weight: 500; font-weight: 500;
font-size: 20px; font-size: 20px;
@ -401,7 +387,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
.item_2-2, .item_2-2,
.item_2-5 { .item_2-5 {
width: 100%; width: 100%;
height: 300px; height: 310px;
margin-top: 20px; margin-top: 20px;
border-left: 1px solid #e4e4e4; border-left: 1px solid #e4e4e4;
border-top: 1px solid #e4e4e4; border-top: 1px solid #e4e4e4;
@ -410,10 +396,27 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
border-radius: 6px; border-radius: 6px;
margin-bottom: 32px; margin-bottom: 32px;
} }
.ResClaDic {
width: 100%;
height: 85px;
padding: 2%;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.ResClaDic > p {
font-family: Inter, Inter;
font-weight: 500;
font-size: 20px;
color: #333333;
line-height: 23px;
text-align: left;
margin-left: 5px;
}
.item_2-3, .item_2-3,
.item_2-4 { .item_2-4 {
width: 100%; width: 100%;
height: 300px; height: 310px;
margin-top: 20px; margin-top: 20px;
border-left: 1px solid #e4e4e4; border-left: 1px solid #e4e4e4;
border-top: 1px solid #e4e4e4; border-top: 1px solid #e4e4e4;

Loading…
Cancel
Save