From f03cf23f3acbd5582a16c263aa6bf83b260ec906 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 28 九月 2026 09:53:19 +0800
Subject: [PATCH] feat(inspection): 接口
---
src/main.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/main.js b/src/main.js
index 16962eb..8cc126f 100644
--- a/src/main.js
+++ b/src/main.js
@@ -65,7 +65,10 @@
Vue.prototype.HaveJson = (val) => {
return JSON.parse(JSON.stringify(val));
};
-Vue.prototype.javaApi = "http://192.168.21.53:8001/lims";
+const apiBase = process.env.VUE_APP_BASE_URL || process.env.VUE_APP_BASE_API;
+Vue.prototype.javaApi = /^https?:\/\//i.test(apiBase)
+ ? apiBase.replace(/\/$/, "")
+ : window.location.origin + "/" + apiBase.replace(/^\/+|\/+$/g, "");
Vue.prototype.checkPermi = checkPermi;
Vue.prototype.uploadHeader = {
Authorization: "Bearer " + getToken(),
--
Gitblit v1.9.3