|
@@ -51,6 +51,7 @@ import en from '@/assets/icon/en.png'
|
|
|
import canal from '@/assets/icon/canal.png'
|
|
import canal from '@/assets/icon/canal.png'
|
|
|
import plant from '@/assets/icon/plant.png'
|
|
import plant from '@/assets/icon/plant.png'
|
|
|
import poetry from '@/assets/icon/poetry.png'
|
|
import poetry from '@/assets/icon/poetry.png'
|
|
|
|
|
+import blockly from '@/assets/icon/blockly.png'
|
|
|
|
|
|
|
|
|
|
|
|
|
// 黑色图标
|
|
// 黑色图标
|
|
@@ -64,6 +65,7 @@ import en02 from '@/assets/icon/en02.png'
|
|
|
import canal02 from '@/assets/icon/canal02.png'
|
|
import canal02 from '@/assets/icon/canal02.png'
|
|
|
import plant02 from '@/assets/icon/plant02.png'
|
|
import plant02 from '@/assets/icon/plant02.png'
|
|
|
import poetry02 from '@/assets/icon/poetry02.png'
|
|
import poetry02 from '@/assets/icon/poetry02.png'
|
|
|
|
|
+import blockly02 from '@/assets/icon/blockly02.png'
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
@@ -83,7 +85,7 @@ const originalGroupList = ref([
|
|
|
index: '0'
|
|
index: '0'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- icon: painting,
|
|
|
|
|
|
|
+ icon: painting,
|
|
|
hoverIcon: painting02,
|
|
hoverIcon: painting02,
|
|
|
title: '智能绘画',
|
|
title: '智能绘画',
|
|
|
path: '/ai-painting',
|
|
path: '/ai-painting',
|
|
@@ -144,6 +146,13 @@ const originalGroupList = ref([
|
|
|
title: '虚拟实验室',
|
|
title: '虚拟实验室',
|
|
|
path: '/virtual-laboratory',
|
|
path: '/virtual-laboratory',
|
|
|
index: '9'
|
|
index: '9'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ icon: blockly,
|
|
|
|
|
+ hoverIcon: blockly02,
|
|
|
|
|
+ title: 'AI学习工具',
|
|
|
|
|
+ path: '/mini-program-tools',
|
|
|
|
|
+ index: '10'
|
|
|
}
|
|
}
|
|
|
])
|
|
])
|
|
|
|
|
|
|
@@ -201,7 +210,7 @@ const personData = ref([])
|
|
|
// 跳转智能问答
|
|
// 跳转智能问答
|
|
|
const navigateToAI = async (group) => {
|
|
const navigateToAI = async (group) => {
|
|
|
const routePath = group.path
|
|
const routePath = group.path
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (group.title === '智能问答') {
|
|
if (group.title === '智能问答') {
|
|
|
try {
|
|
try {
|
|
|
const grade = route.query.grade || localStorage.getItem('selectedGrade')
|
|
const grade = route.query.grade || localStorage.getItem('selectedGrade')
|
|
@@ -210,7 +219,7 @@ const navigateToAI = async (group) => {
|
|
|
const aiPerson = juniorAIRes.data.list.find(
|
|
const aiPerson = juniorAIRes.data.list.find(
|
|
|
person => person.name === '小智'
|
|
person => person.name === '小智'
|
|
|
)
|
|
)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (aiPerson) {
|
|
if (aiPerson) {
|
|
|
personData.value = {
|
|
personData.value = {
|
|
|
id: aiPerson.id,
|
|
id: aiPerson.id,
|
|
@@ -219,12 +228,12 @@ const navigateToAI = async (group) => {
|
|
|
message: aiPerson.systemMessage,
|
|
message: aiPerson.systemMessage,
|
|
|
default: aiPerson.questTip
|
|
default: aiPerson.questTip
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
const newState = {
|
|
const newState = {
|
|
|
...personData.value,
|
|
...personData.value,
|
|
|
category: grade + 'AI'
|
|
category: grade + 'AI'
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 先 push 再手动更新 history.state(确保原生 state 同步)
|
|
// 先 push 再手动更新 history.state(确保原生 state 同步)
|
|
|
router
|
|
router
|
|
|
.push({
|
|
.push({
|
|
@@ -287,23 +296,23 @@ defineExpose({
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
background: linear-gradient(to bottom, #001169, #8a78d0);
|
|
background: linear-gradient(to bottom, #001169, #8a78d0);
|
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 自定义滚动条样式
|
|
// 自定义滚动条样式
|
|
|
&::-webkit-scrollbar {
|
|
&::-webkit-scrollbar {
|
|
|
width: rpx(0); // 滚动条宽度
|
|
width: rpx(0); // 滚动条宽度
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
&::-webkit-scrollbar-track {
|
|
&::-webkit-scrollbar-track {
|
|
|
background-color: rgba(255, 255, 255, 0.1); // 滚动条轨道背景色
|
|
background-color: rgba(255, 255, 255, 0.1); // 滚动条轨道背景色
|
|
|
border-radius: rpx(2); // 滚动条轨道圆角
|
|
border-radius: rpx(2); // 滚动条轨道圆角
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
&::-webkit-scrollbar-thumb {
|
|
&::-webkit-scrollbar-thumb {
|
|
|
background-color: rgba(255, 255, 255, 0.3); // 滚动条滑块颜色
|
|
background-color: rgba(255, 255, 255, 0.3); // 滚动条滑块颜色
|
|
|
border-radius: rpx(2); // 滚动条滑块圆角
|
|
border-radius: rpx(2); // 滚动条滑块圆角
|
|
|
transition: background-color 0.3s ease; // 滑块颜色过渡效果
|
|
transition: background-color 0.3s ease; // 滑块颜色过渡效果
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
&::-webkit-scrollbar-thumb:hover {
|
|
&::-webkit-scrollbar-thumb:hover {
|
|
|
background-color: rgba(255, 255, 255, 0.5); // 鼠标悬停时的滑块颜色
|
|
background-color: rgba(255, 255, 255, 0.5); // 鼠标悬停时的滑块颜色
|
|
|
}
|
|
}
|
|
@@ -355,4 +364,4 @@ defineExpose({
|
|
|
height: rpx(11);
|
|
height: rpx(11);
|
|
|
margin-right: rpx(2);
|
|
margin-right: rpx(2);
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|