|
@@ -38,6 +38,14 @@ const Bind = () => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
+ const goRedirect = () => {
|
|
|
|
|
+ const url = window.location.href.split('redirect=')?.[1];
|
|
|
|
|
+ console.log(url);
|
|
|
|
|
+ if (url) {
|
|
|
|
|
+ window.location.href = url;
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
const getDetail = () => {
|
|
const getDetail = () => {
|
|
|
service.getUserDetail().subscribe((res) => {
|
|
service.getUserDetail().subscribe((res) => {
|
|
|
setUser(res?.result);
|
|
setUser(res?.result);
|
|
@@ -130,6 +138,7 @@ const Bind = () => {
|
|
|
await fetchUserInfo();
|
|
await fetchUserInfo();
|
|
|
localStorage.setItem('onLogin', 'yes');
|
|
localStorage.setItem('onLogin', 'yes');
|
|
|
onlyMessage('登录成功');
|
|
onlyMessage('登录成功');
|
|
|
|
|
+ goRedirect();
|
|
|
setTimeout(() => window.close(), 1000);
|
|
setTimeout(() => window.close(), 1000);
|
|
|
},
|
|
},
|
|
|
error: () => {
|
|
error: () => {
|
|
@@ -267,6 +276,7 @@ const Bind = () => {
|
|
|
service.bind(code).then((res) => {
|
|
service.bind(code).then((res) => {
|
|
|
if (res.status === 200) {
|
|
if (res.status === 200) {
|
|
|
onlyMessage('绑定成功');
|
|
onlyMessage('绑定成功');
|
|
|
|
|
+ goRedirect();
|
|
|
localStorage.setItem('onBind', 'true');
|
|
localStorage.setItem('onBind', 'true');
|
|
|
setTimeout(() => window.close(), 1000);
|
|
setTimeout(() => window.close(), 1000);
|
|
|
} else {
|
|
} else {
|