Browse Source

账号设置完成(下载bug调试中

yee 8 years ago
parent
commit
86cc8802aa

+ 120 - 33
apidoc.md

@@ -8,9 +8,9 @@ type 0为个人会员/1为团体会员
 request data
 ```json
 {
-	"mobile": "13600000000",
+    "mobile": "13600000000",
 	"password": "123456",
-	"type"    : 1,
+	"type"    :1,
 	"companyName" : "XX科技股份有限公司",
 	"contacts"    : "张三",
 	"verificationCode" : "AE5F",
@@ -34,6 +34,8 @@ response data
 }
 ```
 
+/login  (method=get)
+登出
 
 # /signin  
 登录
@@ -65,7 +67,7 @@ response data
 }
 ```
 
-/api/user/afterSignIn
+/api/user/afterSignIn    (method = get)
 登陆后获取用户基本信息
 request data
 ```json
@@ -101,7 +103,7 @@ response data
 获取手机验证码
 request data
 {
-  "mobile" : "18273127971" 
+  "mobile" : "18273127971"  
 } 
 
 {
@@ -109,13 +111,41 @@ request data
 "error":[{"field":"","message":"手机验证码发送频繁"}]
 }
 
-/api/user/avatar/upload
+/api/user/avatar/upload   
 上传非认证资料图片
 {"data":"/avatar/158209360315077.jpg","error":[]}
 
-/api/user/identity/upload
+/api/user/avatar/uploadReplace
+上传非认证资料图片(替换)
+{
+   "sign":"XX"
+}
+
+response data
+
+
+
+
+/api/user/identity/upload   
 上传认证资料图片
-{"data":"/identity/158209360315077.jpg","error":[]}
+request data
+{
+   "sign":"idcard1"
+}
+
+response data
+{"data":"/identity/158209360315077idcard1.jpg","error":[]}
+
+
+下载展示图片(认证+非认证)
+/open/downLoadPicture  
+{"data":
+   {
+  "path":"/identity/235443200453591idcard1.jpg",
+   "isPrivate": true 
+}
+}
+
 
 /api/user/pwd
 修改密码
@@ -131,6 +161,23 @@ response data
  "error":[]
 }
 
+/api/user/mobile
+更换手机
+request data
+
+{
+  "mobile" : "13600000000" ,
+  "mobileCode" : "123456"
+}
+
+response data
+{"data":1,       (1为成功)
+ "error":[]
+}
+
+
+
+
 /api/user/userIndentity
 个人会员基本信息
 request data
@@ -176,9 +223,9 @@ request data
 	"residenceProvince": "湖南省2",
 	"residenceCity" : "长沙市",
 	"residenceArea": "天心区",
-	"personPortraitUrl" : "/avadar/510123456789012345.jpg",
+	"personPortraitUrl" : "510123456789012345",
 	"lifePhotoUrl" : "/avadar/4303502988131.jpg",
-    "personalProfile"	: "4303502988139",
+    "personalProfile"	: "个人简介",
 	"email" : "123@xx.com",
 	"fixedTelArea" : "010",
     "fixedTel"	: "88888888",
@@ -463,8 +510,29 @@ response data
    } 
    
    
------------------查询入口begin---------------------   
-/api/user/base
+-----------------查询入口begin--------------------- 
+  
+/api/user/homePage    (method = get)
+用户首页  
+response data
+{
+"data":{
+		"id":"a0ccba8f-958e-48db-aec3-ebde456e33fe",
+		"uid":"ba00235e-eb3a-45b4-8c9d-000fe507cbca",
+		"lvl":0,
+		"nickname":"lina",
+		"email":"123@xx.com",
+		"number":800000,"type":0,
+		"personPortraitUrl":"/avadar/4303502988139.jpg"
+	  },
+	"error":[]
+}
+  
+  
+  
+  
+  
+/api/user/base           (method=get)
 个人会员基本信息/团体会员基本信息
 request data
 ```json
@@ -514,7 +582,7 @@ response data
 
 
 
-/api/user/member
+/api/user/member        (method=get)
 个人资料/团体会员资料
 request data
 ```json
@@ -535,7 +603,7 @@ response data
 	"residenceArea":"天心区",
 	"personPortraitUrl":"510123456789012345",
 	"lifePhotoUrl":"/avadar/4303502988131.jpg",
-	"personalProfile":"/avadar/4303502988139.jpg",
+	"personalProfile":"个人简介",
 	"fixedTelArea":"010",
 	"fixedTel":"88888888",
 	"fixedTelExtension":"0001",
@@ -550,28 +618,47 @@ response data
 
 团体
 
-{
-	"data":{
-	"id":"5eab2c05-7dee-4ac8-9150-9f82bbcda5ba",
-	"uid":"ba00235e-eb3a-45b4-8c9d-000fe507cbca",
-	"identityType":"身份类型",
-	"companyName":"公司名称",
-	"locationProvince":"所在地--省",
-	"locationCity":"所在地--市",
-	"locationArea":"所在地--区",
-	"unitSize":"单位规模",
-	"companyIntroduction":"单位简介",
-	"homeUnit":"所属单位",
-	"logoUrl":"logo图",
-	"publicityPictureUrl":"宣传图片"},
+{"data":{
+	"info":{
+			"id":"14fa6d3a-1880-46d9-85db-c9b5f4ee2ba2",
+			"uid":"ea04c6ec-3cb7-40b6-b7cf-ab6ddfac22f5",
+			"identityType":null,
+			"companyName":"XX科技股份有限公司",
+			"legalPerson":null,
+			"locationProvince":null,
+			"locationCity":null,
+			"locationArea":null,
+			"unitSize":null,
+			"companyIntroduction":null,
+			"homeUnit":null,
+			"logoUrl":null,
+			"publicityPictureUrl":null
+	      },
+	"pro":{
+			"id":"2ddbe264-5a0a-47c2-8d74-b7a8cb3984ac",
+			"oid":"14fa6d3a-1880-46d9-85db-c9b5f4ee2ba2",
+			"qualification":"企业资质",
+			"turnover":100,
+			"collegeAttribute":"院校属性",
+			"collegeEstablishTime":"院校创办时间",
+			"academician":11,
+			"doctoralTutor":12,
+			"masterTutor":13,
+			"otherExpert":14,
+			"nationalLab":15,
+			"educationLab":16,
+			"enterpriseCenter":17,
+			"otherCenter":18,
+			"institutionEstablishTime":"19"
+	     }
+	},
 	"error":[]
-}
-
+	}
 
 
 
 
-/api/user/educate
+/api/user/educate    (method=get)
 个人会员教育信息
 request data
 ```json
@@ -599,7 +686,7 @@ response data
 	"error":[]
 }
 
-/api/user/job
+/api/user/job                (method=get)
 个人会员职业信息/团体会员技术能力
 request data
 ```json
