Skip to content

Commit 6a5edc1

Browse files
committed
fix: update
Signed-off-by: Innei <[email protected]>
1 parent 49a187b commit 6a5edc1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/app/login/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { StyledButton } from '~/components/ui/button'
77
import { Input } from '~/components/ui/input/Input'
88
import { Routes } from '~/lib/route-builder'
99

10-
export default () => {
10+
export default function LoginPage() {
1111
const [username, setUsername] = useState('')
1212
const [password, setPassword] = useState('')
1313
const router = useRouter()

src/atoms/owner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const login = async (username?: string, password?: string) => {
1818
const user = await apiClient.user.login(username, password).catch((err) => {
1919
console.error(err)
2020
toast('再试试哦', 'error')
21-
return null
21+
throw err
2222
})
2323
if (user) {
2424
const token = user.token

src/lib/request.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const apiClient = createClient(axiosAdaptor)(API_URL, {
2828

2929
export const $axios = axiosAdaptor.default as AxiosInstance
3030

31-
$axios.defaults.timeout = 3000
31+
$axios.defaults.timeout = 8000
3232

3333
if (typeof window === 'undefined')
3434
$axios.defaults.headers.common[

0 commit comments

Comments
 (0)