Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-08-06 10:30:15 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6f111956ae5bf4f4b72086df41244cb4e3b13ce9
6f111956
1 parent
eb687af5
fix: MainPage.ets, 国殇代码容错处理
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
sight_harmony/products/phone/src/main/ets/pages/MainPage.ets
sight_harmony/products/phone/src/main/ets/pages/MainPage.ets
View file @
6f11195
...
...
@@ -12,6 +12,7 @@ import { StartupManager } from '../startupmanager/StartupManager';
import { BusinessError } from '@kit.BasicServicesKit';
import { BottomNavigationComponent } from './view/BottomNavigationComponent';
import LaunchDataModel from './viewModel/LaunchDataModel';
import { LaunchPageModel } from './viewModel/LaunchPageModel';
const TAG = 'MainPage';
...
...
@@ -44,7 +45,13 @@ struct MainPage {
})
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
if (dataModelStr) {
if (!dataModelStr) {
//请求启动页相关接口数据并保存
let launchPageModel = new LaunchPageModel()
launchPageModel.getLaunchPageData()
dataModelStr = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
}
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
console.log(dataModelStr)
// 处理国殇模式数据
...
...
@@ -53,7 +60,6 @@ struct MainPage {
GrayManage.setMourning(mourns)
AppStorage.setOrCreate('GrayManage', GrayManage)
}
}
pageTransition() {
PageTransitionEnter({ type: RouteType.None, duration: 0 })
...
...
Please
register
or
login
to post a comment