@@ -646,8 +733,8 @@ response data
 	"error":[]
 }
 
-/api/user/ability
-个人/团体能力标签
+/api/user/ability       (method=get)
+个人/团体能力标签      
 request data
 ```json
 {

+ 1 - 1
build/admin/index.html

@@ -5,7 +5,7 @@
     <title>admin_index</title>
     <script>
         window.globalConfig = {
-	  		context: " "
+	  		context: "//aft.hnzhiming.com:8080/aft"
 	  	}
     </script>
 </head>

File diff suppressed because it is too large
+ 1 - 1
build/user/account/index.css


+ 1 - 1
build/user/account/index.html

@@ -5,7 +5,7 @@
     <title>用户中心-首页</title>
     <script>
         window.globalConfig = {
-	  		context: " "
+	  		context: "//aft.hnzhiming.com:8080/aft"
 	  	}
     </script>
 <link href="../../user/account/index.css" rel="stylesheet"></head>

File diff suppressed because it is too large
+ 15 - 4
build/user/account/index.js


File diff suppressed because it is too large
+ 1 - 1
build/user/account/set.css


+ 1 - 1
build/user/account/set.html

@@ -5,7 +5,7 @@
     <title>用户中心-首页</title>
     <script>
         window.globalConfig = {
-	  		context: " "
+	  		context: "//aft.hnzhiming.com:8080/aft"
 	  	}
     </script>
 <link href="../../user/account/set.css" rel="stylesheet"></head>

File diff suppressed because it is too large
+ 34 - 22
build/user/account/set.js


+ 1 - 1
build/user/index.html

@@ -5,7 +5,7 @@
     <title>用户首页</title>
     <script>
         window.globalConfig = {
-	  		context: " "
+	  		context: "//aft.hnzhiming.com:8080/aft"
 	  	}
     </script>
 </head>

File diff suppressed because it is too large
+ 1 - 1
build/user/login.css


+ 1 - 1
build/user/login.html

@@ -5,7 +5,7 @@
     <title>用户登录</title>
     <script>
         window.globalConfig = {
-	  		context: " "
+	  		context: "//aft.hnzhiming.com:8080/aft"
 	  	}
     </script>
 <link href="../user/login.css" rel="stylesheet"></head>

File diff suppressed because it is too large
+ 7 - 7
build/user/login.js


File diff suppressed because it is too large
+ 1 - 1
build/user/signIn.css


+ 1 - 1
build/user/signIn.html

@@ -5,7 +5,7 @@
     <title>用户注册</title>
     <script>
         window.globalConfig = {
-	  		context: " "
+	  		context: "//aft.hnzhiming.com:8080/aft"
 	  	}
     </script>
 <link href="../user/signIn.css" rel="stylesheet"></head>

File diff suppressed because it is too large
+ 11 - 10
build/user/signIn.js


File diff suppressed because it is too large
+ 2 - 2
build/vendors.js


+ 37 - 6
js/component/account/index/content.jsx

@@ -1,5 +1,8 @@
 import React from 'react';
 import { Spin, Button, Tabs } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js'
+import $ from 'jquery/src/ajax';
+
 import '../content.less';
 import './content.less';
 import LeftTab from './leftTab.jsx';
@@ -15,7 +18,7 @@ const Content = React.createClass({
         return {
             per: '24',
             loading: false,
-            userlvl: '1',
+            userlvl: '0',
             userid: '1234567',
             follow: '0',
             chengguo: '0',
@@ -26,8 +29,36 @@ const Content = React.createClass({
             { type: '成果对接会', title: '钛白粉行业技术在线对接会', time: '2017-01-11', link: '' }]
         };
     },
-    getData(){
-        
+    getData() {
+        this.setState({
+            loading: false
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            url: globalConfig.context + "/api/user/homePage",
+            success: function (data) {
+                if (data.data.personPortraitUrl && data.data.nickname) {
+                    this.setState({
+                        personPortraitUrl:data.data.personPortraitUrl,
+                        nickname: data.data.nickname,
+                        lvl:data.data.lvl,
+                        number:data.data.number
+                    })
+                };
+            }.bind(this),
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    componentDidMount() {
+        this.getData();
     },
     handlekey(key) {
         this.setState({
@@ -45,9 +76,9 @@ const Content = React.createClass({
                     <Spin spinning={this.state.loading} className='spin-box'>
                         <div className="index-content">
                             <div className="index-userdata clearfix">
-                                <p className="acc-title">{userData.number || undefined }</p>
+                                <p className="acc-title">{this.state.number}</p>
                                 <div className="userdata-img">
-                                    <img src="" alt="" />
+                                    <img src={globalConfig.staticHost + "/upload" + this.state.personPortraitUrl} alt="" />
                                 </div>
                                 <div className="userdata-content">
                                     {(() => {
@@ -59,7 +90,7 @@ const Content = React.createClass({
                                         };
                                     })()}
                                     <p>完善资料 {this.state.per}% ,<a href="./set.html">继续完善</a>,有助于提高您的资信</p>
-                                    <p className="userdata-relate" style={{'display':'none'}}>
+                                    <p className="userdata-relate" style={{ 'display': 'none' }}>
                                         <Button className="relateqq"><img src={qq} alt="" /> QQ账号登录</Button>
                                         <Button className="relateweibo"><img src={weibo} alt="" />微博账号登录</Button>
                                         <Button className="relateweixin"><img src={weixin} alt="" />微信账号登录</Button>

+ 8 - 7
js/component/account/set/ablt.jsx

@@ -12,6 +12,7 @@ class EditableTagGroup extends React.Component {
             tags: ['我的标签:', '标签1', '标签2'],
             inputVisible: false,
             inputValue: '',
+            propsBool:true
         }
     }
 
@@ -44,9 +45,10 @@ class EditableTagGroup extends React.Component {
         });
     }
     componentWillReceiveProps(nextProps) {
-        if (nextProps.abltArr) {
-            debugger
-            this.state.value = nextProps.abltArr;
+        if ( nextProps.abltArr && this.state.propsBool ) {
+            nextProps.abltArr.unshift("我的标签:");
+            this.state.tags = nextProps.abltArr;
+            this.state.propsBool = false;
         };
     }
     render() {
@@ -54,10 +56,10 @@ class EditableTagGroup extends React.Component {
         return (
             <div className="ablt-tips">
                 {tags.map((tag, index) => {
-                    const isLongTag = tag.length > 20;
+                    const isLongTag = tag.length > 11;
                     const tagElem = (
                         <Tag key={tag} closable={index !== 0} afterClose={() => this.handleClose(tag)}>
-                            {isLongTag ? `${tag.slice(0, 20)}...` : tag}
+                            {isLongTag ? `${tag.slice(0, 11)}...` : tag}
                         </Tag>
                     );
                     return isLongTag ? <Tooltip title={tag}>{tagElem}</Tooltip> : tagElem;
@@ -73,7 +75,7 @@ class EditableTagGroup extends React.Component {
                         onPressEnter={this.handleInputConfirm.bind(this)}
                         />
                 )}
-                {!inputVisible && <Button className="addtips" type="dashed" onClick={this.showInput.bind(this)}>+ 新标签</Button>}
+                {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length >10 ? true : false} onClick={this.showInput.bind(this)}>+ 新标签</Button>}
             </div>
         );
     }
@@ -111,7 +113,6 @@ const Base = React.createClass({
         this.state.tags = e.slice(1);
     },
     submit() {
-        debugger
         let theTags = this.state.tags.join(",");
         this.setState({
             loading: true

+ 29 - 28
js/component/account/set/base.jsx

@@ -49,20 +49,13 @@ class Avatar extends React.Component {
         if (info.file.status === 'done') {
             // Get this url from response in real world.
             getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
-            this.props.urlData(globalConfig.uploadPrivatePath + info.file.response.data);
+            this.props.urlData(info.file.response.data);
         }
     }
-    theObj(e) {
-        let _me = this;
-        $.ajax({
-            method: "POST",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/user/identity/upload",
-            data: {
-                'sign': _me.props.name
-            }
-        });
+    theObj() {
+        return {
+            'sign': this.props.name
+        }
     }
     render() {
         const imageUrl = this.state.imageUrl;
@@ -97,17 +90,17 @@ const BaseFrom = Form.create()(React.createClass({
             url: globalConfig.context + "/api/user/base",
             success: function (data) {
                 if (data.data) {
-                    this.state.username = data.data.username;
-                    this.state.sex = data.data.sex === '女' ? 'female' : 'male';
-
                     let d = new Date();
                     d.setMonth(data.data.dateOfBirthMonth - 1);
                     d.setYear(parseInt(data.data.dateOfBirthYear));
-                    this.state.birth = d;
-
-                    this.state.idnumber = data.data.idNumber;
-                    this.state.idcard1 = globalConfig.staticHost + data.data.oppositeIdUrl;
-                    this.state.idcard2 = globalConfig.staticHost + data.data.positiveIdUrl;
+                    this.setState({
+                        username : data.data.username,
+                        sex : data.data.sex === '女' ? 'female' : 'male',
+                        birth : d,
+                        idnumber : data.data.idNumber,
+                        idcard1 : data.data.oppositeIdUrl,
+                        idcard2 : data.data.positiveIdUrl,
+                    })
                 };
             }.bind(this),
         }).done(function (data) {
@@ -120,11 +113,9 @@ const BaseFrom = Form.create()(React.createClass({
     },
     getInitialState() {
         return {
-            idcard1: '',
-            idcard2: ''
         };
     },
-    componentWillMount() {
+    componentDidMount() {
         this.getData();
     },
     handleSubmit(e) {
@@ -171,9 +162,7 @@ const BaseFrom = Form.create()(React.createClass({
     urlData2(e) {
         this.state.idcard2 = e;
     },
-
     render() {
-
         const { getFieldDecorator } = this.props.form;
         const formItemLayout = {
             labelCol: { span: 4 },
@@ -239,6 +228,12 @@ const BaseFrom = Form.create()(React.createClass({
                     {getFieldDecorator('idcard1')(
                         <Avatar name="idcard1" urlData={this.urlData1} />
                     )}
+                    <p>{
+                        this.state.idcard1 !== "" ?
+                            <span><Icon style={{ 'color': '#79b5ff', 'fontSize': '14px', 'margin': '0 6px' }} type="check-circle" />已上传</span> :
+                            <span><Icon style={{ 'color': '#fa0', 'fontSize': '14px', 'margin': '0 6px' }} type="exclamation-circle" />未上传</span>
+                    }
+                    </p>
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
@@ -247,18 +242,24 @@ const BaseFrom = Form.create()(React.createClass({
                     {getFieldDecorator('idcard2')(
                         <Avatar name="idcard2" urlData={this.urlData2} />
                     )}
+                    <p>{
+                        this.state.idcard2 !== "" ?
+                            <span><Icon style={{ 'color': '#79b5ff', 'fontSize': '14px', 'margin': '0 6px' }} type="check-circle" />已上传</span> :
+                            <span><Icon style={{ 'color': '#fa0', 'fontSize': '14px', 'margin': '0 6px' }} type="exclamation-circle" />未上传</span>
+                    }
+                    </p>
                 </FormItem>
                 <FormItem wrapperCol={{ span: 21, offset: 4 }}>
-                    <p className="acc-title">{this.state.idcard1 || this.state.idcard2 ? '已上传' : '示例:'}</p>
+                    <p className="acc-title">示例</p>
                     <div className="idcard-img clearfix">
                         <div>
                             <div className="idcard-imgbox">
-                                <img src={this.state.idcard1 || card1} alt="" />
+                                <img src={card1} alt="" />
                             </div>
                         </div>
                         <div>
                             <div className="idcard-imgbox">
-                                <img src={this.state.idcard2 || card2} alt="" />
+                                <img src={card2} alt="" />
                             </div>
                         </div>
                     </div>

+ 142 - 65
js/component/account/set/company.jsx

@@ -1,10 +1,10 @@
 import React from 'react';
-import { Input, Button, Form, Select, Upload, Icon, Spin, message, InputNumber } from 'antd';
+import { Input, Button, Form, Select, Upload, Icon, Spin, message, InputNumber,Modal } from 'antd';
 import './person.less';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
-import { addressInit } from '../../tools.js';
+import { addressInit ,splitUrl} from '../../tools.js';
 
 
 function getBase64(img, callback) {
@@ -32,14 +32,13 @@ class Avatar extends React.Component {
             imageUrl: ''
         }
     }
-
     handleChange(info) {
         if (info.file.status === 'done') {
             // Get this url from response in real world.
             getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
+            this.props.urlData(info.file.response.data);
         }
     }
-
     render() {
         const imageUrl = this.state.imageUrl;
         return (
@@ -47,9 +46,10 @@ class Avatar extends React.Component {
                 className="avatar-uploader"
                 name="avatar"
                 showUploadList={false}
-                action="/upload.do"
+                action={globalConfig.context + "/api/user/avatar/uploadReplace"}
+                data={{ 'sign': this.props.name }}
                 beforeUpload={beforeUpload}
-                onChange={this.handleChange}
+                onChange={this.handleChange.bind(this)}
                 >
                 {
                     imageUrl ?
@@ -61,6 +61,64 @@ class Avatar extends React.Component {
     }
 };
 
+class PicturesWall extends React.Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+            previewVisible: false,
+            propsbool: true,
+            previewImage: '',
+            fileList: [],
+        }
+    }
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    }
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    }
+
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    }
+    componentWillReceiveProps(nextProps) {
+        if ( nextProps.lifePhotoList && this.state.propsbool) {
+            this.state.fileList = nextProps.lifePhotoList;
+            this.state.propsbool = false;
+        }
+    }
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">Upload</div>
+            </div>
+        );
+        return (
+            <div className="clearfix">
+                <Upload
+                    action={globalConfig.context + "/api/user/avatar/upload"}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange.bind(this)}
+                    >
+                    {fileList.length >= 9 ? null : uploadButton}
+                </Upload>
+                <Modal visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+};
+
 const PersonFrom = Form.create()(React.createClass({
     getData() {
         this.props.spinState(true);
@@ -69,29 +127,33 @@ const PersonFrom = Form.create()(React.createClass({
             dataType: "json",
             url: globalConfig.context + "/api/user/member",
             success: function (data) {
-                 
-                if (data.data) {
-                    addressInit('cmbProvince', 'cmbCity', 'cmbArea',
-                        data.data.residenceProvince, data.data.residenceCity, data.data.residenceArea);
 
+                if (data.data && data.data.info && data.data.pro) {
+                    addressInit('cmbProvince', 'cmbCity', 'cmbArea',
+                        data.data.locationProvince, data.data.locationCity, data.data.locationArea);
+                    let theArr = splitUrl(data.data.info.publicityPictureUrl, ',', globalConfig.staticHost + '/upload');
                     this.setState({
-                        nickname: data.data.nickname,
-                        cmbP: data.data.residenceProvince,
-                        cmbC: data.data.residenceCity,
-                        cmbA: data.data.residenceArea,
-                        intro: data.data.personalProfile,
-                        email: data.data.email,
-                        fixTelArea: data.data.fixedTelArea,
-                        fixTel: data.data.fixedTel,
-                        fixTelExtension: data.data.fixedTelExtension,
-                        qq: data.data.qq,
-                        address: data.data.postalAddress,
-                        postcode: data.data.postcode,
+                        idttType: data.data.info.identityType,
+                        unitName: data.data.info.companyName,
+                        unitNumber: data.data.info.unitSize,
+                        unitIntro: data.data.info.companyIntroduction,
+                        unitFrom: data.data.info.homeUnit,
+                        companyLifePicUrl: theArr,
+                        qiyezizhi: data.data.pro.qualification,
+                        turnover: data.data.pro.turnover,
+                        schoolProp: data.data.pro.collegeAttribute,
+                        schoolTime: data.data.pro.collegeEstablishTime,
+                        aca: data.data.pro.academician,
+                        PhDTutor: data.data.pro.doctoralTutor,
+                        MSTutor: data.data.pro.masterTutor,
+                        otherExperts: data.data.pro.otherExpert,
+                        StateKeyLab: data.data.pro.nationalLab,
+                        EduKeyLab: data.data.pro.educationLab,
+                        ComCenter: data.data.pro.enterpriseCenter,
+                        otherCenter: data.data.pro.otherCenter,
+                        resTime: data.data.pro.institutionEstablishTime
                     });
                 }
-
-                //"personPortraitUrl": "/avadar/4303502988139.jpg",
-                //"lifePhotoUrl": "/avadar/4303502988131.jpg",
             }.bind(this),
         }).always(function () {
             this.props.spinState(false);
@@ -124,16 +186,23 @@ const PersonFrom = Form.create()(React.createClass({
             let cmbP = document.getElementById('cmbProvince').value;
             let cmbC = document.getElementById('cmbCity').value;
             let cmbA = document.getElementById('cmbArea').value;
+            //
+            let leftPicArr = [];
+            this.state.companyLifePicObj.map(function (item) {
+                leftPicArr.push(item.response.data);
+            });
+            let lifePhotoUrl = leftPicArr.join(",");
+
             if (!err) {
                 this.props.spinState(true);
-                 
+
                 $.ajax({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: globalConfig.context + "/api/user/userInfo",
+                    url: globalConfig.context + "/api/user/orgPro",
                     data: {
-                        "info.identityType": this.state.idttType,
+                        "info.identityType": values.identityType,
                         "info.companyName": values.unitName,
                         "info.locationProvince": cmbP,
                         "info.locationCity": cmbC,
@@ -141,8 +210,8 @@ const PersonFrom = Form.create()(React.createClass({
                         "info.unitSize": values.unitNumber,
                         "info.companyIntroduction": values.unitIntro,
                         "info.homeUnit": values.unitFrom,
-                        //"info.logoUrl": "logo图",
-                        //"info.publicityPictureUrl": "宣传图片",
+                        "info.logoUrl": this.state.companyLogoUrl,
+                        "info.publicityPictureUrl": lifePhotoUrl,
                         "pro.qualification": values.qiyezizhi,
                         "pro.turnover": values.turnover,
                         "pro.collegeAttribute": values.schoolProp,
@@ -155,7 +224,7 @@ const PersonFrom = Form.create()(React.createClass({
                         "pro.educationLab": this.state.EduKeyLab,
                         "pro.enterpriseCenter": this.state.ComCenter,
                         "pro.otherCenter": this.state.otherCenter,
-                        "pro.institutionEstablishTime": this.state.resTime
+                        "pro.institutionEstablishTime": values.resTime
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -200,6 +269,26 @@ const PersonFrom = Form.create()(React.createClass({
             });
         }
     },
+    downloadPic(type) {
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            url: globalConfig.context + "/open/downLoadPicture",
+            data: {
+                path: type,
+                isPrivate: true
+            },
+            success: function (data) {
+
+            }.bind(this),
+        });
+    },
+    companyLogoUrl(e) {
+        this.state.companyLogoUrl = e;
+    },
+    companyLifePicUrl(e) {
+        this.state.companyLifePicObj = e;
+    },
     componentDidMount() {
         addressInit('cmbProvince', 'cmbCity', 'cmbArea');
         this.getData();
@@ -225,7 +314,7 @@ const PersonFrom = Form.create()(React.createClass({
                     wrapperCol={{ span: 8 }}
                     label="身份类型"
                     >
-                    {getFieldDecorator('indentityType', {
+                    {getFieldDecorator('identityType', {
                         initialValue: this.state.idttType
                     })(
                         <Select className="acc-edu-lvl" onChange={this.idttTypeChange}>
@@ -242,7 +331,7 @@ const PersonFrom = Form.create()(React.createClass({
                     label="单位名称"
                     >
                     {getFieldDecorator('unitName', {
-                        initialValue: this.props.unitName
+                        initialValue: this.state.unitName
                     })(
                         <Input />
                         )}
@@ -265,7 +354,7 @@ const PersonFrom = Form.create()(React.createClass({
                     label="单位规模"
                     >
                     {getFieldDecorator('unitNumber', {
-                        initialValue: this.props.unitNumber
+                        initialValue: this.state.unitNumber
                     })(
                         <InputNumber />
                         )}
@@ -278,7 +367,7 @@ const PersonFrom = Form.create()(React.createClass({
                     label="单位简介"
                     >
                     {getFieldDecorator('unitIntro', {
-                        initialValue: this.props.unitIntro
+                        initialValue: this.state.unitIntro
                     })(
                         <Input type="textarea"
                             placeholder="全面介绍自己,让商友更深入了解您,内容长度不超过1000个字。"
@@ -360,21 +449,22 @@ const PersonFrom = Form.create()(React.createClass({
                     })(
                         <InputNumber />
                         )}
+                    <span>年</span>
                 </FormItem>
                 <FormItem style={{ 'display': this.state.schoolDis }}
                     labelCol={{ span: 3 }}
-                    wrapperCol={{ span: 20 }}
+                    wrapperCol={{ span: 21, offset: 3 }}
                     label=""
                     >
-                    <div>
-                        <span>院士:<InputNumber value={this.state.aca} onChange={function (e) { this.setState({ aca: e }) }.bind(this)} />人</span>
-                        <span>博士生导师:<InputNumber value={this.state.PhDTutor} onChange={function (e) { this.setState({ PhDTutor: e }) }.bind(this)} />人</span>
-                        <span>硕士生导师:<InputNumber value={this.state.MSTutor} onChange={function (e) { this.setState({ MSTutor: e }) }.bind(this)} />人</span>
-                        <span>其他专家:<InputNumber value={this.state.otherExperts} onChange={function (e) { this.setState({ otherExperts: e }) }.bind(this)} />人</span>
-                        <span>国家级重点实验室:<InputNumber value={this.state.StateKeyLab} onChange={function (e) { this.setState({ StateKeyLab: e }) }.bind(this)} />所</span>
-                        <span>教育部重点实验室:<InputNumber value={this.state.EduKeyLab} onChange={function (e) { this.setState({ EduKeyLab: e }) }.bind(this)} />所</span>
-                        <span>企业共建研究中心:<InputNumber value={this.state.ComCenter} onChange={function (e) { this.setState({ ComCenter: e }) }.bind(this)} />所</span>
-                        <span>其他研究中心:<InputNumber value={this.state.otherCenter} onChange={function (e) { this.setState({ otherCenter: e }) }.bind(this)} />所</span>
+                    <div className="school-props clearfix">
+                        <div><span>院士:</span><InputNumber value={this.state.aca} onChange={function (e) { this.setState({ aca: e }) }.bind(this)} />人</div>
+                        <div><span>博士生导师:</span><InputNumber value={this.state.PhDTutor} onChange={function (e) { this.setState({ PhDTutor: e }) }.bind(this)} />人</div>
+                        <div><span>硕士生导师:</span><InputNumber value={this.state.MSTutor} onChange={function (e) { this.setState({ MSTutor: e }) }.bind(this)} />人</div>
+                        <div><span>其他专家:</span><InputNumber value={this.state.otherExperts} onChange={function (e) { this.setState({ otherExperts: e }) }.bind(this)} />人</div>
+                        <div><span>国家级重点实验室:</span><InputNumber value={this.state.StateKeyLab} onChange={function (e) { this.setState({ StateKeyLab: e }) }.bind(this)} />所</div>
+                        <div><span>教育部重点实验室:</span><InputNumber value={this.state.EduKeyLab} onChange={function (e) { this.setState({ EduKeyLab: e }) }.bind(this)} />所</div>
+                        <div><span>企业共建研究中心:</span><InputNumber value={this.state.ComCenter} onChange={function (e) { this.setState({ ComCenter: e }) }.bind(this)} />所</div>
+                        <div><span>其他研究中心:</span><InputNumber value={this.state.otherCenter} onChange={function (e) { this.setState({ otherCenter: e }) }.bind(this)} />所</div>
                     </div>
                 </FormItem>
                 <FormItem style={{ 'display': this.state.resDis }}
@@ -386,43 +476,30 @@ const PersonFrom = Form.create()(React.createClass({
                     })(
                         <InputNumber />
                         )}
+                    <span>年</span>
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
                     label="LOGO"
                     labelCol={{ span: 3 }}
                     wrapperCol={{ span: 20 }}
-                    hasFeedback
                     >
                     {getFieldDecorator('avatar')(
-                        <Avatar />
+                        <Avatar name="companyLogo" urlData={this.companyLogoUrl} />
                     )}
                 </FormItem>
                 <div className="set-explain">
                     <p>上传的照片图片格式应为jpg格式,大小在2M以内</p>
                 </div>
                 <FormItem
-                    {...formItemLayout}
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 21 }}
                     label="宣传图片"
                     >
-                    {getFieldDecorator('companyimg', {
-                        valuePropName: 'fileList',
-                        normalize: this.normFile,
-                    })(
-                        <Upload
-                            name="companyimg"
-                            action="/upload.do"
-                            listType="picture"
-                            beforeUpload={beforeUpload}
-                            onChange={this.handleUpload}>
-                            <Button type="primary">
-                                <Icon type="upload" /> 点击选择文件
-                            </Button>
-                            <p>上传的照片图片格式应为jpg格式,大小在2M以内</p>
-                        </Upload>
-                        )}
+                    {getFieldDecorator('companyLifePic')(
+                        <PicturesWall fileList={this.companyLifePicUrl} lifePhotoList={this.state.companyLifePicUrl} />
+                    )}
                 </FormItem>
-
                 <FormItem wrapperCol={{ span: 12, offset: 3 }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
                 </FormItem>

+ 10 - 2
js/component/account/set/content.jsx

@@ -16,16 +16,24 @@ const Content = React.createClass({
     getInitialState() {
         return {
             loading: false,
-            leftKey: 'base',
+            leftKey: 'person',
             userType: '0'
         };
     },
-
     handlekey(key) {
         this.setState({
             leftKey: key,
         });
     },
+    componentWillMount() {
+        if (userData) {
+            if (userData.type == '0') {
+                this.state.leftKey = 'base';
+            } else if (userData.type == '1') {
+                this.state.leftKey = 'group';
+            };
+        }
+    },
     render() {
         return (
             <div className="acc-content">

+ 27 - 27
js/component/account/set/edu.jsx

@@ -42,21 +42,9 @@ class Avatar extends React.Component {
         if (info.file.status === 'done') {
             // Get this url from response in real world.
             getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
-            this.props.urlData(globalConfig.uploadPrivatePath + info.file.response.data);
+            this.props.urlData(info.file.response.data);
         }
     }
-    theObj(e) {
-        let _me = this;
-        $.ajax({
-            method: "POST",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/user/identity/upload",
-            data: {
-                'sign': _me.props.name
-            }
-        });
-    }
     render() {
         const imageUrl = this.state.imageUrl;
         return (
@@ -65,7 +53,7 @@ class Avatar extends React.Component {
                 name={this.props.name}
                 showUploadList={false}
                 action={globalConfig.context + "/api/user/identity/upload"}
-                data={this.theObj.bind(this)}
+                data={{ 'sign': this.props.name }}
                 beforeUpload={beforeUpload}
                 onChange={this.handleChange.bind(this)}
                 >
@@ -90,13 +78,13 @@ const EduFrom = Form.create()(React.createClass({
                 if (data.data) {
                     this.setState({
                         edulvl: data.data.education,
-                        eduPfs: [data.data.majorCategory, data.data.majorName],
+                        eduPfs: [parseInt(data.data.majorCategory), parseInt(data.data.majorName)],
                         schoolname: data.data.graduateSchool,
                         graduationTimeYear: data.data.graduationTimeYear,
                         edunum: data.data.diplomaCode,
-                        degreenum: data.data.degreeCode
-                        //"diplomaUrl": "/indentity/4303502988132.jpg",
-                        //"degreeDiplomaUrl": "/indentity/4303502988133.jpg",
+                        degreenum: data.data.degreeCode,
+                        xueliPicUrl: data.data.diplomaUrl,
+                        xueweiPicUrl: data.data.degreeDiplomaUrl
                     });
                 };
             }.bind(this),
@@ -128,9 +116,9 @@ const EduFrom = Form.create()(React.createClass({
                         "majorName": this.state.eduPfsB,
                         "graduateSchool": values.schoolname,
                         "graduationTimeYear": this.state.graduationTimeYear,
-                        //"diplomaUrl": "/indentity/4303502988132.jpg",
+                        "diplomaUrl": this.state.xueliPicUrl,
                         "diplomaCode": values.edunum,
-                        //"degreeDiplomaUrl": "/indentity/4303502988133.jpg",
+                        "degreeDiplomaUrl": this.state.xueweiPicUrl,
                         "degreeCode": values.degreenum
                     }
                 }).done(function (data) {
@@ -145,20 +133,30 @@ const EduFrom = Form.create()(React.createClass({
             }
         });
     },
+    downloadPic(type) {
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            url: globalConfig.context + "/open/downLoadPicture",
+            data:{
+                path:type ,
+                isPrivate: true
+            },
+            success: function (data) {
+                
+            }.bind(this),
+        });
+    },
     handleyear(e) {
         this.state.graduationTimeYear = e;
     },
     xueliPicUrl(e) {
-         
         this.state.xueliPicUrl = e;
     },
     xueweiPicUrl(e) {
-         
+
         this.state.xueweiPicUrl = e;
     },
-    introChange(e) {
-        console.log(e);
-    },
     professional(e1, e2) {
         this.state.eduPfsA = e1;
         this.state.eduPfsB = e2;
@@ -222,8 +220,9 @@ const EduFrom = Form.create()(React.createClass({
                     label="学历证书"
                     >
                     {getFieldDecorator('xueliPic')(
-                        <Avatar name="xueliPic" urlData={this.xueiPicUrl} />
+                        <Avatar name="xueliPic" urlData={this.xueliPicUrl} />
                     )}
+                    <p>{this.state.xueweiPicUrl !== "" ? <Button onClick={this.downloadPic.bind(this,this.state.xueliPicUrl)}>下载证书</Button> : ""}</p>
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
@@ -243,10 +242,11 @@ const EduFrom = Form.create()(React.createClass({
                     {getFieldDecorator('xueweiPic')(
                         <Avatar name="xueweiPic" urlData={this.xueweiPicUrl} />
                     )}
+                    <p>{this.state.xueweiPicUrl !== "" ? <Button onClick={this.downloadPic.bind(this,this.state.xueweiPicUrl)}>下载证书</Button> : ""}</p>
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
-                    label="学证书编号"
+                    label="学证书编号"
                     >
                     {getFieldDecorator('degreenum', {
                         initialValue: this.state.degreenum || null

+ 7 - 0
js/component/account/set/edu.less

@@ -36,6 +36,13 @@
         border: 1px dashed #d9d9d9;
         border-radius: 6px;
         cursor: pointer;
+        position: relative;
+        img {
+            position: absolute;
+            top: -1px;
+            left: -1px;
+            height: 150px;
+        }
     }
     .avatar-uploader-trigger {
         display: table-cell;

+ 4 - 2
js/component/account/set/eduPfsSelect.jsx

@@ -380,7 +380,8 @@ var DataObject = [{
 const eduPfsSelect = React.createClass({
     getInitialState() {
         return {
-            value: []
+            value: [],
+            propsbool:true
         }
     },
     onChange(v, s) {
@@ -390,8 +391,9 @@ const eduPfsSelect = React.createClass({
         this.props.Professional(v[0], v[1]);
     },
     componentWillReceiveProps(nextProps) {
-        if (nextProps.defValue) {
+        if (nextProps.defValue && this.state.propsbool) {
                 this.state.value = nextProps.defValue;
+                this.state.propsbool = false;
         };
     },
     render() {

+ 4 - 8
js/component/account/set/group.jsx

@@ -3,14 +3,13 @@ import { Input, Button, Form, Icon, Spin } from 'antd';
 import './base.less';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
+import ChangePw from './changePassword.jsx';
 
 const FormItem = Form.Item;
 
 import weixin from '../../../../image/weixin-w.png';
 import qq from '../../../../image/qq-w.png';
 import weibo from '../../../../image/weibo-w.png';
-import card1 from '../../../../image/idcard1.jpg';
-import card2 from '../../../../image/idcard2.jpg';
 
 
 const BaseFrom = Form.create()(React.createClass({
@@ -23,7 +22,7 @@ const BaseFrom = Form.create()(React.createClass({
             success: function (data) {
                 if (data.data) {
                     this.setState({
-                        fixTel: data.data.fixedTel,
+                        fixedTel: data.data.fixedTel,
                         contacts: data.data.contacts,
                         qq: data.data.qq,
                         address: data.data.postalAddress,
@@ -121,7 +120,6 @@ const BaseFrom = Form.create()(React.createClass({
                 <FormItem
                     {...formItemLayout}
                     label='联系人'
-                    hasFeedback
                     >
                     {getFieldDecorator('contact', {
                         initialValue: this.state.contacts,
@@ -132,7 +130,6 @@ const BaseFrom = Form.create()(React.createClass({
                 <FormItem
                     {...formItemLayout}
                     label="手机号码"
-                    hasFeedback
                     >
                     {getFieldDecorator('moblie', {
                         initialValue: userData.mobile,
@@ -147,7 +144,6 @@ const BaseFrom = Form.create()(React.createClass({
                 <FormItem
                     {...formItemLayout}
                     label="电子邮箱"
-                    hasFeedback
                     >
                     {getFieldDecorator('email', {
                         initialValue: this.state.email,
@@ -215,8 +211,8 @@ const Base = React.createClass({
                         <p className="acc-title">您登录的账号</p>
                         <p>阿凡提号: <span>{userData.number}</span></p>
                         <p>空间状态: <span>{userData.lv !== '1' ? <a href="">认证空间</a> : <a href="">普通空间</a>}</span>(通过<a href="">实名认证</a>,即可免费开通认证空间)  </p>
-                        <div>
-                            <Button type="primary">修改密码</Button>
+                        <div className="clearfix">
+                            <ChangePw />
                         </div>
                     </div>
                     <div className="acc-bind" style={{ 'display': 'none' }}>

+ 83 - 42
js/component/account/set/person.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
-import { Input, Button, Form, Select, Radio, Upload, Icon, Spin, message } from 'antd';
+import { Input, Button, Form, Select, Radio, Upload, Icon, Spin, message, Modal } from 'antd';
 import './person.less';
-import { addressInit } from '../../tools.js';
+import { addressInit, splitUrl } from '../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
@@ -34,15 +34,13 @@ class Avatar extends React.Component {
             imageUrl: ''
         }
     }
-
     handleChange(info) {
         if (info.file.status === 'done') {
             // Get this url from response in real world.
             getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
-            this.props.urlData(globalConfig.uploadPath + info.file.response.data);
+            this.props.urlData(info.file.response.data);
         }
     }
-
     render() {
         const imageUrl = this.state.imageUrl;
         return (
@@ -50,7 +48,8 @@ class Avatar extends React.Component {
                 className="avatar-uploader"
                 name="avatar"
                 showUploadList={false}
-                action={globalConfig.context + "/api/user/avatar/upload"}
+                action={globalConfig.context + "/api/user/avatar/uploadReplace"}
+                data={{ 'sign': this.props.name }}
                 beforeUpload={beforeUpload}
                 onChange={this.handleChange.bind(this)}
                 >
@@ -64,6 +63,62 @@ class Avatar extends React.Component {
     }
 };
 
+class PicturesWall extends React.Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+            previewVisible: false,
+            previewImage: '',
+            fileList: [],
+        }
+    }
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    }
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    }
+
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    }
+    componentWillReceiveProps(nextProps){
+        if ( nextProps.lifePhotoList ) {
+            this.state.fileList = nextProps.lifePhotoList;
+        }
+    }
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">Upload</div>
+            </div>
+        );
+        return (
+            <div className="clearfix">
+                <Upload
+                    action={globalConfig.context + "/api/user/avatar/upload"}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange.bind(this)}
+                    >
+                    {fileList.length >= 9 ? null : uploadButton}
+                </Upload>
+                <Modal visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+};
+
 const PersonFrom = Form.create()(React.createClass({
     getData() {
         this.props.spinState(true);
@@ -75,7 +130,7 @@ const PersonFrom = Form.create()(React.createClass({
                 if (data.data) {
                     addressInit('cmbProvince', 'cmbCity', 'cmbArea',
                         data.data.residenceProvince, data.data.residenceCity, data.data.residenceArea);
-
+                    let theArr = splitUrl(data.data.lifePhotoUrl, ',', globalConfig.staticHost + '/upload');
                     this.setState({
                         nickname: data.data.nickname,
                         cmbP: data.data.residenceProvince,
@@ -89,11 +144,9 @@ const PersonFrom = Form.create()(React.createClass({
                         qq: data.data.qq,
                         address: data.data.postalAddress,
                         postcode: data.data.postcode,
+                        lifePhotoList: theArr
                     });
                 }
-
-                //"personPortraitUrl": "/avadar/4303502988139.jpg",
-                //"lifePhotoUrl": "/avadar/4303502988131.jpg",
             }.bind(this),
         }).always(function () {
             this.props.spinState(false);
@@ -112,6 +165,14 @@ const PersonFrom = Form.create()(React.createClass({
             let cmbP = document.getElementById('cmbProvince').value;
             let cmbC = document.getElementById('cmbCity').value;
             let cmbA = document.getElementById('cmbArea').value;
+            //lifePhotoUrl
+            let livePicArr = [];
+
+            this.state.lifePhotoList.map(function (item) {
+                livePicArr.push(item.response.data);
+            });
+            let lifePhotoUrl = livePicArr.join(",");
+
             if (!err) {
                 this.props.spinState(true);
                 $.ajax({
@@ -124,8 +185,8 @@ const PersonFrom = Form.create()(React.createClass({
                         "residenceProvince": cmbP,
                         "residenceCity": cmbC,
                         "residenceArea": cmbA,
-                        "personPortraitUrl": "/avadar/4303502988139.jpg",
-                        "lifePhotoUrl": "/avadar/4303502988131.jpg",
+                        "personPortraitUrl": this.state.avatarUrlData,
+                        "lifePhotoUrl": lifePhotoUrl,
                         "personalProfile": values.intro,
                         "email": values.email,
                         "fixedTelArea": this.state.fixTelArea,
@@ -148,17 +209,10 @@ const PersonFrom = Form.create()(React.createClass({
         });
     },
     avatarUrl(e) {
-        this.state.avatarUrl = e;
-    },
-    livePicUpload(info) {
-        if (info.file.status === 'done') {
-            // Get this url from response in real world.
-            getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
-            this.state.livePicUrlArr.push(globalConfig.uploadPath + info.file.response.data);
-        }
+        this.state.avatarUrlData = e;
     },
-    livePicDel(info) {
-
+    livePicFileList(e) {
+        this.state.lifePhotoList = e;
     },
     componentDidMount() {
         addressInit('cmbProvince', 'cmbCity', 'cmbArea');
@@ -216,10 +270,10 @@ const PersonFrom = Form.create()(React.createClass({
                     {...formItemLayout}
                     label="个人头像"
                     labelCol={{ span: 3 }}
-                    wrapperCol={{ span: 20 }}
+                    wrapperCol={{ span: 21 }}
                     >
                     {getFieldDecorator('avatar')(
-                        <Avatar urlData={this.avatarUrl} />
+                        <Avatar urlData={this.avatarUrl} name='personPortrait' />
                     )}
                 </FormItem>
                 <div className="set-explain">
@@ -227,27 +281,14 @@ const PersonFrom = Form.create()(React.createClass({
                     <p>要求2M 以下的jpg、jpeg格式的图片。该资料不会公开展示,仅作为审核材料使用。</p>
                 </div>
                 <FormItem
-                    {...formItemLayout}
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 21 }}
                     label="生活照"
                     >
-                    {getFieldDecorator('livePic', {
-                        valuePropName: 'fileList',
-                    })(
-                        <Upload
-                            name="livePic"
-                            action={globalConfig.context + "/api/user/avatar/upload"}
-                            listType="picture"
-                            beforeUpload={beforeUpload}
-                            onChange={this.livePicUpload}
-                            onRemove={this.livePicDel}>
-                            <Button type="primary">
-                                <Icon type="upload" /> 点击选择文件
-                            </Button>
-                            <p>上传的照片图片格式应为jpg格式,大小在2M以内</p>
-                        </Upload>
-                        )}
+                    {getFieldDecorator('livePic')(
+                        <PicturesWall fileList={this.livePicFileList} lifePhotoList={this.state.lifePhotoList} />
+                    )}
                 </FormItem>
-
                 <FormItem
                     labelCol={{ span: 3 }}
                     wrapperCol={{ span: 20 }}

+ 10 - 0
js/component/account/set/person.less

@@ -40,6 +40,16 @@
                 width: 42%;
             }
         }
+        .school-props {
+            > div {
+                float: left;
+                width: 50%;
+                span {
+                    display: inline-block;
+                    width: 45%;
+                }
+            }
+        }
     }
     .avatar-uploader,
     .avatar-uploader-trigger,

+ 18 - 14
js/component/account/set/pfs.jsx

@@ -45,21 +45,9 @@ class Avatar extends React.Component {
         if (info.file.status === 'done') {
             // Get this url from response in real world.
             getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
-            this.props.urlData(globalConfig.uploadPrivatePath + info.file.response.data);
+            this.props.urlData(info.file.response.data);
         }
     }
-    theObj(e) {
-        let _me = this;
-        $.ajax({
-            method: "POST",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/user/identity/upload",
-            data: {
-                'sign': _me.props.name
-            }
-        });
-    }
     render() {
         const imageUrl = this.state.imageUrl;
         return (
@@ -68,7 +56,7 @@ class Avatar extends React.Component {
                 name={this.props.name}
                 showUploadList={false}
                 action={globalConfig.context + "/api/user/identity/upload"}
-                data={this.theObj.bind(this)}
+                data={{'sign': this.props.name}}
                 beforeUpload={beforeUpload}
                 onChange={this.handleChange.bind(this)}
                 >
@@ -193,6 +181,20 @@ const PfsFrom = Form.create()(React.createClass({
             })
         }
     },
+    downloadPic(type) {
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            url: globalConfig.context + "/open/downLoadPicture",
+            data:{
+                path:type ,
+                isPrivate: true
+            },
+            success: function (data) {
+                
+            }.bind(this),
+        });
+    },
     render() {
         const { getFieldDecorator } = this.props.form;
         const formItemLayout = {
@@ -256,6 +258,7 @@ const PfsFrom = Form.create()(React.createClass({
                 </FormItem>
                 <div className="set-explain">
                     <p>要求2M 以下的jpg、jpeg格式的图片。该资料不会公开展示,仅作为审核材料使用。</p>
+                    <p>{this.state.zhichengPicUrl !== "" ? <Button onClick={this.downloadPic.bind(this,this.state.zhichengPicUrl)}>下载证书</Button> : ""}</p>
                 </div>
                 <FormItem
                     {...formItemLayout}
@@ -288,6 +291,7 @@ const PfsFrom = Form.create()(React.createClass({
                 </FormItem>
                 <div className="set-explain">
                     <p>要求2M 以下的jpg、jpeg格式的图片。该资料不会公开展示,仅作为审核材料使用。</p>
+                    <p>{this.state.zigePicUrl !== "" ? <Button onClick={this.downloadPic.bind(this,this.state.zigePicUrl)}>下载证书</Button> : ""}</p>
                 </div>
                 <FormItem
                     {...formItemLayout}

+ 7 - 0
js/component/account/set/pfs.less

@@ -52,6 +52,13 @@
         border: 1px dashed #d9d9d9;
         border-radius: 6px;
         cursor: pointer;
+        position: relative;
+        img {
+            position: absolute;
+            top: -1px;
+            left: -1px;
+            height: 150px;
+        }
     }
     .avatar-uploader-trigger {
         display: table-cell;

File diff suppressed because it is too large
+ 1144 - 1127
js/component/tools.js