Skip to content

Commit

Permalink
feat: 安卓与mac用户默认账号类型为内置gocq
Browse files Browse the repository at this point in the history
嵌套三目不好,我直接拆出来放onBeforeMount钩子里
  • Loading branch information
Fripine committed Dec 3, 2024
1 parent 20b9b5f commit ccb9e4c
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/components/PageConnectInfoItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2350,10 +2350,8 @@ const handleSignServerDelete = (url: string) => {
const supportedQQVersions = ref<string[]>([]);
const defaultAccountType: number =
store.diceServers.length > 0 && store.diceServers[0].baseInfo.containerMode ? 6 : 15;
const form = reactive({
accountType: defaultAccountType,
accountType: 15,
step: 1,
isEnd: false,
account: '',
Expand Down Expand Up @@ -2433,6 +2431,19 @@ onBeforeMount(async () => {
supportedQQVersions.value = ['', ...versionsRes.versions];
}
// form.accountType默认账号类型,在android与mac系统中,默认账号类型为内置gocq,其余系统为内置客户端
if (store.diceServers.length > 0) {
if (
store.diceServers[0].baseInfo.OS === 'android' ||
store.diceServers[0].baseInfo.OS === 'darwin'
) {
form.accountType = 16;
}
if (store.diceServers[0].baseInfo.containerMode) {
form.accountType = 6;
}
}
timerId = setInterval(async () => {
console.log('refresh');
await store.getImConnections();
Expand Down

0 comments on commit ccb9e4c

Please sign in to comment.