新增 DyQrCodeService,调用 sso.douyin.com 二维码接口; ConfigController 新增 qrcode/qrstatus/qrbind 三个接口; 前端账号列表每行增加"扫码登录"按钮,展示二维码弹窗并自动轮询绑定。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user