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
4325b1ce
Commit
4325b1ce
authored
Aug 19, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
d26cf60c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
bpo-web/app/base/api/impl/bpoSDPJApi.js
+9
-8
No files found.
bpo-web/app/base/api/impl/bpoSDPJApi.js
View file @
4325b1ce
...
...
@@ -160,7 +160,7 @@ class BpoSDPJApi {
console
.
log
(
`bpoSDPJApi.js -> cashQRCode -> mchtId & ecid 进行联合查询 :参数=`
+
JSON
.
stringify
(
obj
)
+
" _cCashInfo = "
+
JSON
.
stringify
(
_cCashInfo
));
//如果二维码有效直接返回
if
(
_cCashInfo
.
qrcode_status
&&
_cCashInfo
.
qrcode
)
{
if
(
_cCashInfo
.
qrcode_status
==
1
&&
_cCashInfo
.
qrcode
)
{
return
this
.
getCodeResult
(
0
,
{
"qrcode"
:
_cCashInfo
.
qrcode
});
}
...
...
@@ -186,7 +186,7 @@ class BpoSDPJApi {
// 生成二维码
let
url
=
await
this
.
qrClient
.
generateQR
(
custormUrl
);
_cCashInfo
.
qrcode
=
url
;
_cCashInfo
.
qrcode_status
=
url
?
1
:
2
;
_cCashInfo
.
qrcode_status
=
1
;
_cCashInfo
.
sign_url
=
custormUrl
;
_cCashInfo
.
save
();
return
this
.
getCodeResult
(
0
,
{
"qrcode"
:
url
||
""
});
...
...
@@ -311,6 +311,7 @@ class BpoSDPJApi {
*/
async
removeQRCode
(
obj
,
req
)
{
try
{
console
.
log
(
"----removeqrcode----"
,
obj
.
outTradeNo
,
new
Date
());
let
params
=
{
appId
:
obj
.
appId
,
mchtId
:
obj
.
mchtId
,
...
...
@@ -387,7 +388,7 @@ class BpoSDPJApi {
};
// 是否交易
if
(
cashInfo
.
trade_status
)
{
if
(
cashInfo
.
trade_status
||
cashInfo
.
qrcode_status
==
2
)
{
// 1 认证页面 2 二维码已失效 3 红包领取页面 4 红包领取结果页面(心跳查询) 5 红包已被领取
resData
.
redirect_code
=
2
;
return
this
.
getCodeResult
(
0
,
resData
);
...
...
@@ -516,7 +517,7 @@ class BpoSDPJApi {
if
(
!
ccashinfo
)
{
return
this
.
getErrResult
(
"信息不存在"
);
}
if
(
ccashinfo
.
qrcode_status
!=
1
)
{
if
(
ccashinfo
.
qrcode_status
==
2
)
{
// 1 认证页面 2 二维码已失效 3 红包领取页面 4 红包领取结果页面(心跳查询) 5 红包已被领取
return
this
.
getCodeResult
(
0
,
{
redirect_code
:
2
});
}
...
...
@@ -600,7 +601,7 @@ class BpoSDPJApi {
// }
async
cashOut
(
cashInfo
,
api
,
cashUser
)
{
if
(
cashInfo
.
qrcode_status
!=
1
)
{
if
(
cashInfo
.
qrcode_status
==
2
)
{
// 1 认证页面 2 二维码已失效 3 红包领取页面 4 红包领取结果页面(心跳查询) 5 红包已被领取
return
this
.
getCodeResult
(
0
,
{
redirect_code
:
2
});
}
...
...
@@ -910,14 +911,14 @@ class BpoSDPJApi {
cashInfo
.
trade_status
=
"00"
;
cashInfo
.
trade_desc
=
"交易成功"
;
await
cashInfo
.
save
();
this
.
notifyCash
(
cashInfo
.
id
);
this
.
syncOneCashAmt
(
cashInfo
.
id
);
await
this
.
notifyCash
(
cashInfo
.
id
);
await
this
.
syncOneCashAmt
(
cashInfo
.
id
);
return
{
code
:
"0000"
};
}
else
if
(
respTradeStatus
==
"02"
||
respTradeStatus
==
"03"
)
{
cashInfo
.
trade_status
=
"02"
;
cashInfo
.
trade_desc
=
obj
.
respDesc
||
"交易失败"
;
await
cashInfo
.
save
();
this
.
notifyCash
(
cashInfo
.
id
);
await
this
.
notifyCash
(
cashInfo
.
id
);
}
else
{
}
this
.
syncOneCashAmt
(
cashInfo
.
id
);
...
...
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