Commit 4d508118 authored by Bill's avatar Bill

fix: 修改活动页原价与活动价bug

parent a8019e54
......@@ -148,7 +148,11 @@ const EditPanelForm = () => {
const isWithMinType = minTypeToOne.includes(componentType) ? 1 : minTypeToTwo.includes(componentType) ? 2 : null
// console.log(hotItem".substring(0, 1));
formActions.setFieldState('product', (fieldState) => {
const [, parentKey] = selectedInfo.parentKey.split('-');
let parentKeyString = selectedInfo.parentKey
if (!parentKeyString) {
parentKeyString = selectedInfo.selectedKey.split("-").slice(0, -1).join("-")
}
const [, parentKey] = parentKeyString.split('-');
const isCombination = componentType === 'combinationItem';
/** 如果是组合促销, 要是已经选择了一个组合促销数据,那么搜索活动商品列表时需要添加当前活动id */
......
......@@ -13,11 +13,15 @@ const Price: React.FC<Iprops> = (props: Iprops) => {
<div className={styles.price}>
<div className={styles.originalPrice}>
<span className={styles.currency}></span>
<span>{originalPrice}/{unit}</span>
</div>
<div className={styles.discountPrice}>
{discountPrice}/{unit}
<span>{discountPrice || originalPrice}/{unit}</span>
</div>
{
(originalPrice !== discountPrice || !originalPrice) && (
<div className={styles.discountPrice}>
{originalPrice}/{unit}
</div>
) || null
}
</div>
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment