Commit f00fa68c by zhanghaozhe

直播间登录问题

parent 5b1c5919
......@@ -22149,6 +22149,11 @@
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz",
"integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA=="
},
"start": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/start/-/start-5.1.0.tgz",
"integrity": "sha1-HBcfDvlIf1bQq5p1Ws6GAWkgh2M="
},
"static-extend": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
......
......@@ -102,6 +102,7 @@
"sass-loader": "8.0.2",
"semver": "6.3.0",
"socket.io": "^2.3.0",
"start": "^5.1.0",
"store2": "^2.11.2",
"style-loader": "0.23.1",
"swiper": "^4.5.1",
......@@ -130,7 +131,10 @@
}
},
"lint-staged": {
"*.(js|css|ts[x])": ["prettier --write", "git add ."]
"*.(js|css|ts[x])": [
"prettier --write",
"git add ."
]
},
"eslintConfig": {
"extends": "react-app",
......
......@@ -262,6 +262,16 @@ class App extends Component {
isFetching: false,
})
if (data.data["is_bind_mobile"]) {
let redirectURI = new URLSearchParams(
window.location.search
).get("redirect")
if (redirectURI) {
localStorage.setItem(
"binding_redirect",
JSON.stringify(redirectURI)
)
// return window.location.assign(data.data.url.slice(0, index) + '?' + se.toString())
}
window.location.assign(data.data.url)
} else {
this.handleLoginResponse(data.data)
......
......@@ -176,7 +176,7 @@ const formikConfig = {
const redirect = localStorage.getItem("binding_redirect")
if (redirect) {
localStorage.removeItem("binding_redirect")
history.replace(JSON.parse(redirect))
window.location.assign(JSON.parse(redirect))
} else {
window.location.assign(data.data["jump_url"])
}
......
......@@ -33,7 +33,9 @@ class Login extends Component {
}
const referrer = document.referrer
const redirectURI =
!/^https?:\/\/m.julyedu.com\/?$/.test(referrer) && referrer
!/^https?:\/\/m.julyedu.com\/?$/.test(referrer) &&
!/\.julyedu\.com\/live\/m_room/.test(referrer) &&
referrer
? referrer
: window.location.origin + from.pathname + from.search + from.hash
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment