style(webui): Oxc format 已有代码
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {defineStore} from 'pinia'
|
||||
import {ref} from 'vue'
|
||||
import {api, setApiToken} from '@/tools/web.ts'
|
||||
import type {UserDto} from '@/types/user.ts'
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import { api, setApiToken } from '@/tools/web.ts'
|
||||
import type { UserDto } from '@/types/user.ts'
|
||||
|
||||
export const useNowUser = defineStore('now-user', () => {
|
||||
const isLogin = ref(false)
|
||||
@@ -22,9 +22,7 @@ export const useNowUser = defineStore('now-user', () => {
|
||||
|
||||
let user: UserDto
|
||||
try {
|
||||
user = await api
|
||||
.get('/admin/me/')
|
||||
.then((res) => res.data as UserDto)
|
||||
user = await api.get('/admin/me/').then((res) => res.data as UserDto)
|
||||
} catch (err) {
|
||||
console.error(`请求用户信息时失败:${err}`)
|
||||
throw err
|
||||
|
||||
Reference in New Issue
Block a user