Revert "Revert " feat(消息): 添加推送消息sdk""

This reverts commit 918cc3415f.
This commit is contained in:
luying
2023-03-21 21:04:12 +08:00
parent 9115794b82
commit 5e15568f71
17 changed files with 406 additions and 16 deletions

View File

@@ -0,0 +1,24 @@
import { readFileAndParse } from '../util'
import { FILENAME } from '../../consts'
export interface DicPushMessage {
id: number;
pushMsgType: string; // 推送类型标签PUSH_MSG_TYPE
title: string; // 推送标题30字以内
description: string; // 推送正文100字以内其他同上
playerType: number; // 推送玩家的类型PLAYER_TYPE
clickType: string; // 点击通知之后的后续动作
url: string; // 玩家点击通知之后如果clickType选了url填写网址长度<=1024
intent: string; // 玩家点击通知之后如果clickType选了intent填写应用特定页面需要找客户端定制长度<=1024
}
export const dicPushMessage = new Map<string, DicPushMessage>();
export function loadPushMessage() {
dicPushMessage.clear();
let arr = readFileAndParse(FILENAME.DIC_PUSH_MESSAGE);
arr.forEach(o => {
dicPushMessage.set(o.pushMsgType, o);
});
arr = undefined;
}