| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- #include "respgetuserinfo.h"
- #include <QScriptValue>
- #include <QScriptEngine>
- #include <QScriptValueIterator>
- RespGetUserInfo::RespGetUserInfo(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()=="userInfo")
- {
- QScriptValue sv1 = it.value();
- this->userid = sv1.property("userid").toString();
- this->usercode =sv1.property("usercode").toString();
- this->username =sv1.property("username").toString();
- this->qq =sv1.property("qq").toString();
- this->wangwang =sv1.property("wangwang").toString();
- this->email =sv1.property("email").toString();
- this->phone =sv1.property("phone").toString();
- this->paytype =sv1.property("paytype").toString();
- this->remainmoney =sv1.property("remainmoney").toString();
- this->summoney =sv1.property("summoney").toString();
- this->regdate =sv1.property("regdate").toString();
- this->lastlogintime =sv1.property("lastlogintime").toString();
- this->lastloginip =sv1.property("lastloginip").toString();
- this->lastloginstatus =sv1.property("lastloginstatus").toString();
- this->memo =sv1.property("memo").toString();
- this->giftMoney = it.value().property("giftmoney").toString();
- this->sumGiftMoney = it.value().property("sumgiftmoney").toString();
- this->toPayMoney = it.value().property("topaymoney").toString();
- this->validNum = it.value().property("validnum").toString();
- }
- }
- }
- }
- int RespGetUserInfo::getRtnCode()
- {
- return this->rtnCode;
- }
- QString RespGetUserInfo::getRtnMemo()
- {
- return this->rtnMemo;
- }
- QString RespGetUserInfo::getUserID()
- {
- return this->userid;
- }
- QString RespGetUserInfo::getUserCode()
- {
- return this->usercode;
- }
- QString RespGetUserInfo::getUserName()
- {
- return this->username;
- }
- QString RespGetUserInfo::getUserQQ()
- {
- return this->qq;
- }
- QString RespGetUserInfo::getUserWW()
- {
- return this->wangwang;
- }
- QString RespGetUserInfo::getUserEmail()
- {
- return this->email;
- }
- QString RespGetUserInfo::getUserPhone()
- {
- return this->phone;
- }
- QString RespGetUserInfo::getUserPayType()
- {
- return this->paytype;
- }
- QString RespGetUserInfo::getUserRemainMoney()
- {
- return this->remainmoney;
- }
- QString RespGetUserInfo::getUserSumMoney()
- {
- return this->summoney;
- }
- QString RespGetUserInfo::getUserRegDate()
- {
- return this->regdate;
- }
- QString RespGetUserInfo::getUserLastLoginTime()
- {
- return this->lastlogintime;
- }
- QString RespGetUserInfo::getUserLastLoginIP()
- {
- return this->lastloginip;
- }
- QString RespGetUserInfo::getUserLoginStatus()
- {
- return this->lastloginstatus;
- }
- QString RespGetUserInfo::getUserMemo()
- {
- return this->memo;
- }
- QString RespGetUserInfo::getUserSumGiftMoney()
- {
- return this->sumGiftMoney;
- }
- QString RespGetUserInfo::getUserToPayMoney()
- {
- return this->toPayMoney;
- }
- QString RespGetUserInfo::getValidNum()
- {
- return this->validNum;
- }
- QString RespGetUserInfo::getUserGiftMoney()
- {
- return this->giftMoney;
- }
|