Преглед на файлове

Merge branch 'beta' into HK

lsc преди 10 месеца
родител
ревизия
f182cd78d3
променени са 2 файла, в които са добавени 38 реда и са изтрити 8 реда
  1. 16 6
      src/components/classRoomHelper/component/searchArea.vue
  2. 22 2
      src/components/classRoomHelper/index.vue

Файловите разлики са ограничени, защото са твърде много
+ 16 - 6
src/components/classRoomHelper/component/searchArea.vue


+ 22 - 2
src/components/classRoomHelper/index.vue

@@ -370,13 +370,22 @@ export default {
 			getWangLoading:false,
 			canUseWangData:false,
 			wangData:"",
+			languageSetting:0,
     };
   },
   mounted() {
+		let setting = this.courseDetail.setting;
+		if(setting){
+			setting = JSON.parse(setting);
+			if(setting.languageSetting){
+				this.languageSetting = setting.languageSetting;
+			}
+		}
     this.setWidth();
     this.getFileId();
 		this.firstEnterTime = new Date().getTime();
 		this.getWantSearch();
+		
 		setTimeout(()=>{
 			this.canGetTips = true;
 			this.getTipsList()
@@ -411,7 +420,7 @@ export default {
         });
         _textData += "\n";
       });
-			let _msg = `Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.if the user speaks Chinese Traditional, the specific text of your answer should also be in Chinese Traditional.
+			let _msg = `Language: ${this.getLang()}
 ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
 Instruction: Based on the context, follow "Format example", write content
 
@@ -688,7 +697,7 @@ let params = {
 			this.canUseWangData = false
 			this.wangData=""
       let _msg = `
-Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.if the user speaks Chinese Traditional, the specific text of your answer should also be in Chinese Traditional.
+Language: ${this.getLang()}
 ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
 Instruction: Based on the context, follow "Format example", write content
 
@@ -778,6 +787,17 @@ Instruction: Based on the context, follow "Format example", write content
 					console.log(e);
         });
       // this.getWAntSearchContent(_uuid);
+    },
+		getLang(){
+      let lang = ''
+      if(this.languageSetting == 0){
+        lang = 'Chinese.'
+      }else if(this.languageSetting == 1){
+        lang = 'Traditional Chinese.'
+      }else if(this.languageSetting == 2){
+        lang = 'English.'
+      }
+      return lang
     },
 		getWanData(){
 			if(this.wangData && this.canUseWangData){

Някои файлове не бяха показани, защото твърде много файлове са промени