ソースを参照

开发新闻新增修改页面

dev01 3 年 前
コミット
75fac2cb9b
共有3 個のファイルを変更した361 個の追加181 個の削除を含む
  1. 100 0
      js/component/administration/authentication/techDemand.css
  2. 258 179
      js/component/administration/business/firmList.jsx
  3. 3 2
      webpack.config.js

+ 100 - 0
js/component/administration/authentication/techDemand.css

@@ -0,0 +1,100 @@
+.user-content {
+  background: #fff;
+  padding: 20px;
+}
+.user-content .content-title {
+  color: #333;
+  font-size: 16px;
+}
+.user-content .user-search {
+  margin-bottom: 10px;
+}
+.user-content .user-search > input {
+  width: 140px;
+}
+.user-content .user-search > input,
+.user-content .user-search > button,
+.user-content .user-search .ant-select {
+  margin-right: 10px;
+  margin-top: 10px;
+}
+.user-content .user-search .ant-switch {
+  margin-left: 10px;
+}
+.user-content .user-search .search-more {
+  margin: 10px 0;
+}
+.user-content .user-search .search-more span {
+  margin-right: 10px;
+}
+.user-content .operateButto button {
+  margin-left: 10px;
+}
+.user-content .fuwen {
+  border: 1px solid;
+}
+.breakWord span {
+  word-break: break-all;
+  word-wrap: break-word;
+  white-space: pre-wrap;
+}
+button:focus,
+button:active {
+  outline: none;
+}
+.btnRight button {
+  margin-right: 10px;
+}
+.patent-addNew {
+  float: right;
+  margin-left: 20px;
+}
+.patent-addNew button {
+  background: #ea0862;
+  color: #fff;
+  border: none;
+  border-radius: 4px;
+  padding: 6px 10px;
+  margin-left: 20px;
+}
+.patent-addNew button:hover {
+  background: #ea0862;
+}
+#demand-form .half-item {
+  float: left;
+  width: 50%;
+  margin-bottom: 10px;
+}
+#demand-form .item-title {
+  line-height: 30px;
+  font-size: 14px;
+  color: #666;
+}
+#demand-form .form-title {
+  font-size: 16px;
+  color: #333;
+}
+#demand-form .keyWord-tips > button {
+  vertical-align: middle;
+}
+#demand-form .set-submit {
+  margin-right: 20px;
+}
+#demand-form .demandDetailShow-upload .anticon-eye-o {
+  margin-left: -8px;
+}
+#demand-form .demandDetailShow-upload .anticon-delete {
+  display: none;
+}
+.ant-modal-content .modal-submit {
+  margin-left: 20px;
+}
+.ant-table-thead .ant-table-selection-column .ant-checkbox-wrapper {
+  display: none;
+}
+.a {
+  border: 1px solid;
+}
+.newsImg {
+  width: 150px;
+}

+ 258 - 179
js/component/administration/business/firmList.jsx

