Commit 327ffb73 by NitefullWind

1. 修复网络模块中error没有重置的bug。 2. 调整数字键盘的界面展示。

parent 5fc70a5d
...@@ -133,6 +133,8 @@ bool FMTask::sendToServer(bool isShowMsg) ...@@ -133,6 +133,8 @@ bool FMTask::sendToServer(bool isShowMsg)
// 服务器返回的错误 // 服务器返回的错误
if(serverRspJsonObj.contains("errcode")) { if(serverRspJsonObj.contains("errcode")) {
setError(FM_API_SERVERERROR, serverRspJsonObj["errcode"].toInt(), serverRspJsonObj["errmsg"].toString()); setError(FM_API_SERVERERROR, serverRspJsonObj["errcode"].toInt(), serverRspJsonObj["errmsg"].toString());
} else {
setError(FM_API_SUCCESS);
} }
} }
} }
......
...@@ -151,15 +151,19 @@ void FMVipLogin::on_login_key_clicked() ...@@ -151,15 +151,19 @@ void FMVipLogin::on_login_key_clicked()
{ {
if(numpad == NULL) if(numpad == NULL)
{ {
numpad = new FMNumPad(); numpad = new FMNumPad(this);
connect(numpad, &FMNumPad::finished, this, &FMVipLogin::on_clean_numpad); connect(numpad, &FMNumPad::finished, this, &FMVipLogin::on_clean_numpad);
connect(numpad, &FMNumPad::digit_click, this, &FMVipLogin::on_edit_change); connect(numpad, &FMNumPad::digit_click, this, &FMVipLogin::on_edit_change);
connect(numpad, &FMNumPad::digit_delete, this, &FMVipLogin::on_delete_clicked); connect(numpad, &FMNumPad::digit_delete, this, &FMVipLogin::on_delete_clicked);
connect(numpad, &FMNumPad::digit_clear, this, &FMVipLogin::on_clear_clicked); connect(numpad, &FMNumPad::digit_clear, this, &FMVipLogin::on_clear_clicked);
connect(numpad, &FMNumPad::digit_confirm, this, &FMVipLogin::on_confirm_clicked); connect(numpad, &FMNumPad::digit_confirm, this, &FMVipLogin::on_confirm_clicked);
numpad->show();
numpad->setGeometry(x() + (width()+640)/2-120, numpad->y()+20, numpad->width(), numpad->height());
} else {
numpad->close();
delete numpad;
numpad = NULL;
} }
numpad->show();
numpad->setGeometry(x() + (width()+640)/2, numpad->y(), numpad->width(), numpad->height());
} }
void FMVipLogin::on_edit_change(QString numkey) void FMVipLogin::on_edit_change(QString numkey)
......
...@@ -203,15 +203,19 @@ void FMVipOrder::on_pay_key_clicked() ...@@ -203,15 +203,19 @@ void FMVipOrder::on_pay_key_clicked()
{ {
if(numpad == NULL) if(numpad == NULL)
{ {
numpad = new FMNumPad(); numpad = new FMNumPad(this);
connect(numpad, &FMNumPad::finished, this, &FMVipOrder::on_clean_numpad); connect(numpad, &FMNumPad::finished, this, &FMVipOrder::on_clean_numpad);
connect(numpad, &FMNumPad::digit_click, this, &FMVipOrder::on_edit_change); connect(numpad, &FMNumPad::digit_click, this, &FMVipOrder::on_edit_change);
connect(numpad, &FMNumPad::digit_delete, this, &FMVipOrder::on_delete_clicked); connect(numpad, &FMNumPad::digit_delete, this, &FMVipOrder::on_delete_clicked);
connect(numpad, &FMNumPad::digit_clear, this, &FMVipOrder::on_clear_clicked); connect(numpad, &FMNumPad::digit_clear, this, &FMVipOrder::on_clear_clicked);
connect(numpad, &FMNumPad::digit_confirm, this, &FMVipOrder::on_confirm_clicked); connect(numpad, &FMNumPad::digit_confirm, this, &FMVipOrder::on_confirm_clicked);
numpad->show();
numpad->setGeometry(x() + width()/2-20, numpad->y()+100, numpad->width(), numpad->height());
} else {
numpad->close();
delete numpad;
numpad = NULL;
} }
numpad->show();
numpad->setGeometry(x() + (width()+950)/2, numpad->y(), numpad->width(), numpad->height());
} }
void FMVipOrder::on_clean_numpad() void FMVipOrder::on_clean_numpad()
......
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