Commit e68d6cde authored by hewenhao's avatar hewenhao

feat: 优化

parent d80d0343
...@@ -110,7 +110,7 @@ export interface CompleteStageOut { ...@@ -110,7 +110,7 @@ export interface CompleteStageOut {
/** 成就奖励 */ /** 成就奖励 */
levelReward: number; levelReward: number;
/** 排名 */ /** 排名 */
ranks: StageRank[]; ranks: StageRank[] | null;
/** 耗时 */ /** 耗时 */
resultTime: number; resultTime: number;
/** 是否升档奖励 */ /** 是否升档奖励 */
......
...@@ -54,7 +54,7 @@ const GameCompleteAchieve = () => { ...@@ -54,7 +54,7 @@ const GameCompleteAchieve = () => {
const time = useFormatTick((gameResult?.levelTime ?? 0) * 1000) const time = useFormatTick((gameResult?.levelTime ?? 0) * 1000)
const rankNo = useMemo(() => { const rankNo = useMemo(() => {
return gameResult?.ranks.find(c => c.me)?.no ?? 'NaN' return gameResult?.ranks?.find(c => c.me)?.no ?? 'NaN'
}, [gameResult]) }, [gameResult])
const rankNoS = useMemo(() => { const rankNoS = useMemo(() => {
......
...@@ -101,7 +101,7 @@ const GameCompleteHead = () => { ...@@ -101,7 +101,7 @@ const GameCompleteHead = () => {
</View> </View>
<View className={styles.item}> <View className={styles.item}>
<Image src={require('../assets/time.png')} className={styles.icon}></Image> <Image src={require('../assets/time.png')} className={styles.icon}></Image>
<View className={styles.item_text}>{time.minutes}:{time.seconds}</View> <View className={classNames(styles.item_text, gameResult.errNum <= 0 && !gameResult.level && styles.err)}>{time.minutes}:{time.seconds}</View>
</View> </View>
</View> </View>
</View> </View>
......
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
.bottom { .bottom {
width: 324px; width: 324px;
display: flex; display: flex;
justify-content: flex-end; justify-content: space-between;
margin-left: 132px; margin-left: 132px;
padding: 0 30px 24px 40px; padding: 0 30px 24px 30px;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
&::after { &::after {
......
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