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
xugenyuan
2024-09-18 19:39:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e56a5c225d819b7d8b5636ee08c3d13eadff2afe
e56a5c22
1 parent
da13d91d
ref |> 增加设备拉黑
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
sight_harmony/features/wdLogin/src/main/ets/LoginModule.ets
sight_harmony/features/wdLogin/src/main/ets/reportDeviceInfo/ReportDeviceInfo.ets
sight_harmony/products/phone/src/main/ets/startupmanager/StartupManager.ets
sight_harmony/features/wdLogin/src/main/ets/LoginModule.ets
View file @
e56a5c2
...
...
@@ -6,6 +6,7 @@ import { AccountManagerUtils, SPHelper } from 'wdKit/Index'
import { LoginViewModel } from './pages/login/LoginViewModel'
import { SpConstants } from 'wdConstant/Index'
import { ReportDeviceInfo } from './reportDeviceInfo/ReportDeviceInfo'
import { common } from '@kit.AbilityKit'
class LoginJumpHandler implements JumpInterceptorAction {
...
...
@@ -42,12 +43,17 @@ export class LoginModule {
}
// 启动进入主页 和 每次登录成功调用
static reportDeviceInfo() {
static reportDeviceInfo(
context?: common.UIAbilityContext
) {
ReportDeviceInfo.reportDeviceInfo().then((res) => {
let nickName = res.touristNickName
if (res.touristNickName) {
SPHelper.default.save(SpConstants.TOURIST_NICK_NAME, res.touristNickName)
}
if (res.blockStatus == -2) {
// Exit the application.
context?.terminateSelf();
}
})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdLogin/src/main/ets/reportDeviceInfo/ReportDeviceInfo.ets
View file @
e56a5c2
...
...
@@ -38,4 +38,5 @@ export class ReportDeviceInfo {
export class ReportDeviceInfoRes {
clean : number = 0
touristNickName : string = ""
blockStatus: number = 0 // 当等于-2时,表示拉黑
}
\ No newline at end of file
...
...
sight_harmony/products/phone/src/main/ets/startupmanager/StartupManager.ets
View file @
e56a5c2
...
...
@@ -137,7 +137,7 @@ export class StartupManager {
return new Promise((resolve) => {
Logger.debug(TAG, "App 初次进入首页,开始其他任务初始化")
LoginModule.reportDeviceInfo()
LoginModule.reportDeviceInfo(
this.context
)
GetuiPush.sharedInstance().requestEnableNotifications(this.context!).then((enabled) => {
HWLocationUtils.startLocationService()
...
...
Please
register
or
login
to post a comment