feat(extension): 采集插件功能开发
This commit is contained in:
@@ -32,6 +32,14 @@ const LoginPage = () => {
|
||||
});
|
||||
applyAuthSession(session);
|
||||
message.success('登录成功');
|
||||
const continuation = new URLSearchParams(location.search).get('continue');
|
||||
if (continuation) {
|
||||
const target = new URL(continuation);
|
||||
if (target.origin === (import.meta.env.VITE_API_PUBLIC_ORIGIN ?? 'http://localhost:8200') && target.pathname === '/api/extension/authorize') {
|
||||
window.location.assign(target.toString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 守卫记住的来源路径优先,默认进入在线商品首页
|
||||
const from = (location.state as { from?: string } | null)?.from;
|
||||
navigate(from && from.startsWith('/') ? from : '/online-products', {
|
||||
|
||||
Reference in New Issue
Block a user