协议调试
This commit is contained in:
@@ -199,6 +199,14 @@ export class GirlData extends BaseData {
|
||||
return oneData.getGrilPriceType();
|
||||
}
|
||||
|
||||
/** 获取原来的价格,除100 */
|
||||
public getGrilOriginalPrice(categoryId: string, girlId: number): number {
|
||||
let oneData = this.getGrilBrief(categoryId, girlId);
|
||||
if (!oneData) return 0;
|
||||
let price = oneData.getGrilPrice();
|
||||
return price/100;
|
||||
}
|
||||
|
||||
/** 获取价格 */
|
||||
public getGrilPrice(categoryId: string, girlId: number): number {
|
||||
let oneData = this.getGrilBrief(categoryId, girlId);
|
||||
@@ -350,6 +358,14 @@ export class GirlData extends BaseData {
|
||||
if (!oneData) return 0;
|
||||
return oneData.getGrilPhotoUnlockCounts(id);
|
||||
}
|
||||
|
||||
/** 获取技师图片的原来价格,除100 */
|
||||
public getGrilPhotoOriginalPrice(categoryId: string, girlId: number, id: number): number {
|
||||
let oneData = this.getGrilDetail(categoryId, girlId);
|
||||
if (!oneData) return 0;
|
||||
let price = oneData.getGrilPhotoPrice(id);
|
||||
return price/100;
|
||||
}
|
||||
|
||||
/** 获取技师图片的价格 */
|
||||
public getGrilPhotoPrice(categoryId: string, girlId: number, id: number): number {
|
||||
@@ -430,6 +446,14 @@ export class GirlData extends BaseData {
|
||||
return oneData.getGrilVideoEmotion(id);
|
||||
}
|
||||
|
||||
/** 获取技师视频的原来价格,除100 */
|
||||
public getGrilVideoOriginalPrice(categoryId: string, girlId: number, id: number): number {
|
||||
let oneData = this.getGrilDetail(categoryId, girlId);
|
||||
if (!oneData) return 0;
|
||||
let price = oneData.getGrilVideoPrice(id);
|
||||
return price/100;
|
||||
}
|
||||
|
||||
/** 获取技师视频的价格 */
|
||||
public getGrilVideoPrice(categoryId: string, girlId: number, id: number): number {
|
||||
let oneData = this.getGrilDetail(categoryId, girlId);
|
||||
|
||||
@@ -126,10 +126,18 @@ export class ShopData extends BaseData {
|
||||
return oneData.name;
|
||||
}
|
||||
|
||||
/** 根据商品 id 获取商品价格 */
|
||||
public getPriceById(id: number): number | null {
|
||||
/** 根据商品 id 获取商品的原来价格,除100 */
|
||||
public getOriginalPriceById(id: number): number {
|
||||
let oneData = this.getGoodDataById(id);
|
||||
if (!oneData) return null;
|
||||
if (!oneData) return 0;
|
||||
let price = oneData.price;
|
||||
return price/100;
|
||||
}
|
||||
|
||||
/** 根据商品 id 获取商品价格 */
|
||||
public getPriceById(id: number): number {
|
||||
let oneData = this.getGoodDataById(id);
|
||||
if (!oneData) return 0;
|
||||
return oneData.price;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { _decorator, Button, Component, Node } from "cc";
|
||||
import { _decorator, Button, Component, Node, Label } from "cc";
|
||||
import li_BaseView from "../../../Main/Common/li_BaseView";
|
||||
import Utils from "../../../Main/Common/Utils";
|
||||
import { GButton } from "../../../Main/Common/GButton";
|
||||
@@ -7,8 +7,6 @@ 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;
|
||||
@@ -16,6 +14,7 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass("GirlListPopupPanel")
|
||||
export class GirlListPopupPanel extends li_BaseView {
|
||||
private _nodeTab: any = {};
|
||||
private priceLabel: Label;
|
||||
private category: number;
|
||||
private girlId: number;
|
||||
|
||||
@@ -27,6 +26,10 @@ export class GirlListPopupPanel extends li_BaseView {
|
||||
}
|
||||
onLoadCT() {
|
||||
Utils.parseNode(this.node, this._nodeTab);
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
// 价格
|
||||
this.priceLabel = this._nodeTab.Price.getComponent(Label);
|
||||
this.priceLabel.string = girlData.getGrilOriginalPrice(this.category.toString(), this.girlId).toString();
|
||||
this.registerListener();
|
||||
}
|
||||
registerListener() {
|
||||
|
||||
Reference in New Issue
Block a user