Commit e68d6cde authored by hewenhao's avatar hewenhao

feat: 优化

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