fix: 重新登录缺陷
This commit is contained in:
@@ -3181,7 +3181,7 @@ export default function HomePage() {
|
||||
try {
|
||||
const { data: meta, error: metaError } = await supabase
|
||||
.from('user_configs')
|
||||
.select('id, updated_at')
|
||||
.select(`id, updated_at${checkConflict ? ', data' : ''}`)
|
||||
.eq('user_id', userId)
|
||||
.maybeSingle();
|
||||
|
||||
@@ -3195,6 +3195,10 @@ export default function HomePage() {
|
||||
setCloudConfigModal({ open: true, userId, type: 'empty' });
|
||||
return;
|
||||
}
|
||||
if (checkConflict) {
|
||||
setCloudConfigModal({ open: true, userId, type: 'conflict', cloudData: meta.data });
|
||||
return;
|
||||
}
|
||||
|
||||
const localUpdatedAt = window.localStorage.getItem('localUpdatedAt');
|
||||
if (localUpdatedAt && meta.updated_at && new Date(meta.updated_at) < new Date(localUpdatedAt)) {
|
||||
|
||||
Reference in New Issue
Block a user