| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- #include "respgetmfuserinfo.h"
- #include <QScriptValue>
- #include <QScriptEngine>
- #include <QScriptValueIterator>
- RespGetMfUserInfo::RespGetMfUserInfo(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->paymoney =sv1.property("paymoney").toString();
- this->paytime =sv1.property("paytime").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->starttime = it.value().property("starttime").toString();
- this->endtime = it.value().property("endtime").toString();
- this->city = it.value().property("city").toString();
- this->companyname = it.value().property("companyname").toString();
- }
- }
- }
- }
- int RespGetMfUserInfo::getRtnCode()
- {
- return this->rtnCode;
- }
- QString RespGetMfUserInfo::getRtnMemo()
- {
- return this->rtnMemo;
- }
- QString RespGetMfUserInfo::getUserID()
- {
- return this->userid;
- }
- QString RespGetMfUserInfo::getUserCode()
- {
- return this->usercode;
- }
- QString RespGetMfUserInfo::getUserName()
- {
- return this->username;
- }
- QString RespGetMfUserInfo::getUserQQ()
- {
- return this->qq;
- }
- QString RespGetMfUserInfo::getUserWW()
- {
- return this->wangwang;
- }
- QString RespGetMfUserInfo::getUserEmail()
- {
- return this->email;
- }
- QString RespGetMfUserInfo::getUserPhone()
- {
- return this->phone;
- }
- QString RespGetMfUserInfo::getUserPayMoney()
- {
- return this->paymoney;
- }
- QString RespGetMfUserInfo::getUserPayTime()
- {
- return this->paytime;
- }
- QString RespGetMfUserInfo::getUserRegDate()
- {
- return this->regdate;
- }
- QString RespGetMfUserInfo::getUserLastLoginTime()
- {
- return this->lastlogintime;
- }
- QString RespGetMfUserInfo::getUserLastLoginIP()
- {
- return this->lastloginip;
- }
- QString RespGetMfUserInfo::getUserLoginStatus()
- {
- return this->lastloginstatus;
- }
- QString RespGetMfUserInfo::getUserMemo()
- {
- return this->memo;
- }
- QString RespGetMfUserInfo::getUserStartTime()
- {
- return this->starttime;
- }
- QString RespGetMfUserInfo::getUserEndTime()
- {
- return this->endtime;
- }
- QString RespGetMfUserInfo::getCity()
- {
- return this->city;
- }
- QString RespGetMfUserInfo::getCompanyName()
- {
- return this->companyname;
- }
|