Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f6811858
authored
Dec 24, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
u
parent
66fc1d2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
model/index.ts
model/index.ts
View file @
f6811858
...
@@ -305,3 +305,31 @@ export const enum IMCatalog {
...
@@ -305,3 +305,31 @@ export const enum IMCatalog {
Flb
=
"福利宝"
,
Flb
=
"福利宝"
,
Order
=
"专项业务订单"
,
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
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment