Explorar el Código

国际化改为本地文件格式

dusenyao hace 4 años
padre
commit
cdf401d934
Se han modificado 72 ficheros con 296 adiciones y 901 borrados
  1. 1 1
      .eslintrc.js
  2. 5 1
      .vscode/settings.json
  3. 0 1
      jsconfig.json
  4. 27 27
      package-lock.json
  5. 4 4
      package.json
  6. 7 9
      src/api/app.js
  7. 38 38
      src/api/course.js
  8. 6 6
      src/api/list.js
  9. 23 23
      src/api/live.js
  10. 8 8
      src/api/select.js
  11. 6 6
      src/api/table.js
  12. 7 7
      src/api/user.js
  13. 1 6
      src/common/show_file/index.vue
  14. 0 5
      src/components/StepBar.vue
  15. 0 5
      src/components/course/CompletionView.vue
  16. 0 5
      src/components/course/FinishCourseware.vue
  17. 14 31
      src/components/live/CurMaterial.vue
  18. 0 5
      src/components/live/SelectMaterial.vue
  19. 1 18
      src/components/payment/Audit.vue
  20. 0 3
      src/components/select/SelectCourse.vue
  21. 1 4
      src/components/select/SelectTeacher.vue
  22. 0 3
      src/components/select/SelectTemplate.vue
  23. 0 3
      src/layouts/components/LayoutHeader.vue
  24. 1 0
      src/locales/lang/AR.js
  25. 1 0
      src/locales/lang/DE.js
  26. 1 0
      src/locales/lang/EN.js
  27. 1 0
      src/locales/lang/ES.js
  28. 1 0
      src/locales/lang/FR.js
  29. 2 0
      src/locales/lang/HI.js
  30. 1 0
      src/locales/lang/RU.js
  31. 1 0
      src/locales/lang/TH.js
  32. 0 3
      src/main.js
  33. 2 2
      src/settings.js
  34. 1 1
      src/utils/auth.js
  35. 0 62
      src/utils/i18n.js
  36. 0 12
      src/utils/mixin.js
  37. 1 1
      src/utils/validate.js
  38. 8 37
      src/views/course_details/index.vue
  39. 1 6
      src/views/live/SelectDevice.vue
  40. 10 9
      src/views/live/common.js
  41. 5 5
      src/views/live/student/audit.js
  42. 8 25
      src/views/live/student/audit.vue
  43. 5 5
      src/views/live/student/group.js
  44. 8 31
      src/views/live/student/group.vue
  45. 1 29
      src/views/live/student/index.vue
  46. 13 13
      src/views/live/student/live.js
  47. 5 10
      src/views/live/teacher/CompleteList.vue
  48. 6 6
      src/views/live/teacher/group.js
  49. 7 34
      src/views/live/teacher/group.vue
  50. 2 55
      src/views/live/teacher/index.vue
  51. 8 8
      src/views/live/teacher/live.js
  52. 7 18
      src/views/login/index.vue
  53. 0 17
      src/views/main/TaskList.vue
  54. 0 24
      src/views/main/TemplateList.vue
  55. 0 5
      src/views/main/components/MainMenu.vue
  56. 4 4
      src/views/main/components/MonthlyCalendar.vue
  57. 0 15
      src/views/main/curricula_list/student.vue
  58. 0 31
      src/views/main/curricula_list/teacher.vue
  59. 2 2
      src/views/main/data.js
  60. 3 3
      src/views/main/index.vue
  61. 6 5
      src/views/task_details/ShowCourseware.vue
  62. 0 5
      src/views/task_details/TaskTop.vue
  63. 0 27
      src/views/task_details/student/index.vue
  64. 4 23
      src/views/task_details/teacher/index.vue
  65. 0 5
      src/views/teacher/create_course/index.vue
  66. 1 1
      src/views/teacher/create_course/step_table/AddItem.vue
  67. 3 34
      src/views/teacher/create_course/step_table/CourseInfo.vue
  68. 2 38
      src/views/teacher/create_course/step_table/CreateTask.vue
  69. 12 43
      src/views/teacher/create_course/step_table/NewTask.vue
  70. 2 6
      src/views/teacher/create_course/step_table/SelectBook.vue
  71. 0 5
      src/views/teacher/student_list/SendMessage.vue
  72. 1 17
      src/views/teacher/student_list/index.vue

+ 1 - 1
.eslintrc.js

@@ -260,7 +260,7 @@ module.exports = {
     'no-warning-comments': [
       1,
       {
-        terms: ['todo', 'fixme', 'xxx'],
+        terms: ['todo', 'fix', '!', '?', '*'],
         location: 'start'
       }
     ],

+ 5 - 1
.vscode/settings.json

@@ -7,5 +7,9 @@
     "titleBar.inactiveForeground": "#15202b99",
     "sash.hoverBorder": "#65c89b"
   },
-  "peacock.color": "#42b883"
+  "peacock.color": "#42b883",
+  "i18n-ally.localesPaths": ["src/locales/lang"],
+  "i18n-ally.keystyle": "nested",
+  "i18n-ally.sourceLanguage": "ZH",
+  "i18n-ally.displayLanguage": "ZH"
 }

+ 0 - 1
jsconfig.json

@@ -5,6 +5,5 @@
       "@/*": ["src/*"]
     }
   },
-  "files": {},
   "exclude": ["node_modules", "dist"]
 }

+ 27 - 27
package-lock.json

@@ -11,7 +11,7 @@
         "ailp-book-question-ui": "file:../ailp-book-question-ui-0.1.1.tgz",
         "awe-dnd": "^0.3.4",
         "axios": "^0.26.0",
-        "book-ui": "file:../book-ui-0.2.25.tgz",
+        "book-ui": "file:../book-ui-0.2.27.tgz",
         "core-js": "^3.21.1",
         "dayjs": "^1.10.7",
         "element-ui": "^2.15.6",
@@ -47,15 +47,15 @@
         "compression-webpack-plugin": "^6.1.1",
         "eslint": "^7.32.0",
         "eslint-plugin-prettier": "^4.0.0",
-        "eslint-plugin-vue": "^8.4.1",
+        "eslint-plugin-vue": "^8.5.0",
         "html-webpack-plugin": "^5.3.1",
         "postcss": "^8.4.6",
         "postcss-html": "^1.3.0",
         "prettier": "2.5.1",
-        "sass": "^1.49.7",
+        "sass": "^1.49.8",
         "sass-loader": "^10.2.1",
         "script-ext-html-webpack-plugin": "^2.1.5",
-        "stylelint": "14.5.1",
+        "stylelint": "14.5.2",
         "stylelint-config-prettier": "^9.0.3",
         "stylelint-config-recess-order": "^3.0.0",
         "stylelint-config-recommended-vue": "^1.3.0",
