zhangweixin hace 4 años
padre
commit
22ab10ebab

+ 2 - 1
docs/.vuepress/components/ServiceApi.vue

@@ -16,8 +16,9 @@ export default {
     },
     props: ["sys"],
     created: function() {
+        console.log(Location)
         Axios.get(
-            `${window.location.origin}/${this.sys}/v2/api-docs`,
+            `${Location.origin}/${this.sys}/v2/api-docs`,
             {}
         ).then(res => {
             this.api = res.data;

+ 4 - 3
docs/.vuepress/components/TableDesig.vue

@@ -51,8 +51,9 @@ export default {
   computed: {},
   methods: {
     getData() {
+      const origin = Location.origin
       Axios.get(
-        `${window.location.origin}/${this.sys}/--database-doc--/table-info?schema=${
+        `/${this.sys}/--database-doc--/table-info?schema=${
           this.schema
         }&table=${this.table}`,
         {}
@@ -88,7 +89,7 @@ import javax.persistence.Table
 open class ${table} : BaseInfo(),Comparator<${table}> {
 `
       );
-      this.tableData.forEach(element => {
+      this.tableData.ColumnList.forEach(element => {
         strBuild.append(`    /** ${element.Description} */`);
         if (element.Nullable == "YES") {
           strBuild.append(
@@ -262,7 +263,7 @@ open class ${className} {
     },
     // 获取路径名称以及路径type
     getUrlData() {
-      const dataArr = window.location.href.split("#")[1].split("-");
+      const dataArr = Location.href.split("#")[1].split("-");
       let obj = {};
       if (dataArr.length == 2) {
         obj = {

+ 1 - 1
docs/.vuepress/config.js

@@ -157,7 +157,7 @@ module.exports = {
                 }
             },
             '/datacenter': {
-                target: 'http://adm.sagacloud.cn:8080/datacenter',
+                target: 'http://47.93.22.124:8080/datacenter',
                 changeOrigin: true,
                 secure: false,
                 pathRewrite: {

+ 1 - 0
docs/.vuepress/templates/dev.html

@@ -8,6 +8,7 @@
 <body>
 <script>
     const Image = window.Image;//定义global
+    const Location = window.location;
 </script>
 <div id="app"></div>
 </body>

+ 1 - 0
docs/.vuepress/templates/ssr.html

@@ -11,6 +11,7 @@
     {{{ renderStyles() }}}
     <script>
         const Image = window.Image;//定义global变量
+        const Location = window.location;
     </script>
 </head>
 <body>

+ 1 - 1
docs/README.md

@@ -11,4 +11,4 @@ footer: MIT Licensed | Copyright © 2009-present 北京博锐尚格科技有限
 
 # 参考文档
 
-<ServiceApi sys="datacenter"/>
+