@@ -20,7 +20,9 @@ import {
   Radio,
   TimePicker,
   Tabs,
-  Tag
+  Tag,
+  Row,
+  Col,
 } from "antd";
 import { areaSelect, getProvince } from "@/NewDicProvinceList"; //省市区
 import {
@@ -30,7 +32,7 @@ import {
   getStatuslist,
   getLvl,
   beforeUploadFile,
-  getPicPath
+  getPicPath,
 } from "@/tools.js";
 import Editors from "@/richTextEditors";
 import SpinContainer from "../../SpinContainer"; //富文本编辑器
@@ -41,12 +43,12 @@ const PicturesWall = React.createClass({
     return {
       previewVisible: false,
       previewImage: "",
-      fileList: this.props.pictureUrl
+      fileList: this.props.pictureUrl,
     };
   },
   getDefaultProps() {
     return {
-      changeClick: this.modifyChange
+      changeClick: this.modifyChange,
     };
   },
   handleCancel() {
@@ -55,7 +57,7 @@ const PicturesWall = React.createClass({
   handlePreview(file) {
     this.setState({
       previewImage: file.url || file.thumbUrl,
-      previewVisible: true
+      previewVisible: true,
     });
   },
   handleChange(info) {
@@ -95,7 +97,7 @@ const PicturesWall = React.createClass({
           maskClosable={false}
           visible={previewVisible}
           footer={null}
-          onCancel={e => {
+          onCancel={(e) => {
             this.setState({ previewVisible: false });
           }}
         >
@@ -103,7 +105,7 @@ const PicturesWall = React.createClass({
         </Modal>
       </div>
     );
-  }
+  },
 });
 //主体
 const FirmList = Form.create()(
@@ -113,7 +115,7 @@ const FirmList = Form.create()(
       this.state.data = [];
       this.setState({
         loading: true,
-        page: pageNo
+        page: pageNo,
       });
       //发送请求
       $.ajax({
@@ -124,9 +126,10 @@ const FirmList = Form.create()(
         data: {
           pageNo: pageNo || this.state.pagination.current || 1,
           pageSize: this.state.pagination.pageSize,
-          title: this.state.titleSearch
+          title: this.state.titleSearch,
+          type: this.state.typeSearch,
         },
-        success: function(data) {
+        success: function (data) {
           let theArr = [];
           if (!data.data || !data.data.list) {
             if (data.error && data.error.length) {
@@ -146,7 +149,7 @@ const FirmList = Form.create()(
                 releaseStatus: thisdata.releaseStatus,
                 releaseTimeConvert: thisdata.releaseTimeConvert,
                 status: thisdata.status,
-                content: thisdata.content
+                content: thisdata.content,
               });
             }
             this.state.pagination.current = data.data.pageNo;
@@ -154,13 +157,13 @@ const FirmList = Form.create()(
           }
           this.setState({
             dataSource: theArr,
-            pagination: this.state.pagination
+            pagination: this.state.pagination,
           });
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -176,7 +179,7 @@ const FirmList = Form.create()(
         ProvinceCity: [],
         ProvinceCityC: [],
         totalData: {
-          mark: false
+          mark: false,
         },
         imgWidth: "width: 200px",
         logoUrl: [],
@@ -185,65 +188,69 @@ const FirmList = Form.create()(
           defaultPageSize: 10,
           showQuickJumper: true,
           pageSize: 10,
-          onChange: function(page) {
+          onChange: function (page) {
             this.loadData(page);
             this.setState({
-              selectedRowKeys: []
+              selectedRowKeys: [],
             });
           }.bind(this),
-          showTotal: function(total) {
+          showTotal: function (total) {
             return "共" + total + "条数据";
-          }
+          },
         },
         //数据类型
         columns: [
           {
             title: "序号",
             dataIndex: "key",
-            key: "key"
+            key: "key",
           },
           {
             title: "新闻分类",
             dataIndex: "type",
             key: "type",
-            render: text => {
+            render: (text) => {
               if (text == 0) {
                 return "公司新闻";
               } else if (text == 1) {
                 return "行业新闻";
+              } else if (text == 2) {
+                return "高新技术企业";
+              } else if (text == 3) {
+                return "军工三证";
               }
-            }
+            },
           },
           {
             title: "新闻标题",
             dataIndex: "title",
             key: "title",
-            render: text => {
+            render: (text) => {
               return text.length >= 8 ? text.substring(0, 8) + "..." : text;
-            }
+            },
           },
           {
             title: "排序",
             dataIndex: "sort",
-            key: "sort"
+            key: "sort",
           },
           {
             title: "是否首页",
             dataIndex: "status",
             key: "status",
-            render: s => {
+            render: (s) => {
               return s ? (
                 <Tag color="#87d068">是</Tag>
               ) : (
                 <Tag color="#f50">否</Tag>
               );
-            }
+            },
           },
           {
             title: "新闻缩率图",
             dataIndex: "pictureUrl",
             key: "pictureUrl",
-            render: url => {
+            render: (url) => {
               let path = getPicPath(globalConfig.avatarUploadHost, url);
               return (
                 <div style={{ textAlign: "center" }}>
@@ -251,7 +258,7 @@ const FirmList = Form.create()(
                   <Button
                     className="buttonimg"
                     style={{ marginLeft: 10 }}
-                    onClick={e => {
+                    onClick={(e) => {
                       e.stopPropagation();
                       this.maximg(path);
                     }}
@@ -260,15 +267,15 @@ const FirmList = Form.create()(
                   </Button>
                 </div>
               );
-            }
+            },
           },
           {
             title: "发布状态",
             dataIndex: "releaseStatus",
             key: "releaseStatus",
-            render: text => {
+            render: (text) => {
               return text ? "是" : "否";
-            }
+            },
           },
           //   {
           //     title: "置顶",
@@ -290,7 +297,7 @@ const FirmList = Form.create()(
                     style={{ marginLeft: "10px" }}
                     onClick={() => {
                       this.setState({
-                        flag: true
+                        flag: true,
                       });
                       this.edit(record);
                     }}
@@ -307,7 +314,7 @@ const FirmList = Form.create()(
                     <Button
                       type="danger"
                       style={{ marginLeft: "10px" }}
-                      onClick={e => {
+                      onClick={(e) => {
                         e.stopPropagation();
                       }}
                     >
@@ -317,7 +324,7 @@ const FirmList = Form.create()(
                   <Button
                     type="primary"
                     style={{ marginLeft: "10px" }}
-                    onClick={e => {
+                    onClick={(e) => {
                       e.stopPropagation();
                       if (record.status) {
                         this.toTop(record, 0);
@@ -330,23 +337,23 @@ const FirmList = Form.create()(
                   </Button>
                 </div>
               );
-            }
+            },
           },
           {
             title: "发布时间",
             dataIndex: "releaseTimeConvert",
-            key: "releaseTimeConvert"
-          }
+            key: "releaseTimeConvert",
+          },
         ],
         //数据列表
-        dataSource: []
+        dataSource: [],
       };
     },
     // 新增新闻按钮
     add() {
       this.setState({
         editvisible: true,
-        flag: false
+        flag: false,
       });
     },
     // 推荐置顶
@@ -358,20 +365,20 @@ const FirmList = Form.create()(
         url: globalConfig.context + "/api/admin/news/updateNews",
         data: {
           id: record.id,
-          status: num
+          status: num,
         },
-        success: function(data) {
+        success: function (data) {
           let theArr = [];
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
           } else {
             this.loadData();
           }
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -379,14 +386,14 @@ const FirmList = Form.create()(
     //编辑按钮操作
     tableRowClick(record) {
       this.setState({
-        editvisible: true
+        editvisible: true,
       });
       this.edit(record);
     },
     edit(record, index) {
       this.setState({
         editvisible: true,
-        loading: true
+        loading: true,
       });
       $.ajax({
         method: "get",
@@ -394,9 +401,9 @@ const FirmList = Form.create()(
         crossDomain: false,
         url: globalConfig.context + "/api/admin/news/selectNews",
         data: {
-          id: record.id
+          id: record.id,
         },
-        success: function(data) {
+        success: function (data) {
           let theArr = [];
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
@@ -415,21 +422,22 @@ const FirmList = Form.create()(
                   )
                 : [],
               sort: thisdata.sort,
+              keywords: thisdata.keywords,
               editorcontext: thisdata.content,
               releaseStatus: thisdata.releaseStatus,
               time: thisdata.releaseTimeConvert
                 ? thisdata.releaseTimeConvert
-                : thisdata.createTimeConvert
+                : thisdata.createTimeConvert,
             });
             window.setTimeout(() => {
               console.log(this.state);
             }, 100);
           }
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -457,9 +465,10 @@ const FirmList = Form.create()(
             content: this.state.editorcontext,
             status: this.state.status,
             releaseTimes: this.state.time,
-            releaseStatus: flag ? flag : undefined
+            releaseStatus: flag ? flag : undefined,
+            keywords: this.state.keywords,
           },
-          success: function(data) {
+          success: function (data) {
             let theArr = [];
             if (data.error && data.error.length) {
               message.warning(data.error[0].message);
@@ -467,11 +476,11 @@ const FirmList = Form.create()(
               this.loadData();
               this.handleCancelEdit();
             }
-          }.bind(this)
+          }.bind(this),
         }).always(
-          function() {
+          function () {
             this.setState({
-              loading: false
+              loading: false,
             });
           }.bind(this)
         );
@@ -490,9 +499,10 @@ const FirmList = Form.create()(
             content: this.state.editorcontext,
             releaseStatus: flag ? flag : undefined,
             status: 0,
-            releaseTimes: this.state.time
+            releaseTimes: this.state.time,
+            keywords: this.state.keywords,
           },
-          success: function(data) {
+          success: function (data) {
             let theArr = [];
             if (data.error && data.error.length) {
               message.warning(data.error[0].message);
@@ -500,11 +510,11 @@ const FirmList = Form.create()(
               this.loadData();
               this.handleCancelEdit();
             }
-          }.bind(this)
+          }.bind(this),
         }).always(
-          function() {
+          function () {
             this.setState({
-              loading: false
+              loading: false,
             });
           }.bind(this)
         );
@@ -515,13 +525,13 @@ const FirmList = Form.create()(
       if (f === undefined) {
         this.state.totalData[key] = e;
         this.setState({
-          totalData: this.state.totalData
+          totalData: this.state.totalData,
         });
       } else if (typeof f === "function") {
         this.state.totalData[key] = e;
         this.setState(
           {
-            totalData: this.state.totalData
+            totalData: this.state.totalData,
           },
           f
         );
@@ -530,7 +540,7 @@ const FirmList = Form.create()(
     // 关闭模态框
     handleCancelEdit() {
       this.setState({
-        editvisible: false
+        editvisible: false,
       });
       this.addReset();
     },
@@ -538,7 +548,7 @@ const FirmList = Form.create()(
     maximg(url) {
       this.setState({
         imgeditvisible: true,
-        maximg: url
+        maximg: url,
       });
     },
     componentWillMount() {
@@ -552,27 +562,27 @@ const FirmList = Form.create()(
         crossDomain: false,
         url: globalConfig.context + "/api/admin/news/deleteNews",
         data: {
-          id
+          id,
         },
-        success: function(data) {
+        success: function (data) {
           let theArr = [];
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
           } else {
             this.loadData();
           }
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
     },
     imghandleCancel() {
       this.setState({
-        imgeditvisible: false
+        imgeditvisible: false,
       });
     },
     //取消删除
@@ -594,12 +604,14 @@ const FirmList = Form.create()(
         type: undefined,
         sort: undefined,
         editorcontext: "",
-        time: undefined
+        time: undefined,
+        keywords: "",
       });
     },
     //搜索部分的清零
     reset() {
       this.state.titleSearch = undefined;
+      this.state.typeSearch = undefined;
       this.loadData();
     },
 
@@ -610,9 +622,9 @@ const FirmList = Form.create()(
         onChange: (selectedRowKeys, selectedRows) => {
           this.setState({
             selectedRows: selectedRows.slice(-1),
-            selectedRowKeys: selectedRowKeys.slice(-1)
+            selectedRowKeys: selectedRowKeys.slice(-1),
           });
-        }
+        },
       };
       let data = this.state.totalData;
       const { TextArea } = Input; //文本域
@@ -629,16 +641,41 @@ const FirmList = Form.create()(
                 style={{
                   width: "150px",
                   marginRight: "10px",
-                  marginBottom: "10px"
+                  marginBottom: "10px",
                 }}
                 value={this.state.titleSearch}
-                onChange={e => {
+                onChange={(e) => {
                   this.setState({ titleSearch: e.target.value });
                 }}
               />
+              <Select
+                style={{ width: 120 }}
+                placeholder="请选择新闻类型"
+                value={
+                  this.state.typeSearch == 1
+                    ? "行业新闻"
+                    : this.state.typeSearch == 0
+                    ? "公司新闻"
+                    : this.state.typeSearch == 2
+                    ? "高新技术企业"
+                    : this.state.typeSearch == 3
+                    ? "军工三证"
+                    : []
+                }
+                onChange={(e) => {
+                  this.setState({
+                    typeSearch: e,
+                  });
+                }}
+              >
+                <Option value="0">公司新闻</Option>
+                <Option value="1">行业新闻</Option>
+                <Option value="2">高新技术企业</Option>
+                <Option value="3">军工三证</Option>
+              </Select>
               <Button
                 type="primary"
-                onClick={e => {
+                onClick={(e) => {
                   this.loadData();
                 }}
                 style={{ marginRight: "10px" }}
@@ -688,101 +725,143 @@ const FirmList = Form.create()(
               >
                 <SpinContainer spinning={this.state.loading}>
                   <div className="clearfix">
-                    <FormItem
-                      className="half-item"
-                      labelCol={{ span: 8 }}
-                      wrapperCol={{ span: 12 }}
-                      label="新闻标题"
-                    >
-                      <Input
-                        placeholder="请输入新闻标题"
-                        value={this.state.title}
-                        onChange={e => {
-                          this.setState({
-                            title: e.target.value
-                          });
-                        }}
-                        style={{ width: "240px" }}
-                      />
-                    </FormItem>
-                    <FormItem
-                      className="half-item"
-                      labelCol={{ span: 8 }}
-                      wrapperCol={{ span: 12 }}
-                      label="新闻类别"
-                    >
-                      <Select
-                        style={{ width: 120 }}
-                        placeholder="请选择新闻类型"
-                        value={
-                          this.state.type == 1
-                            ? "行业新闻"
-                            : this.state.type == 0
-                            ? "公司新闻"
-                            : []
-                        }
-                        onChange={e => {
-                          this.setState({
-                            type: e
-                          });
-                        }}
+                    <Row>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 8 }}
+                        wrapperCol={{ span: 12 }}
+                        label="新闻标题"
                       >
-                        <Option value="0">公司新闻</Option>
-                        <Option value="1">行业新闻</Option>
-                      </Select>
-                    </FormItem>
-                    <FormItem
-                      className="half-item"
-                      labelCol={{ span: 8 }}
-                      wrapperCol={{ span: 12 }}
-                      label="新闻发布人"
-                    >
-                      <Input
-                        placeholder="请输入新闻发布人"
-                        value={this.state.publisher}
-                        onChange={e => {
-                          this.setState({
-                            publisher: e.target.value
-                          });
-                        }}
-                        style={{ width: "240px" }}
-                      />
-                    </FormItem>
-                    <FormItem
-                      className="half-item"
-                      labelCol={{ span: 8 }}
-                      wrapperCol={{ span: 12 }}
-                      label="发布时间"
-                    >
-                      <DatePicker
-                        placeholder="请输入发布时间"
-                        format="YYYY-MM-DD HH:mm:ss"
-                        showTime
-                        value={this.state.time ? moment(this.state.time) : null}
-                        onChange={(e, f) => {
-                          this.setState({ time: f });
-                          console.log(e, f);
-                        }}
-                        style={{ width: "240px" }}
-                      />
-                    </FormItem>
-                    <FormItem
-                      className="half-item"
-                      labelCol={{ span: 8 }}
-                      wrapperCol={{ span: 12 }}
-                      label="排序"
-                    >
-                      <Input
-                        placeholder="请输入排序"
-                        value={this.state.sort}
-                        onChange={e => {
-                          this.setState({
-                            sort: e.target.value
-                          });
+                        <Input
+                          placeholder="请输入新闻标题"
+                          value={this.state.title}
+                          onChange={(e) => {
+                            this.setState({
+                              title: e.target.value,
+                            });
+                          }}
+                          style={{ width: "240px" }}
+                        />
+                      </FormItem>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 8 }}
+                        wrapperCol={{ span: 12 }}
+                        label="新闻类别"
+                      >
+                        <Select
+                          style={{ width: 120 }}
+                          placeholder="请选择新闻类型"
+                          value={
+                            this.state.type == 1
+                              ? "行业新闻"
+                              : this.state.type == 0
+                              ? "公司新闻"
+                              : this.state.type == 2
+                              ? "高新技术企业"
+                              : this.state.type == 3
+                              ? "军工三证"
+                              : []
+                          }
+                          onChange={(e) => {
+                            this.setState({
+                              type: e,
+                            });
+                          }}
+                        >
+                          <Option value="0">公司新闻</Option>
+                          <Option value="1">行业新闻</Option>
+                          <Option value="2">高新技术企业</Option>
+                          <Option value="3">军工三证</Option>
+                        </Select>
+                      </FormItem>
+                    </Row>
+                    <Row>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 8 }}
+                        wrapperCol={{ span: 12 }}
+                        label="新闻发布人"
+                      >
+                        <Input
+                          placeholder="请输入新闻发布人"
+                          value={this.state.publisher}
+                          onChange={(e) => {
+                            this.setState({
+                              publisher: e.target.value,
+                            });
+                          }}
+                          style={{ width: "240px" }}
+                        />
+                      </FormItem>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 8 }}
+                        wrapperCol={{ span: 12 }}
+                        label="发布时间"
+                      >
+                        <DatePicker
+                          placeholder="请输入发布时间"
+                          format="YYYY-MM-DD HH:mm:ss"
+                          showTime
+                          value={
+                            this.state.time ? moment(this.state.time) : null
+                          }
+                          onChange={(e, f) => {
+                            this.setState({ time: f });
+                            console.log(e, f);
+                          }}
+                          style={{ width: "240px" }}
+                        />
+                      </FormItem>
+                    </Row>
+                    <Row>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 8 }}
+                        wrapperCol={{ span: 12 }}
+                        label="排序"
+                      >
+                        <Input
+                          placeholder="请输入排序"
+                          value={this.state.sort}
+                          onChange={(e) => {
+                            this.setState({
+                              sort: e.target.value,
+                            });
+                          }}
+                          style={{ width: "240px" }}
+                        />
+                      </FormItem>
+                    </Row>
+                    <Row>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 8 }}
+                        wrapperCol={{ span: 12 }}
+                        label="关键词设置"
+                      >
+                        <TextArea
+                          placeholder="请输入关键词设置"
+                          value={this.state.keywords}
+                          onChange={(e) => {
+                            this.setState({
+                              keywords: e.target.value,
+                            });
+                          }}
+                          style={{ width: "240px" }}
+                        />
+                      </FormItem>
+                      <span
+                        style={{
+                          top: "28px",
+                          position: "relative",
+                          left: "-79px",
                         }}
-                        style={{ width: "240px" }}
-                      />
-                    </FormItem>
+                      >
+                        设置多个关键词,请用英文,隔开
+                      </span>
+                    </Row>
                   </div>
                   <div className="clearfix">
                     <FormItem
@@ -809,7 +888,7 @@ const FirmList = Form.create()(
                         uploadUrl={"/api/admin/news/uploadFile"}
                         globalConfig={globalConfig.uploadPath}
                         placeholder="业务项目客户基本条件"
-                        handleRichText={value => {
+                        handleRichText={(value) => {
                           this.setState({ editorcontext: value });
                         }}
                       />
@@ -819,13 +898,13 @@ const FirmList = Form.create()(
                     <Button
                       type="primary"
                       size="large"
-                      onClick={e => {
+                      onClick={(e) => {
                         this.addNew(0);
                       }}
                       style={{
                         float: "right",
                         marginRight: "80px",
-                        marginTop: "20px"
+                        marginTop: "20px",
                       }}
                     >
                       保存
@@ -833,13 +912,13 @@ const FirmList = Form.create()(
                     <Button
                       type="primary"
                       size="large"
-                      onClick={e => {
+                      onClick={(e) => {
                         this.addNew(1);
                       }}
                       style={{
                         float: "right",
                         marginRight: "20px",
-                        marginTop: "20px"
+                        marginTop: "20px",
                       }}
                     >
                       保存并发布
@@ -858,7 +937,7 @@ const FirmList = Form.create()(
           </div>
         </div>
       );
-    }
+    },
   })
 );
 

+ 3 - 2
webpack.config.js

@@ -136,7 +136,8 @@ module.exports = (function () {
     }
 
     // let staticHost = 'http://172.16.0.253:80';
-    let staticHost = 'http://172.16.0.52:80';
+    // let staticHost = 'http://172.16.0.52:80';
+    let staticHost = 'http://172.16.1.187:80';
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://static.jishutao.com'
@@ -171,7 +172,7 @@ module.exports = (function () {
         devServer: {
             disableHostCheck: true,
             // host: '172.16.0.253',
-            host: '172.16.0.52',
+            host: '172.16.1.187',
             port: 80,
             allowedHosts: ['127.0.0.1','192.168.0.20','192.168.0.99'],
             headers: {