fix(layout): IPv6按钮顶栏内正常排版不遮挡 + 窄屏收缩;relay/my-ip/用户菜单等本次改动入库
This commit is contained in:
1 parent
ea4e3deb50
commit
7b22e53d1a
8 files changed
+1050
-106
No files matched your search
@@ -52,11 +52,11 @@ export function useUserAuth() {
|
||||
const username = computed(() => state.value?.username ?? '');
|
||||
const isAdmin = computed(() => state.value?.role === 'admin');
|
||||
|
||||
async function login(u: string, p: string, cfToken = '') {
|
||||
async function login(u: string, p: string, captchaId = '', captchaCode = '') {
|
||||
const { status, body } = await apiFetch('/user/login', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', ...licenseHeaders() },
|
||||
body: JSON.stringify({ username: u, password: p, cf_token: cfToken }),
|
||||
body: JSON.stringify({ username: u, password: p, captcha_id: captchaId, captcha_code: captchaCode }),
|
||||
});
|
||||
if (status !== 200) {
|
||||
throw new Error(body.message || '登录失败');
|
||||
@@ -66,11 +66,11 @@ export function useUserAuth() {
|
||||
return body.data.username;
|
||||
}
|
||||
|
||||
async function register(u: string, p: string, cfToken = '') {
|
||||
async function register(u: string, p: string, captchaId = '', captchaCode = '') {
|
||||
const { status, body } = await apiFetch('/user/register', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', ...licenseHeaders() },
|
||||
body: JSON.stringify({ username: u, password: p, cf_token: cfToken }),
|
||||
body: JSON.stringify({ username: u, password: p, captcha_id: captchaId, captcha_code: captchaCode }),
|
||||
});
|
||||
if (status !== 200) {
|
||||
throw new Error(body.message || '注册失败');
|
||||
|
||||
Reference in new issue
Block a user