fix(push): 修复推送令牌刷新逻辑
- 在 GlobalValue 中添加 AccountManager 导入并调用 refreshPushToken 方法 - 在 AccountManager 中实现 refreshPushToken 方法,用于刷新推送令牌 - 更新 EnvManagerView 中的环境切换逻辑,移除不必要的日志输出 - 调整 ToolsHelper 中的提示对话框显示逻辑
这个提交包含在:
父节点
37a12ef1fd
当前提交
181d55d471
@ -149,7 +149,7 @@ function alertDialogBuilder(options: AlertBean) {
|
||||
.width(17)
|
||||
.height(17)
|
||||
.visibility(options.options.cancel ? Visibility.Hidden : Visibility.None)
|
||||
Text(options.options.title ?? '提示')
|
||||
Text(options.options.title ? !options.options.msg ? '提示' : options.options.title : '提示')
|
||||
.fontSize(16)
|
||||
.fontColor($r('sys.color.black'))
|
||||
.textAlign(TextAlign.Center)
|
||||
@ -182,7 +182,7 @@ function alertDialogBuilder(options: AlertBean) {
|
||||
.padding(9)
|
||||
|
||||
Scroll() {
|
||||
Text(options.options.msg)
|
||||
Text(options.options.msg ?? options.options.title)
|
||||
.fontSize(14)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.fontColor($r('sys.color.black'))
|
||||
@ -197,10 +197,11 @@ function alertDialogBuilder(options: AlertBean) {
|
||||
.constraintSize({
|
||||
maxHeight: 220
|
||||
})
|
||||
|
||||
Text(options.options.confirm?.text ?? '确定')
|
||||
.fontSize(14)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.fontColor(options.options.confirm?.color ?? $r('sys.color.white'))
|
||||
.fontColor($r('sys.color.white'))
|
||||
.textAlign(TextAlign.Center)
|
||||
.margin({
|
||||
top: 40,
|
||||
@ -209,7 +210,7 @@ function alertDialogBuilder(options: AlertBean) {
|
||||
right: 18
|
||||
})
|
||||
.width(215)
|
||||
.backgroundColor(options.options.confirm?.bgColor ?? '#0E84FA')
|
||||
.backgroundColor('#0E84FA')
|
||||
.borderRadius(5)
|
||||
.height(34)
|
||||
.onClick(() => {
|
||||
@ -347,7 +348,12 @@ export class ToolsHelper {
|
||||
const dialogTag = ToolsHelper.getUuid()
|
||||
const ui = GlobalContext.getUiContext()
|
||||
const c = new ComponentContent(ui, wrapBuilder(alertDialogBuilder),
|
||||
new AlertBean(options, dialogTag))
|
||||
new AlertBean({
|
||||
title: options.title,
|
||||
msg: options.msg,
|
||||
cancel: options.cancel??{},
|
||||
confirm: options.confirm
|
||||
}, dialogTag))
|
||||
ui.getPromptAction().openCustomDialog(c, {
|
||||
autoCancel: false
|
||||
}).then(() => {
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户