#include "respbindsysaccount.h" #include #include #include RespBindSysAccount::RespBindSysAccount(QString json) { this->json = json; QScriptEngine engine; QScriptValue sv = engine.evaluate("value = " + this->json); QScriptValueIterator it(sv); if(json.isEmpty()) { rtnCode = RTNCODE_NETWORK_NOTAVAILABLE; rtnMemo = RTNMEMO_NETWORK_NOTAVAILABLE; } else if(json=="ABORT") { rtnCode = RTNCODE_NETWORK_ABORT; rtnMemo = RTNMEMO_NETWORK_ABORT; } else { rtnCode = RTNCODE_INVALID_FORMAT; rtnMemo = RTNMEMO_INVALID_FORMAT; while (it.hasNext()) { it.next(); if(it.name()=="rtnCode") { this->rtnCode = it.value().toInt32(); } else if(it.name()=="rtnMemo") { this->rtnMemo = it.value().toString(); } } } } int RespBindSysAccount::getRtnCode() { return this->rtnCode; } QString RespBindSysAccount::getRtnMemo() { return this->rtnMemo; }