Browse Source

初始化项目配置

吕卓 4 years ago
parent
commit
e5eb0d9286
8 changed files with 1018 additions and 1728 deletions
  1. 1008 1705
      package-lock.json
  2. 3 2
      package.json
  3. 1 1
      public/index.html
  4. 1 0
      src/.env
  5. 1 0
      src/App.css
  6. 4 12
      src/App.js
  7. 0 4
      src/component/Layout/Layout.jsx
  8. 0 4
      src/component/homePage/homePage.jsx

File diff suppressed because it is too large
+ 1008 - 1705
package-lock.json


+ 3 - 2
package.json

@@ -11,6 +11,7 @@
     "@types/redux-actions": "^2.6.1",
     "@types/redux-actions": "^2.6.1",
     "antd": "^4.16.5",
     "antd": "^4.16.5",
     "axios": "^0.21.1",
     "axios": "^0.21.1",
+    "babel-loader": "^8.1.0",
     "loadash": "^1.0.0",
     "loadash": "^1.0.0",
     "react": "^17.0.2",
     "react": "^17.0.2",
     "react-dom": "^17.0.2",
     "react-dom": "^17.0.2",
@@ -49,10 +50,10 @@
   "devDependencies": {
   "devDependencies": {
     "babel": "^6.23.0",
     "babel": "^6.23.0",
     "babel-cli": "^6.26.0",
     "babel-cli": "^6.26.0",
-    "babel-loader": "^8.2.2",
     "babel-preset-env": "^1.7.0",
     "babel-preset-env": "^1.7.0",
     "babel-preset-react": "^6.24.1",
     "babel-preset-react": "^6.24.1",
     "react-hot-loader": "^4.13.0",
     "react-hot-loader": "^4.13.0",
-    "webpack": "^5.40.0"
+    "webpack": "^4.44.2",
+    "webpack-cli": "^4.7.2"
   }
   }
 }
 }

+ 1 - 1
public/index.html

@@ -24,7 +24,7 @@
       work correctly both with client-side routing and a non-root public URL.
       work correctly both with client-side routing and a non-root public URL.
       Learn how to configure a non-root public URL by running `npm run build`.
       Learn how to configure a non-root public URL by running `npm run build`.
     -->
     -->
-    <title>React App</title>
+    <title>新支付</title>
   </head>
   </head>
   <body>
   <body>
     <noscript>You need to enable JavaScript to run this app.</noscript>
     <noscript>You need to enable JavaScript to run this app.</noscript>

+ 1 - 0
src/.env

@@ -0,0 +1 @@
+SKIP_PREFLIGHT_CHECK=true

+ 1 - 0
src/App.css

@@ -1,3 +1,4 @@
+@import '~antd/dist/antd.css';
 .App {
 .App {
   text-align: center;
   text-align: center;
 }
 }

+ 4 - 12
src/App.js

@@ -1,6 +1,8 @@
 import React from 'react';
 import React from 'react';
 import ReactDOM from 'react-dom';
 import ReactDOM from 'react-dom';
+import './App.css';
 import Layout from './component/Layout/Layout.jsx'
 import Layout from './component/Layout/Layout.jsx'
+import { Button } from 'antd';
 // import { $Axios } from '&/common/publish';
 // import { $Axios } from '&/common/publish';
 
 
 export default class App extends React.Component {
 export default class App extends React.Component {
@@ -11,9 +13,6 @@ export default class App extends React.Component {
     }
     }
   }
   }
 
 
-  UNSAFE_componentWillMount() {
- 
-  }
 
 
   componentDidMount() {
   componentDidMount() {
 
 
@@ -22,14 +21,6 @@ export default class App extends React.Component {
 
 
 
 
   // autoLogin = () => {
   // autoLogin = () => {
-  //     let href = window.location.href; // 获取浏览器链接
-  //     let args = href.split('?');
-  //     let args_list = args[1].split('&');
-  //     let account = args_list[0].split('=')[1].toString();//获取链接内账号
-  //     let password = args_list[1].split('=')[1].toString();//获取链接内密码
-  //     let login_ip = args_list[2].split('=')[1].toString();//获取链接内IP
-  //     console.log('账号:'+account + '密码:' + password + '外网IP:' + login_ip)
-  //     let me = this
   //     let param = {
   //     let param = {
   //         "account": account,
   //         "account": account,
   //         "password": password,
   //         "password": password,
@@ -52,7 +43,8 @@ export default class App extends React.Component {
     return (
     return (
       <React.Fragment>
       <React.Fragment>
         {this.state.isLogin ? <Layout></Layout> : <div>
         {this.state.isLogin ? <Layout></Layout> : <div>
-          xxxx
+          <Button type="primary">Button</Button>
+          xxxxs
           </div>}
           </div>}
       </React.Fragment>
       </React.Fragment>
     )
     )

+ 0 - 4
src/component/Layout/Layout.jsx

@@ -10,10 +10,6 @@ export default class Layout extends React.Component {
         }
         }
         
         
     }
     }
-
-    UNSAFE_componentWillMount() {
-       
-	}
 	
 	
 	componentDidMount() {
 	componentDidMount() {
         
         

+ 0 - 4
src/component/homePage/homePage.jsx

@@ -11,10 +11,6 @@ export default class homePage extends React.Component {
         
         
     }
     }
 
 
-    UNSAFE_componentWillMount() {
-       
-	}
-	
 	componentDidMount() {
 	componentDidMount() {
         
         
     }
     }