mirror of https://github.com/Nofated095/Q2TG.git
Compare commits
3 Commits
068b61bf63
...
151ca521f1
Author | SHA1 | Date |
---|---|---|
谷風天音 | 是一个浓度纯度都比较高的柚子厨,因为柚子社天下第一!时不时发柚子的癫。有个能干的妹妹真好,たにかぜ あまね天下第一喵,关注谷風天音谢谢喵,关注谷風天音谢谢喵,谢谢在这里看我发癫,天音妹妹真的好好看喵,单推天音一辈子!谁不推天音就打爆他的宁宁的起爆器!\柚子社/\柚子社/\柚子社/\天音/\天音/\天音/天音,我真的好喜欢你啊,为了你,我要 0721!\たにかぜ あまね/\たにかぜ あまね/\たにかぜ あまね/\たにかぜ あまね/\たにかぜ あまね/\たにかぜ あまね/\たにかぜ あまね/ | 151ca521f1 | |
凌莞~(=^▽^=) | c3f83da7e0 | |
Richard | 7d7c237f3a |
|
@ -83,9 +83,15 @@ export default class SetupController {
|
|||
[Button.text('macOS', true, true)],
|
||||
]);
|
||||
const platform = setupHelper.convertTextToPlatform(platformText);
|
||||
|
||||
let signApi = await this.setupService.waitForOwnerInput('请输入签名服务器地址', [
|
||||
[Button.text('不需要签名服务器', true, true)],
|
||||
]);
|
||||
signApi = setupHelper.checkSignApiAddress(signApi)
|
||||
|
||||
let password = await this.setupService.waitForOwnerInput('请输入密码', undefined, true);
|
||||
password = md5Hex(password);
|
||||
this.oicq = await this.setupService.createOicq(uin, password, platform);
|
||||
this.oicq = await this.setupService.createOicq(uin, password, platform, signApi);
|
||||
this.instance.qqBotId = this.oicq.id;
|
||||
await this.setupService.informOwner(`登录成功`);
|
||||
}
|
||||
|
|
|
@ -26,4 +26,12 @@ export default {
|
|||
return '';
|
||||
}
|
||||
},
|
||||
checkSignApiAddress(signApi: string) {
|
||||
try {
|
||||
new URL(signApi);
|
||||
return signApi;
|
||||
} catch (err) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -83,11 +83,11 @@ export default class SetupService {
|
|||
});
|
||||
}
|
||||
|
||||
public async createOicq(uin: number, password: string, platform: Platform) {
|
||||
const dbQQBot = await db.qqBot.create({ data: { uin, password, platform } });
|
||||
public async createOicq(uin: number, password: string, platform: Platform, signApi: string) {
|
||||
const dbQQBot = await db.qqBot.create({ data: { uin, password, platform, signApi } });
|
||||
return await OicqClient.create({
|
||||
id: dbQQBot.id,
|
||||
uin, password, platform,
|
||||
uin, password, platform, signApi,
|
||||
onQrCode: async (file) => {
|
||||
await this.owner.sendMessage({
|
||||
message: '请使用已登录这个账号的手机 QQ 扫描这个二维码授权',
|
||||
|
|
Loading…
Reference in New Issue