Przeglądaj źródła

添加代理 删除config多余

duxiangyu 3 lat temu
rodzic
commit
499e9f4c31

+ 1 - 2
public/systemConf.js

@@ -1,7 +1,6 @@
 var __systemConf = {
   //基础数据根域名
-  baseServiceUrl: 'http://develop.ysbdtp.com',
-  oldAdmServiceUrl: '',
+  baseServiceUrl: '/api',
   //导航菜单
   menus: [{
     "id": "ready",

+ 1 - 1
src/components/old-adm/ledger/facility/index.vue

@@ -177,7 +177,7 @@ export default {
             let param = {
                 filters: "not propertyId isnull",
             };
-            let [res1, res2] = await Promise.all([Equip.countEquip(), Equip.countEquip(param)])
+            let [res1, res2] = await Promise.all([Equip.countEquip({filters: ''}), Equip.countEquip(param)])
             console.log(res1, res2)
             // await Equip.countEquip({}, (res) => {
             //     console.log(res)

+ 6 - 1
src/controller/old-adm/buildController.ts

@@ -1,6 +1,11 @@
 import FloorController from "./floorController";
+import { baseHttpUtils } from "@/utils/http/baseHttpUtils";
 class BuildController {
-  static async buildingQuery(params) {}
+  static http = new baseHttpUtils();
+  static pre = "/datacenter/object";
+  static async buildingQuery(params) {
+    return await this.http.postRequest(this.pre + "/building/query", params);
+  }
   static async getData(buildFloorData) {
     let data,
       buildParams = {

+ 3 - 9
vue.config.js

@@ -9,23 +9,17 @@ module.exports = {
   devServer: {
     port: 8081,
     proxy: {
-      '/2dapi/jsonz': {
+      '/api': {
         // 此处的写法,目的是为了 将 /2dapi/jsonz 替换target的值
         // target: 'http://apmstandard/',
-        target: 'http://82.157.159.41',
+        target: 'http://develop.ysbdtp.com',
         // 允许跨域
         changeOrigin: true,
         ws: true,
         pathRewrite: {
-          '^/2dapi/jsonz': ''
+          '^/api': ''
         }
       },
-      '/2dapi/spacelist': {
-        target: 'http://82.157.159.41',
-        pathRewrite: { '^/2dapi/spacelist': '' },
-        changeOrigin: true,
-        secure: false
-      },
     }
   },
   pages: {