协议调试
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user