|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import { ref } from 'vue'; |
|
|
|
|
import { userGetInfoService } from '@/api/configuration'; |
|
|
|
|
|
|
|
|
|
const paginationData = ref({ |
|
|
|
|
pageNo: 1, |
|
|
|
@ -53,11 +54,24 @@ const dataList = ref([ |
|
|
|
|
isStar: false |
|
|
|
|
}, |
|
|
|
|
]) |
|
|
|
|
const isLogin = ref(false) |
|
|
|
|
userGetInfoService().then(res => { |
|
|
|
|
// @ts-ignore |
|
|
|
|
if (res.code === 200) { |
|
|
|
|
isLogin.value = true |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
function handlePraise(item: any) { |
|
|
|
|
item.isPraise = !item.isPraise |
|
|
|
|
if (isLogin.value) item.isPraise = !item.isPraise |
|
|
|
|
else skip('http://localhost:5173/#/login?redirect=/configurationPage') |
|
|
|
|
} |
|
|
|
|
function handleStar(item: any) { |
|
|
|
|
item.isStar = !item.isStar |
|
|
|
|
if (isLogin.value) item.isStar = !item.isStar |
|
|
|
|
else skip('http://localhost:5173/#/login?redirect=/configurationPage') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function skip(url: string) { |
|
|
|
|
location.assign(url) |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
@ -71,7 +85,7 @@ function handleStar(item:any) { |
|
|
|
|
<div class="course"> |
|
|
|
|
<ul class="course_list"> |
|
|
|
|
<li v-for="item in dataList" :key="item.id"> |
|
|
|
|
<img title="点击查看课程详情" :src="''" alt="" @click="" /> |
|
|
|
|
<img title="点击查看课程详情" :src="'http://teaching-edu123.oss-cn-beijing.aliyuncs.com/sDwvElo68wTi4SR9HVBIn.png'" alt="" @click="" /> |
|
|
|
|
<h2 title="点击查看课程基本信息" class="course_name" @click=""> |
|
|
|
|
软件项目管理 |
|
|
|
|
</h2> |
|
|
|
@ -98,9 +112,17 @@ function handleStar(item:any) { |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<el-button class="object" round plain @click=""> |
|
|
|
|
查看课程详情 |
|
|
|
|
<div class="object"> |
|
|
|
|
<el-button round plain |
|
|
|
|
@click="skip('http://localhost:5173/#/curriculumCenter/basicCourseInformation')"> |
|
|
|
|
详情 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button round plain |
|
|
|
|
@click="skip('http://localhost:5173/#/curriculumCenter/basicCourseInformation')"> |
|
|
|
|
路径规划 |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|