角标,小红点,群发消息

This commit is contained in:
XiuYun CHEN
2025-08-05 17:02:15 +08:00
parent 9355959b36
commit 76b7785d84
15 changed files with 199 additions and 35 deletions
+3 -1
View File
@@ -101,4 +101,6 @@ export { HdTwoNav } from './src/main/ets/components/HdTwoNav'
export { NotificationUtil } from './src/main/ets/utils/NotificationUtil'
export { ScanUtil } from './src/main/ets/utils/ScanUtil'
export { ScanUtil } from './src/main/ets/utils/ScanUtil'
export { NotificationManagementUtil } from './src/main/ets/utils/NotificationManagementUtil'
@@ -13,7 +13,7 @@ export class BasicConstant {
static readonly urlExpert = "https://dev-app.igandan.com/app/expert/"
static readonly wxUrl = "https://dev-wx.igandan.com/";
static readonly polvId = "11";//保利威视学员id
static readonly urlApp="https://dev-app.igandan.com/app/"
//正式环境
// static readonly urlExpertAPI = "https://app.igandan.com/app/expertAPI/";
// static readonly urlExpertApp = "http://app.igandan.com/app/expertApp/"
@@ -22,8 +22,9 @@ export class BasicConstant {
// static readonly urlExpert = "http://app.igandan.com/app/expert/"
// static readonly wxUrl = "https://wx.igandan.com/";// 微信服务器地址
// static readonly polvId = "21";//保利威视学员id
// static readonly urlApp="http://app.igandan.com/app/"
static readonly getSystemTimeStamp = BasicConstant.urlImage+'manager/getSystemTimeStamp'
static readonly getSystemTimeStamp = BasicConstant.urlApp+'manager/getSystemTimeStamp'
static readonly addBonusPoints = BasicConstant.urlExpertApp+'addBonusPoints'
static readonly indexV2 = BasicConstant.urlExpertAPI+'indexV2';//首页轮播
static readonly applyList = BasicConstant.urlExpert+'applyList'
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { notificationManager } from '@kit.NotificationKit';
export class NotificationManagementUtil {
static async setBadgeNumber(num: number) {
if(num<0)
{
return
}
await notificationManager.setBadgeNumber(num).then(() => {
});
}
}
+3 -2
View File
@@ -11,6 +11,7 @@ import { bundleManager} from '@kit.AbilityKit';
import { deviceInfo } from '@kit.BasicServicesKit';
import { cryptoFramework } from '@kit.CryptoArchitectureKit';
import { rcp } from '@kit.RemoteCommunicationKit';
import { BasicConstant } from '../../../../Index';
interface HdRequestOptions {
baseURL?: string
@@ -188,7 +189,7 @@ class HdHttp {
httpReq<T>(url: string, datas: HashMap<string, string>): Promise<HdResponse<T>> {
// 创建httpRequest对象。
let httpRequest = http.createHttp();
let url1 = "https://dev-app.igandan.com/app/manager/getSystemTimeStamp";
let url1 = BasicConstant.getSystemTimeStamp;
let promise = httpRequest.request(
// 请求url地址
url1,
@@ -230,7 +231,7 @@ class HdHttp {
httpReqObject<T>(url: string, datas: HashMap<string, Object>): Promise<HdResponse<T>> {
// 创建httpRequest对象。
let httpRequest = http.createHttp();
let url1 = "https://dev-app.igandan.com/app/manager/getSystemTimeStamp";
let url1 = BasicConstant.getSystemTimeStamp;
let promise = httpRequest.request(
// 请求url地址
url1,