mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
Add getPrice().
This commit is contained in:
parent
fa9b49e25b
commit
88b0fb6e52
@ -83,6 +83,10 @@ class ProductBuyPage extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getPrice(product) {
|
||||||
|
return `${this.getCurrencySymbol(product)}${product?.price} (${this.getCurrencyText(product)})`;
|
||||||
|
}
|
||||||
|
|
||||||
getProviders(product) {
|
getProviders(product) {
|
||||||
if (this.state.providers.length === 0 || product.providers.length === 0) {
|
if (this.state.providers.length === 0 || product.providers.length === 0) {
|
||||||
return [];
|
return [];
|
||||||
@ -207,7 +211,9 @@ class ProductBuyPage extends React.Component {
|
|||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label={i18next.t("product:Price")}>
|
<Descriptions.Item label={i18next.t("product:Price")}>
|
||||||
<span style={{fontSize: 28, color: "red", fontWeight: "bold"}}>
|
<span style={{fontSize: 28, color: "red", fontWeight: "bold"}}>
|
||||||
{`${this.getCurrencySymbol(product)}${product?.price} (${this.getCurrencyText(product)})`}
|
{
|
||||||
|
this.getPrice(product)
|
||||||
|
}
|
||||||
</span>
|
</span>
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label={i18next.t("product:Quantity")}><span style={{fontSize: 16}}>{product?.quantity}</span></Descriptions.Item>
|
<Descriptions.Item label={i18next.t("product:Quantity")}><span style={{fontSize: 16}}>{product?.quantity}</span></Descriptions.Item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user