Browse Source

href #号改void函数

pzc 4 years ago
parent
commit
f3532e07f9

+ 4 - 0
Readme.md

@@ -23,3 +23,7 @@ $ umi build
 ```
 ### FAQ
 > 如有问题可以参考一下我这篇文章 [umi + dva + ant-design-mobile快速搭建H5项目](https://www.jianshu.com/p/59099cb3e28d),可以在文章中评论区写提问或者直接在简书发信息给我
+
+package.json
+  // "homepage": ".",
+  "homepage":"http://mem.360lj.com/ctt",

File diff suppressed because it is too large
+ 2 - 2
dist/index.html


File diff suppressed because it is too large
+ 1 - 1
dist/umi.js


+ 1 - 1
package.json

@@ -7,7 +7,7 @@
     "lint": "",
     "precommit": "lint-staged"
   },
-  "homepage": ".",
+  "homepage":"http://mem.360lj.com/ctt",
   "devDependencies": {
     "antd-pro-server": "^1.0.1",
     "babel-eslint": "^9.0.0",

+ 2 - 2
src/pages/viewHome/categoryEntry/index.js

@@ -53,7 +53,7 @@ class categoryEntry extends Component {
                         {
                             this.state.departmentList && this.state.departmentList.map((item, index) => {
                                 return <li className={styles.nav_item} onClick={() => this.onClick(item)}>
-                                    <a href="#" className={styles.nav_item_link}>
+                                    <a href="javascript:void(0);" className={styles.nav_item_link}>
                                         {
                                             item.departmentIconaddress ? (<img src={item.departmentIconaddress + "?Sso-Token=" + SsoToken} style={{ height: '100%', width: "100%", borderRadius: "50%" }} />) : (<div className={styles.itemStyle}></div>)
                                         }
@@ -63,7 +63,7 @@ class categoryEntry extends Component {
                             })
                         }
                         <li className={styles.nav_item} onClick={() => this.onClick({departmentId:""})}>
-                            <a href="#" className={styles.nav_item_link}>
+                            <a href="javascript:void(0);" className={styles.nav_item_link}>
                             <div className={styles.itemStyle}></div>
                                 <span className={styles.title}>更多</span>
                             </a>

+ 17 - 2
src/pages/viewHome/index.js

@@ -3,6 +3,13 @@ import React, { Component } from 'react'
 import HomeContent from './HomeContent'
 import qs from 'qs';
 import { config, request, permission, util } from 'utils';
+import { BrowserRouter  as Router } from 'react-router-dom'
+import { Provider } from 'react-redux'
+// import store from './store'
+ 
+import ReactDOM from 'react-dom'; 
+
+
 
 const { ClientIdCms,ClientSecretCms } = config
 
@@ -47,9 +54,17 @@ class Index extends Component {
         this.getUpdateToken();
     }
     render() {
-        return this.state.token ? <HomeContent /> : <div />
+        return  this.state.token ?  <HomeContent /> : <div /> ;
         // return <div></div>
     }
 }
 
-export default Index;
+export default Index;
+
+
+
+// ReactDOM.render(  
+// <Router basename="/app/"> 
+// <Index />  
+// </Router> , document.getElementById('root'));
+ 

+ 92 - 0
src/utils/config-dev.js

@@ -0,0 +1,92 @@
+const APIV1 = '/api/v1'
+const APIV2 = '/api/v2' 
+const APIV3 = 'http://192.168.50.32:8004'
+const APIV4 = 'http://192.168.50.32:8005'
+
+const APIV3Auth = 'http://192.168.50.32:13001/oauth2'
+const WXAPIV5= 'http://192.168.50.32:13001/qiyewechat'
+const WXMpAPI= 'http://192.168.50.32:13001/mpwechat'
+const staticMpAPI = 'http://192.168.50.32:13001/mpwechat'
+const ymallAPI = 'http://localhost:8070'
+// const WXMpAPI= 'http://192.168.10.86:8081'
+
+// const APIV3Auth = 'http://192.168.50.32:8031'
+// const WXAPIV5= 'http://localhost:7000'
+// const WXMpAPI= 'http://localhost:8081'
+// const staticMpAPI= 'http://localhost:8081'
+module.exports =  {
+  name: '亮健营销平台',
+  prefix: 'bird',
+  footerText: 'bird admin  ? 2018 360lj.com',
+  logo: '/logo.svg',
+  iconFontCSS: '/iconfont.css',
+  iconFontJS: '/iconfont.js',
+  CORS: ['http://localhost:8000',
+  'http://localhost:8070',
+  'http://localhost:7000',
+  'http://192.168.10.86:8081',
+  'http://192.168.50.32:8031',
+  'http://192.168.50.32:8030',
+  'http://localhost:8030',
+  'http://192.168.50.32:13001',
+  'http://192.168.10.40:13002',
+  'http://localhost:13001',
+  'http://192.168.10.129:8081',
+  'http://192.168.10.40:8081',
+  'http://192.168.50.32:7000',
+  'http://192.168.10.129:7000',
+  'http://192.168.50.39:8081',
+  'http://192.168.10.86:8081',
+  'http://localhost:8081',
+  'http://192.168.50.32:8004',
+  'http://localhost:8005',
+  'http://192.168.50.32:8005',
+  'http://localhost:7000',  
+  'http://192.168.50.32:7000',
+  ],
+  //YQL: ['http://localhost:57251'],
+  openPages: ['/login','/'],
+  apiPrefix: '/api/v1',
+  webApiPrefix: APIV3,
+  authApiPrefix: APIV3Auth,
+  APIV1,
+  APIV2,
+  APIV3,
+  APIV3Auth,
+  APIV4,
+  WXAPIV5,
+  WXMpAPI,
+  staticMpAPI,
+  ymallAPI,
+  ClientId:'f3ed0d90-3fc8-4eba-b83c-a0cfe54c174d',
+  ClientSecret:'78e238b4-c199-49ad-b619-69b6a78959d8',
+  ClientIdCms:'B966BFB4-493C-441A-BF02-8E3750644DE8',
+  ClientSecretCms:'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDL9NmMe2imMfzfQ54ol+v+qdQ0By9F8j+a1Ub3wdqKYhsky44EOkMFrb+o0QGz1pCUB59WIch8HpFvZ8DgmP1GfLGgTfK4TYZIzj5a+6jXeIRE4Kp0nEWOPf89nG0ktjl3Z4H2PdlDRNBXGF/xqbj3NjhoFrQAwuz9Lj10n2YBCwIDAQAB',
+  
+  ApplicationKey:'wechatcp',
+  grant_type:'password',
+  grant_type_refesh:'refresh_token',
+  color:{
+    success:'#52c41a',
+    warn:'#E6A23C',
+    error:'#ff4d4f'
+  },
+  api: {
+    // userLogin: `${APIV3}/web/login/index`,
+    userLogin: `${APIV3Auth}/ums/oauth2/accessToken`,
+    // userLogout: `${APIV3}/web/login/logout`,
+    userLogout: `${APIV3Auth}/web/login/logout`,
+    //menus: `${APIV1}/menus`,
+    // menus: `${APIV3}/web/auth/menus`,
+    menus: `${APIV3Auth}/ums/oauth2/list/permission`,//?types=1 两种菜单类型 顶部菜单和左侧菜单
+    getDic:`${APIV1}/getdic?key=`,
+
+    upload:`${APIV3}/web/upload/uploadprofile`,
+    //getFileName:`/file/getName?url=`,
+    getFileName:`${APIV3}/`,
+    // getOperationToken:`${APIV3}/web/login/getOperationToken`,
+    getOperationToken: `${APIV3Auth}/ums/oauth2/accessToken`,
+    // permissions:`${APIV3}/web/auth/permissions`
+    permissions:`${APIV3Auth}/ums/oauth2/list/permission?types=2`,
+  },
+}

+ 0 - 72
src/utils/config-prod.js

@@ -1,72 +0,0 @@
-const APIV1 = '/api/v1'
-const APIV2 = '/api/v2'
-const APIV3 = 'http://119.130.113.245:8004'
-const APIV4 = 'http://119.130.113.245:8005'
-
-const APIV3Auth = 'http://mem.360lj.com:13000/oauth2'
-const WXAPIV5= 'http://mem.360lj.com:13000/qiyewechat'
-const WXMpAPI= 'http://mem.360lj.com:13000/mpwechat'
-const staticMpAPI = 'http://mem.360lj.com:13000/mpwechat'
-module.exports =  {
-  name: '亮健营销平台',
-  prefix: 'bird',
-  footerText: 'bird admin  © 2018 360lj.com',
-  logo: '/logo.svg',
-  iconFontCSS: '/iconfont.css',
-  iconFontJS: '/iconfont.js',
-  CORS: [
-    'http://mem.360lj.com:7111',
-    'http://119.130.113.245:8004',
-    'http://119.130.113.245:8005',
-    'http://119.130.113.245:7001',
-    'http://119.130.113.245:8030',
-    'http://mem.360lj.com:13000',
-    'http://mem.360lj.com:7000',
-    'http://mem.360lj.com:7001',
-  ],
-  //YQL: ['http://localhost:57251'],
-  openPages: ['/login','/'],
-  apiPrefix: '/api/v1',
-  webApiPrefix:APIV3,
-  authApiPrefix: APIV3Auth,
-  APIV1,
-  APIV2,
-  APIV3,
-  APIV3Auth,
-  APIV4,
-  WXAPIV5,
-  WXMpAPI,
-  staticMpAPI,
-  ClientId:'f3ed0d90-3fc8-4eba-b83c-a0cfe54c174d',
-  ClientSecret:'78e238b4-c199-49ad-b619-69b6a78959d8',
-  ClientIdCms:'f2e2a47c-76e5-4a45-928e-368b1c64695e',
-  ClientSecretCms:'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVHVcChDl9LptUSFCtrqj39rLCq5id/04BfHBWTqgSoVQzYo2ot/rBV0XWaAZExK/DOKHXmLbxlcN5pgU7X6DvGnmu2zp5KhxtxO11bLWhgsik7Dh5x4N6Pkt6xGKAruxoFmCOde5/20Omaa5LlEH2jit7Fc6EK0tbfu4JnVaEGwIDAQAB',
-  
-  ApplicationKey:'wechatcp',
-  grant_type:'password',
-  grant_type_refesh:'refresh_token',
-  color:{
-    success:'#52c41a',
-    warn:'#E6A23C',
-    error:'#ff4d4f'
-  },
-  api: {
-    // userLogin: `${APIV3}/web/login/index`,
-    userLogin: `${APIV3Auth}/ums/oauth2/accessToken`,
-    // userLogout: `${APIV3}/web/login/logout`,
-    userLogout: `${APIV3Auth}/web/login/logout`,
-    //menus: `${APIV1}/menus`,
-    // menus: `${APIV3}/web/auth/menus`,
-    menus: `${APIV3Auth}/ums/oauth2/list/permission`,//?types=1 两种菜单类型 顶部菜单和左侧菜单
-    getDic:`${APIV1}/getdic?key=`,
-
-    upload:`${APIV3}/web/upload/uploadprofile`,
-    //getFileName:`/file/getName?url=`,
-    getFileName:`${APIV3}/`,
-    // getOperationToken:`${APIV3}/web/login/getOperationToken`,
-    getOperationToken: `${APIV3Auth}/ums/oauth2/accessToken`,
-    // permissions:`${APIV3}/web/auth/permissions`
-    permissions:`${APIV3Auth}/ums/oauth2/list/permission?types=2`,
-  },
-  APIV4, 
-}

+ 22 - 42
src/utils/config.js

@@ -1,53 +1,33 @@
 const APIV1 = '/api/v1'
-const APIV2 = '/api/v2' 
-const APIV3 = 'http://192.168.50.32:8004'
-const APIV4 = 'http://192.168.50.32:8005'
+const APIV2 = '/api/v2'
+const APIV3 = 'http://119.130.113.245:8004'
+const APIV4 = 'http://119.130.113.245:8005'
 
-const APIV3Auth = 'http://192.168.50.32:13001/oauth2'
-const WXAPIV5= 'http://192.168.50.32:13001/qiyewechat'
-const WXMpAPI= 'http://192.168.50.32:13001/mpwechat'
-const staticMpAPI = 'http://192.168.50.32:13001/mpwechat'
-const ymallAPI = 'http://localhost:8070'
-// const WXMpAPI= 'http://192.168.10.86:8081'
-
-// const APIV3Auth = 'http://192.168.50.32:8031'
-// const WXAPIV5= 'http://localhost:7000'
-// const WXMpAPI= 'http://localhost:8081'
-// const staticMpAPI= 'http://localhost:8081'
+const APIV3Auth = 'http://mem.360lj.com:13000/oauth2'
+const WXAPIV5= 'http://mem.360lj.com:13000/qiyewechat'
+const WXMpAPI= 'http://mem.360lj.com:13000/mpwechat'
+const staticMpAPI = 'http://mem.360lj.com:13000/mpwechat'
 module.exports =  {
   name: '亮健营销平台',
   prefix: 'bird',
-  footerText: 'bird admin  ? 2018 360lj.com',
+  footerText: 'bird admin  © 2018 360lj.com',
   logo: '/logo.svg',
   iconFontCSS: '/iconfont.css',
   iconFontJS: '/iconfont.js',
-  CORS: ['http://localhost:8000',
-  'http://localhost:8070',
-  'http://localhost:7000',
-  'http://192.168.10.86:8081',
-  'http://192.168.50.32:8031',
-  'http://192.168.50.32:8030',
-  'http://localhost:8030',
-  'http://192.168.50.32:13001',
-  'http://192.168.10.40:13002',
-  'http://localhost:13001',
-  'http://192.168.10.129:8081',
-  'http://192.168.10.40:8081',
-  'http://192.168.50.32:7000',
-  'http://192.168.10.129:7000',
-  'http://192.168.50.39:8081',
-  'http://192.168.10.86:8081',
-  'http://localhost:8081',
-  'http://192.168.50.32:8004',
-  'http://localhost:8005',
-  'http://192.168.50.32:8005',
-  'http://localhost:7000',  
-  'http://192.168.50.32:7000',
+  CORS: [
+    'http://mem.360lj.com:7111',
+    'http://119.130.113.245:8004',
+    'http://119.130.113.245:8005',
+    'http://119.130.113.245:7001',
+    'http://119.130.113.245:8030',
+    'http://mem.360lj.com:13000',
+    'http://mem.360lj.com:7000',
+    'http://mem.360lj.com:7001',
   ],
   //YQL: ['http://localhost:57251'],
   openPages: ['/login','/'],
   apiPrefix: '/api/v1',
-  webApiPrefix: APIV3,
+  webApiPrefix:APIV3,
   authApiPrefix: APIV3Auth,
   APIV1,
   APIV2,
@@ -57,11 +37,10 @@ module.exports =  {
   WXAPIV5,
   WXMpAPI,
   staticMpAPI,
-  ymallAPI,
   ClientId:'f3ed0d90-3fc8-4eba-b83c-a0cfe54c174d',
   ClientSecret:'78e238b4-c199-49ad-b619-69b6a78959d8',
-  ClientIdCms:'B966BFB4-493C-441A-BF02-8E3750644DE8',
-  ClientSecretCms:'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDL9NmMe2imMfzfQ54ol+v+qdQ0By9F8j+a1Ub3wdqKYhsky44EOkMFrb+o0QGz1pCUB59WIch8HpFvZ8DgmP1GfLGgTfK4TYZIzj5a+6jXeIRE4Kp0nEWOPf89nG0ktjl3Z4H2PdlDRNBXGF/xqbj3NjhoFrQAwuz9Lj10n2YBCwIDAQAB',
+  ClientIdCms:'f2e2a47c-76e5-4a45-928e-368b1c64695e',
+  ClientSecretCms:'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVHVcChDl9LptUSFCtrqj39rLCq5id/04BfHBWTqgSoVQzYo2ot/rBV0XWaAZExK/DOKHXmLbxlcN5pgU7X6DvGnmu2zp5KhxtxO11bLWhgsik7Dh5x4N6Pkt6xGKAruxoFmCOde5/20Omaa5LlEH2jit7Fc6EK0tbfu4JnVaEGwIDAQAB',
   
   ApplicationKey:'wechatcp',
   grant_type:'password',
@@ -89,4 +68,5 @@ module.exports =  {
     // permissions:`${APIV3}/web/auth/permissions`
     permissions:`${APIV3Auth}/ums/oauth2/list/permission?types=2`,
   },
-}
+  APIV4, 
+}