feat: 抖音扫码登录,自动填写 Cookie 和 SecUserId
部署到群晖 / deploy (push) Successful in 32s

新增 DyQrCodeService,调用 sso.douyin.com 二维码接口;
ConfigController 新增 qrcode/qrstatus/qrbind 三个接口;
前端账号列表每行增加"扫码登录"按钮,展示二维码弹窗并自动轮询绑定。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
yuming
2026-04-27 08:56:56 +08:00
parent 6803b32b1b
commit 0848ebc272
4 changed files with 360 additions and 3 deletions
+25 -1
View File
@@ -200,6 +200,27 @@ export const useApiStore = defineStore('coreapi', () => {
});
}
// 获取抖音扫码登录二维码
async function QrCodeGet() {
return http.request<any, Response<any>>('/api/config/qrcode', 'get').then(r => {
return r.data;
});
}
// 轮询扫码状态
async function QrCodeStatus(token: string) {
return http.request<any, Response<any>>('/api/config/qrstatus?token=' + token, 'get').then(r => {
return r.data;
});
}
// 扫码成功后绑定到账号
async function QrCodeBind(token: string, id: string) {
return http.request<any, Response<any>>(`/api/config/qrbind?token=${token}&id=${id}`, 'post_json').then(r => {
return r.data;
});
}
return {
deleteCookie,
UpdateConfig,
@@ -216,6 +237,9 @@ export const useApiStore = defineStore('coreapi', () => {
VideoCategories,
VideoCleanup,
CookiePageList,
DeleteAuthorVideos
DeleteAuthorVideos,
QrCodeGet,
QrCodeStatus,
QrCodeBind
};
});