|
@@ -126,11 +126,15 @@
|
|
|
import { getCategoryListTree } from '@/api/category.js'
|
|
import { getCategoryListTree } from '@/api/category.js'
|
|
|
import { getCourseList } from '@/api/course.js'
|
|
import { getCourseList } from '@/api/course.js'
|
|
|
|
|
|
|
|
|
|
+ import { isLogin } from '@/utils/util.js'
|
|
|
|
|
+ import { useI18n } from 'vue-i18n'
|
|
|
|
|
+ const { t } = useI18n()
|
|
|
|
|
+
|
|
|
|
|
|
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
- import { ref, computed, reactive, onMounted } from 'vue'
|
|
|
|
|
|
|
+ import { ref, computed, reactive, onMounted, inject } from 'vue'
|
|
|
//获取参数
|
|
//获取参数
|
|
|
const query = route.query
|
|
const query = route.query
|
|
|
const categoryId = ref(query.categoryId || '');
|
|
const categoryId = ref(query.categoryId || '');
|
|
@@ -150,6 +154,8 @@
|
|
|
carouselHeight.value = calculatedHeight + 'px'
|
|
carouselHeight.value = calculatedHeight + 'px'
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const openLoginDialog = inject('openLoginDialog')
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
// 一级分类列表
|
|
// 一级分类列表
|
|
@@ -194,6 +200,10 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const goDetail = (item) => {
|
|
const goDetail = (item) => {
|
|
|
|
|
+ //判断是否登录
|
|
|
|
|
+ if(!isLogin({callback: openLoginDialog,t})){
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
//增加参数名称
|
|
//增加参数名称
|
|
|
router.push({
|
|
router.push({
|
|
|
path: `/learning-system/detail`,
|
|
path: `/learning-system/detail`,
|