Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjxcxServer
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
zjxcxServer
Commits
06e739ca
Commit
06e739ca
authored
Feb 08, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
795ca65b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
user.ts
src/biz/fuHuqQi/user.ts
+4
-1
errorEnum.ts
src/config/errorEnum.ts
+1
-0
fuhuaqi.ts
src/data/fuHuaQi/fuhuaqi.ts
+2
-2
No files found.
src/biz/fuHuqQi/user.ts
View file @
06e739ca
...
@@ -68,7 +68,10 @@ export async function firstLoginChangePwd(uscc:string, pwd:string, confirmPwd:st
...
@@ -68,7 +68,10 @@ export async function firstLoginChangePwd(uscc:string, pwd:string, confirmPwd:st
export
async
function
changePassword
(
uscc
:
string
,
pwd
:
string
,
newPwd
:
string
)
{
export
async
function
changePassword
(
uscc
:
string
,
pwd
:
string
,
newPwd
:
string
)
{
let
reg
=
new
RegExp
(
"[`~!@#$^&*()=|{}':;',
\\
[
\\
].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"
);
let
reg
=
new
RegExp
(
"[`~!@#$^&*()=|{}':;',
\\
[
\\
].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"
);
if
(
reg
.
test
(
newPwd
))
{
if
(
reg
.
test
(
newPwd
))
{
throw
new
BizError
(
ERRORENUM
.
密码不允许有特殊字符
);
throw
new
BizError
(
ERRORENUM
.
密码不允许有特殊字符
,
uscc
,
pwd
);
}
if
(
pwd
.
length
>
24
)
{
throw
new
BizError
(
ERRORENUM
.
密码长度不能超过
24
个字符
,
uscc
,
pwd
);
}
}
let
fuhuaqiInfo
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
uscc
);
let
fuhuaqiInfo
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
uscc
);
if
(
!
fuhuaqiInfo
)
throw
new
BizError
(
ERRORENUM
.
未找到数据
);
if
(
!
fuhuaqiInfo
)
throw
new
BizError
(
ERRORENUM
.
未找到数据
);
...
...
src/config/errorEnum.ts
View file @
06e739ca
...
@@ -15,6 +15,7 @@ export enum ERRORENUM {
...
@@ -15,6 +15,7 @@ export enum ERRORENUM {
身份验证失败
,
身份验证失败
,
非法登录
,
非法登录
,
身份验证过期
,
身份验证过期
,
密码长度不能超过
24
个字符
}
}
export
enum
ERRORCODEENUM
{
export
enum
ERRORCODEENUM
{
...
...
src/data/fuHuaQi/fuhuaqi.ts
View file @
06e739ca
...
@@ -10,7 +10,6 @@ import { baseDB } from '../../db/dbInit';
...
@@ -10,7 +10,6 @@ import { baseDB } from '../../db/dbInit';
const
fuHuaQiSchema
=
new
Schema
({
const
fuHuaQiSchema
=
new
Schema
({
name
:
{
type
:
String
,
index
:
true
},
//名称
name
:
{
type
:
String
,
index
:
true
},
//名称
firstLoginIsChangePwd
:{
type
:
Boolean
,
default
:
false
},
//首次登录是否修改密码
operationName
:
String
,
//运营机构名称 不可修改
operationName
:
String
,
//运营机构名称 不可修改
uscc
:{
type
:
String
,
index
:
true
},
//统一信用代码 也是登录账号 不可修改
uscc
:{
type
:
String
,
index
:
true
},
//统一信用代码 也是登录账号 不可修改
virtualEnterpriseNum
:
Number
,
//虚拟企业数量
virtualEnterpriseNum
:
Number
,
//虚拟企业数量
...
@@ -32,7 +31,8 @@ const fuHuaQiSchema = new Schema({
...
@@ -32,7 +31,8 @@ const fuHuaQiSchema = new Schema({
/**登录相关 */
/**登录相关 */
pwd
:
String
,
//登录密码
pwd
:
String
,
//登录密码
token
:{
type
:
String
,
index
:
true
},
token
:{
type
:
String
,
index
:
true
},
tokenMs
:
Number
tokenMs
:
Number
,
firstLoginIsChangePwd
:{
type
:
Boolean
,
default
:
false
},
//首次登录是否修改密码
});
});
var
fuHuaQiModel
;
var
fuHuaQiModel
;
...
...
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