Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
352b2c69
Commit
352b2c69
authored
Jan 14, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
f13f9fa8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
bigdata/app/base/api/impl/auth/accessAuth.js
+1
-1
bigdata/app/base/db/cache/vcodeCache.js
+9
-9
No files found.
bigdata/app/base/api/impl/auth/accessAuth.js
View file @
352b2c69
...
...
@@ -435,7 +435,7 @@ class AccessAuthAPI extends APIBase {
return
system
.
getResult
(
null
,
"验证码不能未空."
);
}
var
cacheKeyStr
=
appkey
+
"_"
+
pobj
.
mobile
;
var
cacheCode
=
await
this
.
cacheManager
[
"VCodeCache"
].
cache
(
cacheKeyStr
,
null
);
var
cacheCode
=
await
this
.
cacheManager
[
"VCodeCache"
].
getCache
(
cacheKeyStr
);
if
(
!
cacheCode
||
pobj
.
vcode
!=
cacheCode
.
vcode
)
{
return
system
.
getResultFail
(
system
.
verifyVCodeFail
,
"验证码校验不成功,请重新获取验证码验证."
,
system
.
verifyVCodeFail
);
}
...
...
bigdata/app/base/db/cache/vcodeCache.js
View file @
352b2c69
...
...
@@ -19,15 +19,7 @@ class VCodeCache extends CacheBase {
async
buildCacheVal
(
cachekey
,
inputkey
,
val
,
ex
,
...
items
)
{
var
pobj
=
val
;
var
vcode
=
await
this
.
smsUtil
.
getUidStr
(
6
,
10
);
if
(
pobj
.
reqType
)
{
if
(
pobj
.
reqType
==
"otherVcode"
)
{
//【XXX】您的验证码是:602639(5分钟内有效),工作人员不会索取,请勿泄露。-------描述在模板中配置
pobj
.
msgContent
=
vcode
;
this
.
smsUtil
.
aliOtherSendMsg
(
pobj
.
mobile
,
pobj
.
accessKeyId
,
pobj
.
accessKeySecret
,
pobj
.
tmplCode
,
pobj
.
signName
,
JSON
.
stringify
({
code
:
vcode
}));
}
}
else
{
if
(
!
pobj
.
reqType
)
{
//inputkey采用appkey_mobile的形式
var
mobile
=
inputkey
.
split
(
"_"
)[
1
];
var
tmplCode
=
val
;
...
...
@@ -40,6 +32,14 @@ class VCodeCache extends CacheBase {
else
{
this
.
smsUtil
.
aliSendMsg
(
mobile
,
tmplCode
,
signName
,
JSON
.
stringify
({
code
:
vcode
}));
}
return
JSON
.
stringify
({
vcode
:
vcode
});
}
if
(
pobj
.
reqType
==
"otherVcode"
)
{
//【XXX】您的验证码是:602639(5分钟内有效),工作人员不会索取,请勿泄露。-------描述在模板中配置
pobj
.
msgContent
=
vcode
;
this
.
smsUtil
.
aliOtherSendMsg
(
pobj
.
mobile
,
pobj
.
accessKeyId
,
pobj
.
accessKeySecret
,
pobj
.
tmplCode
,
pobj
.
signName
,
JSON
.
stringify
({
code
:
vcode
}));
}
return
JSON
.
stringify
({
vcode
:
vcode
});
}
...
...
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