瀏覽代碼

Merge branch 'beta' into HK

lsc 7 月之前
父節點
當前提交
f182cd78d3
共有 2 個文件被更改,包括 38 次插入8 次删除
  1. 16 6
      src/components/classRoomHelper/component/searchArea.vue
  2. 22 2
      src/components/classRoomHelper/index.vue

File diff suppressed because it is too large
+ 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){

Some files were not shown because too many files changed in this diff