Commit 94ec61e6 by zhanghaozhe

登录传redirect地址,统计用

parent 5c1747e2
......@@ -154,7 +154,7 @@ class App extends Component {
if (code && !oid) {
http.get(`${API['home']}/m/wx_loginInfo/code/${code}`)
http.get(`${API['home']}/m/wx_loginInfo/code/${code}?redirect=${encodeURIComponent(window.location.href)}`)
.then(res => {
let data = res.data
if (data.errno == 200) {
......@@ -269,4 +269,4 @@ export default compose(
{setCurrentUser, startFetchUser}
),
withRouter
)(App)
\ No newline at end of file
)(App)
......@@ -135,7 +135,7 @@ const FormikConfig = {
phone_num: values.tel,
phone_code: values.veriCode,
area_code: '00'+props.country.num,
redirect: from && window.location.origin + from.pathname + from.search + from.hash
redirect: from && encodeURIComponent(window.location.origin + from.pathname + from.search + from.hash)
}).then(res => {
if (res.hasError) {
Toast.info(res.msg);
......
......@@ -8,7 +8,7 @@ const accountLogin = user => dispatch => {
user_name: user.username,
password: encrypt(user.password),
is_encrypt: 1,
redirect: user.redirect
redirect: encodeURIComponent(user.redirect)
}).then(res => {
return storeUser(res, dispatch)
})
......
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