hookehuyr

fix(profile): 修复学习记录进度计算时未处理空值的问题

...@@ -138,6 +138,8 @@ const onLoad = async () => { ...@@ -138,6 +138,8 @@ const onLoad = async () => {
138 }); 138 });
139 if (code) { 139 if (code) {
140 data.forEach((item) => { 140 data.forEach((item) => {
141 + item?.study_count = item?.study_count || 0;
142 + item?.count = item?.count || 0;
141 item.record_progress = Math.floor((item?.study_count/item?.count)*100); 143 item.record_progress = Math.floor((item?.study_count/item?.count)*100);
142 }); 144 });
143 records.value.push(...data); 145 records.value.push(...data);
......