mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-24 22:19:41 +08:00
🩹 修复 ESLint 代码规范错误
This commit is contained in:
@@ -365,28 +365,24 @@ async function uploadAbyss(): Promise<void> {
|
||||
await TGLogger.Warn("[Abyss][uploadAbyss] 非最新深渊数据");
|
||||
return;
|
||||
}
|
||||
let upAccount = account.value;
|
||||
let upCk = cookie.value;
|
||||
const gcFind = await TSUserAccount.game.getAccountByGid(uidCur.value!.toString());
|
||||
console.log(uidCur.value, gcFind);
|
||||
if (!gcFind) {
|
||||
showSnackbar.warn(`未找到 ${uidCur.value} 对应 UID,无法刷新角色数据进行上传`);
|
||||
return;
|
||||
}
|
||||
upAccount = gcFind;
|
||||
const acFind = await TSUserAccount.account.getAccount(gcFind.uid);
|
||||
if (!acFind) {
|
||||
showSnackbar.warn(`未找到 ${uidCur.value} 对应 CK,无法刷新角色数据进行上传`);
|
||||
return;
|
||||
}
|
||||
upCk = acFind.cookie;
|
||||
try {
|
||||
await showLoading.start(`正在上传 ${upAccount.gameUid} 的深渊数据`, `期数:${abyssData.id}`);
|
||||
await showLoading.start(`正在上传 ${gcFind.gameUid} 的深渊数据`, `期数:${abyssData.id}`);
|
||||
const transAbyss = hutao.Abyss.utils.transData(abyssData);
|
||||
if (userName.value) transAbyss.ReservedUserName = userName.value;
|
||||
const check = await refreshAvatars(upCk!, upAccount);
|
||||
const check = await refreshAvatars(acFind.cookie!, gcFind);
|
||||
if (!check) return;
|
||||
const roles = await TSUserAvatar.getAvatars(Number(upAccount.gameUid));
|
||||
const roles = await TSUserAvatar.getAvatars(Number(gcFind.gameUid));
|
||||
if (!roles) {
|
||||
await showLoading.end();
|
||||
showSnackbar.warn("未找到角色数据");
|
||||
|
||||
@@ -302,29 +302,25 @@ async function refreshCombat(): Promise<void> {
|
||||
}
|
||||
|
||||
async function loadCharMaster(): Promise<void> {
|
||||
let cmAccount = account.value;
|
||||
let cmCk = cookie.value;
|
||||
const gcFind = await TSUserAccount.game.getAccountByGid(uidCur.value!.toString());
|
||||
console.log(uidCur.value, gcFind);
|
||||
if (!gcFind) {
|
||||
showSnackbar.warn(`未找到 ${uidCur.value} 对应 UID,无法获取对应游迹数据`);
|
||||
return;
|
||||
}
|
||||
cmAccount = gcFind;
|
||||
const acFind = await TSUserAccount.account.getAccount(gcFind.uid);
|
||||
if (!acFind) {
|
||||
showSnackbar.warn(`未找到 ${uidCur.value} 对应 CK,无法获取对应游迹数据`);
|
||||
return;
|
||||
}
|
||||
cmCk = acFind.cookie;
|
||||
await TGLogger.Info("[Combat][loadCharMaster] 获取绘想游迹数据");
|
||||
await showLoading.start(`正在获取${cmAccount.gameUid}的绘想游迹数据`);
|
||||
const res = await recordReq.combat.char(cmCk!, cmAccount);
|
||||
await showLoading.start(`正在获取${gcFind.gameUid}的绘想游迹数据`);
|
||||
const res = await recordReq.combat.char(acFind.cookie!, gcFind);
|
||||
console.log(res);
|
||||
if ("retcode" in res) {
|
||||
await showLoading.end();
|
||||
showSnackbar.error(`[${res.retcode}]${res.message}`);
|
||||
await TGLogger.Error(`[Combat][loadCharMaster] 获取${cmAccount.gameUid}的剧诗数据失败`);
|
||||
await TGLogger.Error(`[Combat][loadCharMaster] 获取${gcFind.gameUid}的剧诗数据失败`);
|
||||
await TGLogger.Error(`[Combat][loadCharMaster] ${res.retcode} ${res.message}`);
|
||||
return;
|
||||
}
|
||||
@@ -340,29 +336,25 @@ async function loadCharMaster(): Promise<void> {
|
||||
}
|
||||
|
||||
async function loadTarot(): Promise<void> {
|
||||
let trAccount = account.value;
|
||||
let trCk = cookie.value;
|
||||
const gcFind = await TSUserAccount.game.getAccountByGid(uidCur.value!.toString());
|
||||
console.log(uidCur.value, gcFind);
|
||||
if (!gcFind) {
|
||||
showSnackbar.warn(`未找到 ${uidCur.value} 对应 UID,无法获取对应圣牌数据`);
|
||||
return;
|
||||
}
|
||||
trAccount = gcFind;
|
||||
const acFind = await TSUserAccount.account.getAccount(gcFind.uid);
|
||||
if (!acFind) {
|
||||
showSnackbar.warn(`未找到 ${uidCur.value} 对应 CK,无法获取对应圣牌数据`);
|
||||
return;
|
||||
}
|
||||
trCk = acFind.cookie;
|
||||
await TGLogger.Info("[Combat][loadTarot] 获取月谕圣牌数据");
|
||||
await showLoading.start(`正在获取${trAccount.gameUid}的月谕圣牌数据`);
|
||||
const res = await recordReq.combat.base(trCk!, trAccount);
|
||||
await showLoading.start(`正在获取${gcFind.gameUid}的月谕圣牌数据`);
|
||||
const res = await recordReq.combat.base(acFind.cookie!, gcFind);
|
||||
console.log(res);
|
||||
if ("retcode" in res) {
|
||||
await showLoading.end();
|
||||
showSnackbar.error(`[${res.retcode}]${res.message}`);
|
||||
await TGLogger.Error(`[Combat][loadTarot] 获取${trAccount.gameUid}的月谕圣牌数据失败`);
|
||||
await TGLogger.Error(`[Combat][loadTarot] 获取${gcFind.gameUid}的月谕圣牌数据失败`);
|
||||
await TGLogger.Error(`[Combat][loadTarot] ${res.retcode} ${res.message}`);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -331,9 +331,9 @@ function searchMaterial(): void {
|
||||
}
|
||||
|
||||
function handleUpdate(info: MaterialInfo): void {
|
||||
let find = materialList.value.find((i) => i.info.id === info.info.id);
|
||||
const find = materialList.value.find((i) => i.info.id === info.info.id);
|
||||
if (find !== undefined) {
|
||||
find = info;
|
||||
Object.assign(find, info);
|
||||
curMaterial.value = info;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user