商场数据
This commit is contained in:
@@ -107,10 +107,33 @@ export class PurchaseConfig extends BaseConfig {
|
||||
return oneData.count;
|
||||
}
|
||||
|
||||
/** 根据商品 id 获取商品价格 */
|
||||
/** 根据商品 id 获取商品的原来价格,除100,卢币 */
|
||||
public getOriginalPriceById(id: number): number {
|
||||
let oneData = this.getConfigById(id);
|
||||
if (!oneData) return 0;
|
||||
let price = oneData.price;
|
||||
return price/100;
|
||||
}
|
||||
|
||||
/** 根据商品 id 获取商品价格,卢币 */
|
||||
public getPriceById(id: number): number | null {
|
||||
let oneData = this.getConfigById(id);
|
||||
if (!oneData) return null;
|
||||
return oneData.price;
|
||||
}
|
||||
|
||||
/** 根据商品 id 获取商品的原来价格,除100,usd */
|
||||
public getOriginalUsdPriceById(id: number): number {
|
||||
let oneData = this.getConfigById(id);
|
||||
if (!oneData) return 0;
|
||||
let price = oneData.usd;
|
||||
return price/100;
|
||||
}
|
||||
|
||||
/** 根据商品 id 获取商品价格,usd */
|
||||
public getUsdPriceById(id: number): number | null {
|
||||
let oneData = this.getConfigById(id);
|
||||
if (!oneData) return null;
|
||||
return oneData.usd;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user