|
@@ -110,11 +110,9 @@ const Login2pProvider: React.FC<ContextProviderProps> = ({ children }: ContextPr
|
|
|
// 如果有邀请码
|
|
|
if (!!data.InviteShareCode) {
|
|
|
sessionStorage.setItem('invite_code', data.InviteShareCode)
|
|
|
- history.push(`${window.location.pathname}?invite_code=${data.InviteShareCode}`)
|
|
|
- }
|
|
|
- if (inviteCode) {
|
|
|
- sessionStorage.setItem('invite_code', inviteCode)
|
|
|
+ history.replace(`${window.location.pathname}?invite_code=${data.InviteShareCode}`)
|
|
|
}
|
|
|
+
|
|
|
setUserInfo(data)
|
|
|
},
|
|
|
onError: e => console.log('尚未登录,您现在为游客身份~')
|