Skip to content

Commit

Permalink
Merge branch 'fix/login'
Browse files Browse the repository at this point in the history
  • Loading branch information
lazhenyi committed Oct 19, 2024
2 parents f0f3a4c + 482ef35 commit c190259
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>JiaoziFS</title>
<script>
window.JIAOZIFS_API_URL = "http://localhost:34913/api/v1"
window.JIAOZIFS_API_URL = "https://api.jiaozifs.com/api/v1"
</script>
</head>
<body>
Expand Down
5 changes: 3 additions & 2 deletions src/pages/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const LoginForm = () => {
p: "",
})
const router = useRouter();
const { next } = router.query;
// const { next } = router.query;
const reghandleclick = (e: { preventDefault: () => void; }) =>{
e.preventDefault();
router.push('/register')
Expand All @@ -30,7 +30,8 @@ const LoginForm = () => {
cache.set('token', response.data.token)
await users.getUserInfo().then((response)=>{
cache.set('user', response.data.name)
router.push(next ? next : '/repositories');
// router.push(next ? next : '/repositories');
window.location.href = "/repositories"
})
} catch(err) {
console.log(err);
Expand Down
4 changes: 0 additions & 4 deletions src/styles/index.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

body{
// background-image:url(../../pub/modern-2721466_1280.png);
overflow: hidden;
Expand Down

0 comments on commit c190259

Please sign in to comment.