Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
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
zhenfei.zhang
fmp_vip
Commits
5d2afec4
Commit
5d2afec4
authored
Jul 14, 2017
by
gujin.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在进行会员支付时,若还不是会员,则弹出认证窗口,进行会员认证
parent
776f1057
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
task/taskpay.cpp
+22
-0
No files found.
task/taskpay.cpp
View file @
5d2afec4
...
...
@@ -17,6 +17,28 @@ TaskPay::TaskPay(QJsonObject &jsonObj, Session *session, QObject *parent)
QByteArray
TaskPay
::
doTask
()
{
FMP_DEBUG
()
<<
__FUNCTION__
;
//判断是否真的是会员,如果不是,则先认证
if
(
!
posReqJsonObj
.
contains
(
"fm_open_id"
)
||
posReqJsonObj
[
"fm_open_id"
].
toString
().
isEmpty
())
{
QJsonObject
reqObj
;
reqObj
[
"pos_ver"
]
=
getPosJsonValue
(
"pos_ver"
);
reqObj
[
"operator_id"
]
=
getPosJsonValue
(
"operator_id"
);
reqObj
[
"fm_cmd"
]
=
FM_Login
;
reqObj
[
"pos_id"
]
=
getPosJsonValue
(
"pos_id"
);
reqObj
[
"store_id"
]
=
getPosJsonValue
(
"store_id"
);
reqObj
[
"business_date"
]
=
getPosJsonValue
(
"business_date"
);
TaskLogin
taskLogin
(
reqObj
,
session
());
QByteArray
ret
=
taskLogin
.
doTask
();
if
(
taskLogin
.
error
()
!=
FM_API_SUCCESS
)
{
return
ret
;
}
//认证成功,使用返回的fm_open_id进行会员支付
posReqJsonObj
[
"fm_open_id"
]
=
QJsonDocument
::
fromJson
(
ret
).
object
()[
"fm_open_id"
];
}
//获取可用的代金券
TaskCoupon
taskCoupon
(
posReqJsonObj
,
_session
);
QByteArray
ret
=
taskCoupon
.
doTask
();
...
...
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