#include "respgetpackrealpnuminfo.h" #include #include #include RespGetPackRealPnumInfo::RespGetPackRealPnumInfo(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(); } else if(it.name()=="packInfo") { this->packInfo = it.value().toString(); } else if(it.name()=="fcEncryptParam") { this->fcEncryptParam = it.value().toString(); } } } } int RespGetPackRealPnumInfo::getRtnCode() { return this->rtnCode; } QString RespGetPackRealPnumInfo::getRtnMemo() { return this->rtnMemo; } QString RespGetPackRealPnumInfo::getPackInfo() { return this->packInfo; } QString RespGetPackRealPnumInfo::getFcEncryptParam() { return this->fcEncryptParam; }