11wqe1 2 minggu lalu
induk
melakukan
f450370f10

+ 8 - 1
src/App.vue

@@ -144,7 +144,14 @@ const userInfo = (data) => {
       confirmButtonText: '确定',
       showClose: false
     }).then(() => {
-      top.location.href = "https://zy.szedu.cn/ai/"
+      const a = document.createElement('a');
+      a.href = "https://ai.szedu.cn/";
+      a.target = '_blank';
+      a.rel = 'noreferrer';
+      document.body.appendChild(a);
+      a.click();
+      document.body.removeChild(a);
+      // top.location.href = "https://zy.szedu.cn/ai/"
     })
   }
 

+ 180 - 0
src/assets/course.json

@@ -1488,5 +1488,185 @@
                 
             ]
         }
+    },
+    "hk": {
+        "小四":{
+            "shang": [
+                
+            ],
+            "xia": [
+                {
+                    "id": "bdedbbe6-34b4-11f1-bcd9-005056924926",
+                    "title": "第1課 家裡的聰明朋友",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E5%B0%8F%E5%9B%9B%E3%80%91%E7%AC%AC2%E8%AA%B2%20%E6%88%91%E4%BE%86%E8%A9%A6%E8%A9%A6%E7%9C%8B1775808653844.png",
+                    "dataId": "new1",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "d015b117-34b4-11f1-bcd9-005056924926",
+                    "title": "第2課 我來試試看",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E4%B8%89%E5%B9%B4%E7%BA%A7%E3%80%91%E4%B8%8B%E5%86%8C%20%E7%AC%AC2%E8%AF%BE%20%E4%BB%8B%E7%BB%8D%E6%88%91%E7%9A%84%E6%99%BA%E8%83%BD%E5%B0%8F%E5%B1%8B%EF%BC%88%E8%AF%BE%E4%BB%B6%EF%BC%891772162353907.png",
+                    "dataId": "new2",
+                    "dataList": [],
+                    "courseType": "2"
+                }
+            ]
+        },
+        "小五":{
+            "shang": [
+                
+            ],
+            "xia": [
+                {
+                    "id": "3e7d7e8d-361d-11f1-bcd9-005056924926",
+                    "title": "第8課 借閱數據小管家",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E5%B0%8F%E4%BA%94%E3%80%91%E7%AC%AC8%E8%AA%B2%20%E5%80%9F%E9%96%B1%E6%95%B8%E6%93%9A%E5%B0%8F%E7%AE%A1%E5%AE%B61775963440013.png",
+                    "dataId": "new1",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "8fa942e2-34ba-11f1-bcd9-005056924926",
+                    "title": "第9課 AI館員的真假話",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E5%B0%8F%E4%BA%94%E3%80%91%E7%AC%AC9%E8%AA%B2%20AI%E9%A4%A8%E5%93%A1%E7%9A%84%E7%9C%9F%E5%81%87%E8%A9%B11775811113646.png",
+                    "dataId": "new2",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "14378f85-3a03-11f1-bcd9-005056924926",
+                    "title": "第10課 「越懂你」越好嗎?",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E5%B0%8F%E4%BA%94%E3%80%91%E7%AC%AC3%E8%AA%B2%20%E6%99%BA%E6%85%A7%E7%AA%97%E7%B0%BE%EF%BC%9A%E5%9F%BA%E6%96%BC%E5%A4%A9%E6%B0%A3%E6%95%B8%E6%93%9A%E7%9A%84%E6%99%BA%E8%83%BD%E6%B1%BA%E7%AD%961777270166696.png",
+                    "dataId": "new3",
+                    "dataList": [],
+                    "courseType": "2"
+                }
+            ]
+        },
+        "小六":{
+            "shang": [
+                
+            ],
+            "xia": [
+                {
+                    "id": "d07c673c-3409-11f1-bcd9-005056924926",
+                    "title": "第1課 如何讓汽車變聰明",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E5%B0%8F%E5%85%AD%E3%80%91%E7%AC%AC1%E8%AA%B2%20%E5%A6%82%E4%BD%95%E8%AE%93%E6%B1%BD%E8%BB%8A%E8%AE%8A%E8%81%B0%E6%98%8E1775735204705.png",
+                    "dataId": "new1",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "c34d6a27-340a-11f1-bcd9-005056924926",
+                    "title": "第2課 汽車的決策大腦",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E5%B0%8F%E5%85%AD%E3%80%91%E7%AC%AC2%E8%AA%B2%20%E6%B1%BD%E8%BB%8A%E7%9A%84%E6%B1%BA%E7%AD%96%E5%A4%A7%E8%85%A61775735604829.png",
+                    "dataId": "new2",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "0efd88e8-340f-11f1-bcd9-005056924926",
+                    "title": "第7課 交通擠塞預測",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E5%B0%8F%E5%85%AD%E3%80%91%E7%AC%AC7%E8%AA%B2%20%E4%BA%A4%E9%80%9A%E6%93%A0%E5%A1%9E%E9%A0%90%E6%B8%AC1775804974946.png",
+                    "dataId": "new3",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "5d694f1f-340f-11f1-bcd9-005056924926",
+                    "title": "第8課 智能路綫規劃",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/ScreenShot_%E3%80%89%E3%80%87%E3%80%89%E3%80%8D-%E3%80%87%E3%80%8B-%E3%80%88%E3%80%8A_%E3%80%88%E3%80%8F%E3%80%87%E3%80%8D%E3%80%8B%E3%80%89_%E3%80%8A%E3%80%8E%E3%80%8A1776075446744.png",
+                    "dataId": "new4",
+                    "dataList": [],
+                    "courseType": "2"
+                }
+            ]
+        },
+        "中一":{
+            "shang": [
+                
+            ],
+            "xia": [
+                {
+                    "id": "caf1d65b-34c8-11f1-bcd9-005056924926",
+                    "title": "第4課  智慧農場方案設計",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E4%B8%AD%E4%B8%80%E3%80%91%E7%AC%AC4%E8%AA%B2%20%20%E6%99%BA%E6%85%A7%E8%BE%B2%E5%A0%B4%E6%96%B9%E6%A1%88%E8%A8%AD%E8%A8%881775976298046.jpg",
+                    "dataId": "new1",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "1cef7d1c-34c9-11f1-bcd9-005056924926",
+                    "title": "第5課  農業失誤誰之過",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E4%B8%AD%E4%B8%80%E3%80%91%E7%AC%AC5%E8%AA%B2%20%20%E8%BE%B2%E6%A5%AD%E5%A4%B1%E8%AA%A4%E8%AA%B0%E4%B9%8B%E9%81%8E1775976327884.jpg",
+                    "dataId": "new2",
+                    "dataList": [],
+                    "courseType": "2"
+                }
+            ]
+        },
+        "中二":{
+            "shang": [
+                
+            ],
+            "xia": [
+                {
+                    "id": "7b365926-3484-11f1-bcd9-005056924926",
+                    "title": "第6課 智能旅遊的新時代",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E4%B8%83%E5%B9%B4%E7%BA%A7%E3%80%91%E4%B8%8B%E5%86%8C%20%E7%AC%AC1%E8%AF%BE%20%E6%99%BA%E8%83%BD%E6%97%85%E6%B8%B8%E7%9A%84%E6%96%B0%E6%97%B6%E4%BB%A3hk1775787883436.png",
+                    "dataId": "new1",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "9fa2459d-3485-11f1-bcd9-005056924926",
+                    "title": "第7課 旅遊助手的感知",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E4%B8%83%E5%B9%B4%E7%BA%A7%E3%80%91%E4%B8%8B%E5%86%8C%20%E7%AC%AC2%E8%AF%BE%20%E6%97%85%E6%B8%B8%E5%8A%A9%E6%89%8B%E7%9A%84%E6%99%BA%E8%83%BD%E6%84%9F%E7%9F%A5%E2%80%94%E2%80%94%E5%8E%8B%E7%BC%A9%E7%89%88hk1775788360287.png",
+                    "dataId": "new2",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "c1d11138-3486-11f1-bcd9-005056924926",
+                    "title": "第8課 智能推薦算法奧祕",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E4%B8%83%E5%B9%B4%E7%BA%A7%E3%80%91%E4%B8%8B%E5%86%8C%20%E7%AC%AC3%E8%AF%BE%20%E6%99%BA%E8%83%BD%E6%8E%A8%E8%8D%90%E7%9A%84%E7%AE%97%E6%B3%95%E5%A5%A5%E7%A7%98%EF%BC%88%E7%B9%81%E9%AB%94%EF%BC%891775788845563.png",
+                    "dataId": "new3",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "3b9c182e-3487-11f1-bcd9-005056924926",
+                    "title": "第9課 打造我的旅遊助手",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E4%B8%83%E5%B9%B4%E7%BA%A7%E3%80%91%E4%B8%8B%E5%86%8C%20%E7%AC%AC4%E8%AF%BE%20%E6%89%93%E9%80%A0%E6%88%91%E7%9A%84%E6%99%BA%E8%83%BD%E6%97%85%E6%B8%B8%E5%8A%A9%E6%89%8B%E2%80%94%E2%80%94%E5%8E%8B%E7%BC%A9%E7%89%88hk1775789058902.png",
+                    "dataId": "new4",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "311560ec-3488-11f1-bcd9-005056924926",
+                    "title": "第10課 智慧旅遊的責任與未來",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E3%80%90%E4%B8%83%E5%B9%B4%E7%BA%A7%E3%80%91%E4%B8%8B%E5%86%8C%20%E7%AC%AC5%E8%AF%BE%20%E6%99%BA%E8%83%BD%E6%97%85%E6%B8%B8%E7%9A%84%E8%B4%A3%E4%BB%BB%E4%B8%8E%E6%9C%AA%E6%9D%A5-%E5%8E%8B%E7%BC%A9%E7%89%88hk1775789481138.png",
+                    "dataId": "new5",
+                    "dataList": [],
+                    "courseType": "2"
+                }
+            ]
+        },
+        "中三":{
+            "shang": [
+                
+            ],
+            "xia": [
+                {
+                    "id": "b01b8d51-3654-11f1-bcd9-005056924926",
+                    "title": "第5課 AI醫療的邊界感",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/17759874338751775987446904.jpg",
+                    "dataId": "new1",
+                    "dataList": [],
+                    "courseType": "2"
+                }
+            ]
+        }
     }
 }

