Commit 27fef372 by NitefullWind

1. 所有接口弹窗显示错误信息。

parent 630ae302
...@@ -11,7 +11,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets ...@@ -11,7 +11,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11 CONFIG += c++11
DEFINES += TEST #DEFINES += TEST
SOURCES += \ SOURCES += \
fmp_vip.cpp \ fmp_vip.cpp \
......
...@@ -50,6 +50,10 @@ QByteArray FMTask::doTask() ...@@ -50,6 +50,10 @@ QByteArray FMTask::doTask()
RunFunction(showWindow); RunFunction(showWindow);
RunFunction(packagePOSRsp); RunFunction(packagePOSRsp);
if(getServerJsonValue(PosProps.StatusCode).toInt((int)FM_API_SUCCESS) != FM_API_SUCCESS) {
FMMsgWnd::FailureWnd(getServerJsonValue(PosProps.Msg).toString("Unknown error"), _window);
}
QJsonDocument json(posRspJsonObj); QJsonDocument json(posRspJsonObj);
return json.toJson(QJsonDocument::Compact); return json.toJson(QJsonDocument::Compact);
} }
......
...@@ -34,6 +34,10 @@ QByteArray FMTaskNoWnd::doTask() ...@@ -34,6 +34,10 @@ QByteArray FMTaskNoWnd::doTask()
} }
packagePOSRsp(); packagePOSRsp();
if(getServerJsonValue(PosProps.StatusCode).toInt((int)FM_API_SUCCESS) != FM_API_SUCCESS) {
FMMsgWnd::FailureWnd(getServerJsonValue(PosProps.Msg).toString("Unknown error"), _window);
}
QJsonDocument json(posRspJsonObj); QJsonDocument json(posRspJsonObj);
return json.toJson(QJsonDocument::Compact); return json.toJson(QJsonDocument::Compact);
} }
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include "fmviporder.h" #include "fmviporder.h"
#include "tasklogin.h" #include "tasklogin.h"
#include "fmp_vip_settings.h" #include "fmp_vip_settings.h"
#include "fmmsgwnd.h"
TaskPay::TaskPay(QJsonObject &jsonObj, QObject *parent) TaskPay::TaskPay(QJsonObject &jsonObj, QObject *parent)
:FMTask(jsonObj, FM_Pay, 0, parent) :FMTask(jsonObj, FM_Pay, 0, parent)
......
...@@ -58,7 +58,7 @@ private: ...@@ -58,7 +58,7 @@ private:
this->_needPayStr = needPayStr; this->_needPayStr = needPayStr;
_amount = _amountStr.toInt() / 100.0; _amount = _amountStr.toInt() / 100.0;
_score = (score / 20)*100; // 20积分=1元钱 _score = (score / 20); // 20积分=1元钱
_needPay = _needPayStr.toInt() / 100.0; _needPay = _needPayStr.toInt() / 100.0;
_maxWillPay = _useScore = _couponAmount = 0; _maxWillPay = _useScore = _couponAmount = 0;
......
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