MCPcopy Create free account
hub / github.com/Xu22Web/tech-study-js / refreshScoreInfo

Function refreshScoreInfo

tech-study.js:4470–4489  ·  view source on GitHub ↗

* @description 刷新分数信息

()

Source from the content-addressed store, hash-verified

4468 * @description 刷新分数信息
4469 */
4470async function refreshScoreInfo() {
4471 // 未登录
4472 if (!login.value) {
4473 throw new Error('用户未登录!');
4474 }
4475 log('加载分数信息...');
4476 // 获取总分
4477 const totalScoreRes = await getTotalScore();
4478 // 获取当天总分
4479 const todayScoreRes = await getTodayScore();
4480 // 整数值
4481 if (Number.isInteger(totalScoreRes) && Number.isInteger(todayScoreRes)) {
4482 // 设置分数
4483 totalScore.value = totalScoreRes;
4484 todayScore.value = todayScoreRes;
4485 return true;
4486 }
4487 log('加载分数信息失败!');
4488 return false;
4489}
4490/**
4491 * @description 刷新任务列表
4492 */

Callers 5

doExamPracticeFunction · 0.70
handleLoginFunction · 0.70
readNewsFunction · 0.70
watchVideoFunction · 0.70
onMountedFunction · 0.70

Calls 3

logFunction · 0.70
getTotalScoreFunction · 0.70
getTodayScoreFunction · 0.70

Tested by

no test coverage detected