Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_epay
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_epay
Commits
30a8ed65
Commit
30a8ed65
authored
Aug 21, 2017
by
gujin.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改卡券核销时,商品信息的传递方式
parent
18030203
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
11 deletions
+5
-11
fmp_epay_p.cpp
+1
-6
fmp_epay_p.h
+0
-2
fmp_epayview_dialog.cpp
+3
-3
fmp_epayview_dialog.h
+1
-0
No files found.
fmp_epay_p.cpp
View file @
30a8ed65
...
...
@@ -230,7 +230,7 @@ void FMPePayPrivate::Init()
return
;
}
}
QJsonArray
pos_products
=
_origin_request
[
"products"
].
toArray
();
QJsonArray
pos_products
=
trans
[
"products"
].
toArray
();
QJsonArray
products
;
int
i
=
1
;
foreach
(
QJsonValue
v
,
pos_products
)
{
...
...
@@ -278,11 +278,6 @@ void FMPePayPrivate::DockPayRequest(const QByteArray &json)
FMP_INFO
()
<<
"pay request json:"
<<
json
;
}
QJsonObject
FMPePayPrivate
::
GetRequestInfo
()
{
return
_origin_request
;
}
#define FMP_EPAY_STATUSCODE "statusCode"
#define FMP_EPAY_ERRORMSG "msg"
#define FMP_EPAY_FMID "fm_id"
...
...
fmp_epay_p.h
View file @
30a8ed65
...
...
@@ -69,8 +69,6 @@ public:
bool
HttpPost
(
QJsonObject
&
outjson
,
QJsonObject
json
,
QString
&
error
,
int
timeout
=
60
);
void
GetDailyBillData
(
QVector
<
PayDetail
>
&
vecPay
);
QJsonObject
GetRequestInfo
();
private
:
void
ControlReverseJson
();
...
...
fmp_epayview_dialog.cpp
View file @
30a8ed65
...
...
@@ -183,10 +183,11 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid
// ui->btn_pay->setEnabled(false);
}
QPushButton
*
redeem
=
new
QPushButton
(
QString
::
fromLocal8Bit
(
"卡券支付"
),
this
);
redeem
->
setStyleSheet
(
"width:2
5
0px"
);
redeem
->
setStyleSheet
(
"width:2
2
0px"
);
connect
(
redeem
,
&
QPushButton
::
clicked
,
this
,
&
FMPPayDialog
::
redeem
);
QVBoxLayout
*
layout
=
qobject_cast
<
QVBoxLayout
*>
(
ui
->
frame
->
layout
());
layout
->
insertWidget
(
4
,
redeem
);
_products_info
=
basicinfo
[
"products"
].
toJsonArray
();
setShowFunc
();
}
...
...
@@ -1106,8 +1107,7 @@ void FMPPayDialog::redeem()
double
needPay
=
ui
->
lineedit_num
->
text
().
toDouble
();
FMPRedeemInterface
*
redeem
=
FMP
::
GetService
<
FMPRedeemInterface
>
();
redeem
->
StartService
();
QJsonObject
requestInfo
=
_control
->
GetRequestInfo
();
QJsonObject
result
=
redeem
->
Redeem
(
needPay
,
requestInfo
);
QJsonObject
result
=
redeem
->
Redeem
(
needPay
,
_products_info
);
FMP_DEBUG
()
<<
"redeem result: "
<<
result
;
needPay
-=
result
[
"discount"
].
toDouble
();
ui
->
lineedit_num
->
setText
(
QString
::
number
(
qMax
(
0.0
,
needPay
)));
...
...
fmp_epayview_dialog.h
View file @
30a8ed65
...
...
@@ -152,6 +152,7 @@ private:
bool
_is_api
;
bool
_api_force_close
;
QPoint
_mMovePosition
;
QJsonArray
_products_info
;
};
#endif // DIALOG_H
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