Commit 22774951 by NitefullWind

1. 手机号认证不可支付。

parent 4305996f
......@@ -44,7 +44,6 @@ int FMNetwork::send(const QString &url, const QByteArray &reqData, QByteArray &r
QTimer timer;
timer.setSingleShot(true);
connect(&timer, SIGNAL(timeout()),&loop,SLOT(quit()));
timer.start(1000 * 60);
loop.exec();
......
......@@ -84,7 +84,7 @@ struct PP{
Amount = "amount";
Phone = "phone";
Fm_open_id = "fm_open_id";
CanPay = "CanPay";
CanPay = "canPay";
Address = "address";
Email = "email";
......
......@@ -74,8 +74,15 @@ void TaskLogin::onLogin()
QString birthday = getServerJsonValue(PosProps.Birthday).toString();
QString name = getServerJsonValue(PosProps.Name).toString();
if(getServerJsonValue(PosProps.CanPay).toInt() == 0) {
FMMsgWnd::LoginSuccess(account, name, birthday, _window);
bool canPay = (getServerJsonValue(PosProps.CanPay).toInt() == 1);
if(!canPay) {
if(getPosJsonValue(PosProps.Fm_cmd).toInt() != FM_Pay) {
FMMsgWnd::LoginSuccess(account, name, birthday, _window);
} else {
FMMsgWnd::FailureWnd(QString::fromLocal8Bit(ErrorNeedPayCode), _window);
_window->resetWnd();
return;
}
}
session()->addData(PosProps.Name, name);
......@@ -83,6 +90,7 @@ void TaskLogin::onLogin()
session()->addData(PosProps.Fm_open_id, account);
session()->addData(PosProps.Amount, getServerJsonValue(PosProps.Amount).toInt());
session()->addData(PosProps.Score, getServerJsonValue(PosProps.Score).toInt());
session()->addData(PosProps.CanPay, canPay);
_window->accept();
}
......
......@@ -29,7 +29,9 @@ QByteArray TaskPay::doTask()
// return ret;
// }
if(session()->data(PosProps.Fm_open_id).toString() == 0) {
QString fm_open_id_pos = getPosJsonValue(PosProps.Fm_open_id).toString();
QString fm_open_id_session = session()->data(PosProps.Fm_open_id).toString();
if(fm_open_id_session == "" || fm_open_id_pos!=fm_open_id_session || session()->data(PosProps.CanPay).toBool() == false) {
preTask = new TaskLogin(posReqJsonObj, _session, this);
preTask->session()->addData(PosProps.FM_Type, FM_Pay);
QByteArray loginRst = preTask->doTask();
......
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