Commit 84316c73 by Carwyn

1. 调试问题修改

parent 09a5e76b
...@@ -26,8 +26,8 @@ int FMPVipPrivate::Init() ...@@ -26,8 +26,8 @@ int FMPVipPrivate::Init()
_settings = q->GetService<FMPSettingsInterface>(q->_ctx); _settings = q->GetService<FMPSettingsInterface>(q->_ctx);
FMPVipSettings::instance()->init(_settings); FMPVipSettings::instance()->init(_settings);
auto resend = new ReSend(); // auto resend = new ReSend();
resend->start(); // resend->start();
FMPVipServer::instance()->SetPluginContext(q->_ctx); FMPVipServer::instance()->SetPluginContext(q->_ctx);
q->_inited = true; q->_inited = true;
......
...@@ -23,7 +23,7 @@ void TaskFinal::packageServerReq() ...@@ -23,7 +23,7 @@ void TaskFinal::packageServerReq()
p.push_back(PosProps.Fm_id); p.push_back(PosProps.Fm_id);
p.push_back(PosProps.Fm_open_id); p.push_back(PosProps.Fm_open_id);
p.push_back(PosProps.OrderAmount); p.push_back(PosProps.OrderAmount);
p.push_back(PosProps.PaidAmount); p.push_back(PosProps.PaidAmount == 0 ? PosProps.OrderAmount : PosProps.PaidAmount);
foreach(auto prop , p) { foreach(auto prop , p) {
transData[ServerProps(prop)] = getPosJsonValue(prop); transData[ServerProps(prop)] = getPosJsonValue(prop);
} }
...@@ -54,6 +54,8 @@ void TaskFinal::packageServerReq() ...@@ -54,6 +54,8 @@ void TaskFinal::packageServerReq()
if(typeModeFlag == "0101") { if(typeModeFlag == "0101") {
//现金支付 //现金支付
pay["typeModeFlag"] = "20005"; pay["typeModeFlag"] = "20005";
} else if (typeModeFlag == "0103") {
pay["typeModeFlag"] = "20010";
} else if(typeModeFlag == "0301") { } else if(typeModeFlag == "0301") {
pay["typeModeFlag"] = "10011"; pay["typeModeFlag"] = "10011";
} else if(typeModeFlag == "0302") { } else if(typeModeFlag == "0302") {
......
...@@ -67,8 +67,14 @@ void TaskLogin::onLogin() ...@@ -67,8 +67,14 @@ void TaskLogin::onLogin()
return; return;
} }
int status = getServerJsonValue("statusCode").toInt();
// 认证失败 // 认证失败
if(getServerJsonValue("statusCode").toInt() != FM_API_SUCCESS) { if(status == 2003) {
FMP_INFO() << serverRspJsonObj["msg"].toString();
serverRspJsonObj["phone"] = session()->data(PosProps.Member_sign).toString();
_window->accept();
return;
}else if(status != FM_API_SUCCESS) {
QString info = serverRspJsonObj["msg"].toString(); QString info = serverRspJsonObj["msg"].toString();
FMP_WARN() << "Login failed: " << info; FMP_WARN() << "Login failed: " << info;
FMMsgWnd::FailureWnd(info, _window); FMMsgWnd::FailureWnd(info, _window);
......
...@@ -35,6 +35,7 @@ void TaskRefundPay::packageServerReq() ...@@ -35,6 +35,7 @@ void TaskRefundPay::packageServerReq()
{ {
QJsonArray transIds; QJsonArray transIds;
transIds.append(getPosJsonValue(PosProps.TransId)); transIds.append(getPosJsonValue(PosProps.TransId));
transIds.append(getPosJsonValue(PosProps.Fm_transId));
QJsonObject transData; QJsonObject transData;
transData["transIds"] = transIds; transData["transIds"] = transIds;
......
...@@ -63,7 +63,17 @@ void TaskPay::onGetCoupons(Session* session) ...@@ -63,7 +63,17 @@ void TaskPay::onGetCoupons(Session* session)
void TaskPay::setWindow() void TaskPay::setWindow()
{ {
_window = new FMVipOrder; _window = new FMVipOrder;
session()->addData(PosProps.OrderAmount, getPosJsonValue(PosProps.OrderAmount).toInt()); int amount = getPosJsonValue(PosProps.OrderAmount).toInt();
if (amount == 0) {
amount = getPosJsonValue(PosProps.OrderAmount).toDouble();
}
int paid_amount = getPosJsonValue(PosProps.OrderAmount).toInt();
if (paid_amount == 0) {
paid_amount = getPosJsonValue(PosProps.OrderAmount).toDouble();
}
session()->addData(PosProps.OrderAmount, amount);
session()->addData(PosProps.OrderAmount, paid_amount);
connect(qobject_cast<FMVipOrder*>(_window), SIGNAL(pay()), this, SLOT(onPay())); connect(qobject_cast<FMVipOrder*>(_window), SIGNAL(pay()), this, SLOT(onPay()));
} }
......
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