Files
ZYZ/shared/pubUtils/dictionary/DicPushMessage.ts
2023-03-21 21:04:12 +08:00

25 lines
1018 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
}