Commit ccd2e3cf authored by hewenhao's avatar hewenhao

Merge branch 'feature/2023-04-19-iter' of…

Merge branch 'feature/2023-04-19-iter' of dev.jiuaoedu.com:hewenhao/GeekLearnMathWeapp into feature/2023-04-19-iter
parents 0ff25cbf 24db359c
{ {
"noun": [ "noun": [
"格罗布",
"格利乔",
"泽塔",
"罗索",
"布鲁",
"赛迦",
"风马",
"泰塔斯",
"泰迦",
"维克特利",
"艾克斯",
"赛文21",
"赛文X",
"银河",
"捷德",
"欧布",
"奥特之母",
"奥特之父",
"佐菲", "佐菲",
"初代", "初代",
"赛文", "赛文",
......
...@@ -222,6 +222,31 @@ ...@@ -222,6 +222,31 @@
"小突破者", "小突破者",
"小合群者", "小合群者",
"小原则者", "小原则者",
"小支持者" "小支持者",
"光之国",
"宇宙警备队",
"星光战士",
"兄弟联盟",
"奥特曼",
"古代巨人",
"勇士之心",
"银河联邦",
"时空守护者",
"大地守护者",
"天空巡逻队",
"光明守望者",
"暗影战士",
"宇宙维和队",
"奥特曼联盟",
"元素战士",
"星际游侠",
"科特队",
"怪兽攻击队",
"UGM",
"地球防卫军",
"怪兽打击队",
"地球和平结盟",
"超能力战队",
"特战队"
] ]
} }
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
} }
.consume { .consume {
font-size: 20PX; font-size: 18PX;
} }
} }
} }
......
...@@ -46,11 +46,11 @@ const MainHeader = () => { ...@@ -46,11 +46,11 @@ const MainHeader = () => {
const renderFirst = useCallback(() => stageDetail === null const renderFirst = useCallback(() => stageDetail === null
? null ? null
: ( : (
<View className={styles.details}> <View className={styles.details}>
{renderItem({ u: assets['level-big-s.png'].u, v: setting.sPoint!, t: stageDetail.sTime })} {renderItem({ u: assets['level-big-s.png'].u, v: setting.sPoint!, t: stageDetail.sTime })}
{renderItem({ u: assets['level-big-a.png'].u, v: setting.aPoint!, t: stageDetail.aTime })} {renderItem({ u: assets['level-big-a.png'].u, v: setting.aPoint!, t: stageDetail.aTime })}
{renderItem({ u: assets['level-big-b.png'].u, v: setting.bPoint!, t: stageDetail.bTime })} {renderItem({ u: assets['level-big-b.png'].u, v: setting.bPoint!, t: stageDetail.bTime })}
</View> </View>
), [stageDetail, stageDetail?.sTime, stageDetail?.aTime, stageDetail?.bTime]) ), [stageDetail, stageDetail?.sTime, stageDetail?.aTime, stageDetail?.bTime])
const renderAgain = useCallback(() => ( const renderAgain = useCallback(() => (
...@@ -81,80 +81,88 @@ const MainHeader = () => { ...@@ -81,80 +81,88 @@ const MainHeader = () => {
return null return null
} }
console.log('stageDetailPre', stageDetailPre)
return ( return (
<View className={styles.wrapper}> <View className={styles.wrapper}>
<View className={styles.title}>{stageDetail.name || '-'}</View> <View className={styles.title}>{stageDetail.name || '-'}</View>
<View className={styles.labels}> <View className={styles.labels}>
<View className={styles.label}> {(stageDetail.firstTime || !stageDetail.level)
<Image className={styles.icon} src={formatType(stageDetail?.type).u} mode="widthFix" /> ? (
<Text>{formatType(stageDetail?.type).t}</Text> <>
</View> <View className={styles.label}>
<Text className={styles.label}>{stageDetail.content || '-'}</Text> <Image className={styles.icon} src={formatType(stageDetail?.type).u} mode="widthFix" />
<Text className={styles.label}>共 {stageDetail.questionNum} 题</Text> <Text>{formatType(stageDetail?.type).t}</Text>
</View>
<Text className={styles.label}>{stageDetail.content || '-'}</Text>
<Text className={styles.label}>共 {stageDetail.questionNum} 题</Text>
</>
)
: (
<View className={styles.label}>
<Image src={assets['clock.png'].u} className={styles.icon} />
<Text style={{ marginLeft: 4, marginRight: 4 }}>最佳表现</Text><Text>{stageDetail.bestResultTime || 0}秒</Text>
</View>
)}
</View> </View>
{(stageDetail.firstTime || !stageDetail.level) {(stageDetail.firstTime || !stageDetail.level)
? null ? null
: <View className={styles.replay}> : <View className={styles.replay}>
<View className={styles.performance}> <View className={styles.performance}>
<Text>最佳表现</Text> <Text>当前档位</Text>
<View className={styles.details}> <View className={styles.details}>
<Image src={assets['clock.png'].u} className={styles.logo} /> <Text className={styles.consume}>排名<Text style={{ color: '#FEB645' }}>前{stageDetail.gear || 0}%</Text></Text>
<Text className={styles.consume}>{stageDetail.bestResultTime || 0}秒</Text> </View>
</View> </View>
</View> <View className={styles.achievement}>
<View className={styles.achievement}> <Text className={styles.text}>勋章成就</Text>
<Text className={styles.text}>勋章成就</Text> {/* 以后优化 */}
{/* 以后优化 */} {stageDetailPre
{stageDetailPre ? (
? ( <>
<> <View className={classNames(styles.details,)}>
<View className={classNames(styles.details,)}> <Image src={formatLevelAchieve(stageDetailPre.firstTime ? stageDetail?.level : (stageDetailPre?.level || stageDetail?.level))} className={styles.logo} />
<Image src={formatLevelAchieve(stageDetailPre.firstTime ? stageDetail?.level : (stageDetailPre?.level || stageDetail?.level))} className={styles.logo} /> <Image src={formatTopAchieve(stageDetailPre.firstTime ? stageDetail?.gear?.toString() : (stageDetailPre?.gear?.toString() || stageDetail?.gear?.toString()))} className={styles.logo} />
<Image src={formatTopAchieve(stageDetailPre.firstTime ? stageDetail?.gear?.toString() : (stageDetailPre?.gear?.toString() || stageDetail?.gear?.toString()))} className={styles.logo} /> <Image src={(isKing || (stageDetailPre.firstTime ? stageDetail?.upGear : (stageDetailPre?.upGear || stageDetail?.upGear))) ? assets['upgear.png'].u : assets['upgear-un.png'].u} className={styles.logo} />
<Image src={(isKing || (stageDetailPre.firstTime ? stageDetail?.upGear : (stageDetailPre?.upGear || stageDetail?.upGear))) ? assets['upgear.png'].u : assets['upgear-un.png'].u} className={styles.logo} /> </View>
</View>
<View className={styles.beforeDetails}> <View className={styles.beforeDetails}>
<Image <Image
src={formatLevelAchieve(stageDetail?.level)} src={formatLevelAchieve(stageDetail?.level)}
className={classNames( className={classNames(
styles.logo, { styles.logo, {
[styles.show]: stageDetailPre.level && stageDetail?.level !== stageDetailPre?.level [styles.show]: stageDetailPre.level && stageDetail?.level !== stageDetailPre?.level
}) })
} }
/> />
<Image <Image
src={formatTopAchieve(stageDetail.gear?.toString())} src={formatTopAchieve(stageDetail.gear?.toString())}
className={classNames( className={classNames(
styles.logo, { styles.logo, {
[styles.show]: stageDetailPre.gear && stageDetail?.gear <= 30 && stageDetail?.gear < stageDetailPre?.gear [styles.show]: stageDetailPre.gear && stageDetail?.gear <= 30 && stageDetail?.gear < stageDetailPre?.gear
}) })
} }
/> />
<Image <Image
src={assets['upgear.png'].u} src={assets['upgear.png'].u}
className={classNames( className={classNames(
styles.logo, { styles.logo, {
[styles.show]: stageDetail?.upGear !== stageDetailPre?.upGear [styles.show]: stageDetail?.upGear !== stageDetailPre?.upGear
}) })
} }
/> />
</View>
</>
)
: (
<View className={styles.details}>
<Image src={formatLevelAchieve(stageDetail?.level)} className={styles.logo} />
<Image src={formatTopAchieve(stageDetail.gear?.toString())} className={styles.logo} />
<Image src={(isKing || stageDetail.upGear) ? assets['upgear.png'].u : assets['upgear-un.png'].u} className={styles.logo} />
</View> </View>
</> )}
) </View>
: ( </View>}
<View className={styles.details}>
<Image src={formatLevelAchieve(stageDetail?.level)} className={styles.logo} />
<Image src={formatTopAchieve(stageDetail.gear?.toString())} className={styles.logo} />
<Image src={(isKing || stageDetail.upGear) ? assets['upgear.png'].u : assets['upgear-un.png'].u} className={styles.logo} />
</View>
)}
</View>
</View>}
{!isKing && <View className={styles.requirement}> {!isKing && <View className={styles.requirement}>
<View className={styles.header}> <View className={styles.header}>
......
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