Bladeren bron

首页跳转更改

liting2017 6 jaren geleden
bovenliggende
commit
a46e9da464

+ 2 - 0
js/component/account/services/evaluate/info.jsx

@@ -483,7 +483,9 @@ const evaluateInfo = React.createClass({
     </div>
   },
   render() {
+    
     let { loading, data } = this.state;
+    this.state.data=[];
     return (
       <Spin spinning={loading}>
         <div className="report-container">

+ 1 - 1
js/component/certify/top.jsx

@@ -13,7 +13,7 @@ const LoginTop = React.createClass({
                     <div className="certify-text">
                         <span className="text">实名认证</span>
                         <span className="alink">
-                            <a href={globalConfig.context + "/portal/index.html"}>返回首页</a>
+                            <a href={jumpUrl + "/portal/index.html"}>返回首页</a>
                             <a href="./account/index">尊敬的{userData.nickname || userData.number }</a>
                             <a href="./login.html">退出</a>
                         </span>

+ 1 - 1
js/component/groupCertify/top.jsx

@@ -13,7 +13,7 @@ const LoginTop = React.createClass({
                     <div className="certify-text">
                         <span className="text">实名认证</span>
                         <span className="alink">
-                            <a href={globalConfig.context + "/portal/index.html"}>返回首页</a>
+                            <a href={jumpUrl + "/portal/index.html"}>返回首页</a>
                             <a href="./account/index.html">尊敬的{userData.nickname || userData.number}</a>
                             <a href="./login.html">退出</a>
                             <a href="./index.html">交易管理中心</a>

+ 1 - 1
js/component/login/loginTop.jsx

@@ -17,7 +17,7 @@ const LoginTop = React.createClass({
                     
                     <div className="logo-text">
                         <span>科技交易认知计算平台</span>
-                        <span className="back"><a href={globalConfig.context + "/portal/index.html"}>返回首页</a></span>
+                        <span className="back"><a href={jumpUrl + "/portal/index.html"}>返回首页</a></span>
                     </div>
                     
                 </div>

+ 0 - 2
js/component/manageCenter/index/content.jsx

@@ -169,8 +169,6 @@ const MessageModal = React.createClass({
     setStore(record){
     	localStorage.setItem('newData',{});
     	let ids = record.noticeType;
-    	console.log(record);
-    	ids=7;
     	let rid = this.finId(ids) || "";
     	var urls='',
     	    dataJson={};

+ 0 - 1
js/component/manageCenter/index/leftTab.jsx

@@ -4,7 +4,6 @@ import '../leftTab.less';
 const SubMenu = Menu.SubMenu;
 const MenuItemGroup = Menu.ItemGroup;
 
-
 const LeftTab = React.createClass({
     getInitialState() {
         return {

+ 19 - 0
js/component/manageCenter/servicesManage/projectBusiness/business.jsx

@@ -0,0 +1,19 @@
+import React, { Component } from 'react';
+
+class Business extends React.Component {
+	constructor(props) {
+		super(props);
+		this.state = {};
+	}
+	render() {
+		return (
+			<div className="user-content">
+				<div className="content-title">
+					<span>项目业务管理模板</span>
+				</div>
+			</div>
+		);
+	}
+}
+
+export default Business;

+ 3 - 0
js/component/manageCenter/servicesManage/projectOrder/content.jsx

@@ -6,6 +6,7 @@ import ProjectManage from './projectManagement/projectManage.jsx';
 import ProjectOrderNew from './projectManagement/projectManageNew.jsx';
 import MyTask from './myTask/projectManage.jsx';
 import TaskManagement from './taskManagement/projectManage.jsx';
+import Business from '../projectBusiness/business';
 import Module from '../../module.jsx';
 
 const Content = React.createClass({
@@ -45,6 +46,8 @@ const Content = React.createClass({
                                 return <MyTask />;
                             case 'taskManagement':
                                 return <TaskManagement />;
+                            case 'addBusiness':
+                                return <Business />;
                             default:
                                 return <Module />;  
                         };

+ 1 - 1
js/component/manageCenter/servicesManage/projectOrder/projectManagement/projectManageDetaile.jsx

@@ -1343,7 +1343,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
 		                    		<FormItem className="half-item"
 							            {...formItemLayout}
 							            label="结项说明" >
-						        		{!this.props.queryProject&&orderDetaiel.projectStatus==3?<Input type="textarea" placeholder="请输入项说明" rows={4}  value={this.state.completeComment} 
+						        		{!this.props.queryProject&&orderDetaiel.projectStatus==3?<Input type="textarea" placeholder="请输入项说明" rows={4}  value={this.state.completeComment} 
 												onChange={(e)=>{this.setState({completeComment:e.target.value})}}/>:
 												<span>{orderDetaiel.completeComment}</span>
 										}

+ 2 - 1
js/component/manageCenter/topTab.jsx

@@ -6,6 +6,7 @@ import './topTab.less';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 import logo from '../../../image/acc-logo.png';
+
 const MessageModal = React.createClass({
     getInitialState() {
         return {
@@ -538,7 +539,7 @@ const TopTab = React.createClass({
                         };
                         this.setState({ userModalShow: true });
                     }}> {adminData.name || adminData.mobile} </a> : <a onClick={this.logOut}>{this.state.username}</a>} <a onClick={this.logOut}>[ 退出 ]</a></span>
-                    <span className="acc-top-user-toindex"><a href={globalConfig.context + "/portal/index.html"}>返回首页</a></span>
+                    <span className="acc-top-user-toindex"><a href={jumpUrl||'' + "/portal/index.html"}>返回首页</a></span>
                     {this.props.active ? <a onClick={() => { this.setState({ messageModalShow: true }); }} className="user-badge">
                         <Icon type="mail" />
                         {(() => {

+ 1 - 1
js/component/portal/top.jsx

@@ -37,7 +37,7 @@ const LoginTop = React.createClass({
                     <div className="clearfix">
                         <div className="top-welcomeText">欢迎您来到科技认知计算交易平台-公测版</div>
                         <div className="top-alink">
-                            <a href={globalConfig.context + "/portal/index.html"}>返回首页</a>
+                            <a href={jumpUrl + "/portal/index.html"}>返回首页</a>
                             {window.userData.mobile || window.adminData.mobile ?
                                 <span>
                                     {(() => {

+ 1 - 1
js/component/subscriberDetail/top.jsx

@@ -21,7 +21,7 @@ const LoginTop = React.createClass({
                     <div className="portal-text">
                         <span className="text">用户详情</span>
                         <span className="alink">
-                            <a href={globalConfig.context + "/user/account/index.html"}>返回首页</a>
+                            <a href={jumpUrl||'' + "/user/account/index.html"}>返回首页</a>
                             {window.userData.number ?
                                 <span>
                                     <a href={globalConfig.context + "/user/account/index"}>尊敬的{userData.nickname || userData.number}</a>

+ 17 - 17
template/template.html

@@ -11,23 +11,23 @@
 
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap-theme.min.css">
     <script>
-//         window.userData = {
-//             mobile: "13600000000",
-//             nickname: "Lina",
-//             number: "80000",
-//             type: "0",
-//             email: "test@aft.com",
-//             createTime: "123456789000",
-//             lvl: "0"
-//         };
-//         window.adminData = {};
-//         window.globalConfig = {
-//             //context: "//aft.hnzhiming.com:8080/aft",
-//             context: "//127.0.0.1:8080/aft",
-//             staticHost: "//aft.hnzhiming.com",
-//             uploadPath: "/data/wwwroot/aft/upload",
-//             uploadPrivatePath: "/data/upload"
-//         };
+        // window.userData = {
+        //     mobile: "13600000000",
+        //     nickname: "Lina",
+        //     number: "80000",
+        //     type: "0",
+        //     email: "test@aft.com",
+        //     createTime: "123456789000",
+        //     lvl: "0"
+        // };
+        // window.adminData = {};
+        // window.globalConfig = {
+        //     //context: "//aft.hnzhiming.com:8080/aft",
+        //     context: "//127.0.0.1:8080/aft",
+        //     staticHost: "//aft.hnzhiming.com",
+        //     uploadPath: "/data/wwwroot/aft/upload",
+        //     uploadPrivatePath: "/data/upload"
+        // };
     </script>
 </head>
 

+ 6 - 1
webpack-dll.config.js

@@ -10,7 +10,7 @@ let theme = {
   '@link-color': '#58a3ff'
 };
 module.exports = (function () {
-	let staticHost = 'http://192.168.1.105';    
+  	let staticHost = 'http://192.168.0.188';    
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://static.kedexinxi.com';
@@ -51,6 +51,11 @@ module.exports = (function () {
         compress: {
           warnings: false,
         },
+      }),
+      new webpack.DefinePlugin({
+        "process.env": {
+            NODE_ENV: JSON.stringify("production")
+        }
       })
     ],
     module: require('./webpack/module.config.js')(theme),

+ 24 - 5
webpack.config.js

@@ -21,6 +21,14 @@ process.traceDeprecation = true;
 process.noDeprecation = true;
 
 module.exports = (function () {
+    let jumlApi='';
+    switch(argv.env.deploy){
+        case 'dev':jumlApi="http://192.168.0.20:80";break;
+        case 'test':jumlApi="http://uat.jishutao.com";break;
+        case 'prod':jumlApi="http://www.jishutao.com";break;
+        default:
+             break;
+    }
     let plugins = [
         //把入口文件里面的数组打包成verdors.js
         new webpack.optimize.CommonsChunkPlugin({
@@ -49,6 +57,10 @@ module.exports = (function () {
             disable: false,
             allChunks: true
         }),
+        //定义全局变量区分本地测试生产做跳转
+        new webpack.DefinePlugin({
+            jumpUrl: `'${jumlApi}'`
+        }),
         //user
         new HtmlWebpackPlugin({
             title: '用户首页',
@@ -280,7 +292,7 @@ module.exports = (function () {
     }
 
     //let staticHost = 'http://afts.hnzhiming.com';
-    let staticHost = 'http://127.0.0.1';    
+    let staticHost = 'http://192.168.0.188';
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://static.kedexinxi.com';
@@ -306,15 +318,22 @@ module.exports = (function () {
         resolve: {
         	alias:{
             	'@':__dirname+'/js/component',
-          },
-        		
+            },
             extensions: ['.js', '.jsx']
-           
         },
         plugins: plugins,
+        // devServer: {
+        //     disableHostCheck: true,
+        //     allowedHosts: ['bm.kedexinxi.com'],
+        //     headers: {
+        //         "Access-Control-Allow-Origin": "*"
+        //     }
+        // }
         devServer: {
             disableHostCheck: true,
-            allowedHosts: ['bm.kedexinxi.com'],
+            host: '192.168.0.188',
+            port: 80,
+            allowedHosts: ['127.0.0.1','192.168.0.20','192.168.0.99'],
             headers: {
                 "Access-Control-Allow-Origin": "*"
             }