傅行帆 5 years ago
parent
commit
7eea072c68

+ 2
- 1
generator_ice/build.json View File

@@ -20,5 +20,6 @@
20 20
       "enable": true,
21 21
       "target": "http://127.0.0.1:8080"
22 22
     }
23
-  }
23
+  },
24
+  "publicPath": "./"
24 25
 }

+ 6
- 5
generator_ice/src/pages/Dashboard/components/Guide/index.jsx View File

@@ -3,7 +3,8 @@ import { Button,Form,Input,Message,Select } from '@alifd/next';
3 3
 import styles from './index.module.scss';
4 4
 import { request } from 'ice';
5 5
 
6
-const postData = {mysqlIp:'123.57.65.31',mysqlPort:'3306',mysqlUsername:'root',mysqlUserpass:'LUfZGvh7j1^qA*2c',mysqlName:'estateagents_test'}
6
+const postData = {mysqlIp:'',mysqlPort:'3306',mysqlUsername:'',mysqlUserpass:'',mysqlName:''}
7
+const tjData = {packPath:'com.huiju.estateagents',author:'fxf'}
7 8
 const FormItem = Form.Item;
8 9
 
9 10
 const formItemLayout = {
@@ -19,7 +20,7 @@ const Guide = props => {
19 20
         console.log('Get form value:', values);
20 21
         setDbData(values)
21 22
         request({
22
-          url: '/api/connection',
23
+          url: '/mydb/connection',
23 24
           method: 'post',
24 25
           data: values
25 26
         }).then((response) => {
@@ -31,7 +32,7 @@ const Guide = props => {
31 32
     const createdCode = (values) => {
32 33
         console.log('Get form value22:', {...values,...dbData});
33 34
         request({
34
-            url: '/api/create',
35
+            url: '/mydb/create',
35 36
             method: 'post',
36 37
             responseType: 'arraybuffer',
37 38
             data: {...values,...dbData}
@@ -77,14 +78,14 @@ const Guide = props => {
77 78
         </Form>
78 79
       </div>
79 80
       <div>
80
-      <Form style={{width: '60%'}} {...formItemLayout}>
81
+      <Form style={{width: '60%'}} {...formItemLayout} value={tjData}>
81 82
             <FormItem label="包路径" help="如:com.huiju.estateagents">
82 83
                 <Input name="packPath" placeholder="请输入包路径"/>
83 84
             </FormItem>
84 85
             <FormItem label="作者">
85 86
                 <Input name="author" placeholder="请输入作者"/>
86 87
             </FormItem>
87
-            <FormItem label="要生成代码的" required requiredMessage="必填">
88
+            <FormItem label="要生成代码的" required requiredMessage="必填">
88 89
                 <Select name="mysqlLib" mode="multiple" showSearch dataSource={dataSource} style={{width: 700}} />
89 90
             </FormItem>
90 91
             <FormItem label=" ">