Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nanmoserver
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
nanmoserver
Commits
5603c35f
Commit
5603c35f
authored
Jun 26, 2025
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
94674652
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
14 deletions
+53
-14
serverConfig.xml
serverConfig.xml
+1
-1
errorEnum.ts
src/config/errorEnum.ts
+52
-13
dianXin.ts
src/routers/dianXin.ts
+0
-0
No files found.
serverConfig.xml
View file @
5603c35f
<config>
<port>
40
3
01
</port>
<port>
40
1
01
</port>
</config>
src/config/errorEnum.ts
View file @
5603c35f
export
enum
ERRORENUM
{
身份验证失败
=
1
,
非法登录
,
身份验证过期
,
表单校验失败
,
参数错误
未找到数据
,
数据操作失败
,
暂无对应数据
,
TOKEN
认证失败
}
export
enum
SYSTEMERRORENUM
{
参数错误
=
1
,
您的登录已失效
,
您的账户没有访问权限
,
请求参数错误
,
文件解析失败
,
文件写入失败
,
获取企业微信
access_token
失败
,
获取企业微信用户信息失败
,
请先绑定用户
,
TOKEN
失效
,
该微信用户已绑定过账号
,
存在
TOKEN
并没有绑定角色
,
初始化配置失败
,
暂无对应数据
}
/**
* 只用做code码定义
*/
export
enum
ERRORCODEENUM
{
身份验证失败
=
401
,
非法登录
=
402
,
身份验证过期
=
403
export
enum
INTERFACEERRORENUM
{
"系统错误"
=
10001
,
"服务暂停"
=
10002
,
"远程服务调用失败"
=
10003
,
"IP地址受限,不能访问此接口"
=
10004
,
"APP Key 不存在"
=
10005
,
"签名错误"
=
10006
,
"缺少 POST 参数"
=
10007
,
"POST 参数错误"
=
10008
,
"数据类别标识不存在"
=
10009
,
"数据对象标识不存在"
=
10010
,
"对数据对象没有写的权限"
=
10011
,
"对数据对象没有读的权限"
=
10012
,
"数据记录不存在"
=
10013
,
"数据记录的 id 已存在"
=
10014
,
"应用程序内部错误"
=
10099
,
}
let
bizErrorMsgMap
=
{};
for
(
let
key
in
ERRORENUM
)
{
bizErrorMsgMap
[
ERRORENUM
[
key
]]
=
key
;
}
let
systemErrorMsgMap
=
{};
for
(
let
key
in
SYSTEMERRORENUM
)
{
systemErrorMsgMap
[
SYSTEMERRORENUM
[
key
]]
=
key
;
}
export
function
getBizMsg
(
param
)
{
return
bizErrorMsgMap
[
param
];
}
export
function
getSysMsg
(
param
)
{
return
systemErrorMsgMap
[
param
];
}
\ No newline at end of file
src/routers/dianXin.ts
View file @
5603c35f
This diff is collapsed.
Click to expand it.
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