Explorar o código

Merge branch 'beta' into HK

lsc hai 9 meses
pai
achega
f182cd78d3

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 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){

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio