mas-server 2.0.57 → 2.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,14 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
- <meta charset="UTF-8">
5
- <link rel="icon" href="./favicon.ico">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="./favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Vite App</title>
8
- <script type="module" crossorigin src="./assets/index-7aebccaa.js"></script>
9
- <link rel="stylesheet" href="./assets/index-a3168eed.css">
8
+ <script type="module" crossorigin src="./assets/index-e07831eb.js"></script>
9
+ <link rel="stylesheet" href="./assets/index-cfd53149.css" />
10
10
  </head>
11
11
  <body>
12
12
  <div id="app"></div>
13
-
14
13
  </body>
15
14
  </html>
package/src/index.ts CHANGED
@@ -56,7 +56,8 @@ export function getApp(
56
56
  path.join(state.DIRNAME, "config/defaultApiConfig.ts")
57
57
  );
58
58
  state.config = config;
59
- state.apiCN = [];
59
+ state.apiCN =
60
+ require(path.join(state.DIRNAME, "config/docNav.ts"))?.default || {};
60
61
  // new express
61
62
  const app = express();
62
63
  // ip限制
@@ -0,0 +1,4 @@
1
+ export default {
2
+ "/api/example": "响应示例",
3
+ "/api": "接口",
4
+ };
@@ -4,6 +4,7 @@ export const config: apiConfigTypeItem = {
4
4
  name: "效验数组",
5
5
  methods: "post",
6
6
  validFormat: [Number],
7
+ example: [1, 2],
7
8
  };
8
9
  export default async (req: masReq, res: masRes) => {
9
10
  console.log(req.body);