소스 검색

添加批量导入与下载批量模板

mentoswzq 4 년 전
부모
커밋
3f430d8f2a

+ 48 - 1
js/component/account/achievement/techAchievement.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
+import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Upload } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -69,6 +69,7 @@ const DemandList = React.createClass({
     },
     getInitialState() {
         return {
+            uploadFileLoading:false,
             searchMore: true,
             validityPeriodDate: [],
             releaseDate: [],
@@ -285,6 +286,9 @@ const DemandList = React.createClass({
             searchMore: !this.state.searchMore
         });
     },
+    downLoadFile() {
+        window.open(globalConfig.context + '/api/user/achievement/downloadTemplate?sign=achievement_template')
+    },
     render() {
         const rowSelection = {
             selectedRowKeys: this.state.selectedRowKeys,
@@ -303,6 +307,49 @@ const DemandList = React.createClass({
                     <span>科技成果列表</span>
                     <div className="patent-addNew">
                         <Button type="primary" onClick={this.addClick}>发布成果<Icon type="plus" /></Button>
+                        <Button type="primary" onClick={this.downLoadFile}>下载批量导入模板</Button>
+                        <Upload
+                            action={globalConfig.context + "/api/user/achievement/importAchievement"}
+                            data={{ 'sign': '' }}
+                            showUploadList={false}
+                            multiple={true}
+                            onChange={(info) => {
+                                message.config({
+                                    top: 80,
+                                });
+                                if (info.file.status === 'uploading') {
+                                    this.setState({
+                                        uploadFileLoading: true,
+                                    })
+                                    if(!this.uploadFileHide){
+                                        this.uploadFileHide = message.loading('文件上传中..', 0);
+                                    }
+                                }
+                                if (info.file.status === 'done') {
+                                    this.setState({
+                                        uploadFileLoading: false,
+                                    })
+                                    this.uploadFileHide();
+                                    this.uploadFileHide = null;
+                                    if (!info.file.response.error.length) {
+                                        message.success(`${info.file.name} 文件上传成功!`);
+                                        this.loadData()
+                                    } else {
+                                        message.warning(info.file.response.error[0].message);
+                                        return;
+                                    };
+                                } else if (info.file.status === 'error') {
+                                    this.setState({
+                                        uploadFileLoading: false,
+                                    });
+                                    this.uploadFileHide();
+                                    this.uploadFileHide = null;
+                                    message.error(`${info.file.name} 文件上传失败。`);
+                                };
+                            }} >
+                            <Button type="primary" loading={this.state.uploadFileLoading}>上传批量导入文件</Button>
+                        </Upload>
+
                     </div>
                 </div>
                 <div className="user-search">

+ 47 - 1
js/component/account/demand/techDemand.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Popconfirm,Table, Switch, message, DatePicker, Modal } from 'antd';
+import {Icon, Button, Input, Select, Spin, Popconfirm, Table, Switch, message, DatePicker, Modal, Upload} from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -68,6 +68,7 @@ const DemandList = React.createClass({
     },
     getInitialState() {
         return {
+            uploadFileLoading:false,
             searchMore: true,
             validityPeriodDate: [],
             releaseDate: [],
@@ -301,6 +302,9 @@ const DemandList = React.createClass({
             searchMore: !this.state.searchMore
         });
     },
+    downLoadFile() {
+        window.open(globalConfig.context + '/api/user/demand/downloadTemplate?sign=demand_template')
+    },
     render() {
         const rowSelection = {
             selectedRowKeys: this.state.selectedRowKeys,
@@ -319,6 +323,48 @@ const DemandList = React.createClass({
                     <span>科技需求列表</span>
                     <div className="patent-addNew">
                         <Button type="primary" onClick={this.addClick}>发布需求<Icon type="plus" /></Button>
+                        <Button type="primary" onClick={this.downLoadFile}>下载批量导入模板</Button>
+                        <Upload
+                            action={globalConfig.context + "/api/user/demand/importDemand"}
+                            data={{ 'sign': '' }}
+                            showUploadList={false}
+                            multiple={true}
+                            onChange={(info) => {
+                                message.config({
+                                    top: 80,
+                                });
+                                if (info.file.status === 'uploading') {
+                                    this.setState({
+                                        uploadFileLoading: true,
+                                    })
+                                    if(!this.uploadFileHide){
+                                        this.uploadFileHide = message.loading('文件上传中..', 0);
+                                    }
+                                }
+                                if (info.file.status === 'done') {
+                                    this.setState({
+                                        uploadFileLoading: false,
+                                    })
+                                    this.uploadFileHide();
+                                    this.uploadFileHide = null;
+                                    if (!info.file.response.error.length) {
+                                        message.success(`${info.file.name} 文件上传成功!`);
+                                        this.loadData()
+                                    } else {
+                                        message.warning(info.file.response.error[0].message);
+                                        return;
+                                    };
+                                } else if (info.file.status === 'error') {
+                                    this.setState({
+                                        uploadFileLoading: false,
+                                    });
+                                    this.uploadFileHide();
+                                    this.uploadFileHide = null;
+                                    message.error(`${info.file.name} 文件上传失败。`);
+                                };
+                            }} >
+                            <Button type="primary" loading={this.state.uploadFileLoading}>上传批量导入文件</Button>
+                        </Upload>
                     </div>
                 </div>
                 <div className="user-search">

+ 2 - 2
js/component/administration/authentication/authDesc.jsx

@@ -29,7 +29,7 @@ class DemandDesc extends React.Component {
 	render() {
 		return (
 			<div className="patent-desc">
-				<Modal
+				{this.state.visible ? <Modal
 					maskClosable={false}
 					visible={this.state.visible}
 					onOk={this.handOk.bind(this)}
@@ -51,7 +51,7 @@ class DemandDesc extends React.Component {
 							/>
 						</div>
 					</div>
-				</Modal>
+				</Modal> : <div/>}
 			</div>
 		);
 	}

+ 104 - 21
js/component/administration/authentication/authDetaiel.jsx

@@ -1,13 +1,13 @@
 import React from 'react';
 import $ from 'jquery/src/ajax';
 import {
-	Modal,
-	message,
-	Spin,
-	Upload,
-	Input,
-	Button,
-	Form
+    Modal,
+    message,
+    Spin,
+    Upload,
+    Input,
+    Button,
+    Form, Icon
 } from 'antd';
 
 import { getAdviserType,getIndustry,getSocialAttribute,splitUrl } from '@/tools.js';
@@ -104,6 +104,46 @@ const AuthDetail = Form.create()(React.createClass({
             };
         }.bind(this));
     },
+    beforeUpload(file) {
+        const isJPG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg';
+        if (!isJPG) {
+            message.error('只能上传图片文件!');
+            return isJPG;
+        }
+        const isLt2M = file.size / 1024 / 1024 < 10;
+        if (!isLt2M) {
+            message.error('图片大小不能超过 10MB!');
+            return isLt2M;
+        }
+        return isJPG && isLt2M;
+    },
+    //上传图片
+    updateConsultantFun(){
+        this.setState({
+            loading:true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "JSON",
+            crossDomain: false,
+            url: globalConfig.context +  '/api/admin/updatePictureUrl',
+            data: {
+                url:this.state.consultantFileData,
+                uid:this.props.data.uid,
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('操作成功!');
+                this.setState({
+                    loading: false,
+                    consultantFileData: '',
+                });
+                // this.props.handOk()
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
     //审核拒绝
     refuse(){
         this.setState({
@@ -151,6 +191,12 @@ const AuthDetail = Form.create()(React.createClass({
             labelCol: { span: 6 },
             wrapperCol: { span: 12 },
         };
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
         return (
 			<div className='login'>
 			<Form layout="horizontal" id="demand-form">
@@ -274,26 +320,63 @@ const AuthDetail = Form.create()(React.createClass({
 							}
                         <div className="clearfix">
                             <FormItem className="half-item" labelCol={{ span: 6 }} wrapperCol={{ span: 10 }} label="顾问照片">
-                                    <Upload className="demandDetailShow-upload"
-                                        listType="picture-card"
-                                        fileList={this.state.headPortraitUrl}                               
-                                        onPreview={(file) => {
+                                    {/*<Upload className="demandDetailShow-upload"*/}
+                                    {/*    listType="picture-card"*/}
+                                    {/*    fileList={this.state.headPortraitUrl}                               */}
+                                    {/*    onPreview={(file) => {*/}
+                                    {/*        this.setState({*/}
+                                    {/*            previewImage: file.url || file.thumbUrl,*/}
+                                    {/*            previewVisible: true,*/}
+                                    {/*        });*/}
+                                    {/*    }} >*/}
+                                    {/*</Upload>*/}
+                                <Upload
+                                    action={globalConfig.context + '/api/admin/uploadPicture'}
+                                    data={{ sign: 'user_picture',uid:this.props.data.uid}}
+                                    listType="picture-card"
+                                    fileList={this.state.headPortraitUrl}
+                                    beforeUpload={this.beforeUpload}
+                                    onPreview={(file) => {
+                                        this.setState({
+                                            previewImage: file.url || file.thumbUrl,
+                                            previewVisible: true,
+                                        });
+                                    }}
+                                    onChange={(info)=>{
+                                        if(info.file.status) {
+                                            let fileList = info.fileList;
                                             this.setState({
-                                                previewImage: file.url || file.thumbUrl,
-                                                previewVisible: true,
+                                                headPortraitUrl: fileList,
                                             });
-                                        }} >
-                                    </Upload>
-                                    <Modal maskClosable={false} footer={null}
-                                        visible={this.state.previewVisible}
-                                        onCancel={() => { this.setState({ previewVisible: false }) }}>
-                                        <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
-                                    </Modal>
+                                            if (info.file.status === 'done') {
+                                                this.setState({
+                                                    consultantFileData: info.file.response.data,
+                                                });
+                                            }
+                                        }
+                                    }}>
+                                    {this.state.headPortraitUrl.length === 0 ? uploadButton : null}
+                                </Upload>
+                                <Button
+                                    style={{
+                                        marginLeft:'30px'
+                                    }}
+                                    type="primary"
+                                    onClick={(e)=>{this.updateConsultantFun()}}
+                                    disabled={!this.state.consultantFileData || this.state.headPortraitUrl.length === 0}
+                                >
+                                    保存
+                                </Button>
+                                <Modal maskClosable={false} footer={null}
+                                    visible={this.state.previewVisible}
+                                    onCancel={() => { this.setState({ previewVisible: false }) }}>
+                                    <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
+                                </Modal>
                             </FormItem>
                             {theData.consultantType=='4'&&<FormItem  className="half-item" labelCol={{ span: 6 }} wrapperCol={{ span: 10 }} label="律师职业资格证">
                                     <Upload className="demandDetailShow-upload"
                                         listType="picture-card"
-                                        fileList={this.state.lawUrl}                               
+                                        fileList={this.state.lawUrl}
                                         onPreview={(file) => {
                                             this.setState({
                                                 previewImage: file.url || file.thumbUrl,

+ 1 - 539
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.0.1",
+  "version": "1.0.0",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -1480,7 +1480,6 @@
       "requires": {
         "anymatch": "1.3.2",
         "async-each": "1.0.1",
-        "fsevents": "1.2.4",
         "glob-parent": "2.0.0",
         "inherits": "2.0.3",
         "is-binary-path": "1.0.1",
@@ -3397,535 +3396,6 @@
       "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
       "dev": true
     },
-    "fsevents": {
-      "version": "1.2.4",
-      "resolved": "http://registry.npm.taobao.org/fsevents/download/fsevents-1.2.4.tgz",
-      "integrity": "sha1-9B3LGvJYKvNpLaNvxVy9jhBBxCY=",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "nan": "2.11.1",
-        "node-pre-gyp": "0.10.0"
-      },
-      "dependencies": {
-        "abbrev": {
-          "version": "1.1.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "ansi-regex": {
-          "version": "2.1.1",
-          "bundled": true,
-          "dev": true
-        },
-        "aproba": {
-          "version": "1.2.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "are-we-there-yet": {
-          "version": "1.1.4",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "delegates": "1.0.0",
-            "readable-stream": "2.3.6"
-          }
-        },
-        "balanced-match": {
-          "version": "1.0.0",
-          "bundled": true,
-          "dev": true
-        },
-        "brace-expansion": {
-          "version": "1.1.11",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "balanced-match": "1.0.0",
-            "concat-map": "0.0.1"
-          }
-        },
-        "chownr": {
-          "version": "1.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "code-point-at": {
-          "version": "1.1.0",
-          "bundled": true,
-          "dev": true
-        },
-        "concat-map": {
-          "version": "0.0.1",
-          "bundled": true,
-          "dev": true
-        },
-        "console-control-strings": {
-          "version": "1.1.0",
-          "bundled": true,
-          "dev": true
-        },
-        "core-util-is": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "debug": {
-          "version": "2.6.9",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ms": "2.0.0"
-          }
-        },
-        "deep-extend": {
-          "version": "0.5.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "delegates": {
-          "version": "1.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "detect-libc": {
-          "version": "1.0.3",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "fs-minipass": {
-          "version": "1.2.5",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "minipass": "2.2.4"
-          }
-        },
-        "fs.realpath": {
-          "version": "1.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "gauge": {
-          "version": "2.7.4",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "aproba": "1.2.0",
-            "console-control-strings": "1.1.0",
-            "has-unicode": "2.0.1",
-            "object-assign": "4.1.1",
-            "signal-exit": "3.0.2",
-            "string-width": "1.0.2",
-            "strip-ansi": "3.0.1",
-            "wide-align": "1.1.2"
-          }
-        },
-        "glob": {
-          "version": "7.1.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "fs.realpath": "1.0.0",
-            "inflight": "1.0.6",
-            "inherits": "2.0.3",
-            "minimatch": "3.0.4",
-            "once": "1.4.0",
-            "path-is-absolute": "1.0.1"
-          }
-        },
-        "has-unicode": {
-          "version": "2.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "iconv-lite": {
-          "version": "0.4.21",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "safer-buffer": "2.1.2"
-          }
-        },
-        "ignore-walk": {
-          "version": "3.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "minimatch": "3.0.4"
-          }
-        },
-        "inflight": {
-          "version": "1.0.6",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "once": "1.4.0",
-            "wrappy": "1.0.2"
-          }
-        },
-        "inherits": {
-          "version": "2.0.3",
-          "bundled": true,
-          "dev": true
-        },
-        "ini": {
-          "version": "1.3.5",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "is-fullwidth-code-point": {
-          "version": "1.0.0",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "number-is-nan": "1.0.1"
-          }
-        },
-        "isarray": {
-          "version": "1.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "minimatch": {
-          "version": "3.0.4",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "brace-expansion": "1.1.11"
-          }
-        },
-        "minimist": {
-          "version": "0.0.8",
-          "bundled": true,
-          "dev": true
-        },
-        "minipass": {
-          "version": "2.2.4",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "safe-buffer": "5.1.1",
-            "yallist": "3.0.2"
-          }
-        },
-        "minizlib": {
-          "version": "1.1.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "minipass": "2.2.4"
-          }
-        },
-        "mkdirp": {
-          "version": "0.5.1",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "minimist": "0.0.8"
-          }
-        },
-        "ms": {
-          "version": "2.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "needle": {
-          "version": "2.2.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "debug": "2.6.9",
-            "iconv-lite": "0.4.21",
-            "sax": "1.2.4"
-          }
-        },
-        "node-pre-gyp": {
-          "version": "0.10.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "detect-libc": "1.0.3",
-            "mkdirp": "0.5.1",
-            "needle": "2.2.0",
-            "nopt": "4.0.1",
-            "npm-packlist": "1.1.10",
-            "npmlog": "4.1.2",
-            "rc": "1.2.7",
-            "rimraf": "2.6.2",
-            "semver": "5.5.0",
-            "tar": "4.4.1"
-          }
-        },
-        "nopt": {
-          "version": "4.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "abbrev": "1.1.1",
-            "osenv": "0.1.5"
-          }
-        },
-        "npm-bundled": {
-          "version": "1.0.3",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "npm-packlist": {
-          "version": "1.1.10",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ignore-walk": "3.0.1",
-            "npm-bundled": "1.0.3"
-          }
-        },
-        "npmlog": {
-          "version": "4.1.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "are-we-there-yet": "1.1.4",
-            "console-control-strings": "1.1.0",
-            "gauge": "2.7.4",
-            "set-blocking": "2.0.0"
-          }
-        },
-        "number-is-nan": {
-          "version": "1.0.1",
-          "bundled": true,
-          "dev": true
-        },
-        "object-assign": {
-          "version": "4.1.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "once": {
-          "version": "1.4.0",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "wrappy": "1.0.2"
-          }
-        },
-        "os-homedir": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "os-tmpdir": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "osenv": {
-          "version": "0.1.5",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "os-homedir": "1.0.2",
-            "os-tmpdir": "1.0.2"
-          }
-        },
-        "path-is-absolute": {
-          "version": "1.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "process-nextick-args": {
-          "version": "2.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "rc": {
-          "version": "1.2.7",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "deep-extend": "0.5.1",
-            "ini": "1.3.5",
-            "minimist": "1.2.0",
-            "strip-json-comments": "2.0.1"
-          },
-          "dependencies": {
-            "minimist": {
-              "version": "1.2.0",
-              "bundled": true,
-              "dev": true,
-              "optional": true
-            }
-          }
-        },
-        "readable-stream": {
-          "version": "2.3.6",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "core-util-is": "1.0.2",
-            "inherits": "2.0.3",
-            "isarray": "1.0.0",
-            "process-nextick-args": "2.0.0",
-            "safe-buffer": "5.1.1",
-            "string_decoder": "1.1.1",
-            "util-deprecate": "1.0.2"
-          }
-        },
-        "rimraf": {
-          "version": "2.6.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "glob": "7.1.2"
-          }
-        },
-        "safe-buffer": {
-          "version": "5.1.1",
-          "bundled": true,
-          "dev": true
-        },
-        "safer-buffer": {
-          "version": "2.1.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "sax": {
-          "version": "1.2.4",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "semver": {
-          "version": "5.5.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "set-blocking": {
-          "version": "2.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "signal-exit": {
-          "version": "3.0.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "string-width": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "code-point-at": "1.1.0",
-            "is-fullwidth-code-point": "1.0.0",
-            "strip-ansi": "3.0.1"
-          }
-        },
-        "string_decoder": {
-          "version": "1.1.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "safe-buffer": "5.1.1"
-          }
-        },
-        "strip-ansi": {
-          "version": "3.0.1",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "ansi-regex": "2.1.1"
-          }
-        },
-        "strip-json-comments": {
-          "version": "2.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "tar": {
-          "version": "4.4.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "chownr": "1.0.1",
-            "fs-minipass": "1.2.5",
-            "minipass": "2.2.4",
-            "minizlib": "1.1.0",
-            "mkdirp": "0.5.1",
-            "safe-buffer": "5.1.1",
-            "yallist": "3.0.2"
-          }
-        },
-        "util-deprecate": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "wide-align": {
-          "version": "1.1.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "string-width": "1.0.2"
-          }
-        },
-        "wrappy": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true
-        },
-        "yallist": {
-          "version": "3.0.2",
-          "bundled": true,
-          "dev": true
-        }
-      }
-    },
     "function-bind": {
       "version": "1.1.0",
       "resolved": "http://registry.npm.taobao.org/function-bind/download/function-bind-1.1.0.tgz",
@@ -5765,13 +5235,6 @@
       "resolved": "http://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz",
       "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s="
     },
-    "nan": {
-      "version": "2.11.1",
-      "resolved": "http://registry.npm.taobao.org/nan/download/nan-2.11.1.tgz",
-      "integrity": "sha1-kOIrzLjKV+pM03zIPTgZtS7qZ2Y=",
-      "dev": true,
-      "optional": true
-    },
     "nanomatch": {
       "version": "1.2.7",
       "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.7.tgz",
@@ -10274,7 +9737,6 @@
             "anymatch": "2.0.0",
             "async-each": "1.0.1",
             "braces": "2.3.0",
-            "fsevents": "1.2.4",
             "glob-parent": "3.1.0",
             "inherits": "2.0.3",
             "is-binary-path": "1.0.1",

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.0.0",
+  "version": "1.2.6",
   "description": "",
   "main": "index.js",
   "scripts": {
@@ -12,7 +12,7 @@
     "buildtest": "node bin/clean.js && webpack --progress --colors --env.deploy test",
     "buildstage": "node bin/clean.js && webpack --progress --colors --env.deploy stage",
     "pro": "node bin/clean.js && webpack --progress --colors --env.deploy prod",
-    "dev": "webpack-dev-server --port 8088 --devtool eval --progress --colors --hot --content-base build --env.deploy dev --env.watch watch"
+    "dev": "webpack-dev-server --port 8080 --devtool eval --progress --colors --hot --content-base build --env.deploy dev --env.watch watch"
   },
   "repository": {
     "type": "git",

+ 1 - 1
webpack-dll.config.js

@@ -10,7 +10,7 @@ let theme = {
   '@link-color': '#58a3ff'
 };
 module.exports = (function () {
-	let staticHost = 'http://192.168.0.188:8088';   
+	let staticHost = 'http://172.16.0.253:80';
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://statics.jishutao.com';

+ 4 - 4
webpack.config.js

@@ -1,4 +1,4 @@
-const webpack = require('webpack');
+const webpack = require('webpack');
 const path = require('path');
 const ExtractTextPlugin = require("extract-text-webpack-plugin");
 const HtmlWebpackPlugin = require('html-webpack-plugin');
@@ -121,7 +121,7 @@ module.exports = (function () {
         }));
     }
 
-    let staticHost = 'http://192.168.0.188:8088';    
+    let staticHost = 'http://172.16.0.253:80';
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://statics.jishutao.com';
@@ -156,8 +156,8 @@ module.exports = (function () {
         plugins: plugins,
         devServer: {
             disableHostCheck: true,
-            host: '192.168.0.188',
-            port: 8088,
+            host: '172.16.0.253',
+            port: 80,
             allowedHosts: ['127.0.0.1','192.168.0.20','192.168.0.99','192.168.0.17'],
             headers: {
                 "Access-Control-Allow-Origin": "*"

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 7355 - 0
yarn.lock