Commit 576d45c5 by zhanghaozhe

直播间登录问题

parent 3dc65edf
import React, { Component } from "react"
import "./binding-tel.scss"
import { withFormik, Field, Form } from "formik"
import { http, getParam } from "src/utils"
import { http, getParam, isValidUrl } from "src/utils"
import { compose } from "redux"
import { connect } from "react-redux"
import { setCurrentUser } from "src/store/userAction"
......@@ -176,7 +176,9 @@ const formikConfig = {
const redirect = localStorage.getItem("binding_redirect")
if (redirect) {
localStorage.removeItem("binding_redirect")
window.location.assign(JSON.parse(redirect))
isValidUrl(redirect)
? window.location.assign(JSON.parse(redirect))
: history.replace(JSON.parse(redirect))
} else {
window.location.assign(data.data["jump_url"])
}
......
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