Commit 4c0cd524 by NitefullWind

Merge branch 'fmvip_lvlanzi' of git.oschina.net:kong__mo/fmp_vip into fmvip_lvlanzi

parents 2bba1d44 84316c73
......@@ -26,8 +26,8 @@ int FMPVipPrivate::Init()
_settings = q->GetService<FMPSettingsInterface>(q->_ctx);
FMPVipSettings::instance()->init(_settings);
auto resend = new ReSend();
resend->start();
// auto resend = new ReSend();
// resend->start();
FMPVipServer::instance()->SetPluginContext(q->_ctx);
q->_inited = true;
......
......@@ -23,7 +23,7 @@ void TaskFinal::packageServerReq()
p.push_back(PosProps.Fm_id);
p.push_back(PosProps.Fm_open_id);
p.push_back(PosProps.OrderAmount);
p.push_back(PosProps.PaidAmount);
p.push_back(PosProps.PaidAmount == 0 ? PosProps.OrderAmount : PosProps.PaidAmount);
foreach(auto prop , p) {
transData[ServerProps(prop)] = getPosJsonValue(prop);
}
......@@ -54,6 +54,8 @@ void TaskFinal::packageServerReq()
if(typeModeFlag == "0101") {
//现金支付
pay["typeModeFlag"] = "20005";
} else if (typeModeFlag == "0103") {
pay["typeModeFlag"] = "20010";
} else if(typeModeFlag == "0301") {
pay["typeModeFlag"] = "10011";
} else if(typeModeFlag == "0302") {
......
......@@ -67,8 +67,14 @@ void TaskLogin::onLogin()
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();
FMP_WARN() << "Login failed: " << info;
FMMsgWnd::FailureWnd(info, _window);
......
......@@ -35,6 +35,7 @@ void TaskRefundPay::packageServerReq()
{
QJsonArray transIds;
transIds.append(getPosJsonValue(PosProps.TransId));
transIds.append(getPosJsonValue(PosProps.Fm_transId));
QJsonObject transData;
transData["transIds"] = transIds;
......
......@@ -63,7 +63,17 @@ void TaskPay::onGetCoupons(Session* session)
void TaskPay::setWindow()
{
_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()));
}
......
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