+ 10 - 12
src/components/dialog/addClassDialog.vue

@@ -1,20 +1,20 @@
 <template>
   <div class="addNewPP2">
     <el-dialog
-      title="选择班级"
+      :title="lang.ssSelClass"
       v-model="show"
       width="800px"
       height="80%"
     >
       <div class="check_classBox" v-loading="isLoading">
         <div class="check_class_right">
-          <span>年级</span>
+          <span>{{ lang.ssGradeOnly }}</span>
           <div
             class="check_class"
             :class="{ activeX: gradeId == '' }"
             @click="(gradeId = ''), getClass()"
           >
-            全部年级
+            {{ lang.ssAllGrades }}
           </div>
           <el-tooltip
             placement="top"
@@ -33,25 +33,25 @@
         </div>
         <div class="check_class_left">
           <div class="check_class_all_box">
-            <div class="check_class_left_title">班级</div>
+            <div class="check_class_left_title">{{ lang.ssClassTxt }}</div>
           </div>
           <div class="classItem" @click="classItemClick(item)" :class="{classActiveItem:checkboxList2.map(i=>i.id).includes(item.id)}" v-for="item in grade2" :key="item.id">
             <div class="ci_left">
               <div>{{ item.name }}</div>
-              <span v-if="item.studentNum>=0">{{ item.studentNum }} 名学生</span>
+              <span v-if="item.studentNum>=0">{{ lang.ssStuCount.replace(/\*/g, item.studentNum) }}</span>
             </div>
             <div class="ci_right">
 
               <svg v-show="checkboxList2.map(i=>i.id).includes(item.id)" t="1756864121172" class="icon" viewBox="0 0 1098 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4441" width="200" height="200"><path d="M476.808045 0.000043C213.401753 0.106685-0.031993 213.68973 0 477.074693S213.551052 953.98938 476.94668 954.021373s476.957344-213.412417 477.085315-476.808045A477.010665 477.010665 0 0 0 476.808045 0.000043z m273.761252 353.369671L441.861388 661.853674a43.1901 43.1901 0 0 1-62.023117 0L202.214984 484.251715a43.864079 43.864079 0 1 1 62.033781-62.033782l147.21959 147.21959 277.89897-276.86454a43.861946 43.861946 0 1 1 62.023117 62.033781z m0 0" p-id="4442" fill="#4CAF51"></path></svg>
             </div>
           </div>
-          <div v-if="!grade2.length">暂无数据</div>
+          <div v-if="!grade2.length">{{ lang.ssNoData }}</div>
         </div>
       </div>
       <template #footer>
         <div class="b_bottom">
-					<div @click="close()">取消</div>
-          <div class="b_b_submit" @click="submit()">确定</div>
+					<div @click="close()">{{ lang.ssCancel }}</div>
+          <div class="b_b_submit" @click="submit()">{{ lang.ssConfirm }}</div>
 				</div>
       </template>
     </el-dialog>
@@ -59,12 +59,13 @@
 </template>
 
 <script setup>
-  import { ref } from 'vue';
+  import { ref, inject } from 'vue';
   // import axios from 'axios';
   import axios from '@/services/config'
 
   import { userInfoStore } from '../../stores/counter';
   import qs from 'qs';
+  const lang = inject('lang')
   const show = ref(false);
   const gradeId = ref('');
   const gradeList = ref([]);
@@ -362,9 +363,6 @@
   align-content: flex-start;
 }
 
-.class_item:first-child {
-  /* margin: 0 15px 15px 67px; */
-}
 .class_item {
   margin: 0 15px 15px 0;
 }

+ 11 - 8
src/components/dialog/selectTeachingClassDialog.vue

@@ -3,7 +3,7 @@
 		<el-dialog v-model="show" :show-close="false">
 			<template #header>
 				<div class="b_head">
-					<span>选择授课班级</span>
+					<span>{{ lang.ssSelTeachClass }}</span>
 					<svg
 						@click="close()"
 						t="1748587270371"
@@ -42,7 +42,7 @@
 						>
 							<div>{{ item.name }}</div>
 							<span v-if="item.studentNum >= 0"
-								>{{ item.studentNum }} 名学生
+								>{{ lang.ssStuCount.replace(/\*/g, item.studentNum) }}
 							</span>
 						</div>
 					</template>
@@ -71,12 +71,12 @@
 							</svg>
 							<span>-</span>
 						</div>
-						<div>添加或修改班级</div>
+						<div>{{ lang.ssAddEditClass }}</div>
 					</div>
 				</div>
 				<div class="b_bottom">
-					<div @click="close()">取消</div>
-          			<div class="b_b_submit" @click="selectClassSuccess()">{{selectId ? '确定' : '直接进入'}}</div>
+					<div @click="close()">{{ lang.ssCancel }}</div>
+          			<div class="b_b_submit" @click="selectClassSuccess()">{{selectId ? lang.ssConfirm : lang.ssEnterDirect}}</div>
 				</div>
 
 		</el-dialog>
@@ -90,11 +90,12 @@
 </template>
 
 <script setup>
-import { ref } from "vue";
+import { ref, inject } from "vue";
 import { userInfoStore } from "../../stores/counter";
 import addClassDialog from "./addClassDialog.vue";
 const emit = defineEmits(["success", "changeClassList"]);
 import axios from '@/services/config'
+const lang = inject('lang')
 const checkStage = ref('0');
 
 const courseDetail = ref({});
