Sfoglia il codice sorgente

fix: qpi开发基础路径动态获取

vera_min 5 mesi fa
parent
commit
20dab77bd0
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      src/views/apihub/component/edit.vue

+ 4 - 1
src/views/apihub/component/edit.vue

@@ -56,7 +56,8 @@
             <el-form-item label="API路径" prop="path">
               <div class="path-input-container">
                 <div class="path-prefix">
-                  http://127.0.0.1:8199/api/v1/apihub/
+                  <!-- http://127.0.0.1:8199/api/v1/apihub/ -->
+                  {{ originUrl }}
                 </div>
                 <el-input v-model="formData.path" placeholder="请输入API路径" class="path-input" />
               </div>
@@ -232,6 +233,7 @@ import { ref, reactive, nextTick } from "vue";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { ruleRequired } from "/@/utils/validator";
 import api from "/@/api/modules/apiHub";
+import getOrigin from '/@/utils/origin';
 import {
   Plus as ElePlus,
   Delete as EleDelete,
@@ -249,6 +251,7 @@ const activeTab = ref('basic'); // 当前激活的Tab
 const isFullscreen = ref(false); // 是否全屏显示
 const lineCount = ref(1); // SQL编辑器行数
 const pluginParamsPlaceholder = '插件参数 (JSON格式,例如:{"key": "value"})';
+const originUrl: string = getOrigin("");
 
 // Monaco Editor 配置项
 const monacoOptions = {