Browse Source

首页返回404

RaoMeng 6 years ago
parent
commit
96cd30b446
1 changed files with 9 additions and 7 deletions
  1. 9 7
      frontend/wechat-web/src/modules/accountBind/BindMenu.jsx

+ 9 - 7
frontend/wechat-web/src/modules/accountBind/BindMenu.jsx

@@ -47,12 +47,10 @@ class BindMenu extends Component {
                 this.setState({
                 this.setState({
                     errorMsg: ''
                     errorMsg: ''
                 })
                 })
-                setTimeout(() => {
-                    window.location.href =
-                        'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' +
-                        this.paramId + '&redirect_uri=https%3a%2f%2fschool-api.ubtob.com%2fapi%2fschool%2fwxSchool%2fuser%2fuserLogin&response_type=code&scope=snsapi_userinfo&state=' +
-                        this.paramId + '&connect_redirect=1#wechat_redirect'
-                }, 200)
+                window.location.href =
+                    'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' +
+                    this.paramId + '&redirect_uri=https%3a%2f%2fschool-api.ubtob.com%2fapi%2fschool%2fwxSchool%2fuser%2fuserLogin&response_type=code&scope=snsapi_userinfo&state=' +
+                    this.paramId + '&connect_redirect=1#wechat_redirect'
             }
             }
 
 
         } else if (this.paramType === 'open') {
         } else if (this.paramType === 'open') {
@@ -149,6 +147,8 @@ class BindMenu extends Component {
                 this.setState({
                 this.setState({
                     bindStatus: 2
                     bindStatus: 2
                 })
                 })
+
+                this.props.history.push('/homePage')
             } else {
             } else {
                 this.setState({
                 this.setState({
                     bindStatus: 1
                     bindStatus: 1
@@ -169,7 +169,9 @@ class BindMenu extends Component {
 
 
     getRedirectMain = () => {
     getRedirectMain = () => {
         return (
         return (
-            <Redirect to='/homePage'></Redirect>
+            <div>
+                {/*<Redirect to='/homePage'></Redirect>*/}
+            </div>
         )
         )
     }
     }