|
|
@@ -182,12 +182,12 @@ export async function syncAfterLogin() {
|
|
|
const clientStore = client();
|
|
|
const tokenInfoStore = tokenInfo();
|
|
|
const token = tokenInfoStore.getToken;
|
|
|
-
|
|
|
+
|
|
|
if (!token) {
|
|
|
console.warn('没有token,跳过数据同步');
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 同步系统配置
|
|
|
await clientStore.ipc.invoke(icpList.setting.syncSysConfigs, {
|
|
|
token: token
|
|
|
@@ -199,6 +199,12 @@ export async function syncAfterLogin() {
|
|
|
action: 'sync_all'
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+ // 线上数据同步到本地
|
|
|
+ await clientStore.ipc.invoke(icpList.setting.syncSysConfigs, {
|
|
|
+ token: token
|
|
|
+ });
|
|
|
+
|
|
|
console.log('登录后数据同步成功');
|
|
|
} catch (error) {
|
|
|
console.error('登录后数据同步失败:', error);
|