Commit 2ef9375d by NitefullWind

1. 认证返回新增字段。 2. 手机号认证后弹窗显示会员信息。

parent 4c894e10
...@@ -60,6 +60,8 @@ void TaskLogin::packagePOSRsp() ...@@ -60,6 +60,8 @@ void TaskLogin::packagePOSRsp()
posRspJsonObj["address"] = getServerJsonValue("address").toString(); posRspJsonObj["address"] = getServerJsonValue("address").toString();
posRspJsonObj["email"] = getServerJsonValue("email").toString(); posRspJsonObj["email"] = getServerJsonValue("email").toString();
posRspJsonObj[PosProps.Member_sign] = session()->data(PosProps.Member_sign).toString(); posRspJsonObj[PosProps.Member_sign] = session()->data(PosProps.Member_sign).toString();
posRspJsonObj["memberDiscount"] = getServerJsonValue("memberDiscount").toDouble(1.00);
} }
void TaskLogin::onLogin() void TaskLogin::onLogin()
...@@ -89,11 +91,17 @@ void TaskLogin::onLogin() ...@@ -89,11 +91,17 @@ void TaskLogin::onLogin()
QString account = getServerJsonValue(PosProps.Fm_open_id).toString(); QString account = getServerJsonValue(PosProps.Fm_open_id).toString();
QString birthday = getServerJsonValue(PosProps.Birthday).toString(); QString birthday = getServerJsonValue(PosProps.Birthday).toString();
QString name = getServerJsonValue(PosProps.Name).toString(); QString name = getServerJsonValue(PosProps.Name).toString();
double amount = getServerJsonValue(PosProps.Amount).toInt()/100.0;
int score = getServerJsonValue(PosProps.Score).toInt();
QString amountStr = QString::number(amount, 'f', 2);
QString scoreStr = QString::number(score);
bool canPay = (getServerJsonValue(PosProps.CanPay).toInt() == 1); bool canPay = (getServerJsonValue(PosProps.CanPay).toInt() == 1);
if(!canPay) { if(!canPay) {
if(getPosJsonValue(PosProps.Fm_cmd).toInt() != FM_Pay) { if(getPosJsonValue(PosProps.Fm_cmd).toInt() != FM_Pay) {
FMMsgWnd::LoginSuccess(account, name, birthday, _window); QString info = QString::fromLocal8Bit("账号: %1\n姓名: %2\n余额: %3\n积分: %4").arg(account, name, amountStr, scoreStr);
FMMsgWnd::SuccessWnd(info, _window);
// FMMsgWnd::LoginSuccess(account, name, amountStr, scoreStr, _window);
} else { } else {
FMMsgWnd::FailureWnd(QString::fromLocal8Bit(ErrorNeedPayCode), _window); FMMsgWnd::FailureWnd(QString::fromLocal8Bit(ErrorNeedPayCode), _window);
_window->resetWnd(); _window->resetWnd();
......
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