@@ -5568,9 +5568,9 @@
       "license": "MIT"
     },
     "node_modules/book-ui": {
-      "version": "0.2.25",
-      "resolved": "file:../book-ui-0.2.25.tgz",
-      "integrity": "sha512-1mgj6KGHjgP/HcMXubQE9AqwGaxKe3qGcnvzR7Gi5USh8pYaVdICUn6h2NFpvaVhz+HcdGxxMoS24qj/ZRzCuA==",
+      "version": "0.2.27",
+      "resolved": "file:../book-ui-0.2.27.tgz",
+      "integrity": "sha512-qL1pfrJtzVt+zv09Fkb2v++xqafY41VHoR8SUGPpBKBf1uBV/bRlk10uEADXCrECjbuFPRdErt0YEzQ9hX/l1w==",
       "dependencies": {
         "awe-dnd": "^0.3.4",
         "axios": "^0.21.1",
@@ -8946,9 +8946,9 @@
       }
     },
     "node_modules/eslint-plugin-vue": {
-      "version": "8.4.1",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.4.1.tgz",
-      "integrity": "sha512-nmWOhNmDx9TZ+yP9ZhezTkZUupSHsYA2TocRm+efPSXMOyFrVczVlaIuQcLBjCtI8CbkBiUQ3VcyQsjlIhDrhA==",
+      "version": "8.5.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz",
+      "integrity": "sha512-i1uHCTAKOoEj12RDvdtONWrGzjFm/djkzqfhmQ0d6M/W8KM81mhswd/z+iTZ0jCpdUedW3YRgcVfQ37/J4zoYQ==",
       "dev": true,
       "dependencies": {
         "eslint-utils": "^3.0.0",
@@ -18244,9 +18244,9 @@
       }
     },
     "node_modules/sass": {
-      "version": "1.49.7",
-      "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.7.tgz",
-      "integrity": "sha512-13dml55EMIR2rS4d/RDHHP0sXMY3+30e1TKsyXaSz3iLWVoDWEoboY8WzJd5JMnxrRHffKO3wq2mpJ0jxRJiEQ==",
+      "version": "1.49.8",
+      "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.8.tgz",
+      "integrity": "sha512-NoGOjvDDOU9og9oAxhRnap71QaTjjlzrvLnKecUJ3GxhaQBrV6e7gPuSPF28u1OcVAArVojPAe4ZhOXwwC4tGw==",
       "dev": true,
       "dependencies": {
         "chokidar": ">=3.0.0 <4.0.0",
@@ -19423,9 +19423,9 @@
       }
     },
     "node_modules/stylelint": {
-      "version": "14.5.1",
-      "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.5.1.tgz",
-      "integrity": "sha512-8Hf4HtnhxlWlf7iXF9zFfhSc3X0teRnVzl6PqPs2JEFx+dy/mhMhghZfiTDW4QG0ihDw9+WP7GZw5Nzx7cQF5A==",
+      "version": "14.5.2",
+      "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.5.2.tgz",
+      "integrity": "sha512-ZmZhIosMgFgAEe7+F8z4rlJq+12mmqPK0cN3SyNZhMiHZrZzfsd7WJ2WFZ14AMgQFZ61Dn6RYkEy51U/Lg4MQA==",
       "dev": true,
       "dependencies": {
         "balanced-match": "^2.0.0",
@@ -26894,8 +26894,8 @@
       }
     },
     "book-ui": {
-      "version": "file:..\\book-ui-0.2.25.tgz",
-      "integrity": "sha512-1mgj6KGHjgP/HcMXubQE9AqwGaxKe3qGcnvzR7Gi5USh8pYaVdICUn6h2NFpvaVhz+HcdGxxMoS24qj/ZRzCuA==",
+      "version": "file:..\\book-ui-0.2.27.tgz",
+      "integrity": "sha512-qL1pfrJtzVt+zv09Fkb2v++xqafY41VHoR8SUGPpBKBf1uBV/bRlk10uEADXCrECjbuFPRdErt0YEzQ9hX/l1w==",
       "requires": {
         "awe-dnd": "^0.3.4",
         "axios": "^0.21.1",
@@ -29412,9 +29412,9 @@
       }
     },
     "eslint-plugin-vue": {
-      "version": "8.4.1",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.4.1.tgz",
-      "integrity": "sha512-nmWOhNmDx9TZ+yP9ZhezTkZUupSHsYA2TocRm+efPSXMOyFrVczVlaIuQcLBjCtI8CbkBiUQ3VcyQsjlIhDrhA==",
+      "version": "8.5.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz",
+      "integrity": "sha512-i1uHCTAKOoEj12RDvdtONWrGzjFm/djkzqfhmQ0d6M/W8KM81mhswd/z+iTZ0jCpdUedW3YRgcVfQ37/J4zoYQ==",
       "dev": true,
       "requires": {
         "eslint-utils": "^3.0.0",
@@ -35407,9 +35407,9 @@
       }
     },
     "sass": {
-      "version": "1.49.7",
-      "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.7.tgz",
-      "integrity": "sha512-13dml55EMIR2rS4d/RDHHP0sXMY3+30e1TKsyXaSz3iLWVoDWEoboY8WzJd5JMnxrRHffKO3wq2mpJ0jxRJiEQ==",
+      "version": "1.49.8",
+      "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.8.tgz",
+      "integrity": "sha512-NoGOjvDDOU9og9oAxhRnap71QaTjjlzrvLnKecUJ3GxhaQBrV6e7gPuSPF28u1OcVAArVojPAe4ZhOXwwC4tGw==",
       "dev": true,
       "requires": {
         "chokidar": ">=3.0.0 <4.0.0",
@@ -36230,9 +36230,9 @@
       }
     },
     "stylelint": {
-      "version": "14.5.1",
-      "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.5.1.tgz",
-      "integrity": "sha512-8Hf4HtnhxlWlf7iXF9zFfhSc3X0teRnVzl6PqPs2JEFx+dy/mhMhghZfiTDW4QG0ihDw9+WP7GZw5Nzx7cQF5A==",
+      "version": "14.5.2",
+      "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.5.2.tgz",
+      "integrity": "sha512-ZmZhIosMgFgAEe7+F8z4rlJq+12mmqPK0cN3SyNZhMiHZrZzfsd7WJ2WFZ14AMgQFZ61Dn6RYkEy51U/Lg4MQA==",
       "dev": true,
       "requires": {
         "balanced-match": "^2.0.0",

+ 4 - 4
package.json

@@ -16,7 +16,7 @@
     "ailp-book-question-ui": "file:../ailp-book-question-ui-0.1.1.tgz",
     "awe-dnd": "^0.3.4",
     "axios": "^0.26.0",
-    "book-ui": "file:../book-ui-0.2.25.tgz",
+    "book-ui": "file:../book-ui-0.2.27.tgz",
     "core-js": "^3.21.1",
     "dayjs": "^1.10.7",
     "element-ui": "^2.15.6",
@@ -52,15 +52,15 @@
     "compression-webpack-plugin": "^6.1.1",
     "eslint": "^7.32.0",
     "eslint-plugin-prettier": "^4.0.0",
-    "eslint-plugin-vue": "^8.4.1",
+    "eslint-plugin-vue": "^8.5.0",
     "html-webpack-plugin": "^5.3.1",
     "postcss": "^8.4.6",
     "postcss-html": "^1.3.0",
     "prettier": "2.5.1",
-    "sass": "^1.49.7",
+    "sass": "^1.49.8",
     "sass-loader": "^10.2.1",
     "script-ext-html-webpack-plugin": "^2.1.5",
-    "stylelint": "14.5.1",
+    "stylelint": "14.5.2",
     "stylelint-config-prettier": "^9.0.3",
     "stylelint-config-recess-order": "^3.0.0",
     "stylelint-config-recommended-vue": "^1.3.0",

+ 7 - 9
src/api/app.js

@@ -7,12 +7,10 @@ import store from '@/store';
  * 得到语言列表
  */
 export function GetLanguageList() {
-  let params = getRequestParams('language_manager-GetLanguageList');
-
   return request({
     method: 'post',
     url: process.env.VUE_APP_FileServer,
-    params,
+    params: getRequestParams('language_manager-GetLanguageList'),
     data: {}
   });
 }
@@ -36,7 +34,7 @@ export function GetWordPack(data) {
 export function fileUpload(SecurityLevel, file) {
   const { token, isHas } = getToken();
 
-  let params = {
+  const params = {
     UserCode: isHas ? token.user_code : '',
     UserType: isHas ? token.user_type : '',
     SessionID: isHas ? token.session_id : '',
@@ -71,7 +69,7 @@ export function fileUpload(SecurityLevel, file) {
 export function FileDownload(FileID) {
   const { token, isHas } = getToken();
 
-  let params = {
+  const params = {
     UserCode: isHas ? token.user_code : '',
     UserType: isHas ? token.user_type : '',
     SessionID: isHas ? token.session_id : '',
@@ -92,7 +90,7 @@ export function FileDownload(FileID) {
  * @param {Object} data { file_id 文件ID }
  */
 export function GetFileStoreInfo(data) {
-  let params = getRequestParams('file_store_manager-GetFileStoreInfo');
+  const params = getRequestParams('file_store_manager-GetFileStoreInfo');
 
   return request({
     method: 'post',
@@ -106,7 +104,7 @@ export function GetFileStoreInfo(data) {
  * 得到系统标志
  */
 export function GetLogo() {
-  let params = getRequestParams('sys_config_manager-GetLogo');
+  const params = getRequestParams('sys_config_manager-GetLogo');
 
   return request({
     method: 'post',
@@ -119,7 +117,7 @@ export function GetLogo() {
  * 得到用户能进入的子系统列表(电脑端)
  */
 export function GetChildSysList_CanEnter_PC() {
-  let params = getRequestParams('login_control-GetChildSysList_CanEnter_PC');
+  const params = getRequestParams('login_control-GetChildSysList_CanEnter_PC');
 
   return request({
     method: 'post',
@@ -134,7 +132,7 @@ export function GetChildSysList_CanEnter_PC() {
  * @param {Object} data
  */
 export function getContentFile(MethodName, data) {
-  let params = getRequestParams(MethodName);
+  const params = getRequestParams(MethodName);
 
   return request({
     method: 'post',

+ 38 - 38
src/api/course.js

@@ -5,7 +5,7 @@ import { request, getRequestParams } from '@/utils/request';
  * @param {Object} data
  */
 export function CreateCourse(data) {
-  let params = getRequestParams('teaching-course_manager-CreateCourse');
+  const params = getRequestParams('teaching-course_manager-CreateCourse');
 
   return request({
     method: 'post',
@@ -20,7 +20,7 @@ export function CreateCourse(data) {
  * @param {Object} data
  */
 export function UpdateCourse(data) {
-  let params = getRequestParams('teaching-course_manager-UpdateCourse');
+  const params = getRequestParams('teaching-course_manager-UpdateCourse');
 
   return request({
     method: 'post',
@@ -35,7 +35,7 @@ export function UpdateCourse(data) {
  * @param {Object} { id 课程ID }
  */
 export function GetCourseInfo_ContainCSItem(data) {
-  let params = getRequestParams('teaching-course_manager-GetCourseInfo_ContainCSItem');
+  const params = getRequestParams('teaching-course_manager-GetCourseInfo_ContainCSItem');
 
   return request({
     method: 'post',
@@ -50,7 +50,7 @@ export function GetCourseInfo_ContainCSItem(data) {
  * @param {Object} course_id 课程id book_id 教材ID
  */
 export function AddBookToCourse(data) {
-  let params = getRequestParams('teaching-course_manager-AddBookToCourse');
+  const params = getRequestParams('teaching-course_manager-AddBookToCourse');
 
   return request({
     method: 'post',
@@ -65,7 +65,7 @@ export function AddBookToCourse(data) {
  * @param {Object} course_id 课程ID book_id 教材ID
  */
 export function RemoveBookFromCourse(data) {
-  let params = getRequestParams('teaching-course_manager-RemoveBookFromCourse');
+  const params = getRequestParams('teaching-course_manager-RemoveBookFromCourse');
 
   return request({
     method: 'post',
@@ -80,7 +80,7 @@ export function RemoveBookFromCourse(data) {
  * @param {Object} data course_id 课程ID begin_time 开始时间 end_time 截止时间 name 课节名称
  */
 export function AddCSItemToCourse(data) {
-  let params = getRequestParams('teaching-cs_item_manager-AddCSItemToCourse');
+  const params = getRequestParams('teaching-cs_item_manager-AddCSItemToCourse');
 
   return request({
     method: 'post',
@@ -95,7 +95,7 @@ export function AddCSItemToCourse(data) {
  * @param {Object} data id 课次id
  */
 export function GetCSItemInfoBox(data) {
-  let params = getRequestParams('teaching-cs_item_manager-GetCSItemInfoBox');
+  const params = getRequestParams('teaching-cs_item_manager-GetCSItemInfoBox');
 
   return request({
     method: 'post',
@@ -110,7 +110,7 @@ export function GetCSItemInfoBox(data) {
  * @param {Object} data { id 课节ID }
  */
 export function GetCSItem(data) {
-  let params = getRequestParams('teaching-cs_item_manager-GetCSItem');
+  const params = getRequestParams('teaching-cs_item_manager-GetCSItem');
 
   return request({
     method: 'post',
@@ -125,7 +125,7 @@ export function GetCSItem(data) {
  * @param {Object} data
  */
 export function UpdateCSItem(data) {
-  let params = getRequestParams('teaching-cs_item_manager-UpdateCSItem');
+  const params = getRequestParams('teaching-cs_item_manager-UpdateCSItem');
 
   return request({
     method: 'post',
@@ -140,7 +140,7 @@ export function UpdateCSItem(data) {
  * @param {Object} data id 课次ID
  */
 export function DeleteCSItem(data) {
-  let params = getRequestParams('teaching-cs_item_manager-DeleteCSItem');
+  const params = getRequestParams('teaching-cs_item_manager-DeleteCSItem');
 
   return request({
     method: 'post',
@@ -155,7 +155,7 @@ export function DeleteCSItem(data) {
  * @param {Object} data
  */
 export function AddTaskToCSItem(data) {
-  let params = getRequestParams('teaching-task_manager-AddTaskToCSItem');
+  const params = getRequestParams('teaching-task_manager-AddTaskToCSItem');
 
   return request({
     method: 'post',
@@ -170,7 +170,7 @@ export function AddTaskToCSItem(data) {
  * @param {Object} data { book_id 教材ID }
  */
 export function GetBookChapterStruct(data) {
-  let params = getRequestParams('book-book_manager-GetBookChapterStruct');
+  const params = getRequestParams('book-book_manager-GetBookChapterStruct');
 
   return request({
     method: 'post',
@@ -185,7 +185,7 @@ export function GetBookChapterStruct(data) {
  * @param data { id 节点ID }
  */
 export function GetTreeNodeInfo_BookChapterStruct(data) {
-  let params = getRequestParams('book-book_manager-GetTreeNodeInfo_BookChapterStruct');
+  const params = getRequestParams('book-book_manager-GetTreeNodeInfo_BookChapterStruct');
 
   return request({
     method: 'post',
@@ -200,7 +200,7 @@ export function GetTreeNodeInfo_BookChapterStruct(data) {
  * @param {Object} data { course_student_id 课程学员绑定ID is_audited 审核 }
  */
 export function AuditCourseStudent(data) {
-  let params = getRequestParams('teaching-course_manager-AuditCourseStudent');
+  const params = getRequestParams('teaching-course_manager-AuditCourseStudent');
 
   return request({
     method: 'post',
@@ -215,7 +215,7 @@ export function AuditCourseStudent(data) {
  * @param {Object} data { id 互动课件ID }
  */
 export function GetCoursewareContent_View(data) {
-  let params = getRequestParams('book-courseware_manager-GetCoursewareContent_View');
+  const params = getRequestParams('book-courseware_manager-GetCoursewareContent_View');
 
   return request({
     method: 'post',
@@ -230,7 +230,7 @@ export function GetCoursewareContent_View(data) {
  * @param {Object} data { id 任务 ID }
  */
 export function GetTaskInfo(data) {
-  let params = getRequestParams('teaching-task_manager-GetTaskInfo');
+  const params = getRequestParams('teaching-task_manager-GetTaskInfo');
 
   return request({
     method: 'post',
@@ -245,7 +245,7 @@ export function GetTaskInfo(data) {
  * @param {Object} data
  */
 export function UpdateTask(data) {
-  let params = getRequestParams('teaching-task_manager-UpdateTask');
+  const params = getRequestParams('teaching-task_manager-UpdateTask');
 
   return request({
     method: 'post',
@@ -260,7 +260,7 @@ export function UpdateTask(data) {
  * @param {Object} data {id 课次ID}
  */
 export function GetCourseInfoBox(data) {
-  let params = getRequestParams('cominfo_query-course_query-GetCourseInfoBox');
+  const params = getRequestParams('cominfo_query-course_query-GetCourseInfoBox');
 
   return request({
     method: 'post',
@@ -275,7 +275,7 @@ export function GetCourseInfoBox(data) {
  * @param {Object} data
  */
 export function ApplyJoinCourse(data) {
-  let params = getRequestParams('teaching-course_manager-ApplyJoinCourse');
+  const params = getRequestParams('teaching-course_manager-ApplyJoinCourse');
 
   return request({
     method: 'post',
@@ -290,7 +290,7 @@ export function ApplyJoinCourse(data) {
  * @param {Object} data
  */
 export function CheckMyGoodsBuyStatus(data) {
-  let params = getRequestParams('order-order_manager-CheckMyGoodsBuyStatus');
+  const params = getRequestParams('order-order_manager-CheckMyGoodsBuyStatus');
 
   return request({
     method: 'post',
@@ -305,7 +305,7 @@ export function CheckMyGoodsBuyStatus(data) {
  * @param {Object} data
  */
 export function ReleaseCourse(data) {
-  let params = getRequestParams('teaching-course_manager-ReleaseCourse');
+  const params = getRequestParams('teaching-course_manager-ReleaseCourse');
 
   return request({
     method: 'post',
@@ -320,7 +320,7 @@ export function ReleaseCourse(data) {
  * @param {Object} data
  */
 export function AddLearningMaterialToCSItem(data) {
-  let params = getRequestParams('teaching-cs_item_manager-AddLearningMaterialToCSItem');
+  const params = getRequestParams('teaching-cs_item_manager-AddLearningMaterialToCSItem');
 
   return request({
     method: 'post',
@@ -335,7 +335,7 @@ export function AddLearningMaterialToCSItem(data) {
  * @param {Object} data
  */
 export function DeleteLearningMaterialFromCSItem(data) {
-  let params = getRequestParams('teaching-cs_item_manager-DeleteLearningMaterialFromCSItem');
+  const params = getRequestParams('teaching-cs_item_manager-DeleteLearningMaterialFromCSItem');
 
   return request({
     method: 'post',
@@ -350,7 +350,7 @@ export function DeleteLearningMaterialFromCSItem(data) {
  * @param {Object} data
  */
 export function FillMyTaskExecuteInfo_Student(data) {
-  let params = getRequestParams('teaching-task_manager-FillMyTaskExecuteInfo_Student');
+  const params = getRequestParams('teaching-task_manager-FillMyTaskExecuteInfo_Student');
 
   return request({
     method: 'post',
@@ -365,7 +365,7 @@ export function FillMyTaskExecuteInfo_Student(data) {
  * @param {Object} data
  */
 export function FinishMyTaskMaterial_Student(data) {
-  let params = getRequestParams('teaching-task_manager-FinishMyTaskMaterial_Student');
+  const params = getRequestParams('teaching-task_manager-FinishMyTaskMaterial_Student');
 
   return request({
     method: 'post',
@@ -380,7 +380,7 @@ export function FinishMyTaskMaterial_Student(data) {
  * @param {Object} data {task_id 任务ID, student_id 学员ID}
  */
 export function GetTaskStudentExecuteInfo(data) {
-  let params = getRequestParams('teaching-task_manager-GetTaskStudentExecuteInfo');
+  const params = getRequestParams('teaching-task_manager-GetTaskStudentExecuteInfo');
 
   return request({
     method: 'post',
@@ -395,7 +395,7 @@ export function GetTaskStudentExecuteInfo(data) {
  * @param {Object} data
  */
 export function GetTaskMaterialStudentExamAnswer(data) {
-  let params = getRequestParams('teaching-task_manager-GetTaskMaterialStudentExamAnswer');
+  const params = getRequestParams('teaching-task_manager-GetTaskMaterialStudentExamAnswer');
 
   return request({
     method: 'post',
@@ -410,7 +410,7 @@ export function GetTaskMaterialStudentExamAnswer(data) {
  * @param {Object} data
  */
 export function RemarkTaskStudentExecuteInfo_Teacher(data) {
-  let params = getRequestParams('teaching-task_manager-RemarkTaskStudentExecuteInfo_Teacher');
+  const params = getRequestParams('teaching-task_manager-RemarkTaskStudentExecuteInfo_Teacher');
 
   return request({
     method: 'post',
@@ -425,7 +425,7 @@ export function RemarkTaskStudentExecuteInfo_Teacher(data) {
  * @param {Object} data
  */
 export function DeleteTask(data) {
-  let params = getRequestParams('teaching-task_manager-DeleteTask');
+  const params = getRequestParams('teaching-task_manager-DeleteTask');
 
   return request({
     method: 'post',
@@ -440,7 +440,7 @@ export function DeleteTask(data) {
  * @param {Object} data
  */
 export function DeleteCourse(data) {
-  let params = getRequestParams('teaching-course_manager-DeleteCourse');
+  const params = getRequestParams('teaching-course_manager-DeleteCourse');
 
   return request({
     method: 'post',
@@ -455,7 +455,7 @@ export function DeleteCourse(data) {
  * @param {Object} data
  */
 export function IsHasEditDestCoursePopedom(data) {
-  let params = getRequestParams('teaching-course_manager-IsHasEditDestCoursePopedom');
+  const params = getRequestParams('teaching-course_manager-IsHasEditDestCoursePopedom');
 
   return request({
     method: 'post',
@@ -470,7 +470,7 @@ export function IsHasEditDestCoursePopedom(data) {
  * @param {Object} data
  */
 export function AddMyCollection(data) {
-  let params = getRequestParams('order-collection_manager-AddMyCollection');
+  const params = getRequestParams('order-collection_manager-AddMyCollection');
 
   return request({
     method: 'post',
@@ -485,7 +485,7 @@ export function AddMyCollection(data) {
  * @param {Object} data
  */
 export function DeleteMyCollection(data) {
-  let params = getRequestParams('order-collection_manager-DeleteMyCollection');
+  const params = getRequestParams('order-collection_manager-DeleteMyCollection');
 
   return request({
     method: 'post',
@@ -500,7 +500,7 @@ export function DeleteMyCollection(data) {
  * @param {Object} data
  */
 export function CancelMyGoodsCollection(data) {
-  let params = getRequestParams('order-collection_manager-CancelMyGoodsCollection');
+  const params = getRequestParams('order-collection_manager-CancelMyGoodsCollection');
 
   return request({
     method: 'post',
@@ -515,7 +515,7 @@ export function CancelMyGoodsCollection(data) {
  * @param {Object} data
  */
 export function GetMyGoodsCollectionInfo(data) {
-  let params = getRequestParams('order-collection_manager-GetMyGoodsCollectionInfo');
+  const params = getRequestParams('order-collection_manager-GetMyGoodsCollectionInfo');
 
   return request({
     method: 'post',
@@ -530,7 +530,7 @@ export function GetMyGoodsCollectionInfo(data) {
  * @param {Object} data
  */
 export function CheckMyGoodsCollectionStatus(data) {
-  let params = getRequestParams('order-collection_manager-CheckMyGoodsCollectionStatus');
+  const params = getRequestParams('order-collection_manager-CheckMyGoodsCollectionStatus');
 
   return request({
     method: 'post',
@@ -545,7 +545,7 @@ export function CheckMyGoodsCollectionStatus(data) {
  * @param {Object} data
  */
 export function GetMaterialInfo(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetMaterialInfo');
+  const params = getRequestParams('live_room-live_room_dispatch-GetMaterialInfo');
 
   return request({
     method: 'post',
@@ -560,7 +560,7 @@ export function GetMaterialInfo(data) {
  * @param {Object} data
  */
 export function SendMessageToCourseStudent(data) {
-  let params = getRequestParams('message-message_manager-SendMessageToCourseStudent');
+  const params = getRequestParams('message-message_manager-SendMessageToCourseStudent');
 
   return request({
     method: 'post',

+ 6 - 6
src/api/list.js

@@ -4,7 +4,7 @@ import { request, getRequestParams } from '@/utils/request';
  * 得到我的机构列表
  */
 export function getMyOrgList() {
-  let params = getRequestParams('org-org_manager-GetMyOrgList');
+  const params = getRequestParams('org-org_manager-GetMyOrgList');
 
   return request({
     method: 'post',
@@ -19,7 +19,7 @@ export function getMyOrgList() {
  * @param {Object} data 查询条件
  */
 export function PageQueryBookList(data) {
-  let params = getRequestParams('book-book_manager-PageQueryBookList');
+  const params = getRequestParams('book-book_manager-PageQueryBookList');
 
   return request({
     method: 'post',
@@ -34,7 +34,7 @@ export function PageQueryBookList(data) {
  * @param {Object} data 查询条件
  */
 export function PageQueryBookList_SelectBookForCourse(data) {
-  let params = getRequestParams('cominfo_query-book_query-PageQueryBookList_SelectBookForCourse');
+  const params = getRequestParams('cominfo_query-book_query-PageQueryBookList_SelectBookForCourse');
   return request({
     method: 'post',
     url: process.env.VUE_APP_LearnWebSI,
@@ -48,7 +48,7 @@ export function PageQueryBookList_SelectBookForCourse(data) {
  * @param {Object} data
  */
 export function PageQueryOrgTeacherUserList(data) {
-  let params = getRequestParams('user_manager-PageQueryOrgTeacherUserList');
+  const params = getRequestParams('user_manager-PageQueryOrgTeacherUserList');
 
   return request({
     method: 'post',
@@ -63,7 +63,7 @@ export function PageQueryOrgTeacherUserList(data) {
  * @param {Object} data
  */
 export function PageQueryCourseStudentList(data) {
-  let params = getRequestParams('page_query-PageQueryCourseStudentList');
+  const params = getRequestParams('page_query-PageQueryCourseStudentList');
 
   return request({
     method: 'post',
@@ -78,7 +78,7 @@ export function PageQueryCourseStudentList(data) {
  * @param {Object} data
  */
 export function GetMyCourseList_TaskBelong(data) {
-  let params = getRequestParams('cominfo_query-task_query-GetMyCourseList_TaskBelong');
+  const params = getRequestParams('cominfo_query-task_query-GetMyCourseList_TaskBelong');
 
   return request({
     method: 'post',

+ 23 - 23
src/api/live.js

@@ -5,7 +5,7 @@ import { request, getRequestParams } from '@/utils/request';
  * @param data { task_id 任务ID }
  */
 export function CreateEnterLiveRoomSession(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-CreateEnterLiveRoomSession');
+  const params = getRequestParams('live_room-live_room_dispatch-CreateEnterLiveRoomSession');
 
   return request({
     method: 'post',
@@ -20,7 +20,7 @@ export function CreateEnterLiveRoomSession(data) {
  * @param { Object } data { task_id 任务ID }
  */
 export function CloseLiveRoom(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-CloseLiveRoom');
+  const params = getRequestParams('live_room-live_room_dispatch-CloseLiveRoom');
 
   return request({
     method: 'post',
@@ -35,7 +35,7 @@ export function CloseLiveRoom(data) {
  * @param {Object} data { task_id 任务ID }
  */
 export function GetLiveRoomData_DRTD(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetLiveRoomData_DRTD');
+  const params = getRequestParams('live_room-live_room_dispatch-GetLiveRoomData_DRTD');
 
   return request({
     method: 'post',
@@ -50,7 +50,7 @@ export function GetLiveRoomData_DRTD(data) {
  * @param {Object} data { task_id 任务ID, room_user_id 学员所在直播间的用户ID}
  */
 export function StudentExitLiveRoom(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-StudentExitLiveRoom');
+  const params = getRequestParams('live_room-live_room_dispatch-StudentExitLiveRoom');
 
   return request({
     method: 'post',
@@ -65,7 +65,7 @@ export function StudentExitLiveRoom(data) {
  * @param {Object} data { task_id 任务ID }
  */
 export function GetMaterialListForSendToStudent(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetMaterialListForSendToStudent');
+  const params = getRequestParams('live_room-live_room_dispatch-GetMaterialListForSendToStudent');
 
   return request({
     method: 'post',
@@ -80,7 +80,7 @@ export function GetMaterialListForSendToStudent(data) {
  * @param {Object} data
  */
 export function SendMaterial(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-SendMaterial');
+  const params = getRequestParams('live_room-live_room_dispatch-SendMaterial');
 
   return request({
     method: 'post',
@@ -95,7 +95,7 @@ export function SendMaterial(data) {
  * @param {Object} data {task_id 任务ID}
  */
 export function GetCurMaterialSent(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetCurMaterialSent');
+  const params = getRequestParams('live_room-live_room_dispatch-GetCurMaterialSent');
 
   return request({
     method: 'post',
@@ -110,7 +110,7 @@ export function GetCurMaterialSent(data) {
  * @param { Object } data
  */
 export function FinishMyMaterial(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-FinishMyMaterial');
+  const params = getRequestParams('live_room-live_room_dispatch-FinishMyMaterial');
 
   return request({
     method: 'post',
@@ -125,7 +125,7 @@ export function FinishMyMaterial(data) {
  * @param {Object} data
  */
 export function GetStudentExamAnswer_FinishMaterial(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetStudentExamAnswer_FinishMaterial');
+  const params = getRequestParams('live_room-live_room_dispatch-GetStudentExamAnswer_FinishMaterial');
 
   return request({
     method: 'post',
@@ -140,7 +140,7 @@ export function GetStudentExamAnswer_FinishMaterial(data) {
  * @param {Object} data { task_id 任务ID }
  */
 export function GetLiveRoomInfo(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetLiveRoomInfo');
+  const params = getRequestParams('live_room-live_room_dispatch-GetLiveRoomInfo');
 
   return request({
     method: 'post',
@@ -155,7 +155,7 @@ export function GetLiveRoomInfo(data) {
  * @param {Object} data
  */
 export function GetStudentList_FinishMaterial(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetStudentList_FinishMaterial');
+  const params = getRequestParams('live_room-live_room_dispatch-GetStudentList_FinishMaterial');
 
   return request({
     method: 'post',
@@ -170,7 +170,7 @@ export function GetStudentList_FinishMaterial(data) {
  * @param {Object} data {task_id 任务ID}
  */
 export function StartGroup(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-StartGroup');
+  const params = getRequestParams('live_room-live_room_dispatch-StartGroup');
 
   return request({
     method: 'post',
@@ -185,7 +185,7 @@ export function StartGroup(data) {
  * @param {Object} data {task_id 任务ID}
  */
 export function GetGroupStatus(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetGroupStatus');
+  const params = getRequestParams('live_room-live_room_dispatch-GetGroupStatus');
 
   return request({
     method: 'post',
@@ -200,7 +200,7 @@ export function GetGroupStatus(data) {
  * @param {Object} data {task_id 任务ID}
  */
 export function GetGroupInfo_Teacher(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetGroupInfo_Teacher');
+  const params = getRequestParams('live_room-live_room_dispatch-GetGroupInfo_Teacher');
 
   return request({
     method: 'post',
@@ -215,7 +215,7 @@ export function GetGroupInfo_Teacher(data) {
  * @param {Object} data {task_id 任务ID}
  */
 export function GetMyGroupInfo_Student(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetMyGroupInfo_Student');
+  const params = getRequestParams('live_room-live_room_dispatch-GetMyGroupInfo_Student');
 
   return request({
     method: 'post',
@@ -230,7 +230,7 @@ export function GetMyGroupInfo_Student(data) {
  * @param {Object} data {task_id 任务ID}
  */
 export function StopGroup(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-StopGroup');
+  const params = getRequestParams('live_room-live_room_dispatch-StopGroup');
 
   return request({
     method: 'post',
@@ -245,7 +245,7 @@ export function StopGroup(data) {
  * @param {Object} data {task_id 任务ID, group_id 小组ID}
  */
 export function JoinGroup_Teacher(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-JoinGroup_Teacher');
+  const params = getRequestParams('live_room-live_room_dispatch-JoinGroup_Teacher');
 
   return request({
     method: 'post',
@@ -260,7 +260,7 @@ export function JoinGroup_Teacher(data) {
  * @param {Object} data {task_id 任务ID}
  */
 export function ExitCurGroup_Teacher(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-ExitCurGroup_Teacher');
+  const params = getRequestParams('live_room-live_room_dispatch-ExitCurGroup_Teacher');
 
   return request({
     method: 'post',
@@ -275,7 +275,7 @@ export function ExitCurGroup_Teacher(data) {
  * @param {Object} data {task_id 任务ID}
  */
 export function GetMyGroupInfo_Teacher(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetMyGroupInfo_Teacher');
+  const params = getRequestParams('live_room-live_room_dispatch-GetMyGroupInfo_Teacher');
 
   return request({
     method: 'post',
@@ -290,7 +290,7 @@ export function GetMyGroupInfo_Teacher(data) {
  * @param {Object} data
  */
 export function DealStudentConnection(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-DealStudentConnection');
+  const params = getRequestParams('live_room-live_room_dispatch-DealStudentConnection');
 
   return request({
     method: 'post',
@@ -305,7 +305,7 @@ export function DealStudentConnection(data) {
  * @param {Object} data
  */
 export function GetStudentInfo_Connection(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-GetStudentInfo_Connection');
+  const params = getRequestParams('live_room-live_room_dispatch-GetStudentInfo_Connection');
 
   return request({
     method: 'post',
@@ -320,7 +320,7 @@ export function GetStudentInfo_Connection(data) {
  * @param {Object} data
  */
 export function SendGroupMessage(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-SendGroupMessage');
+  const params = getRequestParams('live_room-live_room_dispatch-SendGroupMessage');
 
   return request({
     method: 'post',
@@ -335,7 +335,7 @@ export function SendGroupMessage(data) {
  * @param {Object} data { task_id 任务ID task_id 小组ID}
  */
 export function SetCurGroupToExample_Teacher(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-SetCurGroupToExample_Teacher');
+  const params = getRequestParams('live_room-live_room_dispatch-SetCurGroupToExample_Teacher');
 
   return request({
     method: 'post',

+ 8 - 8
src/api/select.js

@@ -5,7 +5,7 @@ import { request, getRequestParams } from '@/utils/request';
  * 得到任务教学类型列表
  */
 export function GetTaskTeachingTypeList() {
-  let params = getRequestParams('dict_manager-GetTaskTeachingTypeList');
+  const params = getRequestParams('dict_manager-GetTaskTeachingTypeList');
 
   return request({
     type: 'post',
@@ -18,7 +18,7 @@ export function GetTaskTeachingTypeList() {
  * 得到任务模式列表
  */
 export function GetTaskModeList() {
-  let params = getRequestParams('dict_manager-GetTaskModeList');
+  const params = getRequestParams('dict_manager-GetTaskModeList');
 
   return request({
     type: 'post',
@@ -32,7 +32,7 @@ export function GetTaskModeList() {
  * @param {Object} data {course_id 课程id}
  */
 export function GetTeacherListByCourseID(data) {
-  let params = getRequestParams('teaching-course_manager-GetTeacherListByCourseID');
+  const params = getRequestParams('teaching-course_manager-GetTeacherListByCourseID');
 
   return request({
     method: 'post',
@@ -47,7 +47,7 @@ export function GetTeacherListByCourseID(data) {
  * @param {Object} data { cs_item_id 课节id }
  */
 export function GetCourseBookListByCSItemID(data) {
-  let params = getRequestParams('teaching-cs_item_manager-GetCourseBookListByCSItemID');
+  const params = getRequestParams('teaching-cs_item_manager-GetCourseBookListByCSItemID');
 
   return request({
     method: 'post',
@@ -61,7 +61,7 @@ export function GetCourseBookListByCSItemID(data) {
  * 得到完成状态列表(课程)
  */
 export function GetFinishStatusList_Course() {
-  let params = getRequestParams('dict_manager-GetFinishStatusList_Course');
+  const params = getRequestParams('dict_manager-GetFinishStatusList_Course');
 
   return request({
     method: 'post',
@@ -74,7 +74,7 @@ export function GetFinishStatusList_Course() {
  * 得到学员课程购买状态列表
  */
 export function GetStudentCourseBuyStatusList() {
-  let params = getRequestParams('dict_manager-GetStudentCourseBuyStatusList');
+  const params = getRequestParams('dict_manager-GetStudentCourseBuyStatusList');
 
   return request({
     method: 'post',
@@ -87,7 +87,7 @@ export function GetStudentCourseBuyStatusList() {
  * 得到我的授课教师列表(学员查询自己加入课程的所有授课教师)
  */
 export function GetMyJoinCourseTeacherList_Student() {
-  let params = getRequestParams('cominfo_query-course_query-GetMyJoinCourseTeacherList_Student');
+  const params = getRequestParams('cominfo_query-course_query-GetMyJoinCourseTeacherList_Student');
 
   return request({
     method: 'post',
@@ -101,7 +101,7 @@ export function GetMyJoinCourseTeacherList_Student() {
  * @param {Object} data
  */
 export function GetCourseStudentList(data) {
-  let params = getRequestParams('teaching-course_manager-GetCourseStudentList');
+  const params = getRequestParams('teaching-course_manager-GetCourseStudentList');
 
   return request({
     method: 'post',

+ 6 - 6
src/api/table.js

@@ -5,7 +5,7 @@ import { request, getRequestParams } from '@/utils/request';
  * @param {Object} data { date_stamp } 格式化后的时间 yyy-mm-dd
  */
 export function GetMyDayTaskList(data) {
-  let params = getRequestParams('cominfo_query-task_query-GetMyDayTaskList');
+  const params = getRequestParams('cominfo_query-task_query-GetMyDayTaskList');
 
   return request({
     method: 'post',
@@ -20,7 +20,7 @@ export function GetMyDayTaskList(data) {
  * @param {Object} data
  */
 export function GetMyTaskList(data) {
-  let params = getRequestParams('cominfo_query-task_query-GetMyTaskList');
+  const params = getRequestParams('cominfo_query-task_query-GetMyTaskList');
 
   return request({
     method: 'post',
@@ -35,7 +35,7 @@ export function GetMyTaskList(data) {
  * @param {Object} data finish_status 完成状态 page_capacity 每页容量 cur_page 当前页码
  */
 export function PageQueryMyCourseList(data) {
-  let params = getRequestParams('teaching-course_manager-PageQueryMyCourseList');
+  const params = getRequestParams('teaching-course_manager-PageQueryMyCourseList');
   return request({
     method: 'post',
     url: process.env.VUE_APP_LearnWebSI,
@@ -49,7 +49,7 @@ export function PageQueryMyCourseList(data) {
  * @param { Object } data
  */
 export function PageQueryMyJoinCourseList_Student(data) {
-  let params = getRequestParams('page_query-PageQueryMyJoinCourseList_Student');
+  const params = getRequestParams('page_query-PageQueryMyJoinCourseList_Student');
 
   return request({
     method: 'post',
@@ -64,7 +64,7 @@ export function PageQueryMyJoinCourseList_Student(data) {
  * @param {Object} data
  */
 export function PageQueryCourseList(data) {
-  let params = getRequestParams('page_query-PageQueryCourseList');
+  const params = getRequestParams('page_query-PageQueryCourseList');
 
   return request({
     method: 'post',
@@ -79,7 +79,7 @@ export function PageQueryCourseList(data) {
  * @param {Object} data
  */
 export function PageQueryMyMessageList(data) {
-  let params = getRequestParams('page_query-PageQueryMyMessageList');
+  const params = getRequestParams('page_query-PageQueryMyMessageList');
 
   return request({
     method: 'post',

+ 7 - 7
src/api/user.js

@@ -17,7 +17,7 @@ export function login(data) {
  * @param {Object} data { language_type 语言类型 }
  */
 export function updateLanguageType(data) {
-  let params = getRequestParams('login_control-UpdateLanguageType');
+  const params = getRequestParams('login_control-UpdateLanguageType');
 
   return request({
     method: 'post',
@@ -32,7 +32,7 @@ export function updateLanguageType(data) {
  * @param {Object} data
  */
 export function GetUserListByIDList(data) {
-  let params = getRequestParams('user_manager-GetUserListByIDList');
+  const params = getRequestParams('user_manager-GetUserListByIDList');
 
   return request({
     method: 'post',
@@ -47,7 +47,7 @@ export function GetUserListByIDList(data) {
  * @param {Object} data { id 消息ID }
  */
 export function ReadMyMessage(data) {
-  let params = getRequestParams('message-message_manager-ReadMyMessage');
+  const params = getRequestParams('message-message_manager-ReadMyMessage');
 
   return request({
     method: 'post',
@@ -61,7 +61,7 @@ export function ReadMyMessage(data) {
  * 是否存在我未阅读的消息
  */
 export function IsExistMyMessage_NotRead(data) {
-  let params = getRequestParams('message-message_manager-IsExistMyMessage_NotRead');
+  const params = getRequestParams('message-message_manager-IsExistMyMessage_NotRead');
 
   return request({
     method: 'post',
@@ -76,7 +76,7 @@ export function IsExistMyMessage_NotRead(data) {
  * @param {Object} month_stamp 月份
  */
 export function GetMyTaskDailyDistribution(data) {
-  let params = getRequestParams('cominfo_query-task_query-GetMyTaskDailyDistribution');
+  const params = getRequestParams('cominfo_query-task_query-GetMyTaskDailyDistribution');
 
   return request({
     method: 'post',
@@ -91,7 +91,7 @@ export function GetMyTaskDailyDistribution(data) {
  * @param {Object} data
  */
 export function GetMyBookBuyStatus_CurTaskCoursewareBook(data) {
-  let params = getRequestParams('teaching-task_manager-GetMyBookBuyStatus_CurTaskCoursewareBook');
+  const params = getRequestParams('teaching-task_manager-GetMyBookBuyStatus_CurTaskCoursewareBook');
 
   return request({
     method: 'post',
@@ -106,7 +106,7 @@ export function GetMyBookBuyStatus_CurTaskCoursewareBook(data) {
  * @param { Object } data
  */
 export function GetMyGoodsBuyInfo(data) {
-  let params = getRequestParams('order-order_manager-GetMyGoodsBuyInfo');
+  const params = getRequestParams('order-order_manager-GetMyGoodsBuyInfo');
 
   return request({
     method: 'post',

+ 1 - 6
src/common/show_file/index.vue

@@ -88,11 +88,6 @@ export default {
       }
     }
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key322', 'Key246', 'Key323']
-    });
-  },
   methods: {
     getFileStoreInfo() {
       GetFileStoreInfo({ file_id: this.fileId }).then(({ file_url_https, file_relative_path }) => {
@@ -112,7 +107,7 @@ export default {
     },
 
     getNumPages(url) {
-      let loadingTask = pdf.createLoadingTask(`${process.env.VUE_APP_PDF}${url}`);
+      const loadingTask = pdf.createLoadingTask(`${process.env.VUE_APP_PDF}${url}`);
       loadingTask.promise
         .then(pdf => {
           this.pdfSrc = loadingTask;

+ 0 - 5
src/components/StepBar.vue

@@ -36,11 +36,6 @@ export default {
       ]
     };
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key264', 'Key275', 'Key265', 'Key282', 'Key263', 'Key623']
-    });
-  },
   methods: {
     stepName(num) {
       if (num === this.stepNumber) return this.$i18n.t('Key282');

+ 0 - 5
src/components/course/CompletionView.vue

@@ -131,11 +131,6 @@ export default {
       });
     }
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key320', 'Key321', 'Key194', 'Key195']
-    });
-  },
   methods: {
     getTaskMaterialStudentExamAnswer() {
       return GetTaskMaterialStudentExamAnswer({

+ 0 - 5
src/components/course/FinishCourseware.vue

@@ -125,11 +125,6 @@ export default {
       });
     }
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key332', 'Key82', 'Key333', 'Key334']
-    });
-  },
   methods: {
     saveNPCAnswer(content, duration) {
       const loading = this.$loading();

+ 14 - 31
src/components/live/CurMaterial.vue

@@ -212,23 +212,6 @@ export default {
   created() {
     this.uploadBookWriteParent();
     this.getCurMaterialSent();
-
-    this.updateWordPack({
-      word_key_list: [
-        'Key274',
-        'Key309',
-        'Key244',
-        'Key320',
-        'Key321',
-        'Key194',
-        'Key195',
-        'Key82',
-        'Key333',
-        'Key323',
-        'Key623',
-        'Key637'
-      ]
-    });
   },
   beforeDestroy() {
     clearInterval(this.timer);
@@ -330,7 +313,7 @@ export default {
       GetFileStoreInfo({ file_id: this.material_id }).then(({ file_relative_path, file_url_https }) => {
         this.file_relative_path = file_relative_path;
         this.file_url_https = file_url_https;
-        let fileType = file_url_https.slice(file_url_https.lastIndexOf('.') + 1, file_url_https.length);
+        const fileType = file_url_https.slice(file_url_https.lastIndexOf('.') + 1, file_url_https.length);
         if (fileType === 'pdf') {
           this.getNumPages(file_relative_path);
         }
@@ -345,7 +328,7 @@ export default {
     },
 
     getStudentExamAnswer_FinishMaterial() {
-      let student_id = this.$store.state.user.user_code;
+      const student_id = this.$store.state.user.user_code;
       GetStudentExamAnswer_FinishMaterial({
         task_id: this.taskId,
         material_id: this.material_id,
@@ -365,7 +348,7 @@ export default {
     },
 
     getNumPages(url) {
-      let loadingTask = pdf.createLoadingTask(`${process.env.VUE_APP_PDF}${url}`);
+      const loadingTask = pdf.createLoadingTask(`${process.env.VUE_APP_PDF}${url}`);
       loadingTask.promise
         .then(pdf => {
           this.pdfSrc = loadingTask;
@@ -434,20 +417,20 @@ export default {
     // 上传文件
     uploadBookWriteParent() {
       const { token, isHas } = getToken();
-      let UserCode = isHas ? token.user_code : '';
-      let UserType = isHas ? token.user_type : '';
-      let SessionID = isHas ? token.session_id : '';
+      const UserCode = isHas ? token.user_code : '';
+      const UserType = isHas ? token.user_type : '';
+      const SessionID = isHas ? token.session_id : '';
       this.bookuploadUrl = `${process.env.VUE_APP_BASE_API}/GCLSFileServer/WebFileUpload?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}&SecurityLevel=Mid`;
     },
 
     // 下载文件zip
     downloadBookWriteParent(idList) {
-      let MethodName = 'file_store_manager-StartCreateFileCompressPack';
-      let data = {
+      const MethodName = 'file_store_manager-StartCreateFileCompressPack';
+      const data = {
         file_id_list: JSON.parse(idList)
       };
       getContentFile(MethodName, data).then(res => {
-        let id = res.file_compress_task_id;
+        const id = res.file_compress_task_id;
         this.bookDownTimer = setInterval(() => {
           this.checkTaskProgress(id);
         }, 2000);
@@ -457,12 +440,12 @@ export default {
     // 成功后调用打包进度
     checkTaskProgress(taskId) {
       const { token, isHas } = getToken();
-      let UserCode = isHas ? token.user_code : '';
-      let UserType = isHas ? token.user_type : '';
-      let SessionID = isHas ? token.session_id : '';
+      const UserCode = isHas ? token.user_code : '';
+      const UserType = isHas ? token.user_type : '';
+      const SessionID = isHas ? token.session_id : '';
 
-      let MethodName = 'file_store_manager-GetFileCompressTaskProgress';
-      let data = {
+      const MethodName = 'file_store_manager-GetFileCompressTaskProgress';
+      const data = {
         file_compress_task_id: taskId
       };
       getContentFile(MethodName, data).then(res => {

+ 0 - 5
src/components/live/SelectMaterial.vue

@@ -53,11 +53,6 @@ export default {
       }
     }
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key439', 'Key440']
-    });
-  },
   methods: {
     getMaterialListForSendToStudent() {
       GetMaterialListForSendToStudent({ task_id: this.taskId }).then(({ material_list }) => {

+ 1 - 18
src/components/payment/Audit.vue

@@ -67,7 +67,7 @@ import { ApplyJoinCourse } from '@/api/course';
 export default {
   filters: {
     priceFormat(val) {
-      let price = String(val);
+      const price = String(val);
       if (price.includes('.')) {
         const list = price.split('.');
         return `${list[0]}.${list[1].length <= 1 ? `${list[1]}0` : list[1]}`;
@@ -99,23 +99,6 @@ export default {
       receivables_money: this.data.price // 应收款
     };
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: [
-        'Key53',
-        'Key54',
-        'Key55',
-        'Key56',
-        'Key57',
-        'Key94',
-        'Key629',
-        'Key630',
-        'Key8',
-        'Key65',
-        'Key631'
-      ]
-    });
-  },
   // 方法集合
   methods: {
     // 提交申请

+ 0 - 3
src/components/select/SelectCourse.vue

@@ -91,9 +91,6 @@ export default {
   },
   created() {
     this.getCourseBookListByCSItemID();
-    this.updateWordPack({
-      word_key_list: ['Key383', 'Key373', 'Key94', 'Key83']
-    });
   },
   methods: {
     dialogClose() {

+ 1 - 4
src/components/select/SelectTeacher.vue

@@ -78,13 +78,10 @@ export default {
   },
   created() {
     this.getTeacherUserList();
-    this.updateWordPack({
-      word_key_list: ['Key344', 'Key25', 'Key27', 'Key131', 'Key191', 'Key204', 'Key94', 'Key83']
-    });
   },
   methods: {
     getTeacherUserList() {
-      let data = {
+      const data = {
         org_id: this.orgId,
         user_name: this.searchForm.user_name,
         user_real_name: this.searchForm.user_real_name,

+ 0 - 3
src/components/select/SelectTemplate.vue

@@ -82,9 +82,6 @@ export default {
   },
   created() {
     this.queryCourseList();
-    this.updateWordPack({
-      word_key_list: ['Key288', 'Key339', 'Key131', 'Key191', 'Key250', 'Key83', 'Key94', 'Key340']
-    });
   },
   methods: {
     queryCourseList() {

+ 0 - 3
src/layouts/components/LayoutHeader.vue

@@ -84,9 +84,6 @@ export default {
   },
   created() {
     this.getChildSysList();
-    this.updateWordPack({
-      word_key_list: ['Key2', 'Key8', 'Key9', 'Key39', 'Key573']
-    });
     const { token, isHas } = getToken();
     if (isHas) {
       this.userMessage = token;

+ 1 - 0
src/locales/lang/AR.js

@@ -1,4 +1,5 @@
 // 阿拉伯语
+/* eslint-disable max-len */
 import arLocal from 'element-ui/lib/locale/lang/ar';
 
 export default {

+ 1 - 0
src/locales/lang/DE.js

@@ -1,4 +1,5 @@
 // 德语
+/* eslint-disable max-len */
 import deLocal from 'element-ui/lib/locale/lang/de';
 
 export default {

+ 1 - 0
src/locales/lang/EN.js

@@ -1,4 +1,5 @@
 // 英文
+/* eslint-disable max-len */
 import enLocal from 'element-ui/lib/locale/lang/en';
 
 export default {

+ 1 - 0
src/locales/lang/ES.js

@@ -1,4 +1,5 @@
 // 西班牙语
+/* eslint-disable max-len */
 import esLocal from 'element-ui/lib/locale/lang/es';
 
 export default {

+ 1 - 0
src/locales/lang/FR.js

@@ -1,4 +1,5 @@
 // 法语
+/* eslint-disable max-len */
 import frLocal from 'element-ui/lib/locale/lang/fr';
 
 export default {

+ 2 - 0
src/locales/lang/HI.js

@@ -1,4 +1,6 @@
 // 印地语
+/* eslint-disable max-len */
+
 export default {
   Key0: 'वैश्विक चीनी भाषा शिक्षण प्लेटफार्म में आपका स्वागत है!',
   Key1: 'आप यहां दी जाने वाली अनोखा शिक्षण संसाधनों और उन्नत शिक्षण तरीकों के साथ चाहे आप शिक्षक हों या छात्र चीनी सीख सकते हैं!',

+ 1 - 0
src/locales/lang/RU.js

@@ -1,4 +1,5 @@
 // 俄语
+/* eslint-disable max-len */
 import ruLocal from 'element-ui/lib/locale/lang/ru-RU';
 
 export default {

+ 1 - 0
src/locales/lang/TH.js

@@ -1,4 +1,5 @@
 // 泰语
+/* eslint-disable max-len */
 import thLocal from 'element-ui/lib/locale/lang/th';
 
 export default {

+ 0 - 3
src/main.js

@@ -31,7 +31,6 @@ import '@/icons';
 import '@/styles/index.scss'; // global css
 import 'normalize.css/normalize.css';
 
-import mixin from '@/utils/mixin';
 import '@/permission'; // 权限控制
 
 Vue.use(ElementUI);
@@ -41,8 +40,6 @@ Vue.use(BookUI);
 Vue.use(VideoPlayer);
 Vue.use(VueDND);
 
-Vue.mixin(mixin);
-
 Vue.config.productionTip = false;
 
 new Vue({

+ 2 - 2
src/settings.js

@@ -1,9 +1,9 @@
 const Cookies = require('js-cookie');
 
 let title = '';
-let config = Cookies.get('GCLS_Config');
+const config = Cookies.get('GCLS_Config');
 if (config) {
-  let configObj = JSON.parse(config);
+  const configObj = JSON.parse(config);
   title = configObj.title;
 }
 

+ 1 - 1
src/utils/auth.js

@@ -4,7 +4,7 @@ const TokenKey = 'GCLS_Token';
 const ConfigKey = 'GCLS_Config';
 
 export function getSessionID() {
-  let token = Cookies.get(TokenKey);
+  const token = Cookies.get(TokenKey);
   if (token) {
     return JSON.parse(token)['session_id'];
   }

+ 0 - 62
src/utils/i18n.js

@@ -1,62 +0,0 @@
-import Vue from 'vue';
-import VueI18n from 'vue-i18n';
-import store from '@/store';
-import { GetWordPack } from '@/api/app';
-
-import ElementLocale from 'element-ui/lib/locale';
-import zhLocal from 'element-ui/lib/locale/lang/zh-CN';
-import arLocal from 'element-ui/lib/locale/lang/ar';
-import enLocal from 'element-ui/lib/locale/lang/en';
-import jaLocal from 'element-ui/lib/locale/lang/ja';
-import deLocal from 'element-ui/lib/locale/lang/de';
-import ruLocal from 'element-ui/lib/locale/lang/ru-RU';
-
-Vue.use(VueI18n);
-
-const i18n = new VueI18n({
-  locale: store.getters.language_type,
-  messages: {
-    ZH: {
-      ...zhLocal
-    },
-    AR: {
-      ...arLocal
-    },
-    EN: {
-      ...enLocal
-    },
-    JA: {
-      ...jaLocal
-    },
-    DE: {
-      ...deLocal
-    },
-    RU: {
-      ...ruLocal
-    }
-  },
-  silentTranslationWarn: true
-});
-
-ElementLocale.i18n((key, value) => i18n.t(key, value));
-
-export async function setI18nLang(language_type) {
-  await store.dispatch('user/updateLanguageType', language_type);
-}
-
-/**
- * @description 更新语言列表
- * @param {Object} Parameter word_key_list 需要读取的词汇
- */
-export function updateWordPack(Parameter) {
-  Parameter.language_type = i18n.locale;
-
-  GetWordPack(Parameter).then(({ language_type, word_pack }) => {
-    let localWord = i18n.messages[language_type];
-    if (localWord === undefined) localWord = {};
-    i18n.setLocaleMessage(language_type, Object.assign(localWord, word_pack));
-    // localStorage.setItem('i18n-message', JSON.stringify(i18n.messages));
-  });
-}
-
-export default i18n;

+ 0 - 12
src/utils/mixin.js

@@ -1,12 +0,0 @@
-import { updateWordPack } from '@/utils/i18n';
-
-/**
- * 全局混入
- */
-export default {
-  methods: {
-    updateWordPack(Parameter) {
-      updateWordPack(Parameter);
-    }
-  }
-};

+ 1 - 1
src/utils/validate.js

@@ -31,7 +31,7 @@ export function twoDecimal(value) {
  * @param {String} fileName
  */
 export function isAllowFileType(fileName) {
-  let suffix = fileName.slice(fileName.lastIndexOf('.') + 1, fileName.length).toLowerCase();
+  const suffix = fileName.slice(fileName.lastIndexOf('.') + 1, fileName.length).toLowerCase();
   return ['mp3', 'mp4', 'doc', 'docx', 'pdf', 'ppt', 'pptx', 'xls', 'xlsx', 'jpg', 'gif', 'png', 'txt', 'rtf'].includes(
     suffix
   );

+ 8 - 37
src/views/course_details/index.vue

@@ -264,7 +264,7 @@ export default {
     Audit
   },
   data() {
-    let query = this.$route.query;
+    const query = this.$route.query;
 
     return {
       goods_id: query.goods_id,
@@ -306,35 +306,6 @@ export default {
       .catch(() => {
         this.loading = false;
       });
-    this.updateWordPack({
-      word_key_list: [
-        'Key48',
-        'Key51',
-        'Key72',
-        'Key73',
-        'Key386',
-        'Key387',
-        'Key388',
-        'Key321',
-        'Key389',
-        'Key390',
-        'Key391',
-        'Key49',
-        'Key343',
-        'Key392',
-        'Key353',
-        'Key354',
-        'Key355',
-        'Key393',
-        'Key309',
-        'Key52',
-        'Key395',
-        'Key396',
-        'Key397',
-        'Key389',
-        'Key394'
-      ]
-    });
   },
   mounted() {
     this.$parent.$refs.header.changeLoginNavIndex(this.invok_module);
@@ -367,7 +338,7 @@ export default {
 
     // 处理价格
     changePrice(type, item) {
-      let str = String(item);
+      const str = String(item);
       if (type === '1') {
         return str.includes('.') ? str.split('.')[0] : str;
       }
@@ -428,8 +399,8 @@ export default {
     },
     // 获取当前时间到指定时间的倒计时
     getBackTime() {
-      let date = new Date(this.CourseData.end_date);
-      let targetTime = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59).getTime();
+      const date = new Date(this.CourseData.end_date);
+      const targetTime = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59).getTime();
       // 目标时间戳 - 当前时间戳 = 倒计时
       this.timer = setInterval(() => {
         let backTime = targetTime - new Date().getTime();
@@ -444,10 +415,10 @@ export default {
     },
     // 倒计时时间戳转换为 天 小时 分钟 秒
     formatduring(mss) {
-      let days = parseInt(mss / (1000 * 60 * 60 * 24));
-      let hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
-      let minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
-      let seconds = parseInt((mss % (1000 * 60)) / 1000);
+      const days = parseInt(mss / (1000 * 60 * 60 * 24));
+      const hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
+      const minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
+      const seconds = parseInt((mss % (1000 * 60)) / 1000);
       // 如果到时间了返回false  关闭购买通道  无法购买
       if (days <= 0 && hours <= 0 && minutes <= 0 && seconds <= 0) {
         return false;

+ 1 - 6
src/views/live/SelectDevice.vue

@@ -77,17 +77,12 @@ export default {
   watch: {
     dialogVisibleDevice(newValue) {
       if (newValue) {
-        let device = this.$store.state.app.liveDevice;
+        const device = this.$store.state.app.liveDevice;
         this.video = this.device.video.length === 0 ? '' : this.selectValue(this.device.video, device.video);
         this.audio = this.device.audio.length === 0 ? '' : this.selectValue(this.device.audio, device.audio);
       }
     }
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key398', 'Key74', 'Key399', 'Key400', 'Key401', 'Key82']
-    });
-  },
   methods: {
     selectValue(arr, value) {
       return arr.some(item => item.deviceId === value) ? value : arr[0].deviceId;

+ 10 - 9
src/views/live/common.js

@@ -1,10 +1,11 @@
 import store from '@/store';
 import { Message } from 'element-ui';
-import i18n from '@/utils/i18n';
+import i18n from '@/locales/i18n';
 
 /**
  * WebSDK 实例化对象
  */
+/* eslint-disable-next-line init-declarations */
 export let rtc;
 
 /**
@@ -75,9 +76,9 @@ export function publishStream(streamName) {
  * 得到创建本地流参数对象
  */
 export function createData() {
-  let device = store.state.app.liveDevice;
-  let video = device.video.length > 0 ? { device: 'camera', resolution: 'sif', deviceId: device.video } : false;
-  let audio = device.audio.length > 0 ? { deviceId: device.audio } : false;
+  const device = store.state.app.liveDevice;
+  const video = device.video.length > 0 ? { device: 'camera', resolution: 'sif', deviceId: device.video } : false;
+  const audio = device.audio.length > 0 ? { deviceId: device.audio } : false;
 
   return {
     video,
@@ -224,7 +225,7 @@ export function drawChange(action, value) {
 }
 
 export function createScript(url) {
-  let script = document.createElement('script');
+  const script = document.createElement('script');
   script.type = 'text/javascript';
   script.src = url;
   document.getElementsByTagName('body')[0].appendChild(script);
@@ -232,7 +233,7 @@ export function createScript(url) {
 }
 
 function createLink(url) {
-  let link = document.createElement('link');
+  const link = document.createElement('link');
   link.rel = 'stylesheet';
   link.href = url;
   document.getElementsByTagName('body')[0].appendChild(link);
@@ -246,7 +247,7 @@ export function downloadWebSDK(vue) {
   };
 
   createScript('https://class.csslcloud.net/sdk/websdk/hdRtc-6.7.2.js').onload = () => {
-    let scriptArray = [
+    const scriptArray = [
       'https://class.csslcloud.net/static/dist/js/classMode.js',
       'https://class.csslcloud.net/static/dist/js/classUpdateChat.js',
       'https://image.csslcloud.net/js/dpc.js',
@@ -262,8 +263,8 @@ export function downloadWebSDK(vue) {
 
 // 聊天列表滚动
 export function chatRoll(vue, isGroup = true) {
-  let chat = vue.$refs.chat;
-  let isBottom = chat.scrollTop >= chat.scrollHeight - (isGroup ? 170 : 310);
+  const chat = vue.$refs.chat;
+  const isBottom = chat.scrollTop >= chat.scrollHeight - (isGroup ? 170 : 310);
   vue.$nextTick(() => {
     if (isBottom) {
       chat.scrollTop = chat.scrollHeight;

+ 5 - 5
src/views/live/student/audit.js

@@ -1,7 +1,7 @@
 import { Message } from 'element-ui';
 import { rtc, getHistory } from '@/views/live/common';
 export { initSDK, sendMsg, getLiveStat, createScript, downloadWebSDK, handsDown, chatRoll } from '@/views/live/common';
-import i18n from '@/utils/i18n';
+import i18n from '@/locales/i18n';
 
 /**
  * 取消订阅远程流
@@ -44,7 +44,7 @@ export function initListener(vue) {
 
     getHistory({
       success(data) {
-        let chatLog = data.datas.meta.chatLog.map(({ content, userName }) => {
+        const chatLog = data.datas.meta.chatLog.map(({ content, userName }) => {
           return { msg: content, username: userName };
         });
         vue.chatList = chatLog;
@@ -71,7 +71,7 @@ export function initListener(vue) {
         tryStream: stream,
         success: stream => {
           // 订阅流成功
-          let streamType = stream.streamType();
+          const streamType = stream.streamType();
           console.log('订阅流成功', streamType);
           if (streamType === 10) {
             vue.streamList.push(stream);
@@ -142,7 +142,7 @@ export function initListener(vue) {
     if (stream.streamType() === 0) {
       vue.is_teacher_in_group = false;
     }
-    let num = vue.streamList.findIndex(el => el.id() === stream.id());
+    const num = vue.streamList.findIndex(el => el.id() === stream.id());
     if (num !== -1) {
       vue.streamList.splice(num, 1);
     }
@@ -172,7 +172,7 @@ export function initListener(vue) {
    * 监听聊天事件
    */
   rtc.on('chat_message', data => {
-    let dat = JSON.parse(data);
+    const dat = JSON.parse(data);
     // 如果返回消息中有 isFilterChat 字段(消息不包含敏感词返回数据中无isFilterChat字段),且isFilterChat的值为1,则说明该消息包含敏感字,除发送者外其他人不会收到这条消息。
     if (dat.isFilterChat && dat.isFilterChat === 1) {
       return;

+ 8 - 25
src/views/live/student/audit.vue

@@ -201,7 +201,7 @@ export default {
       }
     },
     streamList(newVal) {
-      let list = this.student_list.filter(item => {
+      const list = this.student_list.filter(item => {
         if (item.is_self === 'false') {
           let isNoStream = true;
           for (let i = 0; i < newVal.length; i++) {
@@ -227,23 +227,6 @@ export default {
   created() {
     this.getLiveRoomInfo();
     this.getMyGroupInfo_Student();
-
-    this.updateWordPack({
-      word_key_list: [
-        'Key94',
-        'Key459',
-        'Key409',
-        'Key410',
-        'Key302',
-        'Key460',
-        'Key458',
-        'Key441',
-        'Key442',
-        'Key443',
-        'Key456',
-        'Key457'
-      ]
-    });
   },
   mounted() {
     this.getGroupStatus();
@@ -350,27 +333,27 @@ export default {
     },
 
     searchStudentName(id) {
-      let uid = id.split('-')[0];
+      const uid = id.split('-')[0];
       if (uid) {
-        let student = this.student_list.find(item => item.room_user_id === uid);
+        const student = this.student_list.find(item => item.room_user_id === uid);
         return student ? student.student_name : '';
       }
       return '';
     },
 
     isMobile(id) {
-      let uid = id.split('-')[0];
+      const uid = id.split('-')[0];
       if (uid) {
-        let student = this.student_list.find(item => item.room_user_id === uid);
+        const student = this.student_list.find(item => item.room_user_id === uid);
         return student ? student.is_mobile === 'true' : false;
       }
       return false;
     },
 
     listMove(direction) {
-      let w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
+      const w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
       if (w > 60) {
-        let left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
+        const left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
         let width = direction === 'right' ? left - 60 : left + 60;
         if (Math.abs(width) > w) width = -w;
         this.marginLeft = width > 0 ? 0 : width;
@@ -382,7 +365,7 @@ export default {
         task_id: this.task_id
       }).then(({ live_room_sys_user_id, room_id, student_list, audience_list }) => {
         console.log(audience_list);
-        let data = audience_list.find(el => el.is_self === 'true');
+        const data = audience_list.find(el => el.is_self === 'true');
         this.session_id = data.session_id;
         this.room_user_id = data.room_user_id;
         this.live_room_sys_user_id = live_room_sys_user_id;

+ 5 - 5
src/views/live/student/group.js

@@ -14,7 +14,7 @@ export {
   pauseVideo,
   playVideo
 } from '@/views/live/common';
-import i18n from '@/utils/i18n';
+import i18n from '@/locales/i18n';
 
 /**
  * 取消订阅远程流
@@ -82,7 +82,7 @@ export function initListener(vue) {
 
     getHistory({
       success(data) {
-        let chatLog = data.datas.meta.chatLog.map(({ content, userName }) => {
+        const chatLog = data.datas.meta.chatLog.map(({ content, userName }) => {
           return { msg: content, username: userName };
         });
         vue.chatList = chatLog;
@@ -124,7 +124,7 @@ export function initListener(vue) {
         tryStream: stream,
         success: stream => {
           // 订阅流成功
-          let streamType = stream.streamType();
+          const streamType = stream.streamType();
           console.log('订阅流成功', streamType);
           if (streamType === 10) {
             vue.streamList.push(stream);
@@ -209,7 +209,7 @@ export function initListener(vue) {
     if (stream.streamType() === 0) {
       vue.is_teacher_in_group = false;
     }
-    let num = vue.streamList.findIndex(el => el.id() === stream.id());
+    const num = vue.streamList.findIndex(el => el.id() === stream.id());
     if (num !== -1) {
       vue.streamList.splice(num, 1);
     }
@@ -247,7 +247,7 @@ export function initListener(vue) {
    * 监听聊天事件
    */
   rtc.on('chat_message', data => {
-    let dat = JSON.parse(data);
+    const dat = JSON.parse(data);
     // 敏感词过滤:如果发送的聊天消息被系统判定包含敏感词,则只有发送者能收到本条消息,房间内其他人都不会收到这条聊天消息。
     // 如果返回消息中有 isFilterChat 字段(消息不包含敏感词返回数据中无isFilterChat字段),且isFilterChat的值为1,则说明该消息包含敏感字,除发送者外其他人不会收到这条消息。
     if (dat.isFilterChat && dat.isFilterChat === 1) {

+ 8 - 31
src/views/live/student/group.vue

@@ -212,7 +212,7 @@ export default {
       }
     },
     streamList(newVal) {
-      let list = this.student_list.filter(item => {
+      const list = this.student_list.filter(item => {
         if (item.is_self === 'false') {
           let isNoStream = true;
           for (let i = 0; i < newVal.length; i++) {
@@ -238,29 +238,6 @@ export default {
   created() {
     this.getLiveRoomInfo();
     this.getMyGroupInfo_Student();
-
-    this.updateWordPack({
-      word_key_list: [
-        'Key94',
-        'Key409',
-        'Key410',
-        'Key302',
-        'Key460',
-        'Key399',
-        'Key401',
-        'Key433',
-        'Key434',
-        'Key435',
-        'Key436',
-        'Key458',
-        'Key441',
-        'Key442',
-        'Key443',
-        'Key403',
-        'Key456',
-        'Key457'
-      ]
-    });
   },
   mounted() {
     this.getGroupStatus();
@@ -442,27 +419,27 @@ export default {
     },
 
     searchStudentName(id) {
-      let uid = id.split('-')[0];
+      const uid = id.split('-')[0];
       if (uid) {
-        let student = this.student_list.find(item => item.room_user_id === uid);
+        const student = this.student_list.find(item => item.room_user_id === uid);
         return student ? student.student_name : '';
       }
       return '';
     },
 
     isMobile(id) {
-      let uid = id.split('-')[0];
+      const uid = id.split('-')[0];
       if (uid) {
-        let student = this.student_list.find(item => item.room_user_id === uid);
+        const student = this.student_list.find(item => item.room_user_id === uid);
         return student ? student.is_mobile === 'true' : false;
       }
       return false;
     },
 
     listMove(direction) {
-      let w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
+      const w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
       if (w > 60) {
-        let left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
+        const left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
         let width = direction === 'right' ? left - 60 : left + 60;
         if (Math.abs(width) > w) width = -w;
         this.marginLeft = width > 0 ? 0 : width;
@@ -473,7 +450,7 @@ export default {
       GetMyGroupInfo_Student({
         task_id: this.task_id
       }).then(({ live_room_sys_user_id, room_id, student_list, audience_list }) => {
-        let data = student_list.find(el => el.is_self === 'true');
+        const data = student_list.find(el => el.is_self === 'true');
         this.session_id = data.session_id;
         this.room_user_id = data.room_user_id;
         this.live_room_sys_user_id = live_room_sys_user_id;

+ 1 - 29
src/views/live/student/index.vue

@@ -327,34 +327,6 @@ export default {
           });
       }
     });
-
-    this.updateWordPack({
-      word_key_list: [
-        'Key459',
-        'Key398',
-        'Key461',
-        'Key422',
-        'Key409',
-        'Key410',
-        'Key302',
-        'Key296',
-        'Key425',
-        'Key431',
-        'Key441',
-        'Key442',
-        'Key445',
-        'Key446',
-        'Key403',
-        'Key456',
-        'Key640',
-        'Key633',
-        'Key632',
-        'Key641',
-        'Key642',
-        'Key643',
-        'Key644'
-      ]
-    });
   },
   mounted() {
     this.getLiveRoomData_DRTDPolling();
@@ -471,7 +443,7 @@ export default {
     },
 
     inviteAccept() {
-      let device = this.$store.state.app.liveDevice;
+      const device = this.$store.state.app.liveDevice;
       if (
         (this.roomInfo.video_mode === 1 && device.video.length === 0) ||
         (this.roomInfo.video_mode === 2 && device.audio.length === 0)

+ 13 - 13
src/views/live/student/live.js

@@ -13,7 +13,7 @@ export {
   updateMcResult,
   sendPublishMessage
 } from '@/views/live/common';
-import i18n from '@/utils/i18n';
+import i18n from '@/locales/i18n';
 
 // 连麦
 
@@ -81,7 +81,7 @@ export function initListener(vue) {
 
     getHistory({
       success(data) {
-        let chatLog = data.datas.meta.chatLog.map(({ content, userName }) => {
+        const chatLog = data.datas.meta.chatLog.map(({ content, userName }) => {
           return { msg: content, username: userName };
         });
         vue.chatList = chatLog;
@@ -94,11 +94,11 @@ export function initListener(vue) {
     getDevice({
       success(data) {
         console.log('获取音视频设备成功', data);
-        let device = store.state.app.liveDevice;
+        const device = store.state.app.liveDevice;
         vue.device = data;
 
-        let isVideo = device.video.length > 0 && data.video.some(item => item.deviceId === device.video);
-        let isAudio = device.audio.length > 0 && data.audio.some(item => item.deviceId === device.audio);
+        const isVideo = device.video.length > 0 && data.video.some(item => item.deviceId === device.video);
+        const isAudio = device.audio.length > 0 && data.audio.some(item => item.deviceId === device.audio);
 
         if (!isVideo && !isAudio) {
           vue.setDevice();
@@ -133,9 +133,9 @@ export function initListener(vue) {
         tryStream,
         success(stream) {
           // 订阅流成功
-          let streamType = stream.streamType();
+          const streamType = stream.streamType();
           console.log('订阅流成功', streamType);
-          let id = streamType === 0 ? 'live' : 'student';
+          const id = streamType === 0 ? 'live' : 'student';
           stream.show(id, 'contain'); // 将流显示到指定 id 的盒子中
           if (streamType === 1 || streamType === 10) {
             vue.remoteStreamType = streamType;
@@ -197,7 +197,7 @@ export function initListener(vue) {
 
   rtc.on('switch_settings', data => {
     console.log('房间设置事件', JSON.parse(data)); // 房间设置事件
-    let { changed, settings } = JSON.parse(data);
+    const { changed, settings } = JSON.parse(data);
     if (changed.includes('allow_chat')) {
       vue.roomData.allow_chat = settings.allow_chat;
     }
@@ -231,7 +231,7 @@ export function initListener(vue) {
   // 监听通知移除流事件
   rtc.on('stream_removed', stream => {
     console.log('监听通知移除流事件', stream);
-    let streamType = stream.streamType();
+    const streamType = stream.streamType();
     if (streamType === 10 || streamType === 1) {
       vue.connect = false;
       vue.remoteStreamType = -1;
@@ -274,9 +274,9 @@ export function initListener(vue) {
     GetLiveRoomInfo({ task_id: vue.task_id }).then(({ video_mode }) => {
       console.log('创建本地流推流');
       vue.roomInfo.video_mode = video_mode;
-      let device = store.state.app.liveDevice;
-      let video = device.video.length > 0 ? { device: 'camera', resolution: 'sif', deviceId: device.video } : false;
-      let audio = device.audio.length > 0 ? { deviceId: device.audio } : false;
+      const device = store.state.app.liveDevice;
+      const video = device.video.length > 0 ? { device: 'camera', resolution: 'sif', deviceId: device.video } : false;
+      const audio = device.audio.length > 0 ? { deviceId: device.audio } : false;
 
       const createData = {
         video: video_mode === 1 ? video : false,
@@ -310,7 +310,7 @@ export function initListener(vue) {
    * 监听聊天事件
    */
   rtc.on('chat_message', data => {
-    let dat = JSON.parse(data);
+    const dat = JSON.parse(data);
     // 敏感词过滤:如果发送的聊天消息被系统判定包含敏感词,则只有发送者能收到本条消息,房间内其他人都不会收到这条聊天消息。
     // 如果返回消息中有 isFilterChat 字段(消息不包含敏感词返回数据中无isFilterChat字段),且isFilterChat的值为1,则说明该消息包含敏感字,除发送者外其他人不会收到这条消息。
     if (dat.isFilterChat && dat.isFilterChat === 1) {

+ 5 - 10
src/views/live/teacher/CompleteList.vue

@@ -220,11 +220,6 @@ export default {
       }
     }
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key274', 'Key309', 'Key244', 'Key320', 'Key321', 'Key194', 'Key195']
-    });
-  },
   methods: {
     getCurMaterialSent() {
       GetCurMaterialSent({ task_id: this.taskId }).then(
@@ -306,7 +301,7 @@ export default {
       GetFileStoreInfo({ file_id: this.material_id }).then(({ file_relative_path, file_url_https }) => {
         this.file_relative_path = file_relative_path;
         this.file_url_https = file_url_https;
-        let fileType = file_url_https.slice(file_url_https.lastIndexOf('.') + 1, file_url_https.length);
+        const fileType = file_url_https.slice(file_url_https.lastIndexOf('.') + 1, file_url_https.length);
         if (fileType === 'pdf') {
           this.getNumPages(file_relative_path);
         }
@@ -321,7 +316,7 @@ export default {
     },
 
     getNumPages(url) {
-      let loadingTask = pdf.createLoadingTask(`${process.env.VUE_APP_PDF}${url}`);
+      const loadingTask = pdf.createLoadingTask(`${process.env.VUE_APP_PDF}${url}`);
       loadingTask.promise
         .then(pdf => {
           this.pdfSrc = loadingTask;
@@ -345,7 +340,7 @@ export default {
       getContentFile('file_store_manager-StartCreateFileCompressPack', {
         file_id_list: JSON.parse(idList)
       }).then(res => {
-        let id = res.file_compress_task_id;
+        const id = res.file_compress_task_id;
         this.bookDownTimer = setInterval(() => {
           this.checkTaskProgress(id);
         }, 2000);
@@ -353,9 +348,9 @@ export default {
     },
 
     listMove(direction) {
-      let w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
+      const w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
       if (w > 60) {
-        let left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
+        const left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
         let width = direction === 'right' ? left - 60 : left + 60;
         if (Math.abs(width) > w) width = -w;
         this.marginLeft = width > 0 ? 0 : width;

+ 6 - 6
src/views/live/teacher/group.js

@@ -1,7 +1,7 @@
 import { Message } from 'element-ui';
 import { rtc, updateMcResult, createScript, createData } from '@/views/live/common';
 export { initSDK, sendMsg, closeVideo, roomUpdate, chatRoll, reconnection } from '@/views/live/common';
-import i18n from '@/utils/i18n';
+import i18n from '@/locales/i18n';
 
 /**
  * 推送本地流
@@ -115,7 +115,7 @@ export function initListener(vue) {
         tryStream: stream,
         success(stream) {
           // 订阅流成功
-          let streamType = stream.streamType();
+          const streamType = stream.streamType();
 
           console.log('订阅流成功', streamType);
           if (streamType === 10) {
@@ -191,7 +191,7 @@ export function initListener(vue) {
   // 监听通知移除流事件
   rtc.on('stream_removed', stream => {
     console.log('监听通知移除流事件');
-    let num = vue.streamList.findIndex(el => el.id() === stream.id());
+    const num = vue.streamList.findIndex(el => el.id() === stream.id());
     if (num !== -1) {
       vue.streamList.splice(num, 1);
     }
@@ -216,7 +216,7 @@ export function initListener(vue) {
    * 监听聊天事件
    */
   rtc.on('chat_message', data => {
-    let dat = JSON.parse(data);
+    const dat = JSON.parse(data);
     // 敏感词过滤:如果发送的聊天消息被系统判定包含敏感词,则只有发送者能收到本条消息,房间内其他人都不会收到这条聊天消息。
     // 如果返回消息中有 isFilterChat 字段(消息不包含敏感词返回数据中无isFilterChat字段),且isFilterChat的值为1,则说明该消息包含敏感字,除发送者外其他人不会收到这条消息。
     if (dat.isFilterChat && dat.isFilterChat === 1) {
@@ -231,7 +231,7 @@ export function initListener(vue) {
 // 加载直播所需 SDK,加载完成后才能初始化
 export function downloadWebSDK(vue) {
   createScript('https://class.csslcloud.net/sdk/websdk/hdRtc-6.7.2.js').onload = () => {
-    let scriptArray = [
+    const scriptArray = [
       'https://class.csslcloud.net/static/dist/js/classMode.js',
       'https://class.csslcloud.net/static/dist/js/classUpdateChat.js'
     ];
@@ -245,7 +245,7 @@ export function downloadWebSDK(vue) {
 }
 
 export function removeWebSDK() {
-  let scriptArray = [
+  const scriptArray = [
     'https://class.csslcloud.net/sdk/websdk/hdRtc-6.7.2.js',
     'https://class.csslcloud.net/static/dist/js/classMode.js',
     'https://class.csslcloud.net/static/dist/js/classUpdateChat.js'

+ 7 - 34
src/views/live/teacher/group.vue

@@ -248,7 +248,7 @@ export default {
       }
     },
     streamList(newVal) {
-      let list = this.student_list.filter(item => {
+      const list = this.student_list.filter(item => {
         let isNoStream = true;
         for (let i = 0; i < newVal.length; i++) {
           if (newVal[i].id().split('-')[0] === item.room_user_id) isNoStream = false;
@@ -290,33 +290,6 @@ export default {
       this.group_list = group_list;
       this.live_room_sys_user_id = live_room_sys_user_id;
     });
-
-    this.updateWordPack({
-      word_key_list: [
-        'Key404',
-        'Key405',
-        'Key406',
-        'Key407',
-        'Key409',
-        'Key408',
-        'Key410',
-        'Key411',
-        'Key302',
-        'Key412',
-        'Key94',
-        'Key83',
-        'Key46',
-        'Key413',
-        'Key414',
-        'Key415',
-        'Key416',
-        'Key417',
-        'Key443',
-        'Key402',
-        'Key403',
-        'Key645'
-      ]
-    });
   },
   beforeDestroy() {
     common.closeVideo('main');
@@ -421,27 +394,27 @@ export default {
     },
 
     searchStudentName(id) {
-      let uid = id.split('-')[0];
+      const uid = id.split('-')[0];
       if (uid) {
-        let student = this.student_list.find(item => item.room_user_id === uid);
+        const student = this.student_list.find(item => item.room_user_id === uid);
         return student ? student.student_name : '';
       }
       return '';
     },
 
     isMobile(id) {
-      let uid = id.split('-')[0];
+      const uid = id.split('-')[0];
       if (uid) {
-        let student = this.student_list.find(item => item.room_user_id === uid);
+        const student = this.student_list.find(item => item.room_user_id === uid);
         return student ? student.is_mobile === 'true' : false;
       }
       return false;
     },
 
     listMove(direction) {
-      let w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
+      const w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
       if (w > 60) {
-        let left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
+        const left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
         let width = direction === 'right' ? left - 60 : left + 60;
         if (Math.abs(width) > w) width = -w;
         this.marginLeft = width > 0 ? 0 : width;

+ 2 - 55
src/views/live/teacher/index.vue

@@ -416,59 +416,6 @@ export default {
         this.getLiveRoomInfo();
       }
     });
-
-    this.updateWordPack({
-      word_key_list: [
-        'Key418',
-        'Key419',
-        'Key405',
-        'Key398',
-        'Key420',
-        'Key421',
-        'Key422',
-        'Key409',
-        'Key423',
-        'Key410',
-        'Key302',
-        'Key296',
-        'Key424',
-        'Key94',
-        'Key83',
-        'Key425',
-        'Key426',
-        'Key427',
-        'Key428',
-        'Key429',
-        'Key430',
-        'Key431',
-        'Key432',
-        'Key433',
-        'Key434',
-        'Key435',
-        'Key436',
-        'Key437',
-        'Key438',
-        'Key399',
-        'Key401',
-        'Key441',
-        'Key442',
-        'Key443',
-        'Key444',
-        'Key445',
-        'Key446',
-        'Key402',
-        'Key403',
-        'Key449',
-        'Key450',
-        'Key451',
-        'Key452',
-        'Key453',
-        'Key454',
-        'Key455',
-        'Key632',
-        'Key633'
-      ]
-    });
   },
   mounted() {
     document.addEventListener(
@@ -593,7 +540,7 @@ export default {
       this.connectStudent = student;
       GetLiveRoomInfo({ task_id: this.task_id })
         .then(({ video_mode }) => {
-          let uid = student.room_user_id;
+          const uid = student.room_user_id;
           this.roomInfo.video_mode = mode;
           if (video_mode === mode) {
             this.inviteStudent(uid, student, mode);
@@ -647,7 +594,7 @@ export default {
     },
 
     handsDown(uid) {
-      let connectUid = typeof uid === 'string' ? uid : this.connectUid;
+      const connectUid = typeof uid === 'string' ? uid : this.connectUid;
       if (connectUid.length === 0) {
         GetStudentInfo_Connection({ task_id: this.task_id }).then(({ room_user_id }) =>
           this.handsDown_Live(room_user_id)

+ 8 - 8
src/views/live/teacher/live.js

@@ -22,7 +22,7 @@ export {
   pauseVideo,
   playVideo
 } from '@/views/live/common';
-import i18n from '@/utils/i18n';
+import i18n from '@/locales/i18n';
 
 /**
  * 推送本地流
@@ -88,7 +88,7 @@ export function initListener(vue) {
     });
     vue.roomData = data;
     // 初始化画板需要的数据
-    let canvasInitData = {
+    const canvasInitData = {
       allowDraw: true, // 是否具有书写画笔权限(讲师权限) true / false
       id: 'draw-parent',
       pptDisplay: 1, // 文档展示方式。默认0,按窗口  1,按宽度
@@ -111,7 +111,7 @@ export function initListener(vue) {
     console.log('加入房间成功');
     getHistory({
       success(data) {
-        let chatLog = data.datas.meta.chatLog.map(({ content, userName }) => {
+        const chatLog = data.datas.meta.chatLog.map(({ content, userName }) => {
           return { msg: content, username: userName };
         });
         vue.chatList = chatLog;
@@ -124,7 +124,7 @@ export function initListener(vue) {
     getDevice({
       success(data) {
         console.log('获取音视频设备成功', data);
-        let device = store.state.app.liveDevice;
+        const device = store.state.app.liveDevice;
         vue.device = data;
 
         if (data.video.length === 0 && data.audio.length === 0) {
@@ -134,8 +134,8 @@ export function initListener(vue) {
           });
         }
 
-        let isVideo = device.video.length > 0 && data.video.some(item => item.deviceId === device.video);
-        let isAudio = device.audio.length > 0 && data.audio.some(item => item.deviceId === device.audio);
+        const isVideo = device.video.length > 0 && data.video.some(item => item.deviceId === device.video);
+        const isAudio = device.audio.length > 0 && data.audio.some(item => item.deviceId === device.audio);
 
         if (!isVideo && !isAudio) {
           vue.setDevice(false);
@@ -172,7 +172,7 @@ export function initListener(vue) {
         tryStream,
         success(stream) {
           // 订阅流成功
-          let streamType = stream.streamType();
+          const streamType = stream.streamType();
           vue.remoteStreamType = streamType;
           console.log('订阅流成功', streamType);
           stream.show('student', 'contain'); // 将流显示到指定 id 的盒子中
@@ -316,7 +316,7 @@ export function initListener(vue) {
    * 监听聊天事件
    */
   rtc.on('chat_message', data => {
-    let dat = JSON.parse(data);
+    const dat = JSON.parse(data);
     console.log(dat);
     // 敏感词过滤:如果发送的聊天消息被系统判定包含敏感词,则只有发送者能收到本条消息,房间内其他人都不会收到这条聊天消息。
     // 如果返回消息中有 isFilterChat 字段(消息不包含敏感词返回数据中无isFilterChat字段),且isFilterChat的值为1,则说明该消息包含敏感字,除发送者外其他人不会收到这条消息。

+ 7 - 18
src/views/login/index.vue

@@ -20,7 +20,7 @@
           type="text"
           name="user_name"
           autocomplete="on"
-          :placeholder="$t('username')"
+          :placeholder="$t('Key25')"
         />
       </el-form-item>
 
@@ -29,7 +29,7 @@
           v-model="loginForm.password"
           type="password"
           name="password"
-          :placeholder="$t('password')"
+          :placeholder="$t('Key14')"
           autocomplete="on"
         />
       </el-form-item>
@@ -42,7 +42,7 @@
             :loading="loading"
             @click.native.prevent="handleLogin('TEACHER')"
           >
-            {{ $t('Learn_TLogin') }}
+            {{ $t('Key540') }}{{ $t('Key9') }}
           </el-button>
         </el-col>
 
@@ -53,7 +53,7 @@
             :loading="loading"
             @click.native.prevent="handleLogin('STUDENT')"
           >
-            {{ $t('Learn_SLogin') }}
+            {{ $t('Key541') }}{{ $t('Key9') }}
           </el-button>
         </el-col>
       </el-row>
@@ -68,14 +68,14 @@ export default {
   data() {
     const validateUsername = (rule, value, callback) => {
       if (value.length <= 0) {
-        callback(new Error(this.$i18n.t('Learn_Login_user_warning')));
+        callback(new Error(this.$i18n.t('Key26')));
       } else {
         callback();
       }
     };
     const validatePassword = (rule, value, callback) => {
       if (value.length < 6) {
-        callback(new Error(this.$i18n.t('Learn_Login_password_warning')));
+        callback(new Error(this.$i18n.t('Key655')));
       } else {
         callback();
       }
@@ -104,17 +104,6 @@ export default {
   },
   created() {
     this.getConfig();
-    this.updateWordPack({
-      word_key_list: [
-        'Key539',
-        'password',
-        'username',
-        'Learn_TLogin',
-        'Learn_SLogin',
-        'Learn_Login_user_warning',
-        'Learn_Login_password_warning'
-      ]
-    });
   },
   methods: {
     async getConfig() {
@@ -130,7 +119,7 @@ export default {
             .then(() => {
               this.$router.push({ path: this.redirect || '/' });
               this.loading = false;
-              this.$message.success('登录成功!');
+              this.$message.success(this.$t('Key442'));
             })
             .catch(() => {
               this.loading = false;

+ 0 - 17
src/views/main/TaskList.vue

@@ -159,23 +159,6 @@ export default {
     }).then(({ message_list }) => {
       this.message_list = message_list;
     });
-    this.updateWordPack({
-      word_key_list: [
-        'Key110',
-        'Key291',
-        'Key215',
-        'Key290',
-        'Key278',
-        'Key292',
-        'Key293',
-        'key294',
-        'Key289',
-        'Key310',
-        'Key311',
-        'Key616',
-        'Key635'
-      ]
-    });
   },
   mounted() {
     this.init();

+ 0 - 24
src/views/main/TemplateList.vue

@@ -121,30 +121,6 @@ export default {
     };
   },
   created() {
-    this.updateWordPack({
-      word_key_list: [
-        'Key129',
-        'Key131',
-        'Key168',
-        'Key297',
-        'Key134',
-        'Key136',
-        'Key250',
-        'Key123',
-        'Key130',
-        'Key171',
-        'Key172',
-        'Key110',
-        'Key129',
-        'Key217',
-        'Key286',
-        'Key253',
-        'Key620',
-        'Key621',
-        'Key622',
-        'Key638'
-      ]
-    });
     this.queryCourseList();
   },
   methods: {

+ 0 - 5
src/views/main/components/MainMenu.vue

@@ -28,11 +28,6 @@ export default {
     return {
       menuList: getMenuList()
     };
-  },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key289', 'Key215', 'Key290']
-    });
   }
 };
 </script>

+ 4 - 4
src/views/main/components/MonthlyCalendar.vue

@@ -119,12 +119,12 @@ export default {
       }
     },
     date(newVal) {
-      let arr = newVal.split('-').map(item => Number(item));
+      const arr = newVal.split('-').map(item => Number(item));
       this.curYear = arr[0];
       this.curMonth = arr[1];
       this.focusMonth = arr[1] - 1;
       GetMyTaskDailyDistribution({ month_stamp: newVal }).then(({ status, ...data }) => {
-        let taskDailyArr = {};
+        const taskDailyArr = {};
         for (const [key, value] of Object.entries(data)) {
           taskDailyArr[key.slice(5)] = value;
         }
@@ -196,10 +196,10 @@ export default {
       const dayOfWeek = dayjs(`${this.date}-1`).day();
       const curMonth = dayjs(this.date).month();
       const curYear = dayjs(this.date).year();
-      let lastDays = dayjs(curMonth === 0 ? `${curYear - 1}-12` : `${curYear}-${curMonth}`).daysInMonth();
+      const lastDays = dayjs(curMonth === 0 ? `${curYear - 1}-12` : `${curYear}-${curMonth}`).daysInMonth();
       const isThisMonth = curMonth === new Date().getMonth() && curYear === new Date().getFullYear();
 
-      let arr = [];
+      const arr = [];
       // 是否有上个月
       for (let i = 0; i < dayOfWeek; i++) {
         arr[i] = {

+ 0 - 15
src/views/main/curricula_list/student.vue

@@ -114,21 +114,6 @@ export default {
     };
   },
   created() {
-    this.updateWordPack({
-      word_key_list: [
-        'Key131',
-        'Key295',
-        'Key168',
-        'Key203',
-        'Key250',
-        'Key614',
-        'Key615',
-        'Key617',
-        'Key627',
-        'Key628',
-        'Key7'
-      ]
-    });
     this.initData();
   },
   methods: {

+ 0 - 31
src/views/main/curricula_list/teacher.vue

@@ -99,7 +99,6 @@
 
 <script>
 import MainMenu from '../components/MainMenu.vue';
-import { updateWordPack } from '@/utils/i18n';
 import { PageQueryMyCourseList } from '@/api/table';
 import { GetFinishStatusList_Course } from '@/api/select';
 import { ReleaseCourse, DeleteCourse } from '@/api/course';
@@ -121,38 +120,8 @@ export default {
     };
   },
   created() {
-    this.updateWordPack({
-      word_key_list: [
-        'Key131',
-        'Key168',
-        'Key295',
-        'Key285',
-        'Key134',
-        'Key250',
-        'Key129',
-        'Key136',
-        'Key280',
-        'Key123',
-        'Key169',
-        'Key171',
-        'Key173',
-        'Key172',
-        'Key296',
-        'key279',
-        'Key94',
-        'Key83',
-        'Key361',
-        'Key638',
-        'Key639',
-        'Key621',
-        'Key622'
-      ]
-    });
     this.queryMyCourseList();
     this.getFinishStatusList_Course();
-    updateWordPack({
-      word_key_list: ['Learn_New_Courses']
-    });
   },
   methods: {
     getFinishStatusList_Course() {

+ 2 - 2
src/views/main/data.js

@@ -45,8 +45,8 @@ const buttonColorList = new Map([
 ]);
 
 function getMenuList() {
-  let popedom_code_list = store.state.user.popedom_code_list;
-  let isStudent = store.state.user.user_type === 'STUDENT';
+  const popedom_code_list = store.state.user.popedom_code_list;
+  const isStudent = store.state.user.user_type === 'STUDENT';
 
   return [
     {

+ 3 - 3
src/views/main/index.vue

@@ -26,12 +26,12 @@ export default {
   },
   data() {
     const state = this.$store.state;
-    let popedom_code_list = state.user.popedom_code_list;
-    let isStudent = state.user.user_type === 'STUDENT';
+    const popedom_code_list = state.user.popedom_code_list;
+    const isStudent = state.user.user_type === 'STUDENT';
     function curTab() {
       return isStudent || popedom_code_list.includes(2000001) ? 'TaskList' : 'TemplateList';
     }
-    let currentTab = this.$route.query.tab || curTab();
+    const currentTab = this.$route.query.tab || curTab();
 
     return {
       currentTab

+ 6 - 5
src/views/task_details/ShowCourseware.vue

@@ -66,8 +66,8 @@ export default {
           this.ui_type = contents.ui_type ? contents.ui_type : '';
         }
         this.$nextTick(() => {
-          let offsetWidth = document.querySelector('div.Big-Book-preview').offsetWidth;
-          let transform = document.querySelector('div.Big-Book-preview').style.transform;
+          const offsetWidth = document.querySelector('div.Big-Book-preview').offsetWidth;
+          const transform = document.querySelector('div.Big-Book-preview').style.transform;
           document.querySelector('button.full-screen').style.left = `${
             offsetWidth * Number(transform.slice(6, -1)) - 130
           }px`;
@@ -91,8 +91,8 @@ export default {
     },
 
     requestFullScreen() {
-      let element = document.getElementById('AILPcontent');
-      let requestMethod =
+      const element = document.getElementById('AILPcontent');
+      const requestMethod =
         element.requestFullScreen ||
         element.webkitRequestFullScreen ||
         element.mozRequestFullScreen ||
@@ -102,7 +102,8 @@ export default {
       if (requestMethod) {
         requestMethod.call(element);
       } else if (typeof window.ActiveXObject !== 'undefined') {
-        let wscript = new ActiveXObject('WScript.Shell');
+        /* eslint-disable-next-line */
+        const wscript = new ActiveXObject('WScript.Shell');
         if (wscript !== null) {
           wscript.SendKeys('{F11}');
         }

+ 0 - 5
src/views/task_details/TaskTop.vue

@@ -61,11 +61,6 @@ export default {
       type: Object
     }
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key309', 'Key274']
-    });
-  },
   methods: {
     emitViewFile(fileName, fileId) {
       this.$emit('viewFile', fileName, fileId);

+ 0 - 27
src/views/task_details/student/index.vue

@@ -233,33 +233,6 @@ export default {
     }
   },
   created() {
-    this.updateWordPack({
-      word_key_list: [
-        'Key353',
-        'Key354',
-        'Key355',
-        'Key326',
-        'Key312',
-        'Key313',
-        'Key327',
-        'Key316',
-        'Key317',
-        'Key328',
-        'Key318',
-        'Key329',
-        'Key317',
-        'Key319',
-        'Key330',
-        'Key152',
-        'Key328',
-        'Key331',
-        'Key335',
-        'Key336',
-        'Key337',
-        'Key338',
-        'Key278'
-      ]
-    });
     this.loading = true;
     GetTaskInfo({
       id: this.id,

+ 4 - 23
src/views/task_details/teacher/index.vue

@@ -180,25 +180,6 @@ export default {
   },
   created() {
     this.loading = true;
-    this.updateWordPack({
-      word_key_list: [
-        'Key308',
-        'Key312',
-        'Key313',
-        'Key314',
-        'Key315',
-        'Key316',
-        'Key317',
-        'Key318',
-        'Key319',
-        'Key338',
-        'Key324',
-        'Key325',
-        'Key278',
-        'Key618',
-        'Key619'
-      ]
-    });
     GetTaskInfo({
       id: this.id,
       is_contain_cs_item_learning_material: true,
@@ -309,7 +290,7 @@ export default {
     },
 
     buttonName() {
-      let list = this.student_list;
+      const list = this.student_list;
       if (list.length <= 0) return '';
       return list[list.length - 1].student_id === this.curStudentId ? this.$i18n.t('Key618') : this.$i18n.t('Key619');
     },
@@ -326,12 +307,12 @@ export default {
     },
 
     next() {
-      let list = this.student_list;
+      const list = this.student_list;
       if (list.length <= 0) {
         return this.$message.warning(this.$i18n.t('Key325'));
       }
-      let curIndex = list.findIndex(item => item.student_id === this.curStudentId);
-      let nextList = list.length - 1 === curIndex ? list[curIndex - 1] : list[curIndex + 1];
+      const curIndex = list.findIndex(item => item.student_id === this.curStudentId);
+      const nextList = list.length - 1 === curIndex ? list[curIndex - 1] : list[curIndex + 1];
       if (nextList) this.getTaskStudentExecuteInfo(nextList.student_id);
     }
   }

+ 0 - 5
src/views/teacher/create_course/index.vue

@@ -37,11 +37,6 @@ export default {
       dialogVisible: false
     };
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key285', 'Key286', 'Key287', 'Key279']
-    });
-  },
   methods: {
     selectTemplate() {
       this.dialogVisible = true;

+ 1 - 1
src/views/teacher/create_course/step_table/AddItem.vue

@@ -90,7 +90,7 @@ export default {
       this.$refs.itemForm.validate(valid => {
         if (!valid) return false;
 
-        let data = {
+        const data = {
           name: this.itemForm.name,
           begin_time: `${this.itemForm.begin_time} 00:00:00`,
           end_time: `${this.itemForm.end_time} 23:59:59`

+ 3 - 34
src/views/teacher/create_course/step_table/CourseInfo.vue

@@ -139,7 +139,7 @@ export default {
         callback();
       }
     };
-    let query = this.$route.query;
+    const query = this.$route.query;
 
     return {
       id: query.id,
@@ -180,37 +180,6 @@ export default {
     if (this.is_use_template) {
       this.getCourseInfo_ContainCSItem(this.template_id);
     }
-
-    this.updateWordPack({
-      word_key_list: [
-        'Key252',
-        'Key134',
-        'Key341',
-        'Key253',
-        'Key136',
-        'Key342',
-        'Key343',
-        'Key250',
-        'Key254',
-        'Key266',
-        'Key255',
-        'Key256',
-        'Key257',
-        'Key233',
-        'Key258',
-        'Key245',
-        'Key246',
-        'Key261',
-        'Key260',
-        'Key262',
-        'Key345',
-        'Key259',
-        'Key346',
-        'Key347',
-        'Key348',
-        'Key349'
-      ]
-    });
   },
   methods: {
     nextStep() {
@@ -282,7 +251,7 @@ export default {
       );
     },
     beforeUpload(file) {
-      let isImage = /^image/.test(file.type);
+      const isImage = /^image/.test(file.type);
       if (!isImage) {
         this.$message.error(this.$i18n.t('Key348'));
       }
@@ -333,7 +302,7 @@ export default {
     tagClose(id, index) {
       this.user_list.splice(index, 1);
 
-      let teacherList = this.form.teacher_id_list;
+      const teacherList = this.form.teacher_id_list;
       teacherList.splice(teacherList.indexOf(id), 1);
     }
   }

+ 2 - 38
src/views/teacher/create_course/step_table/CreateTask.vue

@@ -343,7 +343,7 @@ export default {
   },
   data() {
     const query = this.$route.query;
-    let is_template = 'is_template' in query ? query.is_template === 'true' : false;
+    const is_template = 'is_template' in query ? query.is_template === 'true' : false;
 
     return {
       id: this.$route.params.id,
@@ -384,42 +384,6 @@ export default {
   },
   created() {
     this.getCourseInfo();
-    this.updateWordPack({
-      word_key_list: [
-        'Key275',
-        'Key246',
-        'Key123',
-        'Key172',
-        'Key268',
-        'Key269',
-        'Key352',
-        'Key270',
-        'Key311',
-        'Key272',
-        'Key353',
-        'Key354',
-        'Key355',
-        'Key356',
-        'Key309',
-        'Key357',
-        'Key273',
-        'Key359',
-        'Key274',
-        'Key152',
-        'Key352',
-        'Key358',
-        'Key83',
-        'Key94',
-        'Key360',
-        'Key361',
-        'Key362',
-        'Key363',
-        'Key364',
-        'Key365',
-        'Key366',
-        'Key636'
-      ]
-    });
   },
   methods: {
     getCourseInfo(isRefresh = false) {
@@ -431,7 +395,7 @@ export default {
         this.cs_item_list = cs_item_list;
         if (cs_item_list.length <= 0) return;
         if (isRefresh) return this.getCSItemInfoBox();
-        let curItemID = 'curItemID' in this.$route.query ? this.$route.query.curItemID : '';
+        const curItemID = 'curItemID' in this.$route.query ? this.$route.query.curItemID : '';
         this.curItemID = curItemID || cs_item_list[cs_item_list.length - 1].id;
       });
     },

+ 12 - 43
src/views/teacher/create_course/step_table/NewTask.vue

@@ -265,7 +265,7 @@ export default {
       }
     };
     const { params, query } = this.$route;
-    let is_template = 'is_template' in query ? JSON.parse(query.is_template) : false;
+    const is_template = 'is_template' in query ? JSON.parse(query.is_template) : false;
     return {
       id: params.id,
       task_id: query.task_id,
@@ -330,37 +330,6 @@ export default {
     if (this.task_id) {
       this.getTaskInfo();
     }
-
-    this.updateWordPack({
-      word_key_list: [
-        'Key367',
-        'Key368',
-        'Key369',
-        'Key343',
-        'Key370',
-        'Key271',
-        'Key371',
-        'Key372',
-        'Key312',
-        'Key373',
-        'Key374',
-        'Key375',
-        'Key376',
-        'Key377',
-        'Key378',
-        'Key379',
-        'Key245',
-        'Key246',
-        'Key380',
-        'Key381',
-        'Key330',
-        'Key94',
-        'Key382',
-        'Key384',
-        'Key385',
-        'Key634'
-      ]
-    });
   },
   methods: {
     init() {
@@ -391,8 +360,8 @@ export default {
         if (!valid) {
           return false;
         }
-        let teaching_type = this.form.teaching_type;
-        let data = {
+        const teaching_type = this.form.teaching_type;
+        const data = {
           cs_item_id: this.cs_item_id,
           name: this.form.name,
           time_type: Number(this.time_type),
@@ -444,8 +413,8 @@ export default {
 
     selectStudent(i) {
       const id = this.student_list[i].student_id;
-      let list = this.custom_student_list;
-      let index = list.findIndex(({ student_id }) => student_id === id);
+      const list = this.custom_student_list;
+      const index = list.findIndex(({ student_id }) => student_id === id);
       index === -1 ? list.push(this.student_list[i]) : list.splice(index, 1);
     },
 
@@ -468,7 +437,7 @@ export default {
       }
 
       fileUpload('Open', file).then(({ file_info_list }) => {
-        let type = this.form.teaching_type;
+        const type = this.form.teaching_type;
         if (type === 10) {
           this.liveForm.file_info_list = this.liveForm.file_info_list.concat(file_info_list);
           return;
@@ -494,7 +463,7 @@ export default {
         this.$message.warning(this.$t('Key385'));
         return;
       }
-      let type = this.form.teaching_type;
+      const type = this.form.teaching_type;
       if (type === 10) {
         this.getTreeNodeInfo_BookChapterStruct(course_id, 'live');
       }
@@ -517,7 +486,7 @@ export default {
     },
 
     closeCourse(i, type) {
-      let courseInfo = type === 'live' ? this.liveForm.coursewareInfo : this.courseForm.coursewareInfo;
+      const courseInfo = type === 'live' ? this.liveForm.coursewareInfo : this.courseForm.coursewareInfo;
       courseInfo.splice(i, 1);
     },
 
@@ -544,16 +513,16 @@ export default {
           custom_student_list
         }) => {
           if (begin_time.length > 0) {
-            let begin = begin_time.split(' ');
+            const begin = begin_time.split(' ');
             this.form.begin_date = begin[0];
-            let bTime = begin[1].split(':');
+            const bTime = begin[1].split(':');
             this.form.begin_date_hour = bTime[0];
             this.form.begin_date_minute = bTime[1];
           }
           if (end_time.length > 0) {
-            let end = end_time.split(' ');
+            const end = end_time.split(' ');
             this.form.end_date = end[0];
-            let eTime = end[1].split(':');
+            const eTime = end[1].split(':');
             this.form.end_date_hour = eTime[0];
             this.form.end_date_minute = eTime[1];
           }

+ 2 - 6
src/views/teacher/create_course/step_table/SelectBook.vue

@@ -87,10 +87,6 @@ export default {
   },
   created() {
     this.queryBookList();
-
-    this.updateWordPack({
-      word_key_list: ['Key49', 'Key267', 'Key131', 'Key264', 'Key262', 'Key350', 'Key351']
-    });
   },
   methods: {
     queryBookList() {
@@ -110,9 +106,9 @@ export default {
       this.queryBookList();
     },
     addOrRemoveBookToCourse(e, book_id) {
-      let classList = e.target.parentElement.parentElement.classList;
+      const classList = e.target.parentElement.parentElement.classList;
 
-      let data = {
+      const data = {
         course_id: this.id,
         book_id
       };

+ 0 - 5
src/views/teacher/student_list/SendMessage.vue

@@ -41,11 +41,6 @@ export default {
       this.message = '';
     }
   },
-  created() {
-    this.updateWordPack({
-      word_key_list: ['Key301', 'Key46', 'Key300', 'Key302']
-    });
-  },
   methods: {
     close() {
       this.$emit('update:visible', false);

+ 1 - 17
src/views/teacher/student_list/index.vue

@@ -116,22 +116,6 @@ export default {
   },
   created() {
     this.queryCourseStudentList();
-    this.updateWordPack({
-      word_key_list: [
-        'Key131',
-        'Key299',
-        'Key298',
-        'Key296',
-        'Key303',
-        'Key304',
-        'Key305',
-        'Key306',
-        'Key307',
-        'Key624',
-        'Key625',
-        'Key626'
-      ]
-    });
   },
   methods: {
     queryCourseStudentList() {
@@ -176,7 +160,7 @@ export default {
     },
 
     sendMessageToCourseStudent(content) {
-      let loading = this.$loading(this.$i18n.t('Key624'));
+      const loading = this.$loading(this.$i18n.t('Key624'));
       SendMessageToCourseStudent({
         course_id: this.course_id,
         content,