liting2017 6 years ago
parent
commit
76d622083c

+ 33 - 4
js/component/account/set/newAccount/contacts.jsx

@@ -6,7 +6,7 @@
 
 import React from 'react';
 import './contacts.less';
-import{ Row ,Col} from 'antd';
+import{ Row ,Col,Button,Card,Input} from 'antd';
 
 class Contancts extends React.Component{
     constructor(props){
@@ -15,7 +15,19 @@ class Contancts extends React.Component{
             loading:false
         }
     }
+    //添加联系人
+    addContact(){
+
+    }
     render(){
+        const formItemLayout = {
+			labelCol: {
+				span: 6
+			},
+			wrapperCol: {
+				span: 14
+			}
+		};
         return (
             <div className="contact-wrap">
                 <Row>
@@ -23,12 +35,29 @@ class Contancts extends React.Component{
                         <h4>联系人</h4>
                     </Col> 
                    <Col span={6} offset={8}>
-                        <Button>添加常用联系人</Button>
+                        <Button size="large" type="primary" onClick={this.addContact.bind(this)}>添加常用联系人</Button>
                    </Col>
                 </Row>
-                <Row>
+                <Row className="card">
                     <Card>
-                        
+                        <Row>
+                            <Col span={6}>
+                                <FormItem {...formItemLayout} label="姓名">
+                                    <Input
+                                        style={{ width: '90%' }}
+                                        placeholder="联系人姓名"
+                                        value={this.state.name}
+                                        onChange={(e) => {
+                                            this.setState({ name: e.target.value });
+                                        }}
+                                    />
+                                    <span className="color-red"> * </span>
+                                </FormItem>
+                            </Col>
+                            <Col span={6}>2</Col>
+                            <Col span={6}>3</Col>
+                            <Col span={6}>4</Col>
+                        </Row>
                     </Card>
                 </Row>
             </div>

+ 5 - 1
js/component/account/set/newAccount/contacts.less

@@ -1,4 +1,8 @@
 .contact-wrap{
-    padding:10px;
+    padding:20px 20px 100px;
     background-color:#ffffff; 
+    .card{
+        width: 70%;
+        margin-top: 15px
+    }
 }

+ 2 - 2
package.json

@@ -6,9 +6,9 @@
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
     "dlldev": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy dev --env.host 'http://127.0.0.1'",
-    "dlltest": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy test --env.host 'http://static.jishutao.com'",
+    "dlltest": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy test --env.host 'http://statics.jishutao.com'",
     "dllstage": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy stage --env.host 'http://aftts.hnzhiming.com'",
-    "dllpro": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy prod --env.host 'http://s.jishutao.com'",
+    "dllpro": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy prod --env.host 'http://ss.jishutao.com'",
     "build": "node bin/clean.js && webpack --progress --colors --env.deploy dev",
     "buildtest": "node bin/clean.js && webpack --progress --colors --env.deploy test",
     "buildstage": "node bin/clean.js && webpack --progress --colors --env.deploy stage",

+ 3 - 3
webpack-dll.config.js

@@ -13,15 +13,15 @@ module.exports = (function () {
 	let staticHost = 'http://127.0.0.1';    
     switch (argv.env.deploy) {
         case 'test':
-            staticHost = 'http://static.jishutao.com';
+            staticHost = 'http://statics.jishutao.com';
             break;
         case 'prod':
-            staticHost = 'http://s.jishutao.com';
+            staticHost = 'http://ss.jishutao.com';
             break;
         default:
             break;
     }
-	staticHost = staticHost + '/' + version + '/';
+	staticHost = staticHost + '/client/' + version + '/';
 	theme['@icon-url'] = '"' + staticHost + 'css/iconfont/iconfont"'
   var dllContext = path.resolve(dirVars.dllDir, './' + argv.env.deploy);
   return {

+ 4 - 5
webpack.config.js

@@ -279,25 +279,24 @@ module.exports = (function () {
         }));
     }
 
-    //let staticHost = 'http://afts.hnzhiming.com';
     let staticHost = 'http://127.0.0.1';    
     switch (argv.env.deploy) {
         case 'test':
-            staticHost = 'http://static.jishutao.com';
+            staticHost = 'http://statics.jishutao.com';
             break;
         case 'prod':
-            staticHost = 'http://s.jishutao.com';
+            staticHost = 'http://ss.jishutao.com';
             break;
         default:
             break;
     }
-    staticHost = staticHost + '/' + version + '/';
+    staticHost = staticHost + '/client/' + version + '/';
     theme['@icon-url'] = '"' + staticHost + 'css/iconfont/iconfont"'
     return {
     	//devtool:"source-map",
         entry: isWatch ? entries.watch : entries.prod,
         output: {
-            path: path.resolve(__dirname, './build/' + argv.env.deploy + '/' + version),
+            path: path.resolve(__dirname, './build/' + argv.env.deploy + '/client/' + version),
             filename: '[name].js',
             publicPath: staticHost,
             chunkFilename: 'chunks/[name].[hash:8].js'