修正开拓力显示问题

This commit is contained in:
Ctrlcvs 2023-05-06 17:41:07 +08:00
parent f6890f27c4
commit e69ff80ae3
2 changed files with 13 additions and 2 deletions

View File

@ -47,11 +47,18 @@ export default class Note extends base {
let minutes =d.minutes() let minutes =d.minutes()
let seconds =d.seconds() let seconds =d.seconds()
resinMaxTime = hours+'小时'+minutes+'分钟'+seconds+'秒' resinMaxTime = hours+'小时'+minutes+'分钟'+seconds+'秒'
//精确到秒。。。。
if(day>0){ if(day>0){
resinMaxTime =day+'天'+hours+'小时'+minutes+'分钟'+seconds+'秒' resinMaxTime =day+'天'+hours+'小时'+minutes+'分钟'+seconds+'秒'
}else if(hours>0){
resinMaxTime = hours+'小时'+minutes+'分钟'+seconds+'秒'
}else if(minutes>0){
resinMaxTime = minutes+'分钟'+seconds+'秒'
}else if(seconds>0){
resinMaxTime = seconds+'秒'
} }
} }
data.bfStamina = data.current_stamina / data.max_stamina * data.max_stamina +'%'; data.bfStamina = data.current_stamina / data.max_stamina * 100 +'%';
/** 派遣 */ /** 派遣 */
for(let item of data.expeditions){ for(let item of data.expeditions){
let d = moment.duration(item.remaining_time, 'seconds'); let d = moment.duration(item.remaining_time, 'seconds');

View File

@ -30,7 +30,11 @@
<div class="subject_note">开拓力:<span>{{current_stamina}}</span>/<span>{{max_stamina}}</span></div> <div class="subject_note">开拓力:<span>{{current_stamina}}</span>/<span>{{max_stamina}}</span></div>
<div class="subject_solid"><span style="width: {{bfStamina}};"></span></div> <div class="subject_solid"><span style="width: {{bfStamina}};"></span></div>
<div class="subject_date"> <div class="subject_date">
剩余回复时间:<span style="margin-left: 25px;">{{resinMaxTime}}</span> {{if stamina_recover_time>0}}
剩余恢复时间:<span style="margin-left: 25px;">{{resinMaxTime}}</span>
{{else}}
开拓力已完全恢复
{{/if}}
</div> </div>
</div> </div>
<div class="title_wt"> <div class="title_wt">