张延森 4 years ago
parent
commit
b452fe2eb4

+ 1
- 1
generator_ice/build.json View File

@@ -18,7 +18,7 @@
18 18
   "proxy": {
19 19
     "/**": {
20 20
       "enable": true,
21
-      "target": "http://127.0.0.1:8080"
21
+      "target": "http://127.0.0.1:8081"
22 22
     }
23 23
   },
24 24
   "publicPath": "./"

+ 14
- 4
generator_ice/src/pages/Dashboard/components/Guide/index.jsx View File

@@ -1,10 +1,17 @@
1 1
 import React, { useState, useEffect, useRef } from 'react';
2
-import { Button,Form,Input,Message,Select } from '@alifd/next';
2
+import { Button,Form,Input,Message,Select, Switch } from '@alifd/next';
3 3
 import styles from './index.module.scss';
4 4
 import { request } from 'ice';
5 5
 
6
-const postData = {mysqlIp:'',mysqlPort:'3306',mysqlUsername:'',mysqlUserpass:'',mysqlName:''}
7
-const tjData = {packPath:'com.huiju.estateagents',author:'fxf'}
6
+const postData = {
7
+    mysqlIp: process.env.NODE_ENV === 'development' ? 'rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com' : undefined,
8
+    mysqlPort: '3306',
9
+    mysqlUsername: 'root',
10
+    mysqlUserpass: process.env.NODE_ENV === 'development' ? 'DQ@0lW##kBb2+-jPZC1s$Ma0h5$9W((q' : undefined,
11
+    mysqlName: '',
12
+}
13
+
14
+const tjData = { packPath:'com.yunzhi',author:'yansen' }
8 15
 const FormItem = Form.Item;
9 16
 
10 17
 const formItemLayout = {
@@ -67,7 +74,7 @@ const Guide = props => {
67 74
                 <Input name="mysqlUsername" placeholder="请输入数据库用户名"/>
68 75
             </FormItem>
69 76
             <FormItem label="数据库密码" required requiredMessage="必填">
70
-                <Input name="mysqlUserpass" placeholder="请输入数据库密码"/>
77
+                <Input.Password name="mysqlUserpass" placeholder="请输入数据库密码"/>
71 78
             </FormItem>
72 79
             <FormItem label="数据库库名" required requiredMessage="必填">
73 80
                 <Input name="mysqlName" placeholder="请输入数据库库名"/>
@@ -85,6 +92,9 @@ const Guide = props => {
85 92
             <FormItem label="作者">
86 93
                 <Input name="author" placeholder="请输入作者"/>
87 94
             </FormItem>
95
+            <FormItem label="开启 Swagger2" style={{  textAlign: 'left' }}>
96
+                <Switch name="swagger2" checkedChildren="on" unCheckedChildren="off" style={{ width: `60px` }} />
97
+            </FormItem>
88 98
             <FormItem label="要生成代码的表" required requiredMessage="必填">
89 99
                 <Select name="mysqlLib" mode="multiple" showSearch dataSource={dataSource} style={{width: 700}} />
90 100
             </FormItem>

+ 14139
- 0
generator_ice/yarn.lock
File diff suppressed because it is too large
View File