Commit f6811858 by Sixong.Zhu

u

parent 66fc1d2e
Showing with 28 additions and 0 deletions
......@@ -305,3 +305,31 @@ export const enum IMCatalog {
Flb = "福利宝",
Order = "专项业务订单",
}
export class MessageTypeController {
private static readonly pays = new Set<MessageType>([
MessageType.Pay,
MessageType.PayResult,
MessageType.PayV1,
MessageType.Refund,
MessageType.RefundV1,
MessageType.Withdraw
]);
public static isPayMessage(type: MessageType) {
return this.pays.has(type);
}
public static isOrderOpenedMessage(e: Message) {
return e && !+e.eid && e.msg && e.msg.includes('订单详情') && e.msg.includes('查看订单');
}
public static isOrderClosedMessage(e: Message) {
if (e && e.msg && !+e.eid) {
const msg = e.msg;
return msg.includes('办理完成') || msg.includes('办理失败') || msg.includes('订单已取消');
}
return false;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment