Bladeren bron

api更名;部署环境到开发环境10.38

Michael Wang 5 jaren geleden
bovenliggende
commit
8f13f7fbd1

+ 2 - 3
.env.staging

@@ -1,5 +1,4 @@
 VUE_APP_TK_SERVER_HTML_URL=http://192.168.10.39:5220
 VUE_APP_TK_SERVER_API_URL=http://192.168.10.39:8008
-VUE_APP_WK_SERVER_SOCKET=wss://ecs-dev.qmth.com.cn:8878/oewebsocket/
-VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO=wss://ecs-dev.qmth.com.cn:8878/oewebsocket/fileAnswer/
-VUE_APP_CAN_UPLOAD_PHOTOS_FOR_TEST=true
+VUE_APP_WK_SERVER_SOCKET=wss://ecs-test.qmth.com.cn:8878/oewebsocket/
+VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO=wss://ecs-test.qmth.com.cn:8878/oewebsocket/fileAnswer/

+ 8 - 0
jenkins-dev.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+pwd
+
+yarn
+npm run build:dev
+
+rm -rf ~/project/examcloud/static/student-client/dist/*
+cp -r  dist ~/project/examcloud/static/student-client/

+ 4 - 0
package.json

@@ -6,7 +6,11 @@
     "serve": "vue-cli-service serve",
     "lint": "vue-cli-service lint",
     "start": "vue-cli-service serve",
+    "start:test": "vue-cli-service serve --mode development",
     "mock": "json-server --watch mock/db.json",
+    "prebuild:dev": "node prebuild",
+    "build:dev": "NODE_ENV=production vue-cli-service build --mode development",
+    "postbuild:dev": "node postbuild",
     "prebuild:staging": "node prebuild",
     "build:staging": "NODE_ENV=production vue-cli-service build --mode staging",
     "postbuild:staging": "node postbuild",

+ 1 - 1
src/features/OfflineExam/OfflineExamHome.vue

@@ -45,7 +45,7 @@ export default {
   methods: {
     async fetchData() {
       const res = await this.$http.get(
-        "/api/ecs_oe_student/offlineExam/getOfflineCourse"
+        "/api/ecs_oe_admin/offlineExam/getOfflineCourse"
       );
 
       this.courses = res.data.map(c => ({

+ 1 - 1
src/features/OfflineExam/OfflineExamList.vue

@@ -131,7 +131,7 @@ export default {
   methods: {
     async enterExam(course) {
       // 若出错,直接报网络异常
-      await this.$http.get("/api/ecs_oe_student/offlineExam/startOfflineExam", {
+      await this.$http.get("/api/ecs_oe_admin/offlineExam/startOfflineExam", {
         params: { examStudentId: course.examStudentId },
       });
       this.$emit("reloadList");

+ 1 - 1
src/features/OfflineExam/OfflineExamUpload.vue

@@ -6,7 +6,7 @@
       :data="{ fileType: fileType }"
       :before-upload="handleBeforeUpload"
       :action="
-        '/api/ecs_oe_student/offlineExam/submitPaper?examRecordDataId=' +
+        '/api/ecs_oe_admin/offlineExam/submitPaper?examRecordDataId=' +
           course.examRecordDataId
       "
       :max-size="1024 * 30"

+ 1 - 1
src/features/OnlineExam/Examing/ExamPaper.vue

@@ -123,7 +123,7 @@ export default {
             this.examRecordDataId
         ),
         this.$http.get(
-          "/api/ecs_oe_student/practice/getPracticeDetailInfo?examRecordDataId=" +
+          "/api/ecs_oe_admin/practice/getPracticeDetailInfo?examRecordDataId=" +
             this.examRecordDataId
         ),
       ]);

+ 1 - 1
src/features/OnlineExam/OnlineExamHome.vue

@@ -103,7 +103,7 @@ export default {
     let examListRes;
     for (let i = 0; i < 4; i++) {
       examListRes = await this.$http.get(
-        "/api/ecs_oe_student/examControl/queryExamList"
+        "/api/ecs_oe_admin/examControl/queryExamList"
       );
       if (examListRes.status === 503) {
         await new Promise(resolve => setTimeout(() => resolve(), 2000));

+ 1 - 1
src/features/OnlineExam/OnlineExamResultList.vue

@@ -45,7 +45,7 @@ export default {
       if (this.popperShow) {
         try {
           const results = (await this.$http.get(
-            "/api/ecs_oe_student/examScore/queryObjectiveScoreList?examStudentId=" +
+            "/api/ecs_oe_admin/exam/score/queryObjectiveScoreList?examStudentId=" +
               this.examStudentId
           )).data;
           this.results = (results || [])

+ 1 - 2
src/features/OnlinePractice/OnlinePracticeHome.vue

@@ -95,8 +95,7 @@ export default {
 
       try {
         const res = await this.$http.get(
-          "/api/ecs_oe_student/practice/queryPracticeCourseList?examId=" +
-            examId
+          "/api/ecs_oe_admin/practice/queryPracticeCourseList?examId=" + examId
         );
 
         this.courses = res.data;

+ 1 - 1
src/features/OnlinePractice/OnlinePracticeRecordDetail.vue

@@ -117,7 +117,7 @@ export default {
   async created() {
     try {
       const res = await this.$http.get(
-        "/api/ecs_oe_student/practice/getPracticeDetailInfo?examRecordDataId=" +
+        "/api/ecs_oe_admin/practice/getPracticeDetailInfo?examRecordDataId=" +
           this.$route.query.examRecordDataId
       );
       this.examRecordResult = res.data || [];

+ 1 - 1
src/features/OnlinePractice/OnlinePracticeRecordList.vue

@@ -110,7 +110,7 @@ export default {
   async created() {
     try {
       const res = await this.$http.get(
-        "/api/ecs_oe_student/practice/queryPracticeRecordList?examStudentId=" +
+        "/api/ecs_oe_admin/practice/queryPracticeRecordList?examStudentId=" +
           this.$route.query.examStudentId
       );
       this.recordList = (res.data || []).reverse();

+ 1 - 1
src/utils/axios.js

@@ -142,7 +142,7 @@ qmInstance.interceptors.response.use(
     } else if (status == 503) {
       const deal503Apis = [
         "/api/ecs_oe_student/examControl/checkExamInProgress",
-        "/api/ecs_oe_student/examControl/queryExamList",
+        "/api/ecs_oe_admin/examControl/queryExamList",
       ];
       if (deal503Apis.includes(error.config.url)) {
         return Promise.resolve({ status: 503 });

+ 1 - 9
vue.config.js

@@ -1,14 +1,6 @@
 let proxy = {
-  "/api/ecs_core": {
-    target: process.env.VUE_APP_CORE_HOST_URL,
-    changeOrigin: true,
-  },
-  "/api/ecs_oe_student": {
-    target: process.env.VUE_APP_OE_HOST_URL,
-    changeOrigin: true,
-  },
   "/api": {
-    target: "https://192.168.10.39:8878",
+    target: "https://192.168.10.38:8878",
     changeOrigin: true,
   },
 };