Commit 9040cf1e authored by hewenhao's avatar hewenhao

feat: fix typo

parent ebde4b1f
......@@ -10,7 +10,7 @@ interface CardMainProps {
disabled?: boolean;
extra?: React.ReactNode;
price: number;
stoke: number | null;
stock: number | null;
}
export default ({
......@@ -21,7 +21,7 @@ export default ({
onClick,
disabled,
price,
stoke
stock
}: CardMainProps) => {
const _onClick = () => {
if (!disabled) {
......@@ -38,8 +38,8 @@ export default ({
<View className={styles['card-description']}>
<View className={styles['card-title']}>
{title}
{stoke !== null && (
<View className={styles['stoke-left']}>本月库存 <Text className={styles.left_value}>{stoke}</Text></View>
{stock !== null && (
<View className={styles['stoke-left']}>本月库存 <Text className={styles.left_value}>{stock}</Text></View>
)}
</View>
<Text className={styles['card-subtitle']}>{subtitle}</Text>
......
......@@ -17,7 +17,7 @@ type ExchangeGoods = {
subTitle: string;
description: string;
price: number;
stoke: number | null;
stock: number | null;
img: string;
}
......@@ -27,7 +27,7 @@ const ExchangeItems: ExchangeGoods[] = [
subTitle: '答题卡',
description: '答题卡是不断追求更高档位与排名的必备道具答题卡是不断追求更高档位与排名的必备道具',
price: 30,
stoke: null,
stock: null,
img: require('./assets/ph.png'),
},
......@@ -36,7 +36,7 @@ const ExchangeItems: ExchangeGoods[] = [
subTitle: '神秘大礼',
description: '兑换神秘大礼,线下领取超级大礼',
price: 30,
stoke: 10,
stock: 10,
img: require('./assets/gift.png'),
}
]
......@@ -69,9 +69,9 @@ const StudyMarket = () => {
<CardMain
title={item.subTitle}
cover={item.img}
stoke={item.stoke}
stock={item.stock}
price={item.price}
disabled={item.stoke !== null && item.stoke < 1}
disabled={item.stock !== null && item.stock < 1}
subtitle={item.description}
onClick={() => {
open(item)
......
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