小幅度修改公告

This commit is contained in:
cc 2025-04-07 23:50:35 +08:00
parent 1c05922931
commit b6df80f859
7 changed files with 22976 additions and 42534 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -18,21 +18,21 @@
"IS_HVIGORFILE_TYPE_CHECK": false, "IS_HVIGORFILE_TYPE_CHECK": false,
"TASK_TIME": { "TASK_TIME": {
"1043bfc77febe75fafec0c4309faccf1": { "1043bfc77febe75fafec0c4309faccf1": {
"ConfigureCmake": 856416, "ConfigureCmake": 476000,
"PreCheckSyscap": 632458, "PreCheckSyscap": 312875,
"ProcessIntegratedHsp": 1418083, "ProcessIntegratedHsp": 1175500,
"BuildNativeWithCmake": 273041, "BuildNativeWithCmake": 241625,
"SyscapTransform": 36040791, "SyscapTransform": 25131375,
"BuildNativeWithNinja": 1378666, "BuildNativeWithNinja": 1007250,
"BuildJS": 3533375, "BuildJS": 2504875,
"CompileArkTS": 31907849083, "CompileArkTS": 10385196500,
"PackageHap": 827841167, "PackageHap": 760888875,
"SignHap": 5034625, "SignHap": 3445292,
"CollectDebugSymbol": 3993000, "CollectDebugSymbol": 2780708,
"assembleHap": 304292 "assembleHap": 271000
} }
}, },
"BUILD_ID": "202504040929560100", "BUILD_ID": "202504072349221450",
"TOTAL_TIME": 34679640584 "TOTAL_TIME": 12663371125
} }
} }

View File

@ -26,13 +26,29 @@ struct HomePage {
// 获取文本资源 // 获取文本资源
@State texts: TextResources = settingsService.getTextResources(); @State texts: TextResources = settingsService.getTextResources();
//确保每次从EntryAbility传递过来的参数都能刷新到UI
@StorageLink('userName') userName: string = AppStorage.get('userName') || '';
aboutToAppear() { aboutToAppear() {
/* // 确保在组件出现之前从AppStorage获取最新的值
this.userName = AppStorage.get('userName') || '';*/
// 注册语言变化的回调 // 注册语言变化的回调
settingsService.registerLanguageChangeCallback(() => { settingsService.registerLanguageChangeCallback(() => {
this.texts = settingsService.getTextResources(); this.texts = settingsService.getTextResources();
this.message = this.texts.title; this.message = this.texts.title;
}); });
// 获取当前用户名
this.userName = settingsService.getUserNickname() || settingsService.getCurrentAccount() || '访客';
// 注册用户信息变化的回调
settingsService.registerUserInfoChangeCallback(() => {
this.userName = settingsService.getUserNickname() || settingsService.getCurrentAccount() || '访客';
});
// 初始化文本 // 初始化文本
this.message = this.texts.title; this.message = this.texts.title;
} }
@ -61,7 +77,7 @@ struct HomePage {
step: 6, // 降低步长,使滚动更慢 step: 6, // 降低步长,使滚动更慢
loop: -1, loop: -1,
fromStart: true, fromStart: true,
src: "欢迎使用【智能教室管理系统】本项目由【922213102班鸿蒙第一组】制作相关服务正在完善欢迎您的使用" src: "欢迎【" + this.userName + "】,使用【智能教室管理系统】本项目由【922213102班鸿蒙第一组】制作相关服务正在完善欢迎您的使用"
}) })
.width('90%') .width('90%')
.height(30) .height(30)

View File

@ -1,9 +1,9 @@
import { router } from '@kit.ArkUI'; import { router } from '@kit.ArkUI';
import { BusinessError } from '@kit.BasicServicesKit';
import logManager, { LogCategory, LogEventType } from '../common/logtext'; import logManager, { LogCategory, LogEventType } from '../common/logtext';
import settingsService from '../common/SettingsService'; import settingsService from '../common/SettingsService';
import { DatabaseService } from '../common/DatabaseService'; import { DatabaseService } from '../common/DatabaseService';
@Entry @Entry
@Component @Component
@Preview @Preview
@ -106,6 +106,9 @@ struct Login {
this.username = value; this.username = value;
this.errorMessage = ''; // 清除错误信息 this.errorMessage = ''; // 清除错误信息
}) })
} }
.width('100%') .width('100%')
@ -156,6 +159,7 @@ struct Login {
.enabled(!this.isLoading) .enabled(!this.isLoading)
.opacity(this.isLoading ? 0.6 : 1) .opacity(this.isLoading ? 0.6 : 1)
.onClick(() => { .onClick(() => {
//this.Apply()
this.handleLogin(); this.handleLogin();
}) })
@ -277,18 +281,7 @@ struct Login {
logManager.info(LogCategory.USER, LogEventType.SYSTEM_INFO, `LoginPage: ${eventName}`); logManager.info(LogCategory.USER, LogEventType.SYSTEM_INFO, `LoginPage: ${eventName}`);
} }
} }
}
/*
interface User{
uname:string
upwd:string
}
class Userinfo{
uname:string
upwd:string
constructor(uname: string, upwd: string) {
this.uname = uname;
this.upwd = upwd;
} }
}*/