dengzhiguo 6 роки тому
батько
коміт
dcdc1f846a

+ 4 - 6
js/component/account/business/businessForm.jsx

@@ -125,10 +125,7 @@ const DemandDetailForm = Form.create()(
 				message.warning('请输入正确的市场价');
 				return;
 			}
-			if (!this.state.keyword) {
-				message.warning('请输入关键字');
-				return;
-			}
+			
 			if(this.state.summary&&(this.state.summary).length>40){
 				message.warning('项目营销说明字数不得超过40个字。');
 				return;
@@ -247,7 +244,7 @@ const DemandDetailForm = Form.create()(
 						this.setState({
 							id: thisdata.id, //业务名称
 							name: thisdata.name, //业务名称
-							keyword:this.state.keyword, //关键字
+							keyword:thisdata.keyword, //关键字
 							tagTxt:tagTxt.join(' - '),
 							tagArr:tagArr,
 							categoryId: categoryIdArr, //业务品类
@@ -460,6 +457,7 @@ const DemandDetailForm = Form.create()(
 						this.loadData(nextProps.data.id);
 					}
 				}
+			
 			},
 		render() {
 			const FormItem = Form.Item;
@@ -655,7 +653,7 @@ const DemandDetailForm = Form.create()(
 									wrapperCol={{ span: 12 }}
 									label={
 										<span>
-											<strong style={{ color: 'red' }}>*</strong>关键字
+											关键字
 										</span>
 									}
 								>

+ 39 - 4
js/component/administration/business/businessCategory.jsx

@@ -311,6 +311,7 @@ const BusinessCategory = Form.create()(
 				addFirst: 1,
 				index: undefined,
 				appIndex: undefined,
+				homeIndex: undefined,
 				superId: recard.id,
 				module: recard.module ? recard.module.toString() : 'undefined'
 			});
@@ -343,8 +344,9 @@ const BusinessCategory = Form.create()(
 				dataList.imgUrl = thePictureUrl.length ? thePictureUrl : '';
 				dataList.oldSuperId = this.state.superId;
                 dataList.superId = this.state.superNameId;
-                dataList.pcIndex =this.state.index,  
-                dataList.appIndex=this.state.appIndex
+                dataList.pcIndex =this.state.index;
+                dataList.appIndex=this.state.appIndex;
+                dataList.homeIndex=this.state.homeIndex;
 			}
 			$.ajax({
 				method: 'post',
@@ -411,7 +413,8 @@ const BusinessCategory = Form.create()(
 				superId: '',
 				module: '1',
 				index: undefined,
-				appIndex: undefined
+				appIndex: undefined,
+				homeIndex: undefined,
 			});
 		},
 		//新增保存
@@ -431,7 +434,8 @@ const BusinessCategory = Form.create()(
 					layer: this.state.addFirst ? this.state.recrdAdd.layer + 1 : '1',
 					module: this.state.module,
 					pcIndex : this.state.index,
-					appIndex: this.state.appIndex
+					appIndex: this.state.appIndex,
+					homeIndex: this.state.homeIndex
 				}
 			}).done(
 				function(data) {
@@ -487,6 +491,7 @@ const BusinessCategory = Form.create()(
 							layer: thisdata.layer,
                             superNameId: thisdata.superId,
                             index:thisdata.pcIndex ,
+                            homeIndex:thisdata.homeIndex ,
                             appIndex:thisdata.appIndex,
 							moduleNumber: thisdata.module ? thisdata.module.toString() : undefined
 						});
@@ -724,6 +729,23 @@ const BusinessCategory = Form.create()(
 													<FormItem
 														labelCol={{ span: 7 }}
 														wrapperCol={{ span: 12 }}
+														label="发布到PC首页"
+													>
+														<Radio.Group
+															onChange={(e) => {
+																this.setState({ homeIndex: e.target.value });
+															}}
+															value={this.state.homeIndex}
+														>
+															<Radio value={1}>是</Radio>
+															<Radio value={0}>否</Radio>
+														</Radio.Group>
+													</FormItem>
+												</div>
+												<div className="clearfix">
+													<FormItem
+														labelCol={{ span: 7 }}
+														wrapperCol={{ span: 12 }}
 														label="发布到APP首页"
 													>
 														<Radio.Group
@@ -820,6 +842,19 @@ const BusinessCategory = Form.create()(
                                                 </FormItem>
                                             </div>
                                             <div className="clearfix">
+                                                <FormItem labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} label="发布到PC首页">
+                                                    <Radio.Group
+                                                        onChange={(e) => {
+                                                            this.setState({ homeIndex: e.target.value });
+                                                        }}
+                                                        value={this.state.homeIndex}
+                                                    >
+                                                        <Radio value={1}>是</Radio>
+                                                        <Radio value={0}>否</Radio>
+                                                    </Radio.Group>
+                                                </FormItem>
+                                            </div>
+                                            <div className="clearfix">
                                                 <FormItem labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} label="发布到APP首页">
                                                     <Radio.Group
                                                         onChange={(e) => {

+ 0 - 9
package-lock.json

@@ -1467,7 +1467,6 @@
       "requires": {
         "anymatch": "1.3.2",
         "async-each": "1.0.1",
-        "fsevents": "1.1.3",
         "glob-parent": "2.0.0",
         "inherits": "2.0.3",
         "is-binary-path": "1.0.1",
@@ -3294,13 +3293,6 @@
       "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
       "dev": true
     },
-    "fsevents": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz",
-      "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==",
-      "dev": true,
-      "optional": true
-    },
     "function-bind": {
       "version": "1.1.0",
       "resolved": "http://registry.npm.taobao.org/function-bind/download/function-bind-1.1.0.tgz",
@@ -9240,7 +9232,6 @@
             "anymatch": "2.0.0",
             "async-each": "1.0.1",
             "braces": "2.3.0",
-            "fsevents": "1.1.3",
             "glob-parent": "3.1.0",
             "inherits": "2.0.3",
             "is-binary-path": "1.0.1",

+ 2 - 2
webpack.config.js

@@ -121,7 +121,7 @@ module.exports = (function () {
         }));
     }
 
-    let staticHost = 'http://192.168.0.188:8088';    
+    let staticHost = 'http://192.168.0.190:8088';    
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://statics.jishutao.com';
@@ -156,7 +156,7 @@ module.exports = (function () {
         plugins: plugins,
         devServer: {
             disableHostCheck: true,
-            host: '192.168.0.188',
+            host: '192.168.0.190',
             port: 8088,
             allowedHosts: ['127.0.0.1','192.168.0.20','192.168.0.99'],
             headers: {

+ 7 - 7
webpack/entry.config.js

@@ -11,32 +11,32 @@ module.exports = {
     'admin/index': './js/admin/index.js',
   },
   watch: {
-    'user/index': ['webpack-dev-server/client?http://192.168.0.188:8088', // WebpackDevServer host and port
+    'user/index': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/user/index.js'
     ],
-    'user/login': ['webpack-dev-server/client?http://192.168.0.188:8088', // WebpackDevServer host and port
+    'user/login': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/user/login.js'
     ],
-    'user/signIn': ['webpack-dev-server/client?http://192.168.0.188:8088', // WebpackDevServer host and port
+    'user/signIn': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/user/signIn.js'
     ],
-    'user/account/index': ['webpack-dev-server/client?http://192.168.0.188:8088', // WebpackDevServer host and port
+    'user/account/index': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/user/account/index.js'
     ],
-    'user/account/evaluateInfo': ['webpack-dev-server/client?http://192.168.0.188:8088', // WebpackDevServer host and port
+    'user/account/evaluateInfo': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/user/account/assessment.js'
     ],
     //admin
-    'admin/login': ['webpack-dev-server/client?http://192.168.0.188:8088', // WebpackDevServer host and port
+    'admin/login': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
     'webpack/hot/only-dev-server',
     './js/user/adminLogin.js'
     ],
-    'admin/index': ['webpack-dev-server/client?http://192.168.0.188:8088', // WebpackDevServer host and port
+    'admin/index': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/admin/index.js'
     ]