|
@@ -14,10 +14,10 @@
|
|
|
教材大纲
|
|
教材大纲
|
|
|
<!-- <el-icon><ArrowRightBold /></el-icon> -->
|
|
<!-- <el-icon><ArrowRightBold /></el-icon> -->
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-drawer v-model="drawerVisible" direction="ltr" size="20%">
|
|
|
|
|
|
|
+ <el-drawer v-model="drawerVisible" direction="ltr" size="19%">
|
|
|
<el-row class="tac">
|
|
<el-row class="tac">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <h2 class="mb-2">教材大纲</h2>
|
|
|
|
|
|
|
+ <h3 class="mb-2">教材大纲</h3>
|
|
|
<el-menu
|
|
<el-menu
|
|
|
default-active="1"
|
|
default-active="1"
|
|
|
class="el-menu-vertical-demo"
|
|
class="el-menu-vertical-demo"
|
|
@@ -28,6 +28,7 @@
|
|
|
v-for="(title, index) in courseTitles"
|
|
v-for="(title, index) in courseTitles"
|
|
|
:key="index + 1"
|
|
:key="index + 1"
|
|
|
:index="(index + 1).toString()"
|
|
:index="(index + 1).toString()"
|
|
|
|
|
+ @click="goToAIExperience(index + 1)"
|
|
|
>
|
|
>
|
|
|
<!-- <el-icon><icon-menu /></el-icon> -->
|
|
<!-- <el-icon><icon-menu /></el-icon> -->
|
|
|
<span>0{{ index + 1 }} AI{{ title }}</span>
|
|
<span>0{{ index + 1 }} AI{{ title }}</span>
|
|
@@ -41,7 +42,7 @@
|
|
|
<div class="inner-box left-box">
|
|
<div class="inner-box left-box">
|
|
|
<div class="box-icon" @click="goBack">
|
|
<div class="box-icon" @click="goBack">
|
|
|
<el-icon class="left-icon"><ArrowLeftBold /></el-icon>
|
|
<el-icon class="left-icon"><ArrowLeftBold /></el-icon>
|
|
|
- AI智能课
|
|
|
|
|
|
|
+ {{pageTitle}}
|
|
|
</div>
|
|
</div>
|
|
|
<div class="dropdown-box">
|
|
<div class="dropdown-box">
|
|
|
<!-- 下拉菜单 -->
|
|
<!-- 下拉菜单 -->
|
|
@@ -63,7 +64,7 @@
|
|
|
<div class="top-right-box">
|
|
<div class="top-right-box">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="SearchInput"
|
|
v-model="SearchInput"
|
|
|
- style="width: 200px; height: 40px"
|
|
|
|
|
|
|
+ class="search-input"
|
|
|
placeholder="搜索"
|
|
placeholder="搜索"
|
|
|
>
|
|
>
|
|
|
<template #prefix>
|
|
<template #prefix>
|
|
@@ -78,7 +79,7 @@
|
|
|
class="small-box"
|
|
class="small-box"
|
|
|
v-for="(image, index) in courseImages"
|
|
v-for="(image, index) in courseImages"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
- v-if="selectedGrade === '小学低年级'"
|
|
|
|
|
|
|
+ @click="goToAIExperience(index + 1)"
|
|
|
>
|
|
>
|
|
|
<div
|
|
<div
|
|
|
class="nested-box"
|
|
class="nested-box"
|
|
@@ -93,7 +94,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref } from 'vue'
|
|
|
|
|
|
|
+import { ref,onMounted } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
import { ArrowDown, ArrowRightBold } from '@element-plus/icons-vue'
|
|
import { ArrowDown, ArrowRightBold } from '@element-plus/icons-vue'
|
|
|
import { Search, ArrowLeftBold } from '@element-plus/icons-vue'
|
|
import { Search, ArrowLeftBold } from '@element-plus/icons-vue'
|
|
@@ -112,7 +113,20 @@ const selectedGrade = ref('小学低年级')
|
|
|
const goBack = () => {
|
|
const goBack = () => {
|
|
|
router.go(-1) // 返回上一页
|
|
router.go(-1) // 返回上一页
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+// 添加跳转课程页面的函数
|
|
|
|
|
+const goToAIExperience = (index) => {
|
|
|
|
|
+ const routes = [
|
|
|
|
|
+ '/ai-initial-experience',
|
|
|
|
|
+ // '/ai-development-history',
|
|
|
|
|
+ ];
|
|
|
|
|
+ const title = `0${index} AI${getCourseTitle(index)}`; // 定义 title 变量
|
|
|
|
|
+ if (index >= 1 && index <= routes.length) {
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ path: routes[index - 1],
|
|
|
|
|
+ query:{title:title}
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
// 添加获取课程标题
|
|
// 添加获取课程标题
|
|
|
const getCourseTitle = index => {
|
|
const getCourseTitle = index => {
|
|
|
const titles = [
|
|
const titles = [
|
|
@@ -141,6 +155,14 @@ const courseImages = ref([
|
|
|
'./src/assets/images/seven.png',
|
|
'./src/assets/images/seven.png',
|
|
|
'./src/assets/images/eight.png'
|
|
'./src/assets/images/eight.png'
|
|
|
])
|
|
])
|
|
|
|
|
+// 首页点击渲染后的页面title
|
|
|
|
|
+const pageTitle = ref('')
|
|
|
|
|
+onMounted(()=>{
|
|
|
|
|
+ const title = router.currentRoute.value.query.title
|
|
|
|
|
+ if (title) {
|
|
|
|
|
+ pageTitle.value = title
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -149,7 +171,6 @@ const courseImages = ref([
|
|
|
@function rpx($px) {
|
|
@function rpx($px) {
|
|
|
@return math.div($px, 750) * 100vw;
|
|
@return math.div($px, 750) * 100vw;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.home-container {
|
|
.home-container {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
top: 0;
|
|
top: 0;
|
|
@@ -171,13 +192,13 @@ const courseImages = ref([
|
|
|
}
|
|
}
|
|
|
.el-menu-item{
|
|
.el-menu-item{
|
|
|
width: rpx(130);
|
|
width: rpx(130);
|
|
|
- height: rpx(25);
|
|
|
|
|
|
|
+ height: rpx(20);
|
|
|
margin-bottom: rpx(10);
|
|
margin-bottom: rpx(10);
|
|
|
border-radius: rpx(6);
|
|
border-radius: rpx(6);
|
|
|
}
|
|
}
|
|
|
.el-menu-item span{
|
|
.el-menu-item span{
|
|
|
color: black;
|
|
color: black;
|
|
|
- font-size: rpx(8);
|
|
|
|
|
|
|
+ font-size: rpx(7);
|
|
|
}
|
|
}
|
|
|
.el-menu ::v-deep(.el-menu-item:hover),
|
|
.el-menu ::v-deep(.el-menu-item:hover),
|
|
|
.el-menu ::v-deep(.el-menu-item:focus),
|
|
.el-menu ::v-deep(.el-menu-item:focus),
|
|
@@ -210,6 +231,21 @@ const courseImages = ref([
|
|
|
background-color: rgb(255, 255, 255,0.7);
|
|
background-color: rgb(255, 255, 255,0.7);
|
|
|
box-shadow: 0 8px 8px rgba(202, 52, 52, 0.1);
|
|
box-shadow: 0 8px 8px rgba(202, 52, 52, 0.1);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.drawer-box ::v-deep(.el-drawer__header){
|
|
|
|
|
+ margin-bottom: rpx(0);
|
|
|
|
|
+}
|
|
|
|
|
+.drawer-box ::v-deep(.el-drawer__body)::-webkit-scrollbar {
|
|
|
|
|
+ width: rpx(4);
|
|
|
|
|
+}
|
|
|
|
|
+.drawer-box ::v-deep(.el-drawer__body)::-webkit-scrollbar-thumb {
|
|
|
|
|
+ background-color: rgba(0, 0, 0, 0.2);
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+.drawer-box ::v-deep(.el-drawer__body)::-webkit-scrollbar-track {
|
|
|
|
|
+ background-color: rgba(0, 0, 0, 0.05);
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+}
|
|
|
.toggle-button.is-active,
|
|
.toggle-button.is-active,
|
|
|
.toggle-button:active,
|
|
.toggle-button:active,
|
|
|
.toggle-button:focus {
|
|
.toggle-button:focus {
|
|
@@ -218,7 +254,6 @@ const courseImages = ref([
|
|
|
border: none; // 移除点击时的边框
|
|
border: none; // 移除点击时的边框
|
|
|
outline: none; // 移除点击时的外边框
|
|
outline: none; // 移除点击时的外边框
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.box-1 {
|
|
.box-1 {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
flex: 0.3;
|
|
flex: 0.3;
|
|
@@ -228,7 +263,6 @@ const courseImages = ref([
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
font-size: rpx(16); // 默认字体大小
|
|
font-size: rpx(16); // 默认字体大小
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.inner-box {
|
|
.inner-box {
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -236,7 +270,6 @@ const courseImages = ref([
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
font-size: rpx(16); // 默认字体大小
|
|
font-size: rpx(16); // 默认字体大小
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.left-box {
|
|
.left-box {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
justify-content: flex-start;
|
|
justify-content: flex-start;
|
|
@@ -246,12 +279,13 @@ const courseImages = ref([
|
|
|
.box-icon {
|
|
.box-icon {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
- flex: 0.5;
|
|
|
|
|
|
|
+ flex: 0.6;
|
|
|
display: flex; // 添加 flex 布局
|
|
display: flex; // 添加 flex 布局
|
|
|
align-items: center; // 垂直居中
|
|
align-items: center; // 垂直居中
|
|
|
color: white; // 设置图标颜色为白色
|
|
color: white; // 设置图标颜色为白色
|
|
|
padding-left: rpx(15);
|
|
padding-left: rpx(15);
|
|
|
font-size: rpx(10); // 设置图标大小,可按需调整
|
|
font-size: rpx(10); // 设置图标大小,可按需调整
|
|
|
|
|
+ cursor: pointer; // 添加鼠标指针样式
|
|
|
}
|
|
}
|
|
|
.box-icon .left-icon {
|
|
.box-icon .left-icon {
|
|
|
margin-left: rpx(10);
|
|
margin-left: rpx(10);
|
|
@@ -266,7 +300,7 @@ const courseImages = ref([
|
|
|
color: white;
|
|
color: white;
|
|
|
}
|
|
}
|
|
|
.dropdown-box {
|
|
.dropdown-box {
|
|
|
- width: 100%;
|
|
|
|
|
|
|
+ width: 50%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
display: flex; // 添加 flex 布局;
|
|
display: flex; // 添加 flex 布局;
|
|
|
flex: 1;
|
|
flex: 1;
|
|
@@ -289,7 +323,7 @@ const courseImages = ref([
|
|
|
}
|
|
}
|
|
|
.dropdown-menu {
|
|
.dropdown-menu {
|
|
|
width: rpx(100);
|
|
width: rpx(100);
|
|
|
- height: rpx(65);
|
|
|
|
|
|
|
+ height: rpx(50);
|
|
|
border-radius: rpx(6);
|
|
border-radius: rpx(6);
|
|
|
background-color: rgba(165, 209, 247, 0.5);
|
|
background-color: rgba(165, 209, 247, 0.5);
|
|
|
box-shadow: 0 4px 8px rgba(202, 52, 52, 0.1);
|
|
box-shadow: 0 4px 8px rgba(202, 52, 52, 0.1);
|
|
@@ -298,9 +332,10 @@ const courseImages = ref([
|
|
|
font-size: rpx(8);
|
|
font-size: rpx(8);
|
|
|
color: black;
|
|
color: black;
|
|
|
border-radius: rpx(6);
|
|
border-radius: rpx(6);
|
|
|
- width: rpx(75);
|
|
|
|
|
- height: rpx(25);
|
|
|
|
|
|
|
+ width: rpx(78);
|
|
|
|
|
+ height: rpx(15);
|
|
|
margin-left: rpx(4);
|
|
margin-left: rpx(4);
|
|
|
|
|
+ margin-bottom: rpx(8);
|
|
|
}
|
|
}
|
|
|
.dropdown-menu ::v-deep(.el-dropdown-menu__item:hover),
|
|
.dropdown-menu ::v-deep(.el-dropdown-menu__item:hover),
|
|
|
.dropdown-menu ::v-deep(.el-dropdown-menu__item:focus),
|
|
.dropdown-menu ::v-deep(.el-dropdown-menu__item:focus),
|
|
@@ -342,6 +377,11 @@ const courseImages = ref([
|
|
|
color: white;
|
|
color: white;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.search-input{
|
|
|
|
|
+ width: rpx(100);
|
|
|
|
|
+ height: rpx(15);
|
|
|
|
|
+ font-size: rpx(7);
|
|
|
|
|
+}
|
|
|
.box-2 {
|
|
.box-2 {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
flex: 2;
|
|
flex: 2;
|
|
@@ -351,6 +391,7 @@ const courseImages = ref([
|
|
|
display: flex; // 确保子元素水平排列
|
|
display: flex; // 确保子元素水平排列
|
|
|
flex-wrap: wrap; // 允许子元素换行;
|
|
flex-wrap: wrap; // 允许子元素换行;
|
|
|
align-content: center; // 顶部对齐;
|
|
align-content: center; // 顶部对齐;
|
|
|
|
|
+ cursor: pointer; // 添加鼠标指针样式
|
|
|
}
|
|
}
|
|
|
.small-box {
|
|
.small-box {
|
|
|
flex: 0 0 calc(33.333% - rpx(10)); // 每个小盒子占三分之一宽度,减去间距
|
|
flex: 0 0 calc(33.333% - rpx(10)); // 每个小盒子占三分之一宽度,减去间距
|
|
@@ -368,6 +409,7 @@ const courseImages = ref([
|
|
|
height: rpx(80);
|
|
height: rpx(80);
|
|
|
border-radius: rpx(10);
|
|
border-radius: rpx(10);
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
+ border: 1px solid white; // 添加边框;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
}
|
|
}
|