@@ -620,7 +621,7 @@ defineExpose({
 }
 
 .b_m_classItem > div {
-	color: #5f5f5f;
+	color: #000;
 	font-size: 16px;
 	margin: 4px 0;
 	display: flex;
@@ -654,7 +655,9 @@ defineExpose({
 }
 
 .b_m_classItem_active {
-	box-shadow: 4px 4px 4px 0px rgba(138, 238, 138, 0.555);
+  background-color: #FCCF00;
+  color: #000 !important;
+	/* box-shadow: 4px 4px 4px 0px rgba(138, 238, 138, 0.555); */
 }
 
 .b_m_noClassMsg {

+ 3 - 2
src/components/header/headerLeft.vue

@@ -1,13 +1,14 @@
 <template>
     <div class="header_left">
         <router-link to="/">
-            <span>深教AI6</span>
+            <span>{{ lang.ssSzEduAi6 }}</span>
         </router-link>
     </div>
 </template>
 
 <script setup>
-
+import { inject } from 'vue'
+const lang = inject('lang')
 </script>
 <style scoped lang="scss">
 .header_left {

+ 7 - 6
src/components/header/headerRight.vue

@@ -1,34 +1,35 @@
 <template>
     <div class="header_right">
         <div>
-            <el-button @click="goBack()">返回深教AI首页</el-button>
+            <el-button @click="goBack()">{{ lang.ssBackHome }}</el-button>
         </div>
         <div v-if="isLogin" class="loginAdmin">
             <div v-if="admin">
                 <img src="" alt="">
-                <router-link to="" @click="adminClick()"><span>管理后台</span></router-link>
+                <router-link to="" @click="adminClick()"><span>{{ lang.ssAdminPanel }}</span></router-link>
             </div>
             <div style="min-width: 100px;">
                 <img src="" alt="">
                 <span style="cursor: pointer;" class="dropdownMenu" @click="userInfoShow = true">{{ userName }}</span>
                 <ul v-if="userInfoShow" class="user_info">
-                    <li @click="userInfoOpen()">个人资料</li>
-                    <li @click="logout()">退出</li>
+                    <li @click="userInfoOpen()">{{ lang.ssProfile }}</li>
+                    <li @click="logout()">{{ lang.ssLogout }}</li>
                 </ul>
             </div>
         </div>
         <div v-else>
             <!-- <el-button @click="studentLogin()">学生登录</el-button> -->
-            <el-button @click="linkLogin()">教师登录</el-button>
+            <el-button @click="linkLogin()">{{ lang.ssTeacherLogin }}</el-button>
         </div>
     </div>
 </template>
 
 <script setup>
 import axios from "axios"
-import { ref, onMounted, watchEffect } from "vue"
+import { ref, onMounted, watchEffect, inject } from "vue"
 import { userCurrentRole, userInfoStore } from '../../stores/counter'
 
+const lang = inject('lang')
 const user = userInfoStore()
 const isLogin = ref(false)
 const admin = ref(false)

+ 52 - 21
src/components/main/AIExperience.vue

@@ -1,11 +1,11 @@
 <template>
 	<h2 class="contentTitle">
 		<div class="Levelone">
-			AI体验中心
+			{{ lang.ssAiExperience }}
 		</div>
 	</h2>
 
-	<div class="aiex">
+	<div class="aiex" v-loading="loading">
 		<div
 			class="cont"
 			v-for="(i, ind) in listData"
@@ -18,40 +18,71 @@
 			</div>
 		</div>
 		<div @click="gotoPage" class="cont" style="display: flex;justify-content: center;align-items: center;">
-				查看更多
+				{{ lang.ssViewMore }}
 		</div>
 	</div>
 </template>
 
 <script setup>
-import { ref } from "vue";
+import { ref,onMounted, inject } from "vue";
 import { useRouter } from "vue-router";
+import axios from 'axios';
 const router = useRouter();
+const lang = inject('lang')
+const loading = ref(false)
 const listData = ref([
-	{
-		name: "手写数字识别的原理演示",
-		url: "https://aihub.cocorobo.cn/homes/details?0",
-		img: "https://aihub.cocorobo.cn/aihub/static/media/%E6%89%8B%E5%86%99%E6%95%B0%E5%AD%97%E8%AF%86%E5%88%AB.06caf300.png",
-	},
-	{
-		name: "CNN 解释器",
-		url: "https://aihub.cocorobo.cn/homes/details?1",
-		img: "https://aihub.cocorobo.cn/aihub/static/media/CNN%20%E8%A7%A3%E9%87%8A%E5%99%A8(%E5%B1%82%E8%AE%A1%E7%AE%97%E8%BF%87%E7%A8%8B.469b6d97.png",
-	},
-	{
-		name: "数据分类器",
-		url: "https://aihub.cocorobo.cn/homes/details?2",
-		img: "https://aihub.cocorobo.cn/aihub/static/media/%E6%95%B0%E6%8D%AE%E5%88%86%E7%B1%BB%E5%99%A8(%E8%B0%83%E5%8F%82%E8%BF%87%E7%A8%8B).bd57672f.png",
-	},
+	// {
+	// 	name: "手写数字识别的原理演示",
+	// 	url: "https://aihub.cocorobo.cn/homes/details?0",
+	// 	img: "https://aihub.cocorobo.cn/aihub/static/media/%E6%89%8B%E5%86%99%E6%95%B0%E5%AD%97%E8%AF%86%E5%88%AB.06caf300.png",
+	// },
+	// {
+	// 	name: "CNN 解释器",
+	// 	url: "https://aihub.cocorobo.cn/homes/details?1",
+	// 	img: "https://aihub.cocorobo.cn/aihub/static/media/CNN%20%E8%A7%A3%E9%87%8A%E5%99%A8(%E5%B1%82%E8%AE%A1%E7%AE%97%E8%BF%87%E7%A8%8B.469b6d97.png",
+	// },
+	// {
+	// 	name: "数据分类器",
+	// 	url: "https://aihub.cocorobo.cn/homes/details?2",
+	// 	img: "https://aihub.cocorobo.cn/aihub/static/media/%E6%95%B0%E6%8D%AE%E5%88%86%E7%B1%BB%E5%99%A8(%E8%B0%83%E5%8F%82%E8%BF%87%E7%A8%8B).bd57672f.png",
+	// },
 ]);
 // 拉取用户信息并处理
 const gotoUrl = (val) => {
-	window.open(val.url, "_blank");
+	window.open(val.link, "_blank");
 };
 
 const gotoPage = () => {
-	router.push("/details/AI体验中心");
+	router.push(`/details/${lang.ssAiExperience}`);
 };
+onMounted(() => {
+    getdata()
+})
+const getdata =()=>{
+	loading.value = true
+	let kk = '0d210c77-ad80-11f0-99cb-005056924926,4638538d-ad8c-11f0-99cb-005056924926,c3d15958-ad80-11f0-99cb-005056924926'
+	axios.get('https://pbl.cocorobo.cn/api/pbl/getAIcourseType?con='+kk)
+    .then(res => {
+        console.log('res.data[0]',res.data[0]);
+		let data = res.data[0]
+		data.forEach(item => {
+			if (lang.lang == 'hk') {
+				item.name = item.namehk
+				item.link = item.linkhk
+			}else if (lang.lang == 'en') {
+				item.name = item.namecom
+				item.link = item.linkcom
+			}
+		})
+       
+        listData.value = data       
+        loading.value = false
+    })
+    .catch(err=>{
+        console.log(err);
+        loading.value = false
+    })
+}
 </script>
 
 <style lang="scss" scoped>

+ 22 - 3
src/components/main/AIExperienceCon.vue

@@ -25,7 +25,8 @@
 
 <script setup>
 import axios from 'axios';
-import { ref,onMounted } from 'vue';
+import { ref,onMounted, inject } from 'vue';
+const lang = inject('lang')
 
 const listData = ref([])
 const loading = ref(false)
@@ -41,9 +42,27 @@ const requestUser = () => {
     .then(res => {
         console.log(res);
         let data = res.data
-        data[0].forEach(item1 => {
+        let data0 = data[0]
+        data0.forEach(item => {
+            if (lang.lang == 'hk') {
+                item.name = item.namehk
+            }else if (lang.lang == 'en') {
+                item.name = item.namecom
+            }
+        })
+        let data1 = data[1]
+        data1.forEach(item => {
+            if (lang.lang == 'hk') {
+                item.name = item.namehk
+                item.link = item.linkhk
+            }else if (lang.lang == 'en') {
+                item.name = item.namecom
+                item.link = item.linkcom
+            }
+        })
+        data0.forEach(item1 => {
             // 在第二个数组中查找匹配的数据
-            const matchedItems = data[1].filter(item2 => item2.levA === item1.id);
+            const matchedItems = data1.filter(item2 => item2.levA === item1.id);
             // 将匹配的数据存入ch属性
             item1.ch = matchedItems;
         });

+ 17 - 6
src/components/main/AIexploration.vue

@@ -1,7 +1,7 @@
 <template>
 	<h2 class="contentTitle">
 		<div class="Levelone">
-			AI探究中心
+			{{ lang.ssAiExplore }}
 		</div>
 	</h2>
 
@@ -18,7 +18,7 @@
 			</div>
 		</div>
 		<div @click="gotoPage" class="cont" style="display: flex;justify-content: center;align-items: center;">
-				查看更多
+				{{ lang.ssViewMore }}
 		</div>
 	</div>
     <opendetail ref="opendetailRef"></opendetail>
@@ -28,7 +28,7 @@
 <script setup>
 import axios from 'axios';
 
-import { ref,onMounted } from "vue";
+import { ref,onMounted, inject } from "vue";
 import { useRouter } from "vue-router";
 import taideng from '@/assets/img/taideng.png'
 import esy from '@/assets/img/esy.png'
@@ -36,6 +36,7 @@ import ludeng from '@/assets/img/ludeng.png'
 import { userInfoStore } from '../../stores/counter'
 import dian from '@/assets/icon/dianji.png'
 import opendetail from './opendetail.vue'
+const lang = inject('lang')
 const opendetailRef = ref(null)
 const user = userInfoStore()
 
@@ -64,16 +65,26 @@ const gotoUrl = (val) => {
 
 };
 const gotoPage = () => {
-	router.push("/details/AI探究中心");
+	router.push(`/details/${lang.ssAiExplore}`);
 };
 const getdata =()=>{
 	loading.value = true
 	let kk = '4638538d-ad8c-11f0-99cb-005056924926,91d7d147-ad8c-11f0-99cb-005056924926,a4b3d989-ad8c-11f0-99cb-005056924926'
 	axios.get('https://pbl.cocorobo.cn/api/pbl/getAIcourseType?con='+kk)
     .then(res => {
-        console.log(res);
+        console.log('res.data[0]',res.data[0]);
+		let data = res.data[0]
+		data.forEach(item => {
+			if (lang.lang == 'hk') {
+				item.name = item.namehk
+				item.link = item.linkhk
+			}else if (lang.lang == 'en') {
+				item.name = item.namecom
+				item.link = item.linkcom
+			}
+		})
        
-        listData.value = res.data[0]        
+        listData.value = data       
         loading.value = false
     })
     .catch(err=>{

+ 23 - 3
src/components/main/AIexplorationCon.vue

@@ -95,10 +95,11 @@
 
 <script setup>
 import axios from 'axios';
-import { ref,onMounted } from 'vue';
+import { ref,onMounted, inject } from 'vue';
 import { userInfoStore } from '../../stores/counter'
 import opendetail from './opendetail.vue'
 const user = userInfoStore()
+const lang = inject('lang')
 const iframeRef1Url = ref('')
 const cid = ref('')
 const dialogVisible = ref(false)
@@ -118,9 +119,28 @@ const requestUser = () => {
     .then(res => {
         console.log(res);
         let data = res.data
-        data[0].forEach(item1 => {
+
+        let data0 = data[0]
+        data0.forEach(item => {
+            if (lang.lang == 'hk') {
+                item.name = item.namehk
+            }else if (lang.lang == 'en') {
+                item.name = item.namecom
+            }
+        })
+        let data1 = res.data[1]
+		data1.forEach(item => {
+			if (lang.lang == 'hk') {
+				item.name = item.namehk
+				item.link = item.linkhk
+			}else if (lang.lang == 'en') {
+				item.name = item.namecom
+				item.link = item.linkcom
+			}
+		})
+        data0.forEach(item1 => {
             // 在第二个数组中查找匹配的数据
-            const matchedItems = data[1].filter(item2 => item2.levA === item1.id);
+            const matchedItems = data1.filter(item2 => item2.levA === item1.id);
             // 将匹配的数据存入ch属性
             item1.ch = matchedItems;
         });

+ 34 - 9
src/components/main/Practice.vue

@@ -1,7 +1,7 @@
 <template>
   <h2 class="contentTitle">
     <div class="Levelone">
-			实践中心
+			{{ lang.ssPracticeCenter }}
 		</div>
   </h2>
   <el-row :gutter="20">
@@ -10,8 +10,8 @@
         <!-- <router-link to="/iframe/实践中心/图形化"> -->
         <img :src="GraphicsImg" alt="">
         <div>
-          <p class="title">图形化</p>
-          <p title="通过组合图形化程序进行人工智能硬件控制程序编写。">通过组合图形化程序进行人工智能硬件控制程序编写。</p>
+          <p class="title">{{ lang.ssGraphics }}</p>
+          <p :title="lang.ssGraphicsDesc">{{ lang.ssGraphicsDesc }}</p>
         </div>
         <!-- </router-link> -->
 
@@ -22,8 +22,8 @@
         <!-- <router-link to="/iframe/实践中心/Python"> -->
         <img :src="pythonImg" alt="">
         <div>
-          <p class="title">Python</p>
-          <p title="通过编写Python语言进行人工智能硬件控制程序编写。">通过编写Python语言进行人工智能硬件控制程序编写。</p>
+          <p class="title">{{ lang.ssPython }}</p>
+          <p :title="lang.ssPythonDesc">{{ lang.ssPythonDesc }}</p>
         </div>
         <!-- </router-link> -->
 
@@ -44,7 +44,7 @@
     <template #header>
       <div class="dialog-header img_text_middle">
         <!-- <img :src="WarningImg" alt=""> -->
-        <span class="warning_text">课程中心</span>
+        <span class="warning_text">{{ lang.ssCourseCenter }}</span>
       </div>
     </template>
     <CourseSelect :classDown="false"></CourseSelect>
@@ -53,26 +53,51 @@
         <!-- <el-button type="primary" @click="updateReduction()">
           确认修改
         </el-button> -->
-        <el-button @click="dialogVisible = false">取消</el-button>
+        <el-button @click="dialogVisible = false">{{ lang.ssCancel }}</el-button>
       </div>
     </template>
   </el-dialog>
 </template>
 <script setup>
-import { ref,watchEffect } from 'vue';
+import { ref, watchEffect, inject } from 'vue';
 import CourseSelect from './downloadCourse.vue';
 import GraphicsImg from '@/assets/icon/图形化icon-1.png'
 import pythonImg from '@/assets/icon/Frame.png'
 import Img2 from '@/assets/icon/课程中心.png'
 import { userInfoStore } from '@/stores/counter'
 
+const lang = inject('lang')
+
 const dialogVisible = ref(false)
 const InfoStore = userInfoStore()
 const isLogin = ref(false)
 
 
 const openApplication = (type) => {
-  top.U.MD.D.I.openApplication(type)
+  if ( type == 'szdjgCocooroboX') {
+    if (lang.lang == 'hk') {
+      top.U.MD.D.I.openInApplication('setUrl',{url:'https://pi.cocorobo.hk/?lang=zh-hant',title:'课程详情',id:new Date().getTime()})
+    }else if (lang.lang == 'en') {
+      top.U.MD.D.I.openInApplication('setUrl',{url:'https://pi.cocorobo.cn/?lang=zh-hans',title:'课程详情',id:new Date().getTime()})
+    }else{
+      top.U.MD.D.I.openInApplication('setUrl',{url:'https://pi.cocorobo.cn/?lang=zh-hans',title:'课程详情',id:new Date().getTime()})
+    }
+  }else{
+    if (lang.lang == 'hk') {
+      top.U.MD.D.I.openInApplication('setUrl',{url:'https://pi.cocorobo.hk/python/?lang=zh-hant',title:'课程详情',id:new Date().getTime()})
+    }else if (lang.lang == 'en') {
+      top.U.MD.D.I.openInApplication('setUrl',{url:'https://pi.cocorobo.cn/python/?lang=zh-hans',title:'课程详情',id:new Date().getTime()})
+    }else{
+      top.U.MD.D.I.openInApplication('setUrl',{url:'https://pi.cocorobo.cn/python/?lang=zh-hans',title:'课程详情',id:new Date().getTime()})
+    }
+  }
+  // top.U.MD.D.I.openApplication(type)
+  // if (lang.lang == 'hk') {
+  //   window.open('https://cloud.cocorobo.cn//#/' + type)
+  // }else{
+  //   window.open('https://cloud.cocorobo.cn//#/' + type)
+  // }
+  
 }
 const openApplications = (type) => {
   if (type) {

+ 103 - 55
src/components/main/courseSelect.vue

@@ -1,43 +1,47 @@
 <template>
   <h2 class="contentTitle" v-if="classDown">
     <div class="Levelone">
-      课程列表
+      {{ lang.lang == 'hk' ? lang.ssAiTeachRes : lang.ssCourseList }}
     </div>
   </h2>
-  <div class="grandTitle2">人工智能通识课</div>
-  <div class="course_select">
-    <span class="grandTitle">课程类型:</span>
-    <el-button :class="courseTypeShow ? 'el_button_active' : ''" @click="SwitchCourseType(true)">AI通识课2025版</el-button>
+  <div class="grandTitle2" v-if="lang.lang != 'hk'">{{ lang.ssAiGeneral }}</div>
+  <div class="course_select" v-if="lang.lang != 'hk'">
+    <span class="grandTitle">{{ lang.ssCourseType }}</span>
+    <el-button v-for="item in yearList" 
+    :key="item.value" :class="activeyear == item.value ? 'el_button_active' : ''" 
+    @click="clickYear(item.value)">{{ item.label }}</el-button>
     <!-- <el-button :class="!courseTypeShow ? 'el_button_active' : ''" @click="SwitchCourseType(false)">AI通识课2024版</el-button> -->
   </div>
   <div class="course_select">
-    <span class="grandTitle">年级:</span>
-    <el-button :class="selectGrand == '三年级' ? 'el_button_active' : ''" @click="clickGrand('三年级')">三年级</el-button>
-    <el-button :class="selectGrand == '四年级' ? 'el_button_active' : ''" @click="clickGrand('四年级')">四年级</el-button>
-    <el-button :class="selectGrand == '五年级' ? 'el_button_active' : ''" @click="clickGrand('五年级')">五年级</el-button>
-    <el-button :class="selectGrand == '六年级' ? 'el_button_active' : ''" @click="clickGrand('六年级')">六年级</el-button>
-    <el-button :class="selectGrand == '七年级' ? 'el_button_active' : ''" @click="clickGrand('七年级')">七年级</el-button>
-    <el-button :class="selectGrand == '八年级' ? 'el_button_active' : ''" @click="clickGrand('八年级')">八年级</el-button>
-    <el-button v-if="courseTypeShow" :class="selectGrand == '九年级' ? 'el_button_active' : ''"
-      @click="clickGrand('九年级')">九年级</el-button>
+    <span class="grandTitle">{{ lang.ssGrade }}</span>
+    <el-button 
+      v-for="item in classList" :key="item.value" 
+      :class="activegrade == item.value ? 'el_button_active' : ''" 
+      @click="clickGrand(item.value)">
+      {{ item.label }}
+    </el-button>
   </div>
   <div class="course_select">
-    <el-button :class="volumes ? 'el_button_active' : ''" @click="volumes = true">上册</el-button>
-    <el-button :class="!volumes ? 'el_button_active' : ''"
-      @click="volumes = false">下册</el-button>
+    <template v-if="lang.lang != 'hk'">
+      <span class="grandTitle">{{ lang.ssTerm }}</span>
+      <el-button :class="activeterm == 0 ? 'el_button_active' : ''" @click="activeterm = 0,getCourseList()">{{ lang.ssTermUp }}</el-button>
+      <el-button :class="activeterm == 1 ? 'el_button_active' : ''"
+        @click="activeterm = 1,getCourseList()">{{ lang.ssTermDown }}</el-button>
+    </template>
+   
 
 
       <!-- 课程上下册区域 -->
-    <div v-if="currentData && currentData.shang.length > 0 && volumes">
+    <div v-loading="courseLoading">
       <el-row :gutter="20">
-        <el-col :span="6" v-for="item in currentData.shang" :key="item.title" style="margin-top: 10px;">
+        <el-col :span="6" v-for="item in activeCurrentData" :key="item.id" style="margin-top: 10px;">
           <div class="grid-content ep-bg-purple">
-            <img :src="getImageUrl(item.url)" alt="">
+            <img :src="getImageUrl(item.json.url)" alt="">
             <div class="course_content">
               <div class="div_title">
-                <span>上册</span>
-                  <el-tooltip class="item" effect="dark" :content="item.title" placement="top">
-                    <div class="div_title_text">{{ item.title }}</div>
+                <span>{{ lang.ssTermUp }}</span>
+                  <el-tooltip class="item" effect="dark" :content="item.json.title" placement="top">
+                    <div class="div_title_text">{{ item.json.title }}</div>
                   </el-tooltip>
                 
                 <!-- v-if="isupdateCourse" -->
@@ -45,17 +49,17 @@
                 <el-popover v-if="isupdateCourse" placement="bottom" :width="210"
                   trigger="click" show-after="500" @hide="checked1 = false">
                   <template #reference>
-                    <img :src="DownloadImg" v-if="item.courseType == '2'" alt="">
-                    <img :src="DownloadImg" v-else alt="" @click="getDate(item.dataId)">
+                    <img :src="DownloadImg" v-if="item.json.courseType == '2'" alt="">
+                    <img :src="DownloadImg" v-else alt="" @click="getDate(item.json.dataId)">
                   </template>
                   <div>
                     <div>
-                      <span>资源列表({{ item.dataList.length }}</span>
+                      <span>{{ lang.ssResList.replace(/\*/g, item.json.dataList.length) }}</span>
                       <el-checkbox style="position: relative;top: 0;left: 35px;height: 30px;" v-model="checked1"
-                        label="全选" size="large" @click="checkedAll(item.dataId)" />
+                        :label="lang.ssSelectAll" size="large" @click="checkedAll(item.json.dataId)" />
                     </div>
-                    <div v-if="item.dataList.length > 0">
-                      <div class="div_hover" v-for="dataitem in item.dataList" :key="dataitem.dataId">
+                    <div v-if="item.json.dataList.length > 0">
+                      <div class="div_hover" v-for="dataitem in item.json.dataList" :key="dataitem.dataId">
                         <span style="display: inline-block;width: 130px;" :title="dataitem.name">{{
                           dataitem.name.length > 10 ?
                             dataitem.name.substring(0, 8) + '...' : dataitem.name }}</span>
@@ -63,13 +67,13 @@
                           @click="downloadOne(dataitem.url, dataitem.name)">
                           <img :src="DownloadImg" alt="">
                         </span>
-                        <el-checkbox v-if="checked1" v-model="dataitem.checked" label="全选" size="large" />
+                        <el-checkbox v-if="checked1" v-model="dataitem.checked" :label="lang.ssSelectAll" size="large" />
                       </div>
                       <el-button style="margin-top: 10px;" v-if="checked1"
-                        @click="DownloadProcessing()">批量下载</el-button>
+                        @click="DownloadProcessing()">{{ lang.ssBatchDown }}</el-button>
                     </div>
                     <div v-else>
-                      暂无数据
+                      {{ lang.ssNoData }}
                     </div>
                   </div>
                 </el-popover>
@@ -79,9 +83,9 @@
               <!-- <el-popover v-if="item.courseType == '1'" placement="bottom" trigger="hover">
                 <template #reference> -->
                 <el-button
-                @click="getCourseid(item.id)"
+                @click="getCourseid(item.json.id)"
                   style="width: 50%;background: rgba(255, 255, 245, 1);color: rgba(0, 0, 0, 0.6);">
-                  备课</el-button>
+                  {{ lang.ssPrep }}</el-button>
                 <!-- </template>
                 <ul class="beike">
                   <li @click="openCourseDetail(item.id)">查看</li>
@@ -90,13 +94,13 @@
                 </ul>
               </el-popover> -->
               <el-button style="width: 50%;" class="el_button_active"
-                @click="openCourseDetail(item.id, item)">上课</el-button>
+                @click="openCourseDetail(item.json.id, item.json)">{{ lang.ssInClass }}</el-button>
             </div>
           </div>
         </el-col>
       </el-row>
     </div>
-    <div v-if="currentData && currentData.xia.length > 0 && !volumes">
+    <!-- <div v-if="currentData && currentData.xia.length > 0 && !volumes">
       <el-row :gutter="20">
         <el-col :span="6" v-for="item in currentData.xia" :key="item.title" style="margin-top: 10px;">
           <div class="grid-content ep-bg-purple">
@@ -108,7 +112,6 @@
                   <div class="div_title_text">{{ item.title }}</div>
                 </el-tooltip>
 
-                <!-- v-if="isupdateCourse" -->
                 <el-popover v-if="isupdateCourse" placement="bottom" :width="210"
                   trigger="click" show-after="500" @hide="checked1 = false">
                   <template #reference>
@@ -143,17 +146,6 @@
               </div>
             </div>
             <div class="class_button" v-if="isupdateCourse">
-              <!-- <el-popover v-if="item.courseType == '1'" placement="bottom" trigger="hover">
-                <template #reference>
-                  <el-button
-                    style="width: 50%;background: rgba(255, 255, 245, 1);color: rgba(0, 0, 0, 0.6);">备课</el-button>
-                </template>
-                <ul class="beike">
-                  <li @click="openCourseDetail(item.id)">查看</li>
-                  <li @click="updateCourse(item.id, item)">修改</li>
-                  <li @click="ReductionCourse(item.id)">还原</li>
-                </ul>
-              </el-popover> -->
               <el-button
                 @click="getCourseid(item.id)"
                   style="width: 50%;background: rgba(255, 255, 245, 1);color: rgba(0, 0, 0, 0.6);">
@@ -164,7 +156,7 @@
           </div>
         </el-col>
       </el-row>
-    </div>
+    </div> -->
   </div>
   <template v-if="false">
     <div style="margin-top: 20px;">
@@ -281,7 +273,7 @@
 
 </template>
 <script setup>
-import { ref, onMounted, watchEffect } from 'vue';
+import { ref, onMounted, watchEffect, inject } from 'vue';
 import { userCurrentRole, userInfoStore, userCurrent,pageGotype } from '../../stores/counter'
 // import JSZip from 'jszip';
 // import { saveAs } from 'file-saver';
@@ -294,6 +286,7 @@ import selectTeachingClassDialog from '../dialog/selectTeachingClassDialog.vue'
 // import { dataType } from 'element-plus/es/components/table-v2/src/common';
 import axios from 'axios';
 
+const lang = inject('lang')
 
 const props = defineProps({
   classDown: {
@@ -305,10 +298,31 @@ const volumes = ref(false)
 const user = userInfoStore()
 const CurrentRole = userCurrentRole()
 const Current = userCurrent()
-const selectGrand = ref('三年级')
-const selectmod = ref('模块一')
+const selectGrand = ref(lang.ssGradeThree)
+const selectmod = ref(lang.ssModuleOne)
 const gotype = pageGotype()
 
+const classList = ref([
+  {value: 3, label: lang.ssGradeThree},
+  {value: 4, label: lang.ssGradeFour},
+  {value: 5, label: lang.ssGradeFive},
+  {value: 6, label: lang.ssGradeSix},
+  {value: 7, label: lang.ssGradeSeven},
+  {value: 8, label: lang.ssGradeEight},
+  {value: 9, label: lang.ssGradeNine}
+])
+
+const activeyear = ref(2025)
+const courseLoading = ref(false)
+const yearList = ref([
+  {value: 2025, label: 'AI通识课2025版'},
+])
+
+const clickYear = (val) => {
+  activeyear.value = val
+  getCourseList()
+}
+
 const isupdateCourse = ref(false)
 const currentData = ref(courseDataJson.new.三年级)
 const currentmodData = ref(courseDataJson.mod.模块一)
@@ -330,15 +344,47 @@ const modData = ref(courseDataJson.mod)
 const AI6Data = ref(courseDataJson.AI6one)
 const AI6TwoData = ref(courseDataJson.AI6Two)
 
+const activegrade = ref('3')
+const activeterm = ref('1')
+const activeCurrentData = ref([])
+
 onMounted(() => {
   currentData.value = courseData.value["三年级"]
   getTimeCourse(1, 1)
+  getCourseList() // 获取课程列表
 })
+
+const getCourseList = () => {
+  courseLoading.value = true
+  let params = {
+    ter: activeterm.value,
+    gra: activegrade.value,
+    ar: lang.lang,
+    typ: gotype.gotype == 'bjs' ? 1 : 0,
+    yea: activeyear.value
+  }
+  axios.get('http://localhost:7003/api/pbl/selectaisixCourse', { params })
+  .then(res => {
+    // console.log(res);
+    let data = res.data[0]
+    data.forEach(item => {
+      item.json = JSON.parse(item.json)
+    })
+    activeCurrentData.value = data
+    courseLoading.value = false
+    console.log('activeCurrentData.value',activeCurrentData.value);
+  })
+  .catch(err => {
+    console.error(err);
+    courseLoading.value = false
+  });
+};
 const clickGrand = val => {
-  selectGrand.value = val
-  console.log('courseData.value',courseData.value);
+  activegrade.value = val
+  getCourseList()
+  // console.log('courseData.value',courseData.value);
   
-  currentData.value = courseData.value[val]
+  // currentData.value = courseData.value[val]
 }
 const handleClose =(done)=>{
   done()
@@ -713,6 +759,8 @@ const DownloadProcessing = async () => {
       .catch(console.error);
   }
 }
+
+
 // 获取课程下载资料
 // top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/selectCourseDetailSz", ['课程id'], function (res) {}, [], { "type": "POST", "withCredentials": true });
 

+ 14 - 7
src/components/main/opendetail.vue

@@ -15,7 +15,7 @@
 					</div>
 					<div class="backA">
 						<div class="bABtn" style="flex-shrink: 0" @click="openCourseDetail">
-							进入课程
+							{{ lang.ssEnterCourse }}
 						</div>
 						<div
 							@click="handleCloseL"
@@ -27,12 +27,12 @@
 							"
 						>
 							<img src="../../assets/icon/backk.svg" alt="" />
-							<span style="flex-shrink: 0">返回</span>
+							<span style="flex-shrink: 0">{{ lang.ssBack }}</span>
 						</div>
 					</div>
 				</div>
 			</template>
-			<div class="fileArea2" @click="openDra">
+			<div class="fileArea2" @click="openDra" v-if="lang.lang != 'hk'">
 				<!-- <img src="../../assets/icon/filemr.svg" alt=""> -->
 			</div>
 			<el-drawer
@@ -47,7 +47,7 @@
 					<div class="closeBtn">
 						<div style="display: flex; align-items: center; gap: 10px">
 							<img src="../../assets/icon/tishi.svg" alt="" />
-							<span>使用说明</span>
+							<span>{{ lang.ssGuide }}</span>
 						</div>
 						<div class="fileArea" @click="drawer = false"></div>
 					</div>
@@ -60,14 +60,19 @@
 								:class="[drawertit == 1 ? 'tit2' : '']"
 								@click="drawertit = 1"
 							>
-								文件({{ inst.file && inst.file.length ? inst.file.length : 0 }})
+								{{
+									lang.ssFilesCount.replace(
+										/\*/g,
+										inst.file && inst.file.length ? inst.file.length : 0
+									)
+								}}
 							</div>
 							<div
 								class="tit"
 								:class="[drawertit == 0 ? 'tit2' : '']"
 								@click="drawertit = 0"
 							>
-								文本
+								{{ lang.ssText }}
 							</div>
 						</div>
 						<div class="draconL" v-if="drawertit == 0">
@@ -126,11 +131,12 @@
 </template>
 
 <script setup>
-import { ref } from "vue";
+import { ref, inject } from "vue";
 import "../../common/aws-sdk-2.235.1.min.js";
 
 import { userInfoStore } from "../../stores/counter";
 import { defineExpose } from "vue";
+const lang = inject('lang')
 const user = userInfoStore();
 const iframeRef1Url = ref("");
 const cid = ref("");
@@ -516,6 +522,7 @@ const updateCourseId = (id, type) => {
 			align-items: center;
 			cursor: pointer;
 			.pdfCSTit {
+				line-clamp: 1;
 				-webkit-line-clamp: 1;
 				display: -webkit-box;
 				-webkit-box-orient: vertical;

+ 63 - 0
src/lang/cn.json

@@ -0,0 +1,63 @@
+{
+  "lang": "cn",
+  "ssGradeThree": "三年级",
+  "ssGradeFour": "四年级",
+  "ssGradeFive": "五年级",
+  "ssGradeSix": "六年级",
+  "ssGradeSeven": "七年级",
+  "ssGradeEight": "八年级",
+  "ssGradeNine": "九年级",
+  "ssModuleOne": "模块一",
+  "ssServerName": "深教AI6",
+  "ssCoursePkg": "AI课程",
+  "ssNoRestore": "该课程就是最初课程,不能还原",
+  "ssRestore": "还原",
+  "ssFetchFail": "Fetch下载失败",
+  "ssPracticeCenter": "实践中心",
+  "ssGraphics": "图形化",
+  "ssGraphicsDesc": "通过组合图形化程序进行人工智能硬件控制程序编写。",
+  "ssPython": "Python",
+  "ssPythonDesc": "通过编写Python语言进行人工智能硬件控制程序编写。",
+  "ssCourseCenter": "课程中心",
+  "ssCancel": "取消",
+  "ssAiTeachRes": "AI 教学资源",
+  "ssCourseList": "课程列表",
+  "ssAiGeneral": "人工智能通识课",
+  "ssCourseType": "课程类型:",
+  "ssGrade": "年级:",
+  "ssTerm": "册别:",
+  "ssTermUp": "上册",
+  "ssTermDown": "下册",
+  "ssResList": "资源列表(*)",
+  "ssSelectAll": "全选",
+  "ssBatchDown": "批量下载",
+  "ssNoData": "暂无数据",
+  "ssPrep": "备课",
+  "ssInClass": "上课",
+  "ssSelClass": "选择班级",
+  "ssGradeOnly": "年级",
+  "ssAllGrades": "全部年级",
+  "ssClassTxt": "班级",
+  "ssStuCount": "* 名学生",
+  "ssConfirm": "确定",
+  "ssSelTeachClass": "选择授课班级",
+  "ssAddEditClass": "添加或修改班级",
+  "ssEnterDirect": "直接进入",
+  "ssViewMore": "查看更多",
+  "ssAiExplore": "AI探究中心",
+  "ssAiExperience": "AI体验中心",
+  "ssEnterCourse": "进入课程",
+  "ssBack": "返回",
+  "ssGuide": "使用说明",
+  "ssFilesCount": "文件(*)",
+  "ssText": "文本",
+  "ssAiLiteCourse": "AI通识课",
+  "ssResCenter": "资源中心",
+  "ssOtherCourseRes": "其他课程资源",
+  "ssBackHome": "返回深教AI首页",
+  "ssAdminPanel": "管理后台",
+  "ssProfile": "个人资料",
+  "ssLogout": "退出",
+  "ssTeacherLogin": "教师登录",
+  "ssSzEduAi6": "深教AI6"
+}

+ 63 - 0
src/lang/en.json

@@ -0,0 +1,63 @@
+{
+  "lang": "en",
+  "ssGradeThree": "Grade 3",
+  "ssGradeFour": "Grade 4",
+  "ssGradeFive": "Grade 5",
+  "ssGradeSix": "Grade 6",
+  "ssGradeSeven": "Grade 7",
+  "ssGradeEight": "Grade 8",
+  "ssGradeNine": "Grade 9",
+  "ssModuleOne": "Module 1",
+  "ssServerName": "SZ Edu AI6",
+  "ssCoursePkg": "AI Course",
+  "ssNoRestore": "This course is the original version and cannot be restored.",
+  "ssRestore": "Restore",
+  "ssFetchFail": "Fetch download failed",
+  "ssPracticeCenter": "Practice Center",
+  "ssGraphics": "Block Programming",
+  "ssGraphicsDesc": "Write AI hardware control programs by assembling block-based programs.",
+  "ssPython": "Python",
+  "ssPythonDesc": "Write AI hardware control programs in Python.",
+  "ssCourseCenter": "Course Center",
+  "ssCancel": "Cancel",
+  "ssAiTeachRes": "AI Teaching Resources",
+  "ssCourseList": "Course List",
+  "ssAiGeneral": "AI General Literacy Course",
+  "ssCourseType": "Course type:",
+  "ssGrade": "Grade:",
+  "ssTerm": "Term:",
+  "ssTermUp": "Volume 1",
+  "ssTermDown": "Volume 2",
+  "ssResList": "Resources (*)",
+  "ssSelectAll": "Select all",
+  "ssBatchDown": "Batch download",
+  "ssNoData": "No data",
+  "ssPrep": "Prepare",
+  "ssInClass": "Start class",
+  "ssSelClass": "Select Class",
+  "ssGradeOnly": "Grade",
+  "ssAllGrades": "All grades",
+  "ssClassTxt": "Class",
+  "ssStuCount": "* students",
+  "ssConfirm": "Confirm",
+  "ssSelTeachClass": "Select Teaching Class",
+  "ssAddEditClass": "Add or edit class",
+  "ssEnterDirect": "Enter directly",
+  "ssViewMore": "View more",
+  "ssAiExplore": "AI Exploration Center",
+  "ssAiExperience": "AI Experience Center",
+  "ssEnterCourse": "Enter course",
+  "ssBack": "Back",
+  "ssGuide": "User guide",
+  "ssFilesCount": "Files (*)",
+  "ssText": "Text",
+  "ssAiLiteCourse": "AI General Course",
+  "ssResCenter": "Resource Center",
+  "ssOtherCourseRes": "Other Course Resources",
+  "ssBackHome": "Back to SZ Edu AI Home",
+  "ssAdminPanel": "Admin Panel",
+  "ssProfile": "Profile",
+  "ssLogout": "Log out",
+  "ssTeacherLogin": "Teacher Login",
+  "ssSzEduAi6": "SZ Edu AI6"
+}

+ 63 - 0
src/lang/hk.json

@@ -0,0 +1,63 @@
+{
+  "lang": "hk",
+  "ssGradeThree": "小三",
+  "ssGradeFour": "小四",
+  "ssGradeFive": "小五",
+  "ssGradeSix": "小六",
+  "ssGradeSeven": "中一",
+  "ssGradeEight": "中二",
+  "ssGradeNine": "中三",
+  "ssModuleOne": "模組一",
+  "ssServerName": "深教AI6",
+  "ssCoursePkg": "AI課程",
+  "ssNoRestore": "該課程為最初課程,不能還原",
+  "ssRestore": "還原",
+  "ssFetchFail": "Fetch下載失敗",
+  "ssPracticeCenter": "實踐中心",
+  "ssGraphics": "圖形化",
+  "ssGraphicsDesc": "透過組合圖形化程式,進行人工智能硬體控制。",
+  "ssPython": "Python",
+  "ssPythonDesc": "透過編寫Python語言程式,進行人工智能硬體控制。",
+  "ssCourseCenter": "課程中心",
+  "ssCancel": "取消",
+  "ssAiTeachRes": "AI 教學資源",
+  "ssCourseList": "課程列表",
+  "ssAiGeneral": "人工智能通識課",
+  "ssCourseType": "課程類型:",
+  "ssGrade": "年級:",
+  "ssTerm": "冊別:",
+  "ssTermUp": "上冊",
+  "ssTermDown": "下冊",
+  "ssResList": "資源列表(*)",
+  "ssSelectAll": "全選",
+  "ssBatchDown": "批量下載",
+  "ssNoData": "暫無資料",
+  "ssPrep": "備課",
+  "ssInClass": "上課",
+  "ssSelClass": "選擇班級",
+  "ssGradeOnly": "年級",
+  "ssAllGrades": "全部年級",
+  "ssClassTxt": "班級",
+  "ssStuCount": "* 名學生",
+  "ssConfirm": "確定",
+  "ssSelTeachClass": "選擇授課班級",
+  "ssAddEditClass": "新增或修改班級",
+  "ssEnterDirect": "直接進入",
+  "ssViewMore": "查看更多",
+  "ssAiExplore": "AI探究中心",
+  "ssAiExperience": "AI體驗中心",
+  "ssEnterCourse": "進入課程",
+  "ssBack": "返回",
+  "ssGuide": "使用說明",
+  "ssFilesCount": "文件(*)",
+  "ssText": "文本",
+  "ssAiLiteCourse": "AI通識課",
+  "ssResCenter": "資源中心",
+  "ssOtherCourseRes": "其他課程資源",
+  "ssBackHome": "返回深教AI首頁",
+  "ssAdminPanel": "管理後台",
+  "ssProfile": "個人資料",
+  "ssLogout": "退出",
+  "ssTeacherLogin": "教師登入",
+  "ssSzEduAi6": "深教AI6"
+}

+ 30 - 0
src/lang/index.js

@@ -0,0 +1,30 @@
+
+import cn from './cn.json'
+import hk from './hk.json'
+import en from './en.json'
+
+const messages = {
+  'cn': cn,
+  'hk': hk,
+  'en': en
+}
+
+// 根据URL判断默认语言(和API接口判断方式一致)
+const getDefaultLanguage = () => {
+  const currentUrl = window.location.href.toLowerCase()
+  // 和接口判断方式保持一致
+  if (currentUrl.includes('.hk')) {
+    // 香港地区使用繁体中文
+    return 'hk'
+  } else if (currentUrl.includes('.com')) {
+    // com域名使用英文
+    return 'en'
+  } else {
+    // 默认中文简体
+    return 'cn'
+  }
+}
+
+const defaultLanguage = getDefaultLanguage()
+
+export default messages[defaultLanguage]

+ 3 - 2
src/main.js

@@ -3,12 +3,13 @@ import 'element-plus/dist/index.css'
 import { createApp } from 'vue'
 import { createPinia } from 'pinia'
 import ElementPlus from 'element-plus'
-
+import lang from './lang'
 import App from './App.vue'
 import router from './router'
 
 const app = createApp(App)
-
+app.provide('lang', lang)
+app.config.globalProperties.$lang = lang
 app.use(createPinia())
 app.use(router)
 app.use(ElementPlus)

+ 10 - 9
src/views/Details.vue

@@ -5,30 +5,30 @@
                 <div style="display: flex;justify-content: space-between;align-items: center;">
                     <el-breadcrumb separator="/">
                         <el-breadcrumb-item :to="{ path: '/' }">
-                            <span style="color: #000;font-weight: normal;">AI通识课</span>
+                            <span style="color: #000;font-weight: normal;">{{ lang.ssAiLiteCourse }}</span>
                         </el-breadcrumb-item>
                         <el-breadcrumb-item>{{ params.title }}</el-breadcrumb-item>
                     </el-breadcrumb>
                     <router-link to="/">
                         <img style="height: 14px;object-fit: contain;" src="../assets/img/icon_return2.png" alt="">
-                        返回
+                        {{ lang.ssBack }}
                     </router-link>
                 </div>
             </template>
 
         <div class="iframDiv">
-            <CourseSelect v-if="detailsTitle == '课程列表'"></CourseSelect>
-            <resource v-else-if="detailsTitle == '资源中心'"></resource>
-            <Practice v-else-if="detailsTitle == '实践中心'"></Practice>
-            <other v-else-if="detailsTitle == '其他课程资源'"></other>
-            <AIExperienceCon v-else-if="detailsTitle == 'AI体验中心'"></AIExperienceCon>
-            <AIexplorationCon v-else-if="detailsTitle == 'AI探究中心'"></AIexplorationCon>
+            <CourseSelect v-if="detailsTitle == lang.ssCourseList"></CourseSelect>
+            <resource v-else-if="detailsTitle == lang.ssResCenter"></resource>
+            <Practice v-else-if="detailsTitle == lang.ssPracticeCenter"></Practice>
+            <other v-else-if="detailsTitle == lang.ssOtherCourseRes"></other>
+            <AIExperienceCon v-else-if="detailsTitle == lang.ssAiExperience"></AIExperienceCon>
+            <AIexplorationCon v-else-if="detailsTitle == lang.ssAiExplore"></AIexplorationCon>
         </div>
     </el-page-header>
 </template>
 
 <script setup>
-import { ref, onMounted } from 'vue';
+import { ref, onMounted, inject } from 'vue';
 import CourseSelect from '@/components/main/courseSelect.vue'
 import resource from '@/components/main/resource.vue';
 import Practice from '@/components/main/Practice.vue';
@@ -42,6 +42,7 @@ import { pageGotype } from '../stores/counter'
 const { query, params } = useRoute()
 console.log(query, params)
 const gotype = pageGotype()
+const lang = inject('lang')
 
 const detailsTitle = ref('')
 onMounted(()=>{

+ 3 - 3
src/views/main.vue

@@ -74,7 +74,7 @@
         <CourseSelect></CourseSelect>
         <AIExperience></AIExperience>
         <AIexploration></AIexploration>
-        <DemoCurourse />
+        <DemoCurourse v-if="lang.lang != 'hk'" />
         <!-- <resource></resource> -->
         <Practice></Practice>
         <!-- <other v-if="!isupdateCourse"></other> -->
@@ -115,7 +115,7 @@
   </div>
 </template>
 <script setup>
-import { ref, watchEffect, onMounted } from 'vue';
+import { ref, watchEffect, onMounted, inject } from 'vue';
 import { ArrowLeft,ArrowRight } from '@element-plus/icons-vue'
 import img1 from '@/assets/icon/1.png'
 import img11 from '@/assets/icon/1-1.png'
@@ -136,7 +136,7 @@ import Edu from '@/components/main/edu.vue';
 import Feedback from '@/components/main/feedback.vue';
 import Header from './header.vue'
 import { userCurrentRole, userInfoStore,pageGotype } from '../stores/counter'
-
+const lang = inject('lang')
 
 const user = userInfoStore()
 const CurrentRole = userCurrentRole()