diff --git a/assets/Scripts/Sub/UI/PreloadUI.ts b/assets/Scripts/Sub/UI/PreloadUI.ts index 78b4cd0c..8c57d816 100644 --- a/assets/Scripts/Sub/UI/PreloadUI.ts +++ b/assets/Scripts/Sub/UI/PreloadUI.ts @@ -27,6 +27,7 @@ import { promptItem } from "../Item/promptItem"; import LanguageUtils, { LanguageType } from "../../Main/Common/LanguageUtils"; import { DataManager, DataId } from "../../chat18x/data/DataManager"; import { LoginData } from "../../chat18x/data/LoginData"; +import { PlayerData } from "../../chat18x/data/PlayerData"; import { AccountData } from "../../chat18x/data/AccountData"; import { MetaData } from "../../chat18x/data/MetaData"; import { NetTimeData } from "../../chat18x/data/NetTimeData"; @@ -273,13 +274,13 @@ export class PreloadUI extends Component { const resData = res.data; // 保存数据 const loginData = DataManager.I.getDataById(DataId.Login); - // loginData.operateType = resData.OperateType; loginData.token = resData.token; - // loginData.refreshToken = resData.refreshToken; - // loginData.ip = resData.Ip; - // loginData.machineIdentifier = resData.MachineIdentifier; - // loginData.sdkUid = resData.SdkUid; - // loginData.lastLoginTime = resData.LastLoginTime; + loginData.refreshToken = resData.refreshToken; + loginData.expire = resData.expire; + const playerData = DataManager.I.getDataById(DataId.Player); + playerData.name = resData.name; + + // const accountData = DataManager.I.getDataById(DataId.Account); // accountData.identifier = resData.Identifier; // accountData.identityType = resData.IdentityType; @@ -294,21 +295,19 @@ export class PreloadUI extends Component { this.loginFinish = true; - // this.reqPlayerData(); + // this.reqMyInfo(); }; } - // 请求玩家数据 - private async reqPlayerData() { + // 请求个人信息 + private async reqMyInfo() { const reqData = { - GameName: ConfigManager.tables.TbGlobalConfig.GameName, - IsAll: true, - DataFlagList: [], + }; console.log("玩家数据请求数据:", reqData); - let res = await PlayerDataService.I.reqQueryPlayerData(reqData); + let res = await PlayerDataService.I.reqMyInfo(reqData); console.log("玩家数据响应数据:", res); - if (res && res.code === ApiCode.OK) { + if (res && res.code === proto.cs.EnmRetCode.SUCCESS) { } } diff --git a/assets/Scripts/chat18x/data/AccountData.ts b/assets/Scripts/chat18x/data/AccountData.ts index 41b1dc1b..357673fc 100644 --- a/assets/Scripts/chat18x/data/AccountData.ts +++ b/assets/Scripts/chat18x/data/AccountData.ts @@ -13,7 +13,32 @@ export class AccountData extends BaseData { // 是否新手 private _isNewGuide = true; // 是否刚注册 - private _isNewRegist = true; + private _isNewRegist = true; + + public reset(): void { + this._identifier = ""; + this._identityType = 1; + this._uid = ""; + this._isNewGuide = true; + this._isNewRegist = true; + } + + public clear(): void { + this._identifier = ""; + this._identityType = 1; + this._uid = ""; + this._isNewGuide = true; + this._isNewRegist = true; + } + + public destroy(): void { + super.destroy(); + this._identifier = null; + this._identityType = null; + this._uid = null; + this._isNewGuide = null; + this._isNewRegist = null; + } /** 设置身份识别码 */ public set identifier(value: string) { @@ -64,29 +89,4 @@ export class AccountData extends BaseData { public get isNewRegist(): boolean { return this._isNewRegist; } - - public reset(): void { - this._identifier = ""; - this._identityType = 1; - this._uid = ""; - this._isNewGuide = true; - this._isNewRegist = true; - } - - public clear(): void { - this._identifier = ""; - this._identityType = 1; - this._uid = ""; - this._isNewGuide = true; - this._isNewRegist = true; - } - - public destroy(): void { - super.destroy(); - this._identifier = null; - this._identityType = null; - this._uid = null; - this._isNewGuide = null; - this._isNewRegist = null; - } } \ No newline at end of file diff --git a/assets/Scripts/chat18x/data/LoginData.ts b/assets/Scripts/chat18x/data/LoginData.ts index 13e17eec..7a1f2fa4 100644 --- a/assets/Scripts/chat18x/data/LoginData.ts +++ b/assets/Scripts/chat18x/data/LoginData.ts @@ -10,6 +10,8 @@ export class LoginData extends BaseData { private _token = ""; // refresh token private _refreshToken = ""; + // token 过期时间戳 + private _expire = 0; // 操作类型,1:登录界面;2:断线重连;3:其他 private _operateType = 1; // 公网IP @@ -19,7 +21,44 @@ export class LoginData extends BaseData { // sdk体系的UID private _sdkUid = ""; // 上次登陆时间 - private _lastLoginTime = ""; + private _lastLoginTime = ""; + + public reset(): void { + this._loginState = 0; + this._token = ""; + this._refreshToken = ""; + this._expire = 0; + this._operateType = 1; + this._ip = ""; + this._machineIdentifier = ""; + this._sdkUid = ""; + this._lastLoginTime = ""; + } + + public clear(): void { + this._loginState = 0; + this._token = ""; + this._refreshToken = ""; + this._expire = 0; + this._operateType = 1; + this._ip = ""; + this._machineIdentifier = ""; + this._sdkUid = ""; + this._lastLoginTime = ""; + } + + public destroy(): void { + super.destroy(); + this._loginState = null; + this._token = null; + this._refreshToken = null; + this._expire = null; + this._operateType = null; + this._ip = null; + this._machineIdentifier = null; + this._sdkUid = null; + this._lastLoginTime = null; + } /**是否已登录成功 */ public isLogin(): boolean { @@ -55,8 +94,18 @@ export class LoginData extends BaseData { /** 获取登录refresh token */ public get refreshToken(): string { return this._refreshToken; - } + } + /** 设置token 过期时间戳 */ + public set expire(value: number) { + this._expire = value; + } + + /** 获取token 过期时间戳 */ + public get expire(): number { + return this._expire; + } + /** 设置操作类型 */ public set operateType(value: number) { this._operateType = value; @@ -106,35 +155,4 @@ export class LoginData extends BaseData { public get lastLoginTime(): string { return this._lastLoginTime; } - - public reset(): void { - this._loginState = 0; - this._token = ""; - this._operateType = 1; - this._ip = ""; - this._machineIdentifier = ""; - this._sdkUid = ""; - this._lastLoginTime = ""; - } - - public clear(): void { - this._loginState = 0; - this._token = ""; - this._operateType = 1; - this._ip = ""; - this._machineIdentifier = ""; - this._sdkUid = ""; - this._lastLoginTime = ""; - } - - public destroy(): void { - super.destroy(); - this._loginState = null; - this._token = null; - this._operateType = null; - this._ip = null; - this._machineIdentifier = null; - this._sdkUid = null; - this._lastLoginTime = null; - } } \ No newline at end of file diff --git a/assets/Scripts/chat18x/data/PlayerData.ts b/assets/Scripts/chat18x/data/PlayerData.ts index be2e92f4..e8034af7 100644 --- a/assets/Scripts/chat18x/data/PlayerData.ts +++ b/assets/Scripts/chat18x/data/PlayerData.ts @@ -4,29 +4,59 @@ import { BaseData } from "./BaseData"; export class PlayerData extends BaseData { + // 用户名 private _name: string = ''; - private _score: number = 0; + // 钻石数 + private _diamond: number = 0; + // vip失效时间戳 + private _vipExpire: number = 0; public reset(): void { this._name = ''; - this._score = 0; + this._diamond = 0; + this._vipExpire = 0; } public clear(): void { this._name = ''; - this._score = 0; + this._diamond = 0; + this._vipExpire = 0; } public destroy(): void { super.destroy(); - // 这里可以做额外释放资源的操作 + this._name = null; + this._diamond = null; + this._vipExpire = null; } - public setName(name: string): void { - this._name = name; + /** 设置用户名 */ + public set name(value: string) { + this._name = value; } - public getName(): string { + /** 获取用户名 */ + public get name(): string { return this._name; } + + /** 设置钻石数 */ + public set diamond(value: number) { + this._diamond = value; + } + + /** 获取钻石数 */ + public get diamond(): number { + return this._diamond; + } + + /** 设置vip失效时间戳 */ + public set vipExpire(value: number) { + this._vipExpire = value; + } + + /** 获取vip失效时间戳 */ + public get vipExpire(): number { + return this._vipExpire; + } } \ No newline at end of file diff --git a/assets/Scripts/chat18x/network/services/PlayerDataService.ts b/assets/Scripts/chat18x/network/services/PlayerDataService.ts index dae6c6b7..1f61feea 100644 --- a/assets/Scripts/chat18x/network/services/PlayerDataService.ts +++ b/assets/Scripts/chat18x/network/services/PlayerDataService.ts @@ -11,25 +11,14 @@ export class PlayerDataService { } private constructor(private api = ApiClient.I) {} - // 拉取玩家数据 - public async reqQueryPlayerData(req: proto.ProtoMsg.IQueryPlayerDataReq): Promise> { - let epData: Endpoint = { - path: "playerdata/query_player_data", + // 获取个人信息 + public async reqMyInfo(req: proto.cs.ICSMyInfoReq): Promise> { + let epData: Endpoint = { + path: "api/acc/info", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } - - // 保存玩家数据 - public async reqSavePlayerData(req: proto.ProtoMsg.ISavePlayerDataReq): Promise> { - let epData: Endpoint = { - path: "playerdata/save_player_data", - method: "POST", - codec: "json", - needsAuth: true - }; - return this.api.call(epData, req); - } } diff --git a/assets/Scripts/proto/proto.pb.d.ts b/assets/Scripts/proto/proto.pb.d.ts index de80b798..6c3a2688 100644 --- a/assets/Scripts/proto/proto.pb.d.ts +++ b/assets/Scripts/proto/proto.pb.d.ts @@ -145,6 +145,115 @@ toJSON(): { [k: string]: any }; static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a GirlPhoto. */ + interface IGirlPhoto { + + /** GirlPhoto pic */ + pic?: (string|null); + + /** GirlPhoto isRelease */ + isRelease?: (boolean|null); + + /** GirlPhoto price */ + price?: (number|null); + } + + /** Represents a GirlPhoto. */ + class GirlPhoto implements IGirlPhoto { + + /** + * Constructs a new GirlPhoto. + * @param [properties] Properties to set + */ + constructor(properties?: cs.IGirlPhoto); + + /** GirlPhoto pic. */ +pic: string; + + /** GirlPhoto isRelease. */ +isRelease: boolean; + + /** GirlPhoto price. */ +price: number; + + /** + * Creates a new GirlPhoto instance using the specified properties. + * @param [properties] Properties to set + * @returns GirlPhoto instance + */ +static create(properties?: cs.IGirlPhoto): cs.GirlPhoto; + + /** + * Encodes the specified GirlPhoto message. Does not implicitly {@link cs.GirlPhoto.verify|verify} messages. + * @param message GirlPhoto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.IGirlPhoto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GirlPhoto message, length delimited. Does not implicitly {@link cs.GirlPhoto.verify|verify} messages. + * @param message GirlPhoto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.IGirlPhoto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GirlPhoto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GirlPhoto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.GirlPhoto; + + /** + * Decodes a GirlPhoto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GirlPhoto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.GirlPhoto; + + /** + * Verifies a GirlPhoto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ +static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GirlPhoto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GirlPhoto + */ +static fromObject(object: { [k: string]: any }): cs.GirlPhoto; + + /** + * Creates a plain object from a GirlPhoto message. Also converts values to other types if specified. + * @param message GirlPhoto + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.GirlPhoto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GirlPhoto to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GirlPhoto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GirlDetail. */ interface IGirlDetail { @@ -154,8 +263,14 @@ static getTypeUrl(typeUrlPrefix?: string): string; /** GirlDetail desc */ desc?: (string|null); - /** GirlDetail pics */ - pics?: (string[]|null); + /** GirlDetail photos */ + photos?: (cs.IGirlPhoto[]|null); + + /** GirlDetail isRelease */ + isRelease?: (boolean|null); + + /** GirlDetail chatCount */ + chatCount?: (number|null); } /** Represents a GirlDetail. */ @@ -173,8 +288,14 @@ brief?: (cs.IGirlBrief|null); /** GirlDetail desc. */ desc: string; - /** GirlDetail pics. */ -pics: string[]; + /** GirlDetail photos. */ +photos: cs.IGirlPhoto[]; + + /** GirlDetail isRelease. */ +isRelease: boolean; + + /** GirlDetail chatCount. */ +chatCount: number; /** * Creates a new GirlDetail instance using the specified properties. @@ -548,8 +669,8 @@ static getTypeUrl(typeUrlPrefix?: string): string; /** HallTheme category */ category?: (number|null); - /** HallTheme isLock */ - isLock?: (boolean|null); + /** HallTheme isRelease */ + isRelease?: (boolean|null); /** HallTheme path */ path?: (string|null); @@ -576,8 +697,8 @@ name: string; /** HallTheme category. */ category: number; - /** HallTheme isLock. */ -isLock: boolean; + /** HallTheme isRelease. */ +isRelease: boolean; /** HallTheme path. */ path: string; @@ -761,7 +882,7 @@ static getTypeUrl(typeUrlPrefix?: string): string; interface ICSGetGirlListReq { /** CSGetGirlListReq category */ - category?: (string|null); + category?: (number|null); /** CSGetGirlListReq page */ page?: (number|null); @@ -780,7 +901,7 @@ static getTypeUrl(typeUrlPrefix?: string): string; constructor(properties?: cs.ICSGetGirlListReq); /** CSGetGirlListReq category. */ -category: string; +category: number; /** CSGetGirlListReq page. */ page: number; @@ -1157,230 +1278,121 @@ toJSON(): { [k: string]: any }; static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Diamond. */ - interface IDiamond { + /** Properties of a Good. */ + interface IGood { - /** Diamond id */ + /** Good id */ id?: (number|null); - /** Diamond name */ + /** Good name */ name?: (string|null); - /** Diamond price */ - price?: (string|null); - - /** Diamond diamonCount */ - diamonCount?: (number|null); - } - - /** Represents a Diamond. */ - class Diamond implements IDiamond { - - /** - * Constructs a new Diamond. - * @param [properties] Properties to set - */ - constructor(properties?: cs.IDiamond); - - /** Diamond id. */ -id: number; - - /** Diamond name. */ -name: string; - - /** Diamond price. */ -price: string; - - /** Diamond diamonCount. */ -diamonCount: number; - - /** - * Creates a new Diamond instance using the specified properties. - * @param [properties] Properties to set - * @returns Diamond instance - */ -static create(properties?: cs.IDiamond): cs.Diamond; - - /** - * Encodes the specified Diamond message. Does not implicitly {@link cs.Diamond.verify|verify} messages. - * @param message Diamond message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ -static encode(message: cs.IDiamond, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Diamond message, length delimited. Does not implicitly {@link cs.Diamond.verify|verify} messages. - * @param message Diamond message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ -static encodeDelimited(message: cs.IDiamond, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Diamond message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Diamond - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ -static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.Diamond; - - /** - * Decodes a Diamond message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Diamond - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ -static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.Diamond; - - /** - * Verifies a Diamond message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ -static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Diamond message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Diamond - */ -static fromObject(object: { [k: string]: any }): cs.Diamond; - - /** - * Creates a plain object from a Diamond message. Also converts values to other types if specified. - * @param message Diamond - * @param [options] Conversion options - * @returns Plain object - */ -static toObject(message: cs.Diamond, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Diamond to JSON. - * @returns JSON object - */ -toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Diamond - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ -static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Vip. */ - interface IVip { - - /** Vip id */ - id?: (number|null); - - /** Vip name */ - name?: (string|null); - - /** Vip desc */ + /** Good desc */ desc?: (string|null); - /** Vip price */ + /** Good price */ price?: (string|null); + + /** Good count */ + count?: (number|null); } - /** Represents a Vip. */ - class Vip implements IVip { + /** Represents a Good. */ + class Good implements IGood { /** - * Constructs a new Vip. + * Constructs a new Good. * @param [properties] Properties to set */ - constructor(properties?: cs.IVip); + constructor(properties?: cs.IGood); - /** Vip id. */ + /** Good id. */ id: number; - /** Vip name. */ + /** Good name. */ name: string; - /** Vip desc. */ + /** Good desc. */ desc: string; - /** Vip price. */ + /** Good price. */ price: string; + /** Good count. */ +count: number; + /** - * Creates a new Vip instance using the specified properties. + * Creates a new Good instance using the specified properties. * @param [properties] Properties to set - * @returns Vip instance + * @returns Good instance */ -static create(properties?: cs.IVip): cs.Vip; +static create(properties?: cs.IGood): cs.Good; /** - * Encodes the specified Vip message. Does not implicitly {@link cs.Vip.verify|verify} messages. - * @param message Vip message or plain object to encode + * Encodes the specified Good message. Does not implicitly {@link cs.Good.verify|verify} messages. + * @param message Good message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ -static encode(message: cs.IVip, writer?: $protobuf.Writer): $protobuf.Writer; +static encode(message: cs.IGood, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Vip message, length delimited. Does not implicitly {@link cs.Vip.verify|verify} messages. - * @param message Vip message or plain object to encode + * Encodes the specified Good message, length delimited. Does not implicitly {@link cs.Good.verify|verify} messages. + * @param message Good message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ -static encodeDelimited(message: cs.IVip, writer?: $protobuf.Writer): $protobuf.Writer; +static encodeDelimited(message: cs.IGood, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Vip message from the specified reader or buffer. + * Decodes a Good message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Vip + * @returns Good * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ -static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.Vip; +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.Good; /** - * Decodes a Vip message from the specified reader or buffer, length delimited. + * Decodes a Good message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Vip + * @returns Good * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ -static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.Vip; +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.Good; /** - * Verifies a Vip message. + * Verifies a Good message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Vip message from a plain object. Also converts values to their respective internal types. + * Creates a Good message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Vip + * @returns Good */ -static fromObject(object: { [k: string]: any }): cs.Vip; +static fromObject(object: { [k: string]: any }): cs.Good; /** - * Creates a plain object from a Vip message. Also converts values to other types if specified. - * @param message Vip + * Creates a plain object from a Good message. Also converts values to other types if specified. + * @param message Good * @param [options] Conversion options * @returns Plain object */ -static toObject(message: cs.Vip, options?: $protobuf.IConversionOptions): { [k: string]: any }; +static toObject(message: cs.Good, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Vip to JSON. + * Converts this Good to JSON. * @returns JSON object */ toJSON(): { [k: string]: any }; /** - * Gets the default type url for Vip + * Gets the default type url for Good * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -1481,11 +1493,8 @@ static getTypeUrl(typeUrlPrefix?: string): string; /** Properties of a CSGetShopRes. */ interface ICSGetShopRes { - /** CSGetShopRes diamonds */ - diamonds?: (cs.IDiamond[]|null); - - /** CSGetShopRes vips */ - vips?: (cs.IVip[]|null); + /** CSGetShopRes Goods */ + Goods?: (cs.IGood[]|null); } /** Represents a CSGetShopRes. */ @@ -1497,11 +1506,8 @@ static getTypeUrl(typeUrlPrefix?: string): string; */ constructor(properties?: cs.ICSGetShopRes); - /** CSGetShopRes diamonds. */ -diamonds: cs.IDiamond[]; - - /** CSGetShopRes vips. */ -vips: cs.IVip[]; + /** CSGetShopRes Goods. */ +Goods: cs.IGood[]; /** * Creates a new CSGetShopRes instance using the specified properties. @@ -1877,6 +1883,9 @@ static getTypeUrl(typeUrlPrefix?: string): string; /** CSCreateOrderRes payUrl */ payUrl?: (string|null); + + /** CSCreateOrderRes orderId */ + orderId?: (string|null); } /** Represents a CSCreateOrderRes. */ @@ -1891,6 +1900,9 @@ static getTypeUrl(typeUrlPrefix?: string): string; /** CSCreateOrderRes payUrl. */ payUrl: string; + /** CSCreateOrderRes orderId. */ +orderId: string; + /** * Creates a new CSCreateOrderRes instance using the specified properties. * @param [properties] Properties to set @@ -1969,6 +1981,218 @@ toJSON(): { [k: string]: any }; static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a CSQueryOrderReq. */ + interface ICSQueryOrderReq { + + /** CSQueryOrderReq orderId */ + orderId?: (string|null); + } + + /** Represents a CSQueryOrderReq. */ + class CSQueryOrderReq implements ICSQueryOrderReq { + + /** + * Constructs a new CSQueryOrderReq. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSQueryOrderReq); + + /** CSQueryOrderReq orderId. */ +orderId: string; + + /** + * Creates a new CSQueryOrderReq instance using the specified properties. + * @param [properties] Properties to set + * @returns CSQueryOrderReq instance + */ +static create(properties?: cs.ICSQueryOrderReq): cs.CSQueryOrderReq; + + /** + * Encodes the specified CSQueryOrderReq message. Does not implicitly {@link cs.CSQueryOrderReq.verify|verify} messages. + * @param message CSQueryOrderReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSQueryOrderReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSQueryOrderReq message, length delimited. Does not implicitly {@link cs.CSQueryOrderReq.verify|verify} messages. + * @param message CSQueryOrderReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSQueryOrderReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSQueryOrderReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSQueryOrderReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.CSQueryOrderReq; + + /** + * Decodes a CSQueryOrderReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSQueryOrderReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.CSQueryOrderReq; + + /** + * Verifies a CSQueryOrderReq message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ +static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CSQueryOrderReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSQueryOrderReq + */ +static fromObject(object: { [k: string]: any }): cs.CSQueryOrderReq; + + /** + * Creates a plain object from a CSQueryOrderReq message. Also converts values to other types if specified. + * @param message CSQueryOrderReq + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSQueryOrderReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSQueryOrderReq to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSQueryOrderReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSQueryOrderRes. */ + interface ICSQueryOrderRes { + + /** CSQueryOrderRes status */ + status?: (number|null); + + /** CSQueryOrderRes retCode */ + retCode?: (number|null); + + /** CSQueryOrderRes diamond */ + diamond?: (number|Long|null); + + /** CSQueryOrderRes vipExpire */ + vipExpire?: (number|Long|null); + } + + /** Represents a CSQueryOrderRes. */ + class CSQueryOrderRes implements ICSQueryOrderRes { + + /** + * Constructs a new CSQueryOrderRes. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSQueryOrderRes); + + /** CSQueryOrderRes status. */ +status: number; + + /** CSQueryOrderRes retCode. */ +retCode: number; + + /** CSQueryOrderRes diamond. */ +diamond: (number|Long); + + /** CSQueryOrderRes vipExpire. */ +vipExpire: (number|Long); + + /** + * Creates a new CSQueryOrderRes instance using the specified properties. + * @param [properties] Properties to set + * @returns CSQueryOrderRes instance + */ +static create(properties?: cs.ICSQueryOrderRes): cs.CSQueryOrderRes; + + /** + * Encodes the specified CSQueryOrderRes message. Does not implicitly {@link cs.CSQueryOrderRes.verify|verify} messages. + * @param message CSQueryOrderRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSQueryOrderRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSQueryOrderRes message, length delimited. Does not implicitly {@link cs.CSQueryOrderRes.verify|verify} messages. + * @param message CSQueryOrderRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSQueryOrderRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSQueryOrderRes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSQueryOrderRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.CSQueryOrderRes; + + /** + * Decodes a CSQueryOrderRes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSQueryOrderRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.CSQueryOrderRes; + + /** + * Verifies a CSQueryOrderRes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ +static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CSQueryOrderRes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSQueryOrderRes + */ +static fromObject(object: { [k: string]: any }): cs.CSQueryOrderRes; + + /** + * Creates a plain object from a CSQueryOrderRes message. Also converts values to other types if specified. + * @param message CSQueryOrderRes + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSQueryOrderRes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSQueryOrderRes to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSQueryOrderRes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CSLoginReq. */ interface ICSLoginReq { diff --git a/assets/Scripts/proto/proto.pb.js b/assets/Scripts/proto/proto.pb.js index 45e60cab..797283f9 100644 --- a/assets/Scripts/proto/proto.pb.js +++ b/assets/Scripts/proto/proto.pb.js @@ -399,6 +399,258 @@ $root.cs = (function() { return GirlBrief; })(); + cs.GirlPhoto = (function() { + + /** + * Properties of a GirlPhoto. + * @memberof cs + * @interface IGirlPhoto + * @property {string|null} [pic] GirlPhoto pic + * @property {boolean|null} [isRelease] GirlPhoto isRelease + * @property {number|null} [price] GirlPhoto price + */ + + /** + * Constructs a new GirlPhoto. + * @memberof cs + * @classdesc Represents a GirlPhoto. + * @implements IGirlPhoto + * @constructor + * @param {cs.IGirlPhoto=} [properties] Properties to set + */ + function GirlPhoto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GirlPhoto pic. + * @member {string} pic + * @memberof cs.GirlPhoto + * @instance + */ + GirlPhoto.prototype.pic = ""; + + /** + * GirlPhoto isRelease. + * @member {boolean} isRelease + * @memberof cs.GirlPhoto + * @instance + */ + GirlPhoto.prototype.isRelease = false; + + /** + * GirlPhoto price. + * @member {number} price + * @memberof cs.GirlPhoto + * @instance + */ + GirlPhoto.prototype.price = 0; + + /** + * Creates a new GirlPhoto instance using the specified properties. + * @function create + * @memberof cs.GirlPhoto + * @static + * @param {cs.IGirlPhoto=} [properties] Properties to set + * @returns {cs.GirlPhoto} GirlPhoto instance + */ + GirlPhoto.create = function create(properties) { + return new GirlPhoto(properties); + }; + + /** + * Encodes the specified GirlPhoto message. Does not implicitly {@link cs.GirlPhoto.verify|verify} messages. + * @function encode + * @memberof cs.GirlPhoto + * @static + * @param {cs.IGirlPhoto} message GirlPhoto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GirlPhoto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pic != null && Object.hasOwnProperty.call(message, "pic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pic); + if (message.isRelease != null && Object.hasOwnProperty.call(message, "isRelease")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isRelease); + if (message.price != null && Object.hasOwnProperty.call(message, "price")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.price); + return writer; + }; + + /** + * Encodes the specified GirlPhoto message, length delimited. Does not implicitly {@link cs.GirlPhoto.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.GirlPhoto + * @static + * @param {cs.IGirlPhoto} message GirlPhoto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GirlPhoto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GirlPhoto message from the specified reader or buffer. + * @function decode + * @memberof cs.GirlPhoto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.GirlPhoto} GirlPhoto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GirlPhoto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.GirlPhoto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.pic = reader.string(); + break; + } + case 2: { + message.isRelease = reader.bool(); + break; + } + case 3: { + message.price = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GirlPhoto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.GirlPhoto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.GirlPhoto} GirlPhoto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GirlPhoto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GirlPhoto message. + * @function verify + * @memberof cs.GirlPhoto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GirlPhoto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pic != null && message.hasOwnProperty("pic")) + if (!$util.isString(message.pic)) + return "pic: string expected"; + if (message.isRelease != null && message.hasOwnProperty("isRelease")) + if (typeof message.isRelease !== "boolean") + return "isRelease: boolean expected"; + if (message.price != null && message.hasOwnProperty("price")) + if (!$util.isInteger(message.price)) + return "price: integer expected"; + return null; + }; + + /** + * Creates a GirlPhoto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.GirlPhoto + * @static + * @param {Object.} object Plain object + * @returns {cs.GirlPhoto} GirlPhoto + */ + GirlPhoto.fromObject = function fromObject(object) { + if (object instanceof $root.cs.GirlPhoto) + return object; + var message = new $root.cs.GirlPhoto(); + if (object.pic != null) + message.pic = String(object.pic); + if (object.isRelease != null) + message.isRelease = Boolean(object.isRelease); + if (object.price != null) + message.price = object.price | 0; + return message; + }; + + /** + * Creates a plain object from a GirlPhoto message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.GirlPhoto + * @static + * @param {cs.GirlPhoto} message GirlPhoto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GirlPhoto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pic = ""; + object.isRelease = false; + object.price = 0; + } + if (message.pic != null && message.hasOwnProperty("pic")) + object.pic = message.pic; + if (message.isRelease != null && message.hasOwnProperty("isRelease")) + object.isRelease = message.isRelease; + if (message.price != null && message.hasOwnProperty("price")) + object.price = message.price; + return object; + }; + + /** + * Converts this GirlPhoto to JSON. + * @function toJSON + * @memberof cs.GirlPhoto + * @instance + * @returns {Object.} JSON object + */ + GirlPhoto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GirlPhoto + * @function getTypeUrl + * @memberof cs.GirlPhoto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GirlPhoto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.GirlPhoto"; + }; + + return GirlPhoto; + })(); + cs.GirlDetail = (function() { /** @@ -407,7 +659,9 @@ $root.cs = (function() { * @interface IGirlDetail * @property {cs.IGirlBrief|null} [brief] GirlDetail brief * @property {string|null} [desc] GirlDetail desc - * @property {Array.|null} [pics] GirlDetail pics + * @property {Array.|null} [photos] GirlDetail photos + * @property {boolean|null} [isRelease] GirlDetail isRelease + * @property {number|null} [chatCount] GirlDetail chatCount */ /** @@ -419,7 +673,7 @@ $root.cs = (function() { * @param {cs.IGirlDetail=} [properties] Properties to set */ function GirlDetail(properties) { - this.pics = []; + this.photos = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -443,12 +697,28 @@ $root.cs = (function() { GirlDetail.prototype.desc = ""; /** - * GirlDetail pics. - * @member {Array.} pics + * GirlDetail photos. + * @member {Array.} photos * @memberof cs.GirlDetail * @instance */ - GirlDetail.prototype.pics = $util.emptyArray; + GirlDetail.prototype.photos = $util.emptyArray; + + /** + * GirlDetail isRelease. + * @member {boolean} isRelease + * @memberof cs.GirlDetail + * @instance + */ + GirlDetail.prototype.isRelease = false; + + /** + * GirlDetail chatCount. + * @member {number} chatCount + * @memberof cs.GirlDetail + * @instance + */ + GirlDetail.prototype.chatCount = 0; /** * Creates a new GirlDetail instance using the specified properties. @@ -478,9 +748,13 @@ $root.cs = (function() { $root.cs.GirlBrief.encode(message.brief, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.desc); - if (message.pics != null && message.pics.length) - for (var i = 0; i < message.pics.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pics[i]); + if (message.photos != null && message.photos.length) + for (var i = 0; i < message.photos.length; ++i) + $root.cs.GirlPhoto.encode(message.photos[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.isRelease != null && Object.hasOwnProperty.call(message, "isRelease")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isRelease); + if (message.chatCount != null && Object.hasOwnProperty.call(message, "chatCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.chatCount); return writer; }; @@ -526,9 +800,17 @@ $root.cs = (function() { break; } case 3: { - if (!(message.pics && message.pics.length)) - message.pics = []; - message.pics.push(reader.string()); + if (!(message.photos && message.photos.length)) + message.photos = []; + message.photos.push($root.cs.GirlPhoto.decode(reader, reader.uint32())); + break; + } + case 4: { + message.isRelease = reader.bool(); + break; + } + case 5: { + message.chatCount = reader.int32(); break; } default: @@ -574,13 +856,21 @@ $root.cs = (function() { if (message.desc != null && message.hasOwnProperty("desc")) if (!$util.isString(message.desc)) return "desc: string expected"; - if (message.pics != null && message.hasOwnProperty("pics")) { - if (!Array.isArray(message.pics)) - return "pics: array expected"; - for (var i = 0; i < message.pics.length; ++i) - if (!$util.isString(message.pics[i])) - return "pics: string[] expected"; + if (message.photos != null && message.hasOwnProperty("photos")) { + if (!Array.isArray(message.photos)) + return "photos: array expected"; + for (var i = 0; i < message.photos.length; ++i) { + var error = $root.cs.GirlPhoto.verify(message.photos[i]); + if (error) + return "photos." + error; + } } + if (message.isRelease != null && message.hasOwnProperty("isRelease")) + if (typeof message.isRelease !== "boolean") + return "isRelease: boolean expected"; + if (message.chatCount != null && message.hasOwnProperty("chatCount")) + if (!$util.isInteger(message.chatCount)) + return "chatCount: integer expected"; return null; }; @@ -603,13 +893,20 @@ $root.cs = (function() { } if (object.desc != null) message.desc = String(object.desc); - if (object.pics) { - if (!Array.isArray(object.pics)) - throw TypeError(".cs.GirlDetail.pics: array expected"); - message.pics = []; - for (var i = 0; i < object.pics.length; ++i) - message.pics[i] = String(object.pics[i]); + if (object.photos) { + if (!Array.isArray(object.photos)) + throw TypeError(".cs.GirlDetail.photos: array expected"); + message.photos = []; + for (var i = 0; i < object.photos.length; ++i) { + if (typeof object.photos[i] !== "object") + throw TypeError(".cs.GirlDetail.photos: object expected"); + message.photos[i] = $root.cs.GirlPhoto.fromObject(object.photos[i]); + } } + if (object.isRelease != null) + message.isRelease = Boolean(object.isRelease); + if (object.chatCount != null) + message.chatCount = object.chatCount | 0; return message; }; @@ -627,20 +924,26 @@ $root.cs = (function() { options = {}; var object = {}; if (options.arrays || options.defaults) - object.pics = []; + object.photos = []; if (options.defaults) { object.brief = null; object.desc = ""; + object.isRelease = false; + object.chatCount = 0; } if (message.brief != null && message.hasOwnProperty("brief")) object.brief = $root.cs.GirlBrief.toObject(message.brief, options); if (message.desc != null && message.hasOwnProperty("desc")) object.desc = message.desc; - if (message.pics && message.pics.length) { - object.pics = []; - for (var j = 0; j < message.pics.length; ++j) - object.pics[j] = message.pics[j]; + if (message.photos && message.photos.length) { + object.photos = []; + for (var j = 0; j < message.photos.length; ++j) + object.photos[j] = $root.cs.GirlPhoto.toObject(message.photos[j], options); } + if (message.isRelease != null && message.hasOwnProperty("isRelease")) + object.isRelease = message.isRelease; + if (message.chatCount != null && message.hasOwnProperty("chatCount")) + object.chatCount = message.chatCount; return object; }; @@ -1263,7 +1566,7 @@ $root.cs = (function() { * @property {string|null} [key] HallTheme key * @property {string|null} [name] HallTheme name * @property {number|null} [category] HallTheme category - * @property {boolean|null} [isLock] HallTheme isLock + * @property {boolean|null} [isRelease] HallTheme isRelease * @property {string|null} [path] HallTheme path */ @@ -1315,12 +1618,12 @@ $root.cs = (function() { HallTheme.prototype.category = 0; /** - * HallTheme isLock. - * @member {boolean} isLock + * HallTheme isRelease. + * @member {boolean} isRelease * @memberof cs.HallTheme * @instance */ - HallTheme.prototype.isLock = false; + HallTheme.prototype.isRelease = false; /** * HallTheme path. @@ -1362,8 +1665,8 @@ $root.cs = (function() { writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); if (message.category != null && Object.hasOwnProperty.call(message, "category")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.category); - if (message.isLock != null && Object.hasOwnProperty.call(message, "isLock")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isLock); + if (message.isRelease != null && Object.hasOwnProperty.call(message, "isRelease")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isRelease); if (message.path != null && Object.hasOwnProperty.call(message, "path")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.path); return writer; @@ -1419,7 +1722,7 @@ $root.cs = (function() { break; } case 5: { - message.isLock = reader.bool(); + message.isRelease = reader.bool(); break; } case 6: { @@ -1473,9 +1776,9 @@ $root.cs = (function() { if (message.category != null && message.hasOwnProperty("category")) if (!$util.isInteger(message.category)) return "category: integer expected"; - if (message.isLock != null && message.hasOwnProperty("isLock")) - if (typeof message.isLock !== "boolean") - return "isLock: boolean expected"; + if (message.isRelease != null && message.hasOwnProperty("isRelease")) + if (typeof message.isRelease !== "boolean") + return "isRelease: boolean expected"; if (message.path != null && message.hasOwnProperty("path")) if (!$util.isString(message.path)) return "path: string expected"; @@ -1502,8 +1805,8 @@ $root.cs = (function() { message.name = String(object.name); if (object.category != null) message.category = object.category | 0; - if (object.isLock != null) - message.isLock = Boolean(object.isLock); + if (object.isRelease != null) + message.isRelease = Boolean(object.isRelease); if (object.path != null) message.path = String(object.path); return message; @@ -1527,7 +1830,7 @@ $root.cs = (function() { object.key = ""; object.name = ""; object.category = 0; - object.isLock = false; + object.isRelease = false; object.path = ""; } if (message.id != null && message.hasOwnProperty("id")) @@ -1538,8 +1841,8 @@ $root.cs = (function() { object.name = message.name; if (message.category != null && message.hasOwnProperty("category")) object.category = message.category; - if (message.isLock != null && message.hasOwnProperty("isLock")) - object.isLock = message.isLock; + if (message.isRelease != null && message.hasOwnProperty("isRelease")) + object.isRelease = message.isRelease; if (message.path != null && message.hasOwnProperty("path")) object.path = message.path; return object; @@ -1633,7 +1936,7 @@ $root.cs = (function() { writer = $Writer.create(); if (message.themes != null && message.themes.length) for (var i = 0; i < message.themes.length; ++i) - $root.cs.HallTheme.encode(message.themes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.cs.HallTheme.encode(message.themes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -1670,7 +1973,7 @@ $root.cs = (function() { if (tag === error) break; switch (tag >>> 3) { - case 2: { + case 1: { if (!(message.themes && message.themes.length)) message.themes = []; message.themes.push($root.cs.HallTheme.decode(reader, reader.uint32())); @@ -1806,7 +2109,7 @@ $root.cs = (function() { * Properties of a CSGetGirlListReq. * @memberof cs * @interface ICSGetGirlListReq - * @property {string|null} [category] CSGetGirlListReq category + * @property {number|null} [category] CSGetGirlListReq category * @property {number|null} [page] CSGetGirlListReq page * @property {number|null} [limit] CSGetGirlListReq limit */ @@ -1828,11 +2131,11 @@ $root.cs = (function() { /** * CSGetGirlListReq category. - * @member {string} category + * @member {number} category * @memberof cs.CSGetGirlListReq * @instance */ - CSGetGirlListReq.prototype.category = ""; + CSGetGirlListReq.prototype.category = 0; /** * CSGetGirlListReq page. @@ -1875,7 +2178,7 @@ $root.cs = (function() { if (!writer) writer = $Writer.create(); if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.category); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); if (message.page != null && Object.hasOwnProperty.call(message, "page")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.page); if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) @@ -1917,7 +2220,7 @@ $root.cs = (function() { break; switch (tag >>> 3) { case 1: { - message.category = reader.string(); + message.category = reader.int32(); break; } case 2: { @@ -1964,8 +2267,8 @@ $root.cs = (function() { if (typeof message !== "object" || message === null) return "object expected"; if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; + if (!$util.isInteger(message.category)) + return "category: integer expected"; if (message.page != null && message.hasOwnProperty("page")) if (!$util.isInteger(message.page)) return "page: integer expected"; @@ -1988,7 +2291,7 @@ $root.cs = (function() { return object; var message = new $root.cs.CSGetGirlListReq(); if (object.category != null) - message.category = String(object.category); + message.category = object.category | 0; if (object.page != null) message.page = object.page | 0; if (object.limit != null) @@ -2010,7 +2313,7 @@ $root.cs = (function() { options = {}; var object = {}; if (options.defaults) { - object.category = ""; + object.category = 0; object.page = 0; object.limit = 0; } @@ -2693,27 +2996,28 @@ $root.cs = (function() { return CSGetGirlDetailRes; })(); - cs.Diamond = (function() { + cs.Good = (function() { /** - * Properties of a Diamond. + * Properties of a Good. * @memberof cs - * @interface IDiamond - * @property {number|null} [id] Diamond id - * @property {string|null} [name] Diamond name - * @property {string|null} [price] Diamond price - * @property {number|null} [diamonCount] Diamond diamonCount + * @interface IGood + * @property {number|null} [id] Good id + * @property {string|null} [name] Good name + * @property {string|null} [desc] Good desc + * @property {string|null} [price] Good price + * @property {number|null} [count] Good count */ /** - * Constructs a new Diamond. + * Constructs a new Good. * @memberof cs - * @classdesc Represents a Diamond. - * @implements IDiamond + * @classdesc Represents a Good. + * @implements IGood * @constructor - * @param {cs.IDiamond=} [properties] Properties to set + * @param {cs.IGood=} [properties] Properties to set */ - function Diamond(properties) { + function Good(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2721,334 +3025,67 @@ $root.cs = (function() { } /** - * Diamond id. + * Good id. * @member {number} id - * @memberof cs.Diamond + * @memberof cs.Good * @instance */ - Diamond.prototype.id = 0; + Good.prototype.id = 0; /** - * Diamond name. + * Good name. * @member {string} name - * @memberof cs.Diamond + * @memberof cs.Good * @instance */ - Diamond.prototype.name = ""; + Good.prototype.name = ""; /** - * Diamond price. - * @member {string} price - * @memberof cs.Diamond - * @instance - */ - Diamond.prototype.price = ""; - - /** - * Diamond diamonCount. - * @member {number} diamonCount - * @memberof cs.Diamond - * @instance - */ - Diamond.prototype.diamonCount = 0; - - /** - * Creates a new Diamond instance using the specified properties. - * @function create - * @memberof cs.Diamond - * @static - * @param {cs.IDiamond=} [properties] Properties to set - * @returns {cs.Diamond} Diamond instance - */ - Diamond.create = function create(properties) { - return new Diamond(properties); - }; - - /** - * Encodes the specified Diamond message. Does not implicitly {@link cs.Diamond.verify|verify} messages. - * @function encode - * @memberof cs.Diamond - * @static - * @param {cs.IDiamond} message Diamond message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Diamond.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.diamonCount != null && Object.hasOwnProperty.call(message, "diamonCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.diamonCount); - if (message.price != null && Object.hasOwnProperty.call(message, "price")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.price); - return writer; - }; - - /** - * Encodes the specified Diamond message, length delimited. Does not implicitly {@link cs.Diamond.verify|verify} messages. - * @function encodeDelimited - * @memberof cs.Diamond - * @static - * @param {cs.IDiamond} message Diamond message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Diamond.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Diamond message from the specified reader or buffer. - * @function decode - * @memberof cs.Diamond - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cs.Diamond} Diamond - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Diamond.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.Diamond(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.id = reader.int32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 4: { - message.price = reader.string(); - break; - } - case 3: { - message.diamonCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Diamond message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cs.Diamond - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cs.Diamond} Diamond - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Diamond.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Diamond message. - * @function verify - * @memberof cs.Diamond - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Diamond.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id)) - return "id: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.price != null && message.hasOwnProperty("price")) - if (!$util.isString(message.price)) - return "price: string expected"; - if (message.diamonCount != null && message.hasOwnProperty("diamonCount")) - if (!$util.isInteger(message.diamonCount)) - return "diamonCount: integer expected"; - return null; - }; - - /** - * Creates a Diamond message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cs.Diamond - * @static - * @param {Object.} object Plain object - * @returns {cs.Diamond} Diamond - */ - Diamond.fromObject = function fromObject(object) { - if (object instanceof $root.cs.Diamond) - return object; - var message = new $root.cs.Diamond(); - if (object.id != null) - message.id = object.id | 0; - if (object.name != null) - message.name = String(object.name); - if (object.price != null) - message.price = String(object.price); - if (object.diamonCount != null) - message.diamonCount = object.diamonCount | 0; - return message; - }; - - /** - * Creates a plain object from a Diamond message. Also converts values to other types if specified. - * @function toObject - * @memberof cs.Diamond - * @static - * @param {cs.Diamond} message Diamond - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Diamond.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = 0; - object.name = ""; - object.diamonCount = 0; - object.price = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.diamonCount != null && message.hasOwnProperty("diamonCount")) - object.diamonCount = message.diamonCount; - if (message.price != null && message.hasOwnProperty("price")) - object.price = message.price; - return object; - }; - - /** - * Converts this Diamond to JSON. - * @function toJSON - * @memberof cs.Diamond - * @instance - * @returns {Object.} JSON object - */ - Diamond.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Diamond - * @function getTypeUrl - * @memberof cs.Diamond - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Diamond.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/cs.Diamond"; - }; - - return Diamond; - })(); - - cs.Vip = (function() { - - /** - * Properties of a Vip. - * @memberof cs - * @interface IVip - * @property {number|null} [id] Vip id - * @property {string|null} [name] Vip name - * @property {string|null} [desc] Vip desc - * @property {string|null} [price] Vip price - */ - - /** - * Constructs a new Vip. - * @memberof cs - * @classdesc Represents a Vip. - * @implements IVip - * @constructor - * @param {cs.IVip=} [properties] Properties to set - */ - function Vip(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Vip id. - * @member {number} id - * @memberof cs.Vip - * @instance - */ - Vip.prototype.id = 0; - - /** - * Vip name. - * @member {string} name - * @memberof cs.Vip - * @instance - */ - Vip.prototype.name = ""; - - /** - * Vip desc. + * Good desc. * @member {string} desc - * @memberof cs.Vip + * @memberof cs.Good * @instance */ - Vip.prototype.desc = ""; + Good.prototype.desc = ""; /** - * Vip price. + * Good price. * @member {string} price - * @memberof cs.Vip + * @memberof cs.Good * @instance */ - Vip.prototype.price = ""; + Good.prototype.price = ""; /** - * Creates a new Vip instance using the specified properties. - * @function create - * @memberof cs.Vip - * @static - * @param {cs.IVip=} [properties] Properties to set - * @returns {cs.Vip} Vip instance + * Good count. + * @member {number} count + * @memberof cs.Good + * @instance */ - Vip.create = function create(properties) { - return new Vip(properties); + Good.prototype.count = 0; + + /** + * Creates a new Good instance using the specified properties. + * @function create + * @memberof cs.Good + * @static + * @param {cs.IGood=} [properties] Properties to set + * @returns {cs.Good} Good instance + */ + Good.create = function create(properties) { + return new Good(properties); }; /** - * Encodes the specified Vip message. Does not implicitly {@link cs.Vip.verify|verify} messages. + * Encodes the specified Good message. Does not implicitly {@link cs.Good.verify|verify} messages. * @function encode - * @memberof cs.Vip + * @memberof cs.Good * @static - * @param {cs.IVip} message Vip message or plain object to encode + * @param {cs.IGood} message Good message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vip.encode = function encode(message, writer) { + Good.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) @@ -3059,37 +3096,39 @@ $root.cs = (function() { writer.uint32(/* id 3, wireType 2 =*/26).string(message.desc); if (message.price != null && Object.hasOwnProperty.call(message, "price")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.price); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.count); return writer; }; /** - * Encodes the specified Vip message, length delimited. Does not implicitly {@link cs.Vip.verify|verify} messages. + * Encodes the specified Good message, length delimited. Does not implicitly {@link cs.Good.verify|verify} messages. * @function encodeDelimited - * @memberof cs.Vip + * @memberof cs.Good * @static - * @param {cs.IVip} message Vip message or plain object to encode + * @param {cs.IGood} message Good message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vip.encodeDelimited = function encodeDelimited(message, writer) { + Good.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Vip message from the specified reader or buffer. + * Decodes a Good message from the specified reader or buffer. * @function decode - * @memberof cs.Vip + * @memberof cs.Good * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {cs.Vip} Vip + * @returns {cs.Good} Good * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vip.decode = function decode(reader, length, error) { + Good.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.Vip(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.Good(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -3111,6 +3150,10 @@ $root.cs = (function() { message.price = reader.string(); break; } + case 5: { + message.count = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3120,30 +3163,30 @@ $root.cs = (function() { }; /** - * Decodes a Vip message from the specified reader or buffer, length delimited. + * Decodes a Good message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof cs.Vip + * @memberof cs.Good * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cs.Vip} Vip + * @returns {cs.Good} Good * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vip.decodeDelimited = function decodeDelimited(reader) { + Good.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Vip message. + * Verifies a Good message. * @function verify - * @memberof cs.Vip + * @memberof cs.Good * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Vip.verify = function verify(message) { + Good.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) @@ -3158,21 +3201,24 @@ $root.cs = (function() { if (message.price != null && message.hasOwnProperty("price")) if (!$util.isString(message.price)) return "price: string expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; return null; }; /** - * Creates a Vip message from a plain object. Also converts values to their respective internal types. + * Creates a Good message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof cs.Vip + * @memberof cs.Good * @static * @param {Object.} object Plain object - * @returns {cs.Vip} Vip + * @returns {cs.Good} Good */ - Vip.fromObject = function fromObject(object) { - if (object instanceof $root.cs.Vip) + Good.fromObject = function fromObject(object) { + if (object instanceof $root.cs.Good) return object; - var message = new $root.cs.Vip(); + var message = new $root.cs.Good(); if (object.id != null) message.id = object.id | 0; if (object.name != null) @@ -3181,19 +3227,21 @@ $root.cs = (function() { message.desc = String(object.desc); if (object.price != null) message.price = String(object.price); + if (object.count != null) + message.count = object.count | 0; return message; }; /** - * Creates a plain object from a Vip message. Also converts values to other types if specified. + * Creates a plain object from a Good message. Also converts values to other types if specified. * @function toObject - * @memberof cs.Vip + * @memberof cs.Good * @static - * @param {cs.Vip} message Vip + * @param {cs.Good} message Good * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Vip.toObject = function toObject(message, options) { + Good.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -3202,6 +3250,7 @@ $root.cs = (function() { object.name = ""; object.desc = ""; object.price = ""; + object.count = 0; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; @@ -3211,36 +3260,38 @@ $root.cs = (function() { object.desc = message.desc; if (message.price != null && message.hasOwnProperty("price")) object.price = message.price; + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; return object; }; /** - * Converts this Vip to JSON. + * Converts this Good to JSON. * @function toJSON - * @memberof cs.Vip + * @memberof cs.Good * @instance * @returns {Object.} JSON object */ - Vip.prototype.toJSON = function toJSON() { + Good.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Vip + * Gets the default type url for Good * @function getTypeUrl - * @memberof cs.Vip + * @memberof cs.Good * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Vip.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Good.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/cs.Vip"; + return typeUrlPrefix + "/cs.Good"; }; - return Vip; + return Good; })(); cs.CSGetShopReq = (function() { @@ -3426,8 +3477,7 @@ $root.cs = (function() { * Properties of a CSGetShopRes. * @memberof cs * @interface ICSGetShopRes - * @property {Array.|null} [diamonds] CSGetShopRes diamonds - * @property {Array.|null} [vips] CSGetShopRes vips + * @property {Array.|null} [Goods] CSGetShopRes Goods */ /** @@ -3439,8 +3489,7 @@ $root.cs = (function() { * @param {cs.ICSGetShopRes=} [properties] Properties to set */ function CSGetShopRes(properties) { - this.diamonds = []; - this.vips = []; + this.Goods = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3448,20 +3497,12 @@ $root.cs = (function() { } /** - * CSGetShopRes diamonds. - * @member {Array.} diamonds + * CSGetShopRes Goods. + * @member {Array.} Goods * @memberof cs.CSGetShopRes * @instance */ - CSGetShopRes.prototype.diamonds = $util.emptyArray; - - /** - * CSGetShopRes vips. - * @member {Array.} vips - * @memberof cs.CSGetShopRes - * @instance - */ - CSGetShopRes.prototype.vips = $util.emptyArray; + CSGetShopRes.prototype.Goods = $util.emptyArray; /** * Creates a new CSGetShopRes instance using the specified properties. @@ -3487,12 +3528,9 @@ $root.cs = (function() { CSGetShopRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.diamonds != null && message.diamonds.length) - for (var i = 0; i < message.diamonds.length; ++i) - $root.cs.Diamond.encode(message.diamonds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.vips != null && message.vips.length) - for (var i = 0; i < message.vips.length; ++i) - $root.cs.Vip.encode(message.vips[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.Goods != null && message.Goods.length) + for (var i = 0; i < message.Goods.length; ++i) + $root.cs.Good.encode(message.Goods[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -3530,15 +3568,9 @@ $root.cs = (function() { break; switch (tag >>> 3) { case 1: { - if (!(message.diamonds && message.diamonds.length)) - message.diamonds = []; - message.diamonds.push($root.cs.Diamond.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.vips && message.vips.length)) - message.vips = []; - message.vips.push($root.cs.Vip.decode(reader, reader.uint32())); + if (!(message.Goods && message.Goods.length)) + message.Goods = []; + message.Goods.push($root.cs.Good.decode(reader, reader.uint32())); break; } default: @@ -3576,22 +3608,13 @@ $root.cs = (function() { CSGetShopRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.diamonds != null && message.hasOwnProperty("diamonds")) { - if (!Array.isArray(message.diamonds)) - return "diamonds: array expected"; - for (var i = 0; i < message.diamonds.length; ++i) { - var error = $root.cs.Diamond.verify(message.diamonds[i]); + if (message.Goods != null && message.hasOwnProperty("Goods")) { + if (!Array.isArray(message.Goods)) + return "Goods: array expected"; + for (var i = 0; i < message.Goods.length; ++i) { + var error = $root.cs.Good.verify(message.Goods[i]); if (error) - return "diamonds." + error; - } - } - if (message.vips != null && message.hasOwnProperty("vips")) { - if (!Array.isArray(message.vips)) - return "vips: array expected"; - for (var i = 0; i < message.vips.length; ++i) { - var error = $root.cs.Vip.verify(message.vips[i]); - if (error) - return "vips." + error; + return "Goods." + error; } } return null; @@ -3609,24 +3632,14 @@ $root.cs = (function() { if (object instanceof $root.cs.CSGetShopRes) return object; var message = new $root.cs.CSGetShopRes(); - if (object.diamonds) { - if (!Array.isArray(object.diamonds)) - throw TypeError(".cs.CSGetShopRes.diamonds: array expected"); - message.diamonds = []; - for (var i = 0; i < object.diamonds.length; ++i) { - if (typeof object.diamonds[i] !== "object") - throw TypeError(".cs.CSGetShopRes.diamonds: object expected"); - message.diamonds[i] = $root.cs.Diamond.fromObject(object.diamonds[i]); - } - } - if (object.vips) { - if (!Array.isArray(object.vips)) - throw TypeError(".cs.CSGetShopRes.vips: array expected"); - message.vips = []; - for (var i = 0; i < object.vips.length; ++i) { - if (typeof object.vips[i] !== "object") - throw TypeError(".cs.CSGetShopRes.vips: object expected"); - message.vips[i] = $root.cs.Vip.fromObject(object.vips[i]); + if (object.Goods) { + if (!Array.isArray(object.Goods)) + throw TypeError(".cs.CSGetShopRes.Goods: array expected"); + message.Goods = []; + for (var i = 0; i < object.Goods.length; ++i) { + if (typeof object.Goods[i] !== "object") + throw TypeError(".cs.CSGetShopRes.Goods: object expected"); + message.Goods[i] = $root.cs.Good.fromObject(object.Goods[i]); } } return message; @@ -3645,19 +3658,12 @@ $root.cs = (function() { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.diamonds = []; - object.vips = []; - } - if (message.diamonds && message.diamonds.length) { - object.diamonds = []; - for (var j = 0; j < message.diamonds.length; ++j) - object.diamonds[j] = $root.cs.Diamond.toObject(message.diamonds[j], options); - } - if (message.vips && message.vips.length) { - object.vips = []; - for (var j = 0; j < message.vips.length; ++j) - object.vips[j] = $root.cs.Vip.toObject(message.vips[j], options); + if (options.arrays || options.defaults) + object.Goods = []; + if (message.Goods && message.Goods.length) { + object.Goods = []; + for (var j = 0; j < message.Goods.length; ++j) + object.Goods[j] = $root.cs.Good.toObject(message.Goods[j], options); } return object; }; @@ -4309,6 +4315,7 @@ $root.cs = (function() { * @memberof cs * @interface ICSCreateOrderRes * @property {string|null} [payUrl] CSCreateOrderRes payUrl + * @property {string|null} [orderId] CSCreateOrderRes orderId */ /** @@ -4334,6 +4341,14 @@ $root.cs = (function() { */ CSCreateOrderRes.prototype.payUrl = ""; + /** + * CSCreateOrderRes orderId. + * @member {string} orderId + * @memberof cs.CSCreateOrderRes + * @instance + */ + CSCreateOrderRes.prototype.orderId = ""; + /** * Creates a new CSCreateOrderRes instance using the specified properties. * @function create @@ -4360,6 +4375,8 @@ $root.cs = (function() { writer = $Writer.create(); if (message.payUrl != null && Object.hasOwnProperty.call(message, "payUrl")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.payUrl); + if (message.orderId != null && Object.hasOwnProperty.call(message, "orderId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.orderId); return writer; }; @@ -4400,6 +4417,10 @@ $root.cs = (function() { message.payUrl = reader.string(); break; } + case 2: { + message.orderId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4438,6 +4459,9 @@ $root.cs = (function() { if (message.payUrl != null && message.hasOwnProperty("payUrl")) if (!$util.isString(message.payUrl)) return "payUrl: string expected"; + if (message.orderId != null && message.hasOwnProperty("orderId")) + if (!$util.isString(message.orderId)) + return "orderId: string expected"; return null; }; @@ -4455,6 +4479,8 @@ $root.cs = (function() { var message = new $root.cs.CSCreateOrderRes(); if (object.payUrl != null) message.payUrl = String(object.payUrl); + if (object.orderId != null) + message.orderId = String(object.orderId); return message; }; @@ -4471,10 +4497,14 @@ $root.cs = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.payUrl = ""; + object.orderId = ""; + } if (message.payUrl != null && message.hasOwnProperty("payUrl")) object.payUrl = message.payUrl; + if (message.orderId != null && message.hasOwnProperty("orderId")) + object.orderId = message.orderId; return object; }; @@ -4507,6 +4537,514 @@ $root.cs = (function() { return CSCreateOrderRes; })(); + cs.CSQueryOrderReq = (function() { + + /** + * Properties of a CSQueryOrderReq. + * @memberof cs + * @interface ICSQueryOrderReq + * @property {string|null} [orderId] CSQueryOrderReq orderId + */ + + /** + * Constructs a new CSQueryOrderReq. + * @memberof cs + * @classdesc Represents a CSQueryOrderReq. + * @implements ICSQueryOrderReq + * @constructor + * @param {cs.ICSQueryOrderReq=} [properties] Properties to set + */ + function CSQueryOrderReq(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CSQueryOrderReq orderId. + * @member {string} orderId + * @memberof cs.CSQueryOrderReq + * @instance + */ + CSQueryOrderReq.prototype.orderId = ""; + + /** + * Creates a new CSQueryOrderReq instance using the specified properties. + * @function create + * @memberof cs.CSQueryOrderReq + * @static + * @param {cs.ICSQueryOrderReq=} [properties] Properties to set + * @returns {cs.CSQueryOrderReq} CSQueryOrderReq instance + */ + CSQueryOrderReq.create = function create(properties) { + return new CSQueryOrderReq(properties); + }; + + /** + * Encodes the specified CSQueryOrderReq message. Does not implicitly {@link cs.CSQueryOrderReq.verify|verify} messages. + * @function encode + * @memberof cs.CSQueryOrderReq + * @static + * @param {cs.ICSQueryOrderReq} message CSQueryOrderReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSQueryOrderReq.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.orderId != null && Object.hasOwnProperty.call(message, "orderId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.orderId); + return writer; + }; + + /** + * Encodes the specified CSQueryOrderReq message, length delimited. Does not implicitly {@link cs.CSQueryOrderReq.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSQueryOrderReq + * @static + * @param {cs.ICSQueryOrderReq} message CSQueryOrderReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSQueryOrderReq.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSQueryOrderReq message from the specified reader or buffer. + * @function decode + * @memberof cs.CSQueryOrderReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSQueryOrderReq} CSQueryOrderReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSQueryOrderReq.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.CSQueryOrderReq(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.orderId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSQueryOrderReq message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSQueryOrderReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSQueryOrderReq} CSQueryOrderReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSQueryOrderReq.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSQueryOrderReq message. + * @function verify + * @memberof cs.CSQueryOrderReq + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSQueryOrderReq.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.orderId != null && message.hasOwnProperty("orderId")) + if (!$util.isString(message.orderId)) + return "orderId: string expected"; + return null; + }; + + /** + * Creates a CSQueryOrderReq message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSQueryOrderReq + * @static + * @param {Object.} object Plain object + * @returns {cs.CSQueryOrderReq} CSQueryOrderReq + */ + CSQueryOrderReq.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSQueryOrderReq) + return object; + var message = new $root.cs.CSQueryOrderReq(); + if (object.orderId != null) + message.orderId = String(object.orderId); + return message; + }; + + /** + * Creates a plain object from a CSQueryOrderReq message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSQueryOrderReq + * @static + * @param {cs.CSQueryOrderReq} message CSQueryOrderReq + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSQueryOrderReq.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.orderId = ""; + if (message.orderId != null && message.hasOwnProperty("orderId")) + object.orderId = message.orderId; + return object; + }; + + /** + * Converts this CSQueryOrderReq to JSON. + * @function toJSON + * @memberof cs.CSQueryOrderReq + * @instance + * @returns {Object.} JSON object + */ + CSQueryOrderReq.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSQueryOrderReq + * @function getTypeUrl + * @memberof cs.CSQueryOrderReq + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSQueryOrderReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSQueryOrderReq"; + }; + + return CSQueryOrderReq; + })(); + + cs.CSQueryOrderRes = (function() { + + /** + * Properties of a CSQueryOrderRes. + * @memberof cs + * @interface ICSQueryOrderRes + * @property {number|null} [status] CSQueryOrderRes status + * @property {number|null} [retCode] CSQueryOrderRes retCode + * @property {number|Long|null} [diamond] CSQueryOrderRes diamond + * @property {number|Long|null} [vipExpire] CSQueryOrderRes vipExpire + */ + + /** + * Constructs a new CSQueryOrderRes. + * @memberof cs + * @classdesc Represents a CSQueryOrderRes. + * @implements ICSQueryOrderRes + * @constructor + * @param {cs.ICSQueryOrderRes=} [properties] Properties to set + */ + function CSQueryOrderRes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CSQueryOrderRes status. + * @member {number} status + * @memberof cs.CSQueryOrderRes + * @instance + */ + CSQueryOrderRes.prototype.status = 0; + + /** + * CSQueryOrderRes retCode. + * @member {number} retCode + * @memberof cs.CSQueryOrderRes + * @instance + */ + CSQueryOrderRes.prototype.retCode = 0; + + /** + * CSQueryOrderRes diamond. + * @member {number|Long} diamond + * @memberof cs.CSQueryOrderRes + * @instance + */ + CSQueryOrderRes.prototype.diamond = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CSQueryOrderRes vipExpire. + * @member {number|Long} vipExpire + * @memberof cs.CSQueryOrderRes + * @instance + */ + CSQueryOrderRes.prototype.vipExpire = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new CSQueryOrderRes instance using the specified properties. + * @function create + * @memberof cs.CSQueryOrderRes + * @static + * @param {cs.ICSQueryOrderRes=} [properties] Properties to set + * @returns {cs.CSQueryOrderRes} CSQueryOrderRes instance + */ + CSQueryOrderRes.create = function create(properties) { + return new CSQueryOrderRes(properties); + }; + + /** + * Encodes the specified CSQueryOrderRes message. Does not implicitly {@link cs.CSQueryOrderRes.verify|verify} messages. + * @function encode + * @memberof cs.CSQueryOrderRes + * @static + * @param {cs.ICSQueryOrderRes} message CSQueryOrderRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSQueryOrderRes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status); + if (message.retCode != null && Object.hasOwnProperty.call(message, "retCode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.retCode); + if (message.diamond != null && Object.hasOwnProperty.call(message, "diamond")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.diamond); + if (message.vipExpire != null && Object.hasOwnProperty.call(message, "vipExpire")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.vipExpire); + return writer; + }; + + /** + * Encodes the specified CSQueryOrderRes message, length delimited. Does not implicitly {@link cs.CSQueryOrderRes.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSQueryOrderRes + * @static + * @param {cs.ICSQueryOrderRes} message CSQueryOrderRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSQueryOrderRes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSQueryOrderRes message from the specified reader or buffer. + * @function decode + * @memberof cs.CSQueryOrderRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSQueryOrderRes} CSQueryOrderRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSQueryOrderRes.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.CSQueryOrderRes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.status = reader.int32(); + break; + } + case 2: { + message.retCode = reader.int32(); + break; + } + case 3: { + message.diamond = reader.int64(); + break; + } + case 4: { + message.vipExpire = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSQueryOrderRes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSQueryOrderRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSQueryOrderRes} CSQueryOrderRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSQueryOrderRes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSQueryOrderRes message. + * @function verify + * @memberof cs.CSQueryOrderRes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSQueryOrderRes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isInteger(message.status)) + return "status: integer expected"; + if (message.retCode != null && message.hasOwnProperty("retCode")) + if (!$util.isInteger(message.retCode)) + return "retCode: integer expected"; + if (message.diamond != null && message.hasOwnProperty("diamond")) + if (!$util.isInteger(message.diamond) && !(message.diamond && $util.isInteger(message.diamond.low) && $util.isInteger(message.diamond.high))) + return "diamond: integer|Long expected"; + if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) + if (!$util.isInteger(message.vipExpire) && !(message.vipExpire && $util.isInteger(message.vipExpire.low) && $util.isInteger(message.vipExpire.high))) + return "vipExpire: integer|Long expected"; + return null; + }; + + /** + * Creates a CSQueryOrderRes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSQueryOrderRes + * @static + * @param {Object.} object Plain object + * @returns {cs.CSQueryOrderRes} CSQueryOrderRes + */ + CSQueryOrderRes.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSQueryOrderRes) + return object; + var message = new $root.cs.CSQueryOrderRes(); + if (object.status != null) + message.status = object.status | 0; + if (object.retCode != null) + message.retCode = object.retCode | 0; + if (object.diamond != null) + if ($util.Long) + (message.diamond = $util.Long.fromValue(object.diamond)).unsigned = false; + else if (typeof object.diamond === "string") + message.diamond = parseInt(object.diamond, 10); + else if (typeof object.diamond === "number") + message.diamond = object.diamond; + else if (typeof object.diamond === "object") + message.diamond = new $util.LongBits(object.diamond.low >>> 0, object.diamond.high >>> 0).toNumber(); + if (object.vipExpire != null) + if ($util.Long) + (message.vipExpire = $util.Long.fromValue(object.vipExpire)).unsigned = false; + else if (typeof object.vipExpire === "string") + message.vipExpire = parseInt(object.vipExpire, 10); + else if (typeof object.vipExpire === "number") + message.vipExpire = object.vipExpire; + else if (typeof object.vipExpire === "object") + message.vipExpire = new $util.LongBits(object.vipExpire.low >>> 0, object.vipExpire.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a CSQueryOrderRes message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSQueryOrderRes + * @static + * @param {cs.CSQueryOrderRes} message CSQueryOrderRes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSQueryOrderRes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.status = 0; + object.retCode = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.diamond = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.diamond = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.vipExpire = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.vipExpire = options.longs === String ? "0" : 0; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.retCode != null && message.hasOwnProperty("retCode")) + object.retCode = message.retCode; + if (message.diamond != null && message.hasOwnProperty("diamond")) + if (typeof message.diamond === "number") + object.diamond = options.longs === String ? String(message.diamond) : message.diamond; + else + object.diamond = options.longs === String ? $util.Long.prototype.toString.call(message.diamond) : options.longs === Number ? new $util.LongBits(message.diamond.low >>> 0, message.diamond.high >>> 0).toNumber() : message.diamond; + if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) + if (typeof message.vipExpire === "number") + object.vipExpire = options.longs === String ? String(message.vipExpire) : message.vipExpire; + else + object.vipExpire = options.longs === String ? $util.Long.prototype.toString.call(message.vipExpire) : options.longs === Number ? new $util.LongBits(message.vipExpire.low >>> 0, message.vipExpire.high >>> 0).toNumber() : message.vipExpire; + return object; + }; + + /** + * Converts this CSQueryOrderRes to JSON. + * @function toJSON + * @memberof cs.CSQueryOrderRes + * @instance + * @returns {Object.} JSON object + */ + CSQueryOrderRes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSQueryOrderRes + * @function getTypeUrl + * @memberof cs.CSQueryOrderRes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSQueryOrderRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSQueryOrderRes"; + }; + + return CSQueryOrderRes; + })(); + cs.CSLoginReq = (function() { /** diff --git a/proto_cs b/proto_cs index 596a85ec..664c8ad7 160000 --- a/proto_cs +++ b/proto_cs @@ -1 +1 @@ -Subproject commit 596a85eceabc1ca62e7ce5404d51df7edfa73a5f +Subproject commit 664c8ad737a91ffcbe862180fefd5a450777ce9a