Commit 9040cf1e authored by hewenhao's avatar hewenhao

feat: fix typo

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