wyling 3 лет назад
Родитель
Сommit
80bee201b1

+ 1 - 1
package.json

@@ -3,7 +3,7 @@
   "version": "0.0.0",
   "scripts": {
     "dev": "vite",
-    "build": "vue-tsc --noEmit && vite build",
+    "build": "vite build",
     "serve": "vite preview"
   },
   "dependencies": {

+ 2 - 2
src/api/modules/auth.ts

@@ -20,7 +20,7 @@ interface loginRes {
  */
 export async function login(code: LocationQueryValue | LocationQueryValue[]) {
   let res = await request({
-    url: "/twzd-admin/login/code/test",
+    url: "/login/code/test",
     method: "post",
     headers: {
       isToken: false,
@@ -34,6 +34,6 @@ export async function login(code: LocationQueryValue | LocationQueryValue[]) {
 
 export async function userInfo() {
   return request({
-    url: "/twzd-admin/student/user/info",
+    url: "/student/user/info",
   });
 }

+ 3 - 3
src/api/modules/pay.ts

@@ -37,7 +37,7 @@ function onBridgeReady(payConfig: PayConfig) {
  */
 export async function prepareOrder(dictCode: number) {
   let res = await request({
-    url: "/twzd-admin/student/wx/prepareOrder",
+    url: "/student/wx/prepareOrder",
     method: "post",
     data: {
       dictCode,
@@ -56,12 +56,12 @@ export async function prepareOrder(dictCode: number) {
  */
 export async function LoopPrepareOrder() {
   // let res = await request({
-  //   url: "/twzd-admin/student/wx/prepareOrder-test",
+  //   url: "/student/wx/prepareOrder-test",
   //   method: "post",
   // });
 
   let res = await request({
-    url: "/twzd-admin/student/wx/prepareOrder",
+    url: "/student/wx/prepareOrder",
     method: "post",
     data: {
       dictCode: 33,

+ 2 - 2
src/api/modules/test.ts

@@ -61,7 +61,7 @@ export async function getTopicList(params: any) {
   };
 
   let res = await request({
-    url: "/twzd-admin/qustion/info/list",
+    url: "/qustion/info/list",
     params,
   });
 
@@ -91,7 +91,7 @@ export async function getTopicList(params: any) {
  */
 export async function getTopicClass(path: string, params: any) {
   return request({
-    url: `/twzd-admin/qustion/info/${path}`,
+    url: `/qustion/info/${path}`,
     params,
   });
 }

+ 2 - 2
src/api/modules/testScores.ts

@@ -6,7 +6,7 @@ import request from "../request";
  */
 export const getTestScoresList = async () => {
   let res = await request({
-    url: "/twzd-admin/score/info/list",
+    url: "/score/info/list",
   });
 
   return res.data;
@@ -18,7 +18,7 @@ export const getTestScoresList = async () => {
  */
 export const getTestScoresInfo = async () => {
     let res = await request({
-      url: "/twzd-admin/score/info/getScoreInfoAll",
+      url: "/score/info/getScoreInfoAll",
     });
   
     return res.data;

+ 1 - 1
src/api/request.ts

@@ -2,7 +2,7 @@ import axios from "axios";
 import store from "@/store";
 
 const request = axios.create({
-  baseURL: "/api",
+  baseURL: "/prod-api",
 });
 
 request.interceptors.request.use((config) => {

+ 3 - 3
vite.config.ts

@@ -13,10 +13,10 @@ export default defineConfig({
   server: {
     host: "0.0.0.0",
     proxy: {
-      "/api": {
-        target: "http://192.168.8.213:8080",
+      "/prod-api": {
+        target: "http://192.168.8.213:8080/twzd-admin",
         changeOrigin: true,
-        rewrite: (path) => path.replace(/^\/api/, ""),
+        rewrite: (path) => path.replace(/^\/prod-api/, ""),
       },
     },
   },