Commit 99163eb5 by Carwyn

1.修正不传商品列表问题; 2. 按 ESC 正常退出;

parent c03b2439
......@@ -22,12 +22,14 @@ FMPePay::FMPePay(ctkPluginContext *context)
_ste_handler(new FMPStartEventHandler(_ctx, this)),
d_ptr(new FMPePayPrivate(this))
{
FMPLoggerInterface::InitContext(context);
}
FMPePay::~FMPePay()
{
StopService();
FMPLoggerInterface::InitContext(nullptr, false);
if (d_ptr) {
delete d_ptr;
d_ptr = nullptr;
......
......@@ -651,7 +651,8 @@ bool FMPePayPrivate::GetPayJson(const QString& sum, const QString& code)
if (_is_api) {
QJsonObject origin_trans = _origin_request["transactions"].toObject();
transaction[FMP_EPAY_TRANSTRACTION_AMOUNT] = (int)(origin_trans["order_amount"].toDouble() + 0.005);
QJsonArray pos_products = _origin_request["products"].toArray();
QJsonObject pos_trans = _origin_request["transactions"].toObject();
QJsonArray pos_products = pos_trans["products"].toArray();
QJsonArray products;
int i = 1;
foreach (QJsonValue v, pos_products) {
......
......@@ -313,7 +313,9 @@ void FMPPayDialog::onSelectionChanged(QModelIndex idx)
void FMPPayDialog::keyPressEvent(QKeyEvent *e)
{
return QDialog::keyPressEvent(e);
if (e->key() == Qt::Key_Escape) {
on_btn_close_clicked();
}
}
void FMPPayDialog::mousePressEvent(QMouseEvent *event)
......
......@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 12
#define VER_BUILD 14
//! Convert version numbers to string
#define _STR(S) #S
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment