协议调试
This commit is contained in:
@@ -27,6 +27,8 @@ export enum InnerMsgCode {
|
|||||||
Chat_EmotionUpdated,
|
Chat_EmotionUpdated,
|
||||||
SimplePlayVide,
|
SimplePlayVide,
|
||||||
LanguageChange,
|
LanguageChange,
|
||||||
|
BalanceChange, // 余额发生变化
|
||||||
|
VipExpireChange, // vip失效时间戳发生变化
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum InnerEventCode {
|
export enum InnerEventCode {
|
||||||
|
|||||||
@@ -488,6 +488,13 @@ export class GirlData extends BaseData {
|
|||||||
return oneData.getIsRelease();
|
return oneData.getIsRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 保存 付费技师是否已经解锁 */
|
||||||
|
public setIsRelease(categoryId: string, girlId: number, value: boolean): void {
|
||||||
|
let oneData = this.getGrilUnlock(categoryId, girlId);
|
||||||
|
if (!oneData) return;
|
||||||
|
oneData.setIsRelease(value);
|
||||||
|
}
|
||||||
|
|
||||||
/** 判断图片是否解锁 */
|
/** 判断图片是否解锁 */
|
||||||
public isImageUnlock(categoryId: string, girlId: number, id: number): boolean {
|
public isImageUnlock(categoryId: string, girlId: number, id: number): boolean {
|
||||||
let oneData = this.getGrilUnlock(categoryId, girlId);
|
let oneData = this.getGrilUnlock(categoryId, girlId);
|
||||||
|
|||||||
@@ -53,45 +53,60 @@ export class ShopData extends BaseData {
|
|||||||
/** 获取所有商品 id */
|
/** 获取所有商品 id */
|
||||||
public get goodIds(): number[] { return this._goodIds; }
|
public get goodIds(): number[] { return this._goodIds; }
|
||||||
|
|
||||||
|
/** 是否是充值商品,首位数字为 1 */
|
||||||
|
public isRechargeId(id: number): boolean {
|
||||||
|
const firstDigit = id.toString()[0]; // 取首位字符
|
||||||
|
return firstDigit === "1";
|
||||||
|
}
|
||||||
|
|
||||||
/** 获取 充值商品的id数组,首位数字为 1 */
|
/** 获取 充值商品的id数组,首位数字为 1 */
|
||||||
private getRechargeIds(): number[] {
|
public getRechargeIds(): number[] {
|
||||||
let allId = this._goodIds;
|
let allId = this._goodIds;
|
||||||
if (!allId) return [];
|
if (!allId) return [];
|
||||||
// 获取所有 id
|
// 获取所有 id
|
||||||
let resultId = [];
|
let resultId = [];
|
||||||
for (let one of allId) {
|
for (let one of allId) {
|
||||||
const firstDigit = one.toString()[0]; // 取首位字符
|
if (this.isRechargeId(one)) {
|
||||||
if (firstDigit === "1") {
|
|
||||||
resultId.push(one);
|
resultId.push(one);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resultId;
|
return resultId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 是否是会员商品,首位数字为 2 */
|
||||||
|
public isMemberId(id: number): boolean {
|
||||||
|
const firstDigit = id.toString()[0]; // 取首位字符
|
||||||
|
return firstDigit === "2";
|
||||||
|
}
|
||||||
|
|
||||||
/** 获取 会员商品的id数组,首位数字为 2 */
|
/** 获取 会员商品的id数组,首位数字为 2 */
|
||||||
private getMemberIds(): number[] {
|
public getMemberIds(): number[] {
|
||||||
let allId = this._goodIds;
|
let allId = this._goodIds;
|
||||||
if (!allId) return [];
|
if (!allId) return [];
|
||||||
// 获取所有 id
|
// 获取所有 id
|
||||||
let resultId = [];
|
let resultId = [];
|
||||||
for (let one of allId) {
|
for (let one of allId) {
|
||||||
const firstDigit = one.toString()[0]; // 取首位字符
|
if (this.isMemberId(one)) {
|
||||||
if (firstDigit === "2") {
|
|
||||||
resultId.push(one);
|
resultId.push(one);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resultId;
|
return resultId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 是否是聊天商品,首位数字为 3 */
|
||||||
|
public isChatId(id: number): boolean {
|
||||||
|
const firstDigit = id.toString()[0]; // 取首位字符
|
||||||
|
return firstDigit === "3";
|
||||||
|
}
|
||||||
|
|
||||||
/** 获取 聊天商品的id数组,首位数字为 3 */
|
/** 获取 聊天商品的id数组,首位数字为 3 */
|
||||||
private getChatIds(): number[] {
|
public getChatIds(): number[] {
|
||||||
let allId = this._goodIds;
|
let allId = this._goodIds;
|
||||||
if (!allId) return [];
|
if (!allId) return [];
|
||||||
// 获取所有 id
|
// 获取所有 id
|
||||||
let resultId = [];
|
let resultId = [];
|
||||||
for (let one of allId) {
|
for (let one of allId) {
|
||||||
const firstDigit = one.toString()[0]; // 取首位字符
|
if (this.isChatId(one)) {
|
||||||
if (firstDigit === "3") {
|
|
||||||
resultId.push(one);
|
resultId.push(one);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import type { IGirlService } from "./IGirlService";
|
|||||||
import { ConfigManager, ConfigId } from "../../manager/ConfigManager";
|
import { ConfigManager, ConfigId } from "../../manager/ConfigManager";
|
||||||
import { GirlConfig } from "../../config/GirlConfig";
|
import { GirlConfig } from "../../config/GirlConfig";
|
||||||
import { GirlDetailConfig } from "../../config/GirlDetailConfig";
|
import { GirlDetailConfig } from "../../config/GirlDetailConfig";
|
||||||
|
import { DataManager, DataId } from "../../data/DataManager";
|
||||||
|
import { GirlData } from "../../data/GirlData";
|
||||||
|
import { WalletData } from "../../data/WalletData";
|
||||||
|
|
||||||
export class MockGirlService implements IGirlService {
|
export class MockGirlService implements IGirlService {
|
||||||
private delay(ms = 180) { return new Promise<void>(r => setTimeout(r, ms)); }
|
private delay(ms = 180) { return new Promise<void>(r => setTimeout(r, ms)); }
|
||||||
private randInt(min: number, max: number) { return Math.floor(Math.random() * (max - min + 1)) + min; }
|
private randInt(min: number, max: number) { return Math.floor(Math.random() * (max - min + 1)) + min; }
|
||||||
@@ -240,20 +244,61 @@ export class MockGirlService implements IGirlService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 解锁技师
|
// 解锁技师
|
||||||
async reqUnlockGirl(_req: proto.cs.ICSUnlockGirlReq): Promise<ApiResponse<proto.cs.ICSUnlockGirlRes>> {
|
async reqUnlockGirl(req: proto.cs.ICSUnlockGirlReq): Promise<ApiResponse<proto.cs.ICSUnlockGirlRes>> {
|
||||||
// 延时
|
// 延时
|
||||||
await this.delay(180);
|
await this.delay(180);
|
||||||
|
// 请求数据
|
||||||
|
const reqGirlId = req.id;
|
||||||
|
// 数据层的数据
|
||||||
|
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||||
|
const category = girlData.getGrilCategoryById(reqGirlId);
|
||||||
|
const price = girlData.getGrilPrice(category.toString(), reqGirlId);
|
||||||
|
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
|
||||||
|
// 余额
|
||||||
|
let balanceNumber = Number(walletData.balance) - Number(price);
|
||||||
|
let balance = balanceNumber.toString();
|
||||||
|
// vip 30天后过期
|
||||||
|
const nowSeconds = Math.floor(Date.now() / 1000);
|
||||||
|
let vipExpire = nowSeconds + 30 * 24 * 3600;
|
||||||
// 返回数据
|
// 返回数据
|
||||||
const res: proto.cs.ICSUnlockGirlRes = {};
|
const res: proto.cs.ICSUnlockGirlRes = {
|
||||||
|
balance,
|
||||||
|
vipExpire,
|
||||||
|
};
|
||||||
return this.ok(res);
|
return this.ok(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 解锁资源
|
// 解锁资源
|
||||||
async reqUnlockGirlRes(_req: proto.cs.ICSUnlockResourceReq): Promise<ApiResponse<proto.cs.ICSUnlockResourceRes>> {
|
async reqUnlockGirlRes(req: proto.cs.ICSUnlockResourceReq): Promise<ApiResponse<proto.cs.ICSUnlockResourceRes>> {
|
||||||
// 延时
|
// 延时
|
||||||
await this.delay(180);
|
await this.delay(180);
|
||||||
|
// 请求数据
|
||||||
|
const reqGirlId = req.girlId;
|
||||||
|
const resId = req.resId;
|
||||||
|
const resType = req.type;
|
||||||
|
// 数据层的数据
|
||||||
|
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||||
|
const category = girlData.getGrilCategoryById(reqGirlId);
|
||||||
|
let price = 0;
|
||||||
|
if (resType === proto.cs.EnmResType.ERT_Image) {
|
||||||
|
// 图片
|
||||||
|
price = girlData.getGrilPhotoPrice(category.toString(), reqGirlId, resId);
|
||||||
|
} else if (resType === proto.cs.EnmResType.ERT_Video) {
|
||||||
|
// 视频
|
||||||
|
price = girlData.getGrilVideoPrice(category.toString(), reqGirlId, resId);
|
||||||
|
}
|
||||||
|
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
|
||||||
|
// 余额
|
||||||
|
let balanceNumber = Number(walletData.balance) - Number(price);
|
||||||
|
let balance = balanceNumber.toString();
|
||||||
|
// vip 30天后过期
|
||||||
|
const nowSeconds = Math.floor(Date.now() / 1000);
|
||||||
|
let vipExpire = nowSeconds + 30 * 24 * 3600;
|
||||||
// 返回数据
|
// 返回数据
|
||||||
const res: proto.cs.ICSUnlockResourceRes = {};
|
const res: proto.cs.ICSUnlockResourceRes = {
|
||||||
|
balance,
|
||||||
|
vipExpire,
|
||||||
|
};
|
||||||
return this.ok(res);
|
return this.ok(res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ import proto from "db://assets/Scripts/proto/proto.pb.js";
|
|||||||
import type { IShopService } from "./IShopService";
|
import type { IShopService } from "./IShopService";
|
||||||
import { PurchaseConfig } from "../../config/PurchaseConfig";
|
import { PurchaseConfig } from "../../config/PurchaseConfig";
|
||||||
import { ConfigManager, ConfigId } from "../../manager/ConfigManager";
|
import { ConfigManager, ConfigId } from "../../manager/ConfigManager";
|
||||||
|
import { DataManager, DataId } from "../../data/DataManager";
|
||||||
|
import { GirlData } from "../../data/GirlData";
|
||||||
|
import { WalletData } from "../../data/WalletData";
|
||||||
|
import { ShopData } from "../../data/ShopData";
|
||||||
|
|
||||||
export class MockShopService implements IShopService {
|
export class MockShopService implements IShopService {
|
||||||
private delay(ms = 180) { return new Promise<void>(r => setTimeout(r, ms)); }
|
private delay(ms = 180) { return new Promise<void>(r => setTimeout(r, ms)); }
|
||||||
@@ -26,7 +30,7 @@ export class MockShopService implements IShopService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取商品列表
|
// 获取商品列表
|
||||||
async reqShopList(_req: proto.cs.ICSGetPurchaseReq): Promise<ApiResponse<proto.cs.ICSGetPurchaseRes>> {
|
async reqShopList(req: proto.cs.ICSGetPurchaseReq): Promise<ApiResponse<proto.cs.ICSGetPurchaseRes>> {
|
||||||
// 延时
|
// 延时
|
||||||
await this.delay();
|
await this.delay();
|
||||||
// 配置数据
|
// 配置数据
|
||||||
@@ -46,11 +50,42 @@ export class MockShopService implements IShopService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 使用余额购买商品
|
// 使用余额购买商品
|
||||||
async reqBuyGood(_req: proto.cs.ICSBuyGoodReq): Promise<ApiResponse<proto.cs.ICSBuyGoodRes>> {
|
async reqBuyGood(req: proto.cs.ICSBuyGoodReq): Promise<ApiResponse<proto.cs.ICSBuyGoodRes>> {
|
||||||
// 延时
|
// 延时
|
||||||
await this.delay();
|
await this.delay();
|
||||||
|
// 请求数据
|
||||||
|
const reqGirlId = req.girlId;
|
||||||
|
const goodId = req.goodId;
|
||||||
|
// 数据层的数据
|
||||||
|
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||||
|
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
|
||||||
|
const shopData = DataManager.I.getDataById<ShopData>(DataId.Shop);
|
||||||
|
const category = girlData.getGrilCategoryById(reqGirlId);
|
||||||
|
|
||||||
|
let chatRemainCount = 0;
|
||||||
|
if (shopData.isRechargeId(goodId)) {
|
||||||
|
// 充值
|
||||||
|
} else if (shopData.isMemberId(goodId)) {
|
||||||
|
// 会员
|
||||||
|
chatRemainCount = -1;
|
||||||
|
} else if (shopData.isChatId(goodId)) {
|
||||||
|
// 聊天
|
||||||
|
const curCount = girlData.getChatRemainCount(category.toString(), reqGirlId);
|
||||||
|
chatRemainCount = curCount + shopData.getCountById(goodId);
|
||||||
|
}
|
||||||
|
// 余额
|
||||||
|
const price = shopData.getPriceById(goodId);
|
||||||
|
let balanceNumber = Number(walletData.balance) - Number(price);
|
||||||
|
let balance = balanceNumber.toString();
|
||||||
|
// vip 30天后过期
|
||||||
|
const nowSeconds = Math.floor(Date.now() / 1000);
|
||||||
|
let vipExpire = nowSeconds + 30 * 24 * 3600;
|
||||||
// 返回数据
|
// 返回数据
|
||||||
const res: proto.cs.ICSBuyGoodRes = {};
|
const res: proto.cs.ICSBuyGoodRes = {
|
||||||
|
balance,
|
||||||
|
vipExpire,
|
||||||
|
chatRemainCount,
|
||||||
|
};
|
||||||
return this.ok(res);
|
return this.ok(res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,16 +4,24 @@ import Utils from "../../../Main/Common/Utils";
|
|||||||
import { GButton } from "../../../Main/Common/GButton";
|
import { GButton } from "../../../Main/Common/GButton";
|
||||||
import { PopupGirlDetailPanel } from "./PopupGirlDetailPanel";
|
import { PopupGirlDetailPanel } from "./PopupGirlDetailPanel";
|
||||||
import { GirlListItem } from "../../uiitems/GirlListItem";
|
import { GirlListItem } from "../../uiitems/GirlListItem";
|
||||||
|
import { GirlService } from "db://assets/Scripts/chat18x/network/services/GirlService";
|
||||||
|
import { DataManager, DataId } from "../../data/DataManager";
|
||||||
|
import { GirlData } from "../../data/GirlData";
|
||||||
|
import { PlayerDataService } from "db://assets/Scripts/chat18x/network/services/PlayerDataService";
|
||||||
|
import { PlayerData } from "../../data/PlayerData";
|
||||||
|
import { WalletData } from "../../data/WalletData";
|
||||||
|
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ccclass("GirlListPopupPanel")
|
@ccclass("GirlListPopupPanel")
|
||||||
export class GirlListPopupPanel extends li_BaseView {
|
export class GirlListPopupPanel extends li_BaseView {
|
||||||
private _nodeTab: any = {};
|
private _nodeTab: any = {};
|
||||||
|
private category: number;
|
||||||
private girlId: number;
|
private girlId: number;
|
||||||
|
|
||||||
base: GirlListItem;
|
base: GirlListItem;
|
||||||
openUIDataCT(data) {
|
openUIDataCT(data) {
|
||||||
|
this.category = data.category;
|
||||||
this.girlId = data.id;
|
this.girlId = data.id;
|
||||||
this.base = data.base;
|
this.base = data.base;
|
||||||
}
|
}
|
||||||
@@ -28,13 +36,26 @@ export class GirlListPopupPanel extends li_BaseView {
|
|||||||
Close() {
|
Close() {
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
buyCharacter() {
|
async buyCharacter() {
|
||||||
// 购买id为girlId的女生
|
// 购买id为girlId的女生
|
||||||
console.log(this.girlId);
|
console.log(this.girlId);
|
||||||
|
// 请求解锁
|
||||||
if (true) {
|
const reqData = {
|
||||||
|
id: this.girlId,
|
||||||
|
};
|
||||||
|
let res = await GirlService.I.reqUnlockGirl(reqData);
|
||||||
|
console.log("请求解锁响应数据:", res);
|
||||||
|
if (res && res.code === proto.cs.EnmRetCode.SUCCESS) {
|
||||||
|
const resData = res.data;
|
||||||
|
// 保存数据
|
||||||
|
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||||
|
girlData.setIsRelease(this.category.toString(), this.girlId, true);
|
||||||
|
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
|
||||||
|
walletData.balance = Number(resData.balance);
|
||||||
|
walletData.vipExpire = Number(resData.vipExpire);
|
||||||
|
// 刷新界面
|
||||||
this.base.refreshBuy(true);
|
this.base.refreshBuy(true);
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ export class GirlListItem extends Component {
|
|||||||
this.nameKey = girlData.getGrilName(this.category.toString(), this.id);
|
this.nameKey = girlData.getGrilName(this.category.toString(), this.id);
|
||||||
this.girlName.string = LanguageUtils.getText(this.nameKey);
|
this.girlName.string = LanguageUtils.getText(this.nameKey);
|
||||||
this.tagKey = girlData.getGrilTagKey(this.category.toString(), this.id);
|
this.tagKey = girlData.getGrilTagKey(this.category.toString(), this.id);
|
||||||
|
// 是否已经解锁
|
||||||
|
const isRelease = girlData.getIsRelease(this.category.toString(), this.id);
|
||||||
let desc = "";
|
let desc = "";
|
||||||
const tags = LanguageUtils.getText(this.tagKey).split("|");
|
const tags = LanguageUtils.getText(this.tagKey).split("|");
|
||||||
for (let i = 0; i < tags.length; i++) {
|
for (let i = 0; i < tags.length; i++) {
|
||||||
@@ -148,13 +150,17 @@ export class GirlListItem extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClickDetail() {
|
onClickDetail() {
|
||||||
if (false) {
|
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||||
|
// 是否已经解锁
|
||||||
|
const isRelease = girlData.getIsRelease(this.category.toString(), this.id);
|
||||||
|
if (isRelease) {
|
||||||
NavigationManager.Instance.navigateToGirlDetail(this.id);
|
NavigationManager.Instance.navigateToGirlDetail(this.id);
|
||||||
ViewManager.I.closeView(this.baseNode);
|
ViewManager.I.closeView(this.baseNode);
|
||||||
} else {
|
} else {
|
||||||
//未解锁
|
//未解锁
|
||||||
ViewManager.I.openBundlesView("GirlListPopupPanel", {
|
ViewManager.I.openBundlesView("GirlListPopupPanel", {
|
||||||
base: this,
|
base: this,
|
||||||
|
category: this.category,
|
||||||
id: this.id,
|
id: this.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+42
@@ -1129,6 +1129,12 @@ static getTypeUrl(typeUrlPrefix?: string): string;
|
|||||||
|
|
||||||
/** Properties of a CSUnlockGirlRes. */
|
/** Properties of a CSUnlockGirlRes. */
|
||||||
interface ICSUnlockGirlRes {
|
interface ICSUnlockGirlRes {
|
||||||
|
|
||||||
|
/** CSUnlockGirlRes balance */
|
||||||
|
balance?: (number|Long|null);
|
||||||
|
|
||||||
|
/** CSUnlockGirlRes vipExpire */
|
||||||
|
vipExpire?: (number|Long|null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Represents a CSUnlockGirlRes. */
|
/** Represents a CSUnlockGirlRes. */
|
||||||
@@ -1140,6 +1146,12 @@ static getTypeUrl(typeUrlPrefix?: string): string;
|
|||||||
*/
|
*/
|
||||||
constructor(properties?: cs.ICSUnlockGirlRes);
|
constructor(properties?: cs.ICSUnlockGirlRes);
|
||||||
|
|
||||||
|
/** CSUnlockGirlRes balance. */
|
||||||
|
balance: (number|Long);
|
||||||
|
|
||||||
|
/** CSUnlockGirlRes vipExpire. */
|
||||||
|
vipExpire: (number|Long);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new CSUnlockGirlRes instance using the specified properties.
|
* Creates a new CSUnlockGirlRes instance using the specified properties.
|
||||||
* @param [properties] Properties to set
|
* @param [properties] Properties to set
|
||||||
@@ -1335,6 +1347,12 @@ static getTypeUrl(typeUrlPrefix?: string): string;
|
|||||||
|
|
||||||
/** Properties of a CSUnlockResourceRes. */
|
/** Properties of a CSUnlockResourceRes. */
|
||||||
interface ICSUnlockResourceRes {
|
interface ICSUnlockResourceRes {
|
||||||
|
|
||||||
|
/** CSUnlockResourceRes balance */
|
||||||
|
balance?: (number|Long|null);
|
||||||
|
|
||||||
|
/** CSUnlockResourceRes vipExpire */
|
||||||
|
vipExpire?: (number|Long|null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Represents a CSUnlockResourceRes. */
|
/** Represents a CSUnlockResourceRes. */
|
||||||
@@ -1346,6 +1364,12 @@ static getTypeUrl(typeUrlPrefix?: string): string;
|
|||||||
*/
|
*/
|
||||||
constructor(properties?: cs.ICSUnlockResourceRes);
|
constructor(properties?: cs.ICSUnlockResourceRes);
|
||||||
|
|
||||||
|
/** CSUnlockResourceRes balance. */
|
||||||
|
balance: (number|Long);
|
||||||
|
|
||||||
|
/** CSUnlockResourceRes vipExpire. */
|
||||||
|
vipExpire: (number|Long);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new CSUnlockResourceRes instance using the specified properties.
|
* Creates a new CSUnlockResourceRes instance using the specified properties.
|
||||||
* @param [properties] Properties to set
|
* @param [properties] Properties to set
|
||||||
@@ -1529,6 +1553,15 @@ static getTypeUrl(typeUrlPrefix?: string): string;
|
|||||||
|
|
||||||
/** Properties of a CSBuyGoodRes. */
|
/** Properties of a CSBuyGoodRes. */
|
||||||
interface ICSBuyGoodRes {
|
interface ICSBuyGoodRes {
|
||||||
|
|
||||||
|
/** CSBuyGoodRes balance */
|
||||||
|
balance?: (number|Long|null);
|
||||||
|
|
||||||
|
/** CSBuyGoodRes vipExpire */
|
||||||
|
vipExpire?: (number|Long|null);
|
||||||
|
|
||||||
|
/** CSBuyGoodRes chatRemainCount */
|
||||||
|
chatRemainCount?: (number|null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Represents a CSBuyGoodRes. */
|
/** Represents a CSBuyGoodRes. */
|
||||||
@@ -1540,6 +1573,15 @@ static getTypeUrl(typeUrlPrefix?: string): string;
|
|||||||
*/
|
*/
|
||||||
constructor(properties?: cs.ICSBuyGoodRes);
|
constructor(properties?: cs.ICSBuyGoodRes);
|
||||||
|
|
||||||
|
/** CSBuyGoodRes balance. */
|
||||||
|
balance: (number|Long);
|
||||||
|
|
||||||
|
/** CSBuyGoodRes vipExpire. */
|
||||||
|
vipExpire: (number|Long);
|
||||||
|
|
||||||
|
/** CSBuyGoodRes chatRemainCount. */
|
||||||
|
chatRemainCount: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new CSBuyGoodRes instance using the specified properties.
|
* Creates a new CSBuyGoodRes instance using the specified properties.
|
||||||
* @param [properties] Properties to set
|
* @param [properties] Properties to set
|
||||||
|
|||||||
@@ -2585,6 +2585,8 @@ $root.cs = (function() {
|
|||||||
* Properties of a CSUnlockGirlRes.
|
* Properties of a CSUnlockGirlRes.
|
||||||
* @memberof cs
|
* @memberof cs
|
||||||
* @interface ICSUnlockGirlRes
|
* @interface ICSUnlockGirlRes
|
||||||
|
* @property {number|Long|null} [balance] CSUnlockGirlRes balance
|
||||||
|
* @property {number|Long|null} [vipExpire] CSUnlockGirlRes vipExpire
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2602,6 +2604,22 @@ $root.cs = (function() {
|
|||||||
this[keys[i]] = properties[keys[i]];
|
this[keys[i]] = properties[keys[i]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSUnlockGirlRes balance.
|
||||||
|
* @member {number|Long} balance
|
||||||
|
* @memberof cs.CSUnlockGirlRes
|
||||||
|
* @instance
|
||||||
|
*/
|
||||||
|
CSUnlockGirlRes.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSUnlockGirlRes vipExpire.
|
||||||
|
* @member {number|Long} vipExpire
|
||||||
|
* @memberof cs.CSUnlockGirlRes
|
||||||
|
* @instance
|
||||||
|
*/
|
||||||
|
CSUnlockGirlRes.prototype.vipExpire = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new CSUnlockGirlRes instance using the specified properties.
|
* Creates a new CSUnlockGirlRes instance using the specified properties.
|
||||||
* @function create
|
* @function create
|
||||||
@@ -2626,6 +2644,10 @@ $root.cs = (function() {
|
|||||||
CSUnlockGirlRes.encode = function encode(message, writer) {
|
CSUnlockGirlRes.encode = function encode(message, writer) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
writer = $Writer.create();
|
writer = $Writer.create();
|
||||||
|
if (message.balance != null && Object.hasOwnProperty.call(message, "balance"))
|
||||||
|
writer.uint32(/* id 1, wireType 0 =*/8).int64(message.balance);
|
||||||
|
if (message.vipExpire != null && Object.hasOwnProperty.call(message, "vipExpire"))
|
||||||
|
writer.uint32(/* id 2, wireType 0 =*/16).int64(message.vipExpire);
|
||||||
return writer;
|
return writer;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2662,6 +2684,14 @@ $root.cs = (function() {
|
|||||||
if (tag === error)
|
if (tag === error)
|
||||||
break;
|
break;
|
||||||
switch (tag >>> 3) {
|
switch (tag >>> 3) {
|
||||||
|
case 1: {
|
||||||
|
message.balance = reader.int64();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
message.vipExpire = reader.int64();
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
reader.skipType(tag & 7);
|
reader.skipType(tag & 7);
|
||||||
break;
|
break;
|
||||||
@@ -2697,6 +2727,12 @@ $root.cs = (function() {
|
|||||||
CSUnlockGirlRes.verify = function verify(message) {
|
CSUnlockGirlRes.verify = function verify(message) {
|
||||||
if (typeof message !== "object" || message === null)
|
if (typeof message !== "object" || message === null)
|
||||||
return "object expected";
|
return "object expected";
|
||||||
|
if (message.balance != null && message.hasOwnProperty("balance"))
|
||||||
|
if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high)))
|
||||||
|
return "balance: 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;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2711,7 +2747,26 @@ $root.cs = (function() {
|
|||||||
CSUnlockGirlRes.fromObject = function fromObject(object) {
|
CSUnlockGirlRes.fromObject = function fromObject(object) {
|
||||||
if (object instanceof $root.cs.CSUnlockGirlRes)
|
if (object instanceof $root.cs.CSUnlockGirlRes)
|
||||||
return object;
|
return object;
|
||||||
return new $root.cs.CSUnlockGirlRes();
|
var message = new $root.cs.CSUnlockGirlRes();
|
||||||
|
if (object.balance != null)
|
||||||
|
if ($util.Long)
|
||||||
|
(message.balance = $util.Long.fromValue(object.balance)).unsigned = false;
|
||||||
|
else if (typeof object.balance === "string")
|
||||||
|
message.balance = parseInt(object.balance, 10);
|
||||||
|
else if (typeof object.balance === "number")
|
||||||
|
message.balance = object.balance;
|
||||||
|
else if (typeof object.balance === "object")
|
||||||
|
message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2723,8 +2778,33 @@ $root.cs = (function() {
|
|||||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||||
* @returns {Object.<string,*>} Plain object
|
* @returns {Object.<string,*>} Plain object
|
||||||
*/
|
*/
|
||||||
CSUnlockGirlRes.toObject = function toObject() {
|
CSUnlockGirlRes.toObject = function toObject(message, options) {
|
||||||
return {};
|
if (!options)
|
||||||
|
options = {};
|
||||||
|
var object = {};
|
||||||
|
if (options.defaults) {
|
||||||
|
if ($util.Long) {
|
||||||
|
var long = new $util.Long(0, 0, false);
|
||||||
|
object.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
||||||
|
} else
|
||||||
|
object.balance = 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.balance != null && message.hasOwnProperty("balance"))
|
||||||
|
if (typeof message.balance === "number")
|
||||||
|
object.balance = options.longs === String ? String(message.balance) : message.balance;
|
||||||
|
else
|
||||||
|
object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() : message.balance;
|
||||||
|
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3028,6 +3108,8 @@ $root.cs = (function() {
|
|||||||
* Properties of a CSUnlockResourceRes.
|
* Properties of a CSUnlockResourceRes.
|
||||||
* @memberof cs
|
* @memberof cs
|
||||||
* @interface ICSUnlockResourceRes
|
* @interface ICSUnlockResourceRes
|
||||||
|
* @property {number|Long|null} [balance] CSUnlockResourceRes balance
|
||||||
|
* @property {number|Long|null} [vipExpire] CSUnlockResourceRes vipExpire
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3045,6 +3127,22 @@ $root.cs = (function() {
|
|||||||
this[keys[i]] = properties[keys[i]];
|
this[keys[i]] = properties[keys[i]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSUnlockResourceRes balance.
|
||||||
|
* @member {number|Long} balance
|
||||||
|
* @memberof cs.CSUnlockResourceRes
|
||||||
|
* @instance
|
||||||
|
*/
|
||||||
|
CSUnlockResourceRes.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSUnlockResourceRes vipExpire.
|
||||||
|
* @member {number|Long} vipExpire
|
||||||
|
* @memberof cs.CSUnlockResourceRes
|
||||||
|
* @instance
|
||||||
|
*/
|
||||||
|
CSUnlockResourceRes.prototype.vipExpire = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new CSUnlockResourceRes instance using the specified properties.
|
* Creates a new CSUnlockResourceRes instance using the specified properties.
|
||||||
* @function create
|
* @function create
|
||||||
@@ -3069,6 +3167,10 @@ $root.cs = (function() {
|
|||||||
CSUnlockResourceRes.encode = function encode(message, writer) {
|
CSUnlockResourceRes.encode = function encode(message, writer) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
writer = $Writer.create();
|
writer = $Writer.create();
|
||||||
|
if (message.balance != null && Object.hasOwnProperty.call(message, "balance"))
|
||||||
|
writer.uint32(/* id 1, wireType 0 =*/8).int64(message.balance);
|
||||||
|
if (message.vipExpire != null && Object.hasOwnProperty.call(message, "vipExpire"))
|
||||||
|
writer.uint32(/* id 2, wireType 0 =*/16).int64(message.vipExpire);
|
||||||
return writer;
|
return writer;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3105,6 +3207,14 @@ $root.cs = (function() {
|
|||||||
if (tag === error)
|
if (tag === error)
|
||||||
break;
|
break;
|
||||||
switch (tag >>> 3) {
|
switch (tag >>> 3) {
|
||||||
|
case 1: {
|
||||||
|
message.balance = reader.int64();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
message.vipExpire = reader.int64();
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
reader.skipType(tag & 7);
|
reader.skipType(tag & 7);
|
||||||
break;
|
break;
|
||||||
@@ -3140,6 +3250,12 @@ $root.cs = (function() {
|
|||||||
CSUnlockResourceRes.verify = function verify(message) {
|
CSUnlockResourceRes.verify = function verify(message) {
|
||||||
if (typeof message !== "object" || message === null)
|
if (typeof message !== "object" || message === null)
|
||||||
return "object expected";
|
return "object expected";
|
||||||
|
if (message.balance != null && message.hasOwnProperty("balance"))
|
||||||
|
if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high)))
|
||||||
|
return "balance: 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;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3154,7 +3270,26 @@ $root.cs = (function() {
|
|||||||
CSUnlockResourceRes.fromObject = function fromObject(object) {
|
CSUnlockResourceRes.fromObject = function fromObject(object) {
|
||||||
if (object instanceof $root.cs.CSUnlockResourceRes)
|
if (object instanceof $root.cs.CSUnlockResourceRes)
|
||||||
return object;
|
return object;
|
||||||
return new $root.cs.CSUnlockResourceRes();
|
var message = new $root.cs.CSUnlockResourceRes();
|
||||||
|
if (object.balance != null)
|
||||||
|
if ($util.Long)
|
||||||
|
(message.balance = $util.Long.fromValue(object.balance)).unsigned = false;
|
||||||
|
else if (typeof object.balance === "string")
|
||||||
|
message.balance = parseInt(object.balance, 10);
|
||||||
|
else if (typeof object.balance === "number")
|
||||||
|
message.balance = object.balance;
|
||||||
|
else if (typeof object.balance === "object")
|
||||||
|
message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3166,8 +3301,33 @@ $root.cs = (function() {
|
|||||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||||
* @returns {Object.<string,*>} Plain object
|
* @returns {Object.<string,*>} Plain object
|
||||||
*/
|
*/
|
||||||
CSUnlockResourceRes.toObject = function toObject() {
|
CSUnlockResourceRes.toObject = function toObject(message, options) {
|
||||||
return {};
|
if (!options)
|
||||||
|
options = {};
|
||||||
|
var object = {};
|
||||||
|
if (options.defaults) {
|
||||||
|
if ($util.Long) {
|
||||||
|
var long = new $util.Long(0, 0, false);
|
||||||
|
object.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
||||||
|
} else
|
||||||
|
object.balance = 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.balance != null && message.hasOwnProperty("balance"))
|
||||||
|
if (typeof message.balance === "number")
|
||||||
|
object.balance = options.longs === String ? String(message.balance) : message.balance;
|
||||||
|
else
|
||||||
|
object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() : message.balance;
|
||||||
|
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3434,6 +3594,9 @@ $root.cs = (function() {
|
|||||||
* Properties of a CSBuyGoodRes.
|
* Properties of a CSBuyGoodRes.
|
||||||
* @memberof cs
|
* @memberof cs
|
||||||
* @interface ICSBuyGoodRes
|
* @interface ICSBuyGoodRes
|
||||||
|
* @property {number|Long|null} [balance] CSBuyGoodRes balance
|
||||||
|
* @property {number|Long|null} [vipExpire] CSBuyGoodRes vipExpire
|
||||||
|
* @property {number|null} [chatRemainCount] CSBuyGoodRes chatRemainCount
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3451,6 +3614,30 @@ $root.cs = (function() {
|
|||||||
this[keys[i]] = properties[keys[i]];
|
this[keys[i]] = properties[keys[i]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSBuyGoodRes balance.
|
||||||
|
* @member {number|Long} balance
|
||||||
|
* @memberof cs.CSBuyGoodRes
|
||||||
|
* @instance
|
||||||
|
*/
|
||||||
|
CSBuyGoodRes.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSBuyGoodRes vipExpire.
|
||||||
|
* @member {number|Long} vipExpire
|
||||||
|
* @memberof cs.CSBuyGoodRes
|
||||||
|
* @instance
|
||||||
|
*/
|
||||||
|
CSBuyGoodRes.prototype.vipExpire = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSBuyGoodRes chatRemainCount.
|
||||||
|
* @member {number} chatRemainCount
|
||||||
|
* @memberof cs.CSBuyGoodRes
|
||||||
|
* @instance
|
||||||
|
*/
|
||||||
|
CSBuyGoodRes.prototype.chatRemainCount = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new CSBuyGoodRes instance using the specified properties.
|
* Creates a new CSBuyGoodRes instance using the specified properties.
|
||||||
* @function create
|
* @function create
|
||||||
@@ -3475,6 +3662,12 @@ $root.cs = (function() {
|
|||||||
CSBuyGoodRes.encode = function encode(message, writer) {
|
CSBuyGoodRes.encode = function encode(message, writer) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
writer = $Writer.create();
|
writer = $Writer.create();
|
||||||
|
if (message.balance != null && Object.hasOwnProperty.call(message, "balance"))
|
||||||
|
writer.uint32(/* id 1, wireType 0 =*/8).int64(message.balance);
|
||||||
|
if (message.vipExpire != null && Object.hasOwnProperty.call(message, "vipExpire"))
|
||||||
|
writer.uint32(/* id 2, wireType 0 =*/16).int64(message.vipExpire);
|
||||||
|
if (message.chatRemainCount != null && Object.hasOwnProperty.call(message, "chatRemainCount"))
|
||||||
|
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.chatRemainCount);
|
||||||
return writer;
|
return writer;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3511,6 +3704,18 @@ $root.cs = (function() {
|
|||||||
if (tag === error)
|
if (tag === error)
|
||||||
break;
|
break;
|
||||||
switch (tag >>> 3) {
|
switch (tag >>> 3) {
|
||||||
|
case 1: {
|
||||||
|
message.balance = reader.int64();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
message.vipExpire = reader.int64();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
message.chatRemainCount = reader.int32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
reader.skipType(tag & 7);
|
reader.skipType(tag & 7);
|
||||||
break;
|
break;
|
||||||
@@ -3546,6 +3751,15 @@ $root.cs = (function() {
|
|||||||
CSBuyGoodRes.verify = function verify(message) {
|
CSBuyGoodRes.verify = function verify(message) {
|
||||||
if (typeof message !== "object" || message === null)
|
if (typeof message !== "object" || message === null)
|
||||||
return "object expected";
|
return "object expected";
|
||||||
|
if (message.balance != null && message.hasOwnProperty("balance"))
|
||||||
|
if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high)))
|
||||||
|
return "balance: 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";
|
||||||
|
if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount"))
|
||||||
|
if (!$util.isInteger(message.chatRemainCount))
|
||||||
|
return "chatRemainCount: integer expected";
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3560,7 +3774,28 @@ $root.cs = (function() {
|
|||||||
CSBuyGoodRes.fromObject = function fromObject(object) {
|
CSBuyGoodRes.fromObject = function fromObject(object) {
|
||||||
if (object instanceof $root.cs.CSBuyGoodRes)
|
if (object instanceof $root.cs.CSBuyGoodRes)
|
||||||
return object;
|
return object;
|
||||||
return new $root.cs.CSBuyGoodRes();
|
var message = new $root.cs.CSBuyGoodRes();
|
||||||
|
if (object.balance != null)
|
||||||
|
if ($util.Long)
|
||||||
|
(message.balance = $util.Long.fromValue(object.balance)).unsigned = false;
|
||||||
|
else if (typeof object.balance === "string")
|
||||||
|
message.balance = parseInt(object.balance, 10);
|
||||||
|
else if (typeof object.balance === "number")
|
||||||
|
message.balance = object.balance;
|
||||||
|
else if (typeof object.balance === "object")
|
||||||
|
message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.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();
|
||||||
|
if (object.chatRemainCount != null)
|
||||||
|
message.chatRemainCount = object.chatRemainCount | 0;
|
||||||
|
return message;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3572,8 +3807,36 @@ $root.cs = (function() {
|
|||||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||||
* @returns {Object.<string,*>} Plain object
|
* @returns {Object.<string,*>} Plain object
|
||||||
*/
|
*/
|
||||||
CSBuyGoodRes.toObject = function toObject() {
|
CSBuyGoodRes.toObject = function toObject(message, options) {
|
||||||
return {};
|
if (!options)
|
||||||
|
options = {};
|
||||||
|
var object = {};
|
||||||
|
if (options.defaults) {
|
||||||
|
if ($util.Long) {
|
||||||
|
var long = new $util.Long(0, 0, false);
|
||||||
|
object.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
||||||
|
} else
|
||||||
|
object.balance = 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;
|
||||||
|
object.chatRemainCount = 0;
|
||||||
|
}
|
||||||
|
if (message.balance != null && message.hasOwnProperty("balance"))
|
||||||
|
if (typeof message.balance === "number")
|
||||||
|
object.balance = options.longs === String ? String(message.balance) : message.balance;
|
||||||
|
else
|
||||||
|
object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() : message.balance;
|
||||||
|
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;
|
||||||
|
if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount"))
|
||||||
|
object.chatRemainCount = message.chatRemainCount;
|
||||||
|
return object;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
Submodule proto_cs updated: f055100cf0...9ec1d4f077
Reference in New Issue
Block a user