From e59a07075ba150d327683756dcd054d2b90b7fd8 Mon Sep 17 00:00:00 2001
From: YM <479443481@qq.com>
Date: 星期三, 22 五月 2024 14:43:53 +0800
Subject: [PATCH] 增加环境变量

---
 .env.product                                    |    3 
 src/assets/js/config.js                         |    2 
 vue.config.js                                   |   11 -
 src/assets/js/middleGround/tool.js              |    5 
 src/main.js                                     |    6 -
 src/books/content/js/examinationList.js         |   10 
 package.json                                    |    8 
 .env                                            |    3 
 src/books/childHealth/assets/examinationList.js |  208 +++++++++++++++++++++-------------
 src/assets/methods/resources.js                 |    3 
 src/assets/methods/examination.js               |   81 ++++++------
 src/plugin/axios/index.js                       |    2 
 12 files changed, 191 insertions(+), 151 deletions(-)

diff --git a/.env b/.env
new file mode 100644
index 0000000..ba16ee5
--- /dev/null
+++ b/.env
@@ -0,0 +1,3 @@
+VUE_APP_ENV = 'dev'
+VUE_APP_API_URL = "https://jsek.bnuic.com"
+PUBLIC_PATH = '/books/book'
\ No newline at end of file
diff --git a/.env.product b/.env.product
new file mode 100644
index 0000000..923d230
--- /dev/null
+++ b/.env.product
@@ -0,0 +1,3 @@
+VUE_APP_ENV = 'product'
+VUE_APP_API_URL = "https://jsek.bnuic.com"
+PUBLIC_PATH = 'http://182.92.203.7:3007/books/book'
\ No newline at end of file
diff --git a/package.json b/package.json
index 9f83094..0134bab 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,10 @@
 {
-  "name": "temp-book",
-  "version": "0.1.0",
+  "name": "testbook",
+  "version": "1.0.0",
   "private": true,
   "scripts": {
-    "serve": "vue-cli-service serve",
-    "build": "vue-cli-service build",
+    "serve": "vue-cli-service serve --mode dev",
+    "build": "vue-cli-service build --mode product",
     "lint": "vue-cli-service lint"
   },
   "dependencies": {
diff --git a/src/assets/js/config.js b/src/assets/js/config.js
index f8eebe0..791bda3 100644
--- a/src/assets/js/config.js
+++ b/src/assets/js/config.js
@@ -1,5 +1,4 @@
 import axios from "axios";
-export const requestCtx = "https://jsek.bnuic.com"; // 璇锋眰鍦板潃
 export const resourceCtx = "http://182.92.203.7:3007/books/resource/1"; // 璧勬簮璇锋眰鍦板潃
 export let activeBook = {}; // 璧勬簮璇锋眰鍦板潃
 export let goodsStore = "";
@@ -15,7 +14,6 @@
 export const tokenKey = "jsek-token";
 
 const config = {
-  requestCtx,
   resourceCtx,
   activeBook,
   requestTimeOut,
diff --git a/src/assets/js/middleGround/tool.js b/src/assets/js/middleGround/tool.js
index 1d60512..3c8c9ab 100644
--- a/src/assets/js/middleGround/tool.js
+++ b/src/assets/js/middleGround/tool.js
@@ -1,6 +1,5 @@
-import { requestCtx, appId } from "@/assets/js/config.js";
+import {  appId } from "@/assets/js/config.js";
 import defaultImg from "@/assets/images/default-book-img.png";
-import defaultBookFair from "@/assets/images/default-bookFair.png"
 import bookCover from "@/assets/images/book-cover.png";
 import moment from "moment";
 // 澶勭悊鍒楄〃鏌ヨ缁撴灉
@@ -420,7 +419,7 @@
 export function getPublicImage(md5, width, height,storeInfo) {
   let src = null;
   if (md5) {
-    src = requestCtx + `/file/GetPreViewImage?md5=${md5}`;
+    src = process.env.VUE_APP_API_URL + `/file/GetPreViewImage?md5=${md5}`;
   } else {
     if(storeInfo == 'jsek_bookFair') {
       // return defaultBookFair;
diff --git a/src/assets/methods/examination.js b/src/assets/methods/examination.js
index e1edbf1..ea886c5 100644
--- a/src/assets/methods/examination.js
+++ b/src/assets/methods/examination.js
@@ -1,35 +1,35 @@
 import { activeBook } from "@/assets/js/config";
 import MG from "@/assets/js/middleGround/WebMiddleGroundApi";
 import getPublicImage from "@/assets/js/middleGround/tool";
-const getQuestionList = async (oldList,questionList) => {
+const getQuestionList = async (oldList, questionList) => {
   let cardList = [
     {
       catalogName: "鍗曢�夐",
-      infoList: [],
+      infoList: []
     },
     {
       catalogName: "鍒ゆ柇棰�",
-      infoList: [],
+      infoList: []
     },
     {
       catalogName: "澶氶�夐",
-      infoList: [],
+      infoList: []
     },
     {
       catalogName: "濉┖棰�",
-      infoList: [],
+      infoList: []
     },
     {
       catalogName: "绠�绛旈",
-      infoList: [],
-    },
+      infoList: []
+    }
   ];
   let singleChoiceArr = []; // 鍗曢��
   let judgeArr = []; // 鍒ゆ柇
   let shortArr = []; // 绠�绛�
   let multipleChoiceArr = []; // 澶氶��
   let completionArr = []; // 濉┖
-  console.log('active',activeBook);
+  console.log("active", activeBook);
   for (let qindex = 0; qindex < questionList.length; qindex++) {
     const qitem = questionList[qindex];
     let query = {
@@ -48,14 +48,14 @@
         Embedded_QuestionBank_StemStyle: [],
         Embedded_QuestionBank_OptionStyle: [],
         Embedded_QuestionBank_KnowledgePoint: [],
-        Embedded_QuestionBank_Difficulty: [],
-      },
+        Embedded_QuestionBank_Difficulty: []
+      }
     };
     const res = await MG.store.getProductDetail(query);
     res.datas.cmsDatas[0].datas.forEach((item, index) => {
-      let oldObj = {}
-      if(oldList) {
-        oldObj = oldList.find(item => item.id == qitem)
+      let oldObj = {};
+      if (oldList) {
+        oldObj = oldList.find((item) => item.id == qitem);
       }
       const questionObj = {
         number: index + 1, // 棰樺彿
@@ -77,16 +77,17 @@
         difficulty: item.Embedded_QuestionBank_Difficulty
           ? 4 - item.Embedded_QuestionBank_Difficulty
           : 0, // 闅惧害绛夌骇
-        userAnswer:oldObj ? oldObj.userAnswer :
-          item.Embedded_QuestionBank_QuestionType == "completion" ||
-          item.Embedded_QuestionBank_QuestionType == "multipleChoice"
-            ? []
-            : "",
+        userAnswer: oldObj
+          ? oldObj.userAnswer
+          : item.Embedded_QuestionBank_QuestionType == "completion" ||
+            item.Embedded_QuestionBank_QuestionType == "multipleChoice"
+          ? []
+          : "",
         isSubmit: false, // 鏌ョ湅瑙f瀽
         isRight: null, // 鏄惁姝g‘
         isComplete: false,
         isCollect: true,
-        isUnfold: "",
+        isUnfold: ""
       };
       // 澶氶�夊拰濉┖绛旀鑲负鏁扮粍锛岃杞崲JSON鏍煎紡
       if (
@@ -107,7 +108,7 @@
           if (item == "input") {
             questionObj.stem[i] = {
               num: index,
-              data: "input",
+              data: "input"
             };
             questionObj.userAnswer[index] = "";
             index++;
@@ -142,7 +143,7 @@
             '<img style="max-width: 300rpx !important;object-fit: contain;" class="stem-rich-img" '
           )
           .replace(/\<p/gi, '<p class="stem-rich-p"')
-          .replace("../file", app.config.requestCtx + "/file");
+          .replace("../file", process.env.VUE_APP_API_URL + "/file");
       }
       // 閫夐」瀵屾枃鏈鐞�
       if (
@@ -156,7 +157,7 @@
             item.txt = item.txt
               .replace(/\<img/gi, '<img class="option-rich-img"')
               .replace(/\<p/gi, '<p class="stem-rich-p"')
-              .replace("../file", app.config.requestCtx + "/file");
+              .replace("../file", process.env.VUE_APP_API_URL + "/file");
         });
       }
       // 瑙f瀽瀵屾枃鏈鐞�
@@ -183,9 +184,7 @@
       } else if (item.Embedded_QuestionBank_QuestionType == "singleChoice") {
         questionObj.type = "鍗曢�夐";
         singleChoiceArr.push(questionObj);
-      } else if (
-        item.Embedded_QuestionBank_QuestionType == "multipleChoice"
-      ) {
+      } else if (item.Embedded_QuestionBank_QuestionType == "multipleChoice") {
         questionObj.type = "澶氶�夐";
         multipleChoiceArr.push(questionObj);
       } else if (item.Embedded_QuestionBank_QuestionType == "completion") {
@@ -197,11 +196,11 @@
       }
     });
   }
-  cardList[0].infoList = singleChoiceArr
-  cardList[1].infoList = judgeArr
-  cardList[2].infoList = multipleChoiceArr
-  cardList[3].infoList = completionArr
-  cardList[4].infoList = shortArr
+  cardList[0].infoList = singleChoiceArr;
+  cardList[1].infoList = judgeArr;
+  cardList[2].infoList = multipleChoiceArr;
+  cardList[3].infoList = completionArr;
+  cardList[4].infoList = shortArr;
   for (let index = 0; index < cardList.length; index++) {
     const item = cardList[index];
     for (let cindex = 0; cindex < item.infoList.length; cindex++) {
@@ -209,23 +208,23 @@
       citem.number = cindex + 1;
     }
   }
-  return cardList.filter(item=>item.infoList.length > 0);
+  return cardList.filter((item) => item.infoList.length > 0);
 };
 
-const getQuestionData = async (chapter,chapterData) => {
+const getQuestionData = async (chapter, chapterData) => {
   const data = { ...chapterData };
-  const oldAnswerData =  localStorage.getItem('oldAnswerData')
-  const oldData = oldAnswerData ? JSON.parse(oldAnswerData) :{}
-  let oldChapterData
-  if(oldData) {
-    oldChapterData = oldData[chapter]
+  const oldAnswerData = localStorage.getItem("oldAnswerData");
+  const oldData = oldAnswerData ? JSON.parse(oldAnswerData) : {};
+  let oldChapterData;
+  if (oldData) {
+    oldChapterData = oldData[chapter];
   }
   for (let key in chapterData) {
-    let oldList = []
-    if(oldChapterData) {
-      oldList = oldChapterData[key]
+    let oldList = [];
+    if (oldChapterData) {
+      oldList = oldChapterData[key];
     }
-    data[key] = await getQuestionList(oldList,chapterData[key]);
+    data[key] = await getQuestionList(oldList, chapterData[key]);
   }
   return data;
 };
diff --git a/src/assets/methods/resources.js b/src/assets/methods/resources.js
index 4a2db4f..7711436 100644
--- a/src/assets/methods/resources.js
+++ b/src/assets/methods/resources.js
@@ -1,6 +1,5 @@
-import config from "../js/config"
 const getResourcePath = (md5) => {
-  return  config.requestCtx + '/file/api/ApiDownload?md5=' + md5
+  return  process.env.VUE_APP_API_URL + '/file/api/ApiDownload?md5=' + md5
 }
 
 export default getResourcePath
\ No newline at end of file
diff --git a/src/books/childHealth/assets/examinationList.js b/src/books/childHealth/assets/examinationList.js
index d3c3716..928001a 100644
--- a/src/books/childHealth/assets/examinationList.js
+++ b/src/books/childHealth/assets/examinationList.js
@@ -1,147 +1,193 @@
-  const testData =  {
+const testData = {
   1: {
     2: [63795, 63796, 63797, 63798, 63804],
-    6:[65859, 65860, 65861, 65862],
-    9:[65863, 65864, 65865, 65866, 65867, 65868, 65869],
-    14:[65870, 65871, 65872, 65873, 65874],
-    19:[65875, 65876, 65877, 65878, 65879, 65880, 65881, 65882],
-    24:[65883, 65884, 65885, 65886],
-    26:[65887, 65888, 65889, 65890, 65891, 65892],
-    31:[65905, 65906, 65907, 65908, 65909],
-    40:[
+    6: [65859, 65860, 65861, 65862],
+    9: [65863, 65864, 65865, 65866, 65867, 65868, 65869],
+    14: [65870, 65871, 65872, 65873, 65874],
+    19: [65875, 65876, 65877, 65878, 65879, 65880, 65881, 65882],
+    24: [65883, 65884, 65885, 65886],
+    26: [65887, 65888, 65889, 65890, 65891, 65892],
+    31: [65905, 65906, 65907, 65908, 65909],
+    40: [
       65910, 65911, 65912, 65913, 65914, 65915, 65916, 65917, 65918, 65919,
       65920
     ],
-    42_1:[
+    42_1: [
       65944, 65945, 65946, 65947, 65948, 65949, 65950, 65951, 65952, 65953,
       65954, 65955, 65956, 65957, 65958, 65959
     ],
-  42_2:[
+    42_2: [
       65962, 65963, 65964, 65965, 65966, 65967, 65968, 65969, 65970, 65971,
       65972, 65973, 65974, 65975, 65976, 65977
     ]
   },
-  2:{
-    46:[65979, 65980, 65981],
-    49:[65983, 65984],
-    52:[65986, 65987],
-    54_1:[65990, 65991, 65992, 65993, 65994, 65995, 65996, 65997, 65998, 65999,
-    66000, 66001, 66002, 66003, 66004, 66005],
-    54_2:[66008, 66009, 66010, 66011, 66012, 66013, 66014, 66015, 66016, 66017,
-    66018, 66019, 66020, 66021, 66022, 66023]
+  2: {
+    46: [65979, 65980, 65981],
+    49: [65983, 65984],
+    52: [65986, 65987],
+    54_1: [
+      65990, 65991, 65992, 65993, 65994, 65995, 65996, 65997, 65998, 65999,
+      66000, 66001, 66002, 66003, 66004, 66005
+    ],
+    54_2: [
+      66008, 66009, 66010, 66011, 66012, 66013, 66014, 66015, 66016, 66017,
+      66018, 66019, 66020, 66021, 66022, 66023
+    ]
   },
-  3:{
-    64:[66025, 66026, 66027, 66028, 66029],
-    73:[66031, 66032, 66033, 66034, 66035],
-    78:[66037, 66038, 66039, 66040, 66041, 66042],
+  3: {
+    64: [66025, 66026, 66027, 66028, 66029],
+    73: [66031, 66032, 66033, 66034, 66035],
+    78: [66037, 66038, 66039, 66040, 66041, 66042],
     80_1: [
       66051, 66052, 66053, 66054, 66055, 66056, 66057, 66058, 66059, 66060,
       66045, 66046, 66047, 66048, 66049, 66050
     ],
-    80_2:[
+    80_2: [
       66063, 66064, 66065, 66066, 66067, 66068, 66069, 66070, 66071, 66072,
       66073, 66074, 66075, 66076, 66077, 66078
     ]
   },
-  4:{
-    91:[66080, 66081, 66082],
-    97:[66084, 66085],
-    98_1:[
+  4: {
+    91: [66080, 66081, 66082],
+    97: [66084, 66085],
+    98_1: [
       66102, 66103, 66104, 66105, 66106, 66107, 66108, 66109, 66110, 66111,
       66090, 66091, 66092, 66093, 66094, 66095
     ],
-    98_2:[
+    98_2: [
       66112, 66113, 66114, 66115, 66116, 66117, 66118, 66119, 66120, 66121,
       66096, 66097, 66098, 66099, 66100, 66101
     ]
   },
-  5:{
-    119:[66125, 66126, 66127, 66128, 66129, 66130, 66131],
-    124:[66134, 66135, 66136, 66137, 66138],
-    129:[66144, 66145, 66146, 66147, 66148],
-    133:[66150, 66151, 66152, 66153, 66154],
-    134_1:[
+  5: {
+    119: [66125, 66126, 66127, 66128, 66129, 66130, 66131],
+    124: [66134, 66135, 66136, 66137, 66138],
+    129: [66144, 66145, 66146, 66147, 66148],
+    133: [66150, 66151, 66152, 66153, 66154],
+    134_1: [
       66159, 66160, 66161, 66162, 66163, 66164, 66165, 66166, 66167, 66168,
       66179, 66180, 66181, 66182, 66183, 66184
     ],
-    134_2:[
+    134_2: [
       66169, 66170, 66171, 66172, 66173, 66174, 66175, 66176, 66177, 66178,
       66185, 66186, 66187, 66188, 66189, 66190
     ]
   },
-  6:{
-    142:[66192, 66193, 66194, 66195, 66196],
-    152:[66198, 66199, 66200, 66201, 66202],
-    156:[66204, 66205, 66206, 66207, 66208],
-    159:[66210, 66211, 66212],
-    164:[66214, 66215, 66216, 66217, 66218],
-    166_1:[
+  6: {
+    142: [66192, 66193, 66194, 66195, 66196],
+    152: [66198, 66199, 66200, 66201, 66202],
+    156: [66204, 66205, 66206, 66207, 66208],
+    159: [66210, 66211, 66212],
+    164: [66214, 66215, 66216, 66217, 66218],
+    166_1: [
       66223, 66224, 66225, 66226, 66227, 66228, 66229, 66230, 66231, 66232,
       66243, 66244, 66245, 66246, 66247, 66248
     ],
-    166_2:[
+    166_2: [
       66233, 66234, 66235, 66236, 66237, 66238, 66239, 66240, 66241, 66242,
       66249, 66250, 66251, 66252, 66253, 66254
     ]
   },
-  7:{
-    169:[66261, 66262, 66263],
-    174:[66265, 66266, 66267],
-    177:[66269, 66270, 66271],
-    188:[666273, 66274, 66275, 66276, 66277, 66278, 66279],
-    207:[
+  7: {
+    169: [66261, 66262, 66263],
+    174: [66265, 66266, 66267],
+    177: [66269, 66270, 66271],
+    188: [666273, 66274, 66275, 66276, 66277, 66278, 66279],
+    207: [
       66287, 66288, 66289, 66290, 66291, 66292, 66293, 66294, 66295, 66296,
       66297, 66298
     ],
-    209_1:[
+    209_1: [
       66303, 66304, 66305, 66306, 66307, 66308, 66309, 66310, 66311, 66312,
       66323, 66324, 66325, 66326, 66327, 66328
     ],
-    209_2:[
+    209_2: [
       66313, 66314, 66315, 66316, 66317, 66318, 66319, 66320, 66321, 66322,
       66329, 66330, 66331, 66332, 66333, 66334
     ]
   },
-  8:{
-    215:[66336, 66337, 66338, 66339],
-    227:[
+  8: {
+    215: [66336, 66337, 66338, 66339],
+    227: [
       66341, 66342, 66343, 66344, 66345, 66346, 66347, 66348, 66349, 66350,
       66351, 66352, 66353, 66354
     ],
-    232:[66356, 66357, 66358],
-    234_1:[
+    232: [66356, 66357, 66358],
+    234_1: [
       66363, 66364, 66365, 66366, 66367, 66368, 66369, 66370, 66371, 66372,
       66383, 66384, 66385, 66386, 66387, 66388
     ],
-    234_2:[
+    234_2: [
       66373, 66374, 66375, 66376, 66377, 66378, 66379, 66380, 66381, 66382,
       66389, 66390, 66391, 66392, 66393, 66394
     ]
   },
-  9:{
-    243:[66396,66397,66398,66399,66400],
-    255:[66412,66413,66414,66415,66416],
-    256_1:[66418,66419,66420,66421,66422,66423,66424,66425,66426,66427,66438,66439,66440,66441,66442,66443],
-    256_2:[66428,66429,66430,66431,66432,66433,66434,66435,66436,66437,66402,66403,66404,66405,66406,66407]
+  9: {
+    243: [66396, 66397, 66398, 66399, 66400],
+    255: [66412, 66413, 66414, 66415, 66416],
+    256_1: [
+      66418, 66419, 66420, 66421, 66422, 66423, 66424, 66425, 66426, 66427,
+      66438, 66439, 66440, 66441, 66442, 66443
+    ],
+    256_2: [
+      66428, 66429, 66430, 66431, 66432, 66433, 66434, 66435, 66436, 66437,
+      66402, 66403, 66404, 66405, 66406, 66407
+    ]
   },
-  10:{
-    267:[66445,66446,66447,66448,66449,66450],
-    272:[66455,66456,66457,66458,66459],
-    273_1:[66469,66470,66471,66472,66473,66474,66475,66476,66477,66478,66502,66503,66504,66505,66506,66507],
-    273_2:[66479,66480,66481,66482,66483,66484,66485,66486,66487,66488,66495,66496,66497,66498,66499,66500]
+  10: {
+    267: [66445, 66446, 66447, 66448, 66449, 66450],
+    272: [66455, 66456, 66457, 66458, 66459],
+    273_1: [
+      66469, 66470, 66471, 66472, 66473, 66474, 66475, 66476, 66477, 66478,
+      66502, 66503, 66504, 66505, 66506, 66507
+    ],
+    273_2: [
+      66479, 66480, 66481, 66482, 66483, 66484, 66485, 66486, 66487, 66488,
+      66495, 66496, 66497, 66498, 66499, 66500
+    ]
   },
-  11:{
-    274_1:[66529,66530,66531,66532,66533,66534,66535,66536,66537,66538,66629,66630,66631,66632,66633,66634],
-    274_2:[66539,66540,66541,66542,66543,66544,66545,66546,66547,66548,66635,66636,66637,66638,66639,66640],
-    274_3:[66549,66550,66551,66552,66553,66554,66555,66556,66557,66558,66643,66644,66645,66646,66647,66648],
-    274_4:[66559,66560,66561,66562,66563,66564,66565,66566,66567,66568,66650,66651,66652,66653,66654,66655],
-    274_5:[66569,66570,66571,66572,66573,66574,66575,66576,66577,66578,66657,66658,66659,66660,66661,66662],
-    274_6:[66579,66580,66581,66582,66583,66584,66585,66586,66587,66588,66663,66664,66665,66666,66667,66668],
-    274_7:[66589,66590,66591,66592,66593,66594,66595,66596,66597,66598,66669,66670,66671,66672,66673,66674],
-    274_8:[66599,66600,66601,66602,66603,66604,66605,66606,66607,66608,66675,66676,66677,66678,66679,66680],
-    274_9:[66609,66610,66611,66612,66613,66614,66615,66616,66617,66618,66681,66682,66683,66684,66685,66686],
-    274_10:[66619,66620,66621,66622,66623,66624,66625,66626,66627,66628,66688,66689,66690,66691,66692,66693],
+  11: {
+    274_1: [
+      66529, 66530, 66531, 66532, 66533, 66534, 66535, 66536, 66537, 66538,
+      66629, 66630, 66631, 66632, 66633, 66634
+    ],
+    274_2: [
+      66539, 66540, 66541, 66542, 66543, 66544, 66545, 66546, 66547, 66548,
+      66635, 66636, 66637, 66638, 66639, 66640
+    ],
+    274_3: [
+      66549, 66550, 66551, 66552, 66553, 66554, 66555, 66556, 66557, 66558,
+      66643, 66644, 66645, 66646, 66647, 66648
+    ],
+    274_4: [
+      66559, 66560, 66561, 66562, 66563, 66564, 66565, 66566, 66567, 66568,
+      66650, 66651, 66652, 66653, 66654, 66655
+    ],
+    274_5: [
+      66569, 66570, 66571, 66572, 66573, 66574, 66575, 66576, 66577, 66578,
+      66657, 66658, 66659, 66660, 66661, 66662
+    ],
+    274_6: [
+      66579, 66580, 66581, 66582, 66583, 66584, 66585, 66586, 66587, 66588,
+      66663, 66664, 66665, 66666, 66667, 66668
+    ],
+    274_7: [
+      66589, 66590, 66591, 66592, 66593, 66594, 66595, 66596, 66597, 66598,
+      66669, 66670, 66671, 66672, 66673, 66674
+    ],
+    274_8: [
+      66599, 66600, 66601, 66602, 66603, 66604, 66605, 66606, 66607, 66608,
+      66675, 66676, 66677, 66678, 66679, 66680
+    ],
+    274_9: [
+      66609, 66610, 66611, 66612, 66613, 66614, 66615, 66616, 66617, 66618,
+      66681, 66682, 66683, 66684, 66685, 66686
+    ],
+    274_10: [
+      66619, 66620, 66621, 66622, 66623, 66624, 66625, 66626, 66627, 66628,
+      66688, 66689, 66690, 66691, 66692, 66693
+    ]
   }
-}
+};
 
-export default testData
+export default testData;
diff --git a/src/books/content/js/examinationList.js b/src/books/content/js/examinationList.js
index 7d3a6a5..7f84294 100644
--- a/src/books/content/js/examinationList.js
+++ b/src/books/content/js/examinationList.js
@@ -1,7 +1,7 @@
-  const testData =  {
+const testData = {
   1: {
-    9: [66984,66985,66986],
-  },
-}
+    9: [66984, 66985, 66986]
+  }
+};
 
-export default testData
+export default testData;
diff --git a/src/main.js b/src/main.js
index 17ec245..0a4b258 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,12 +1,6 @@
 import Vue from "vue";
 import App from "./App.vue";
 import less from "less";
-// 瀛﹀墠鍎跨鍗敓涓庡仴搴�
-
-
-// import './books/content/css/default.less';
-// 宓屽叆寮忕粍鎬佹帶鍒舵妧鏈�
-// import './books/embedded/assets/main.less';
 import ElementUI from "element-ui";
 import "element-ui/lib/theme-chalk/index.css";
 import store from "./store";
diff --git a/src/plugin/axios/index.js b/src/plugin/axios/index.js
index 5171304..80a8050 100644
--- a/src/plugin/axios/index.js
+++ b/src/plugin/axios/index.js
@@ -3,7 +3,7 @@
 // import toolClass from '@/assets/js/toolClass.js'
 // 鍒涘缓 axios 瀹炰緥
 const service = axios.create({
-  baseURL: myConfig.requestCtx,
+  baseURL: process.env.VUE_APP_API_URL,
   timeout: myConfig.requestTimeOut // 璇锋眰瓒呮椂鏃堕棿
 })
 
diff --git a/vue.config.js b/vue.config.js
index 9b41f49..b375ec8 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,7 +1,6 @@
 const { defineConfig } = require("@vue/cli-service");
 module.exports = defineConfig({
-  // publicPath: 'http://182.92.203.7:3007/books/book/3',
-  publicPath:'/books/book',
+  publicPath: process.env.PUBLIC_PATH,
   transpileDependencies: true,
   lintOnSave: false,
   // devServer: {
@@ -19,8 +18,8 @@
     output: {
       library: `app-content`,
       libraryTarget: "umd",
-      chunkLoadingGlobal: `webpackJsonp_app-content`,
-    },
+      chunkLoadingGlobal: `webpackJsonp_app-content`
+    }
   },
   chainWebpack: (config) => {
     config.module
@@ -32,8 +31,8 @@
       .loader("change-prefix-loader")
       .options({
         prefix: "el-",
-        replace: "gp-",
+        replace: "gp-"
       })
       .end();
-  },
+  }
 });

--
Gitblit v1.9.1