From ac50bc38b9aa354e1fa824d31fdb059f57a9a8b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E9=87=8C=E8=83=A1=E5=93=A8?= <1146638442@qq.com> Date: Sun, 2 Jul 2023 07:46:17 +0000 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=8B=E5=8A=A8=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=5Fmys.set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- plugins/genshin/defSet/mys/set.yaml | 7 +- plugins/genshin/model/mys/apiTool.js | 379 ++++++++++++++------------- plugins/genshin/model/mys/mysInfo.js | 50 ++++ plugins/genshin/model/mysSign.js | 25 +- 5 files changed, 276 insertions(+), 187 deletions(-) diff --git a/package.json b/package.json index 74b5a52..2e2278b 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "chalk": "^5.2.0", "chokidar": "^3.5.3", "https-proxy-agent": "5.0.1", - "icqq": "^0.3.14", + "icqq": "^0.4.8", "image-size": "^1.0.2", "inquirer": "^9.1.4", "lodash": "^4.17.21", diff --git a/plugins/genshin/defSet/mys/set.yaml b/plugins/genshin/defSet/mys/set.yaml index fd5bbcc..4a992db 100644 --- a/plugins/genshin/defSet/mys/set.yaml +++ b/plugins/genshin/defSet/mys/set.yaml @@ -14,4 +14,9 @@ signTime: 0 2 0 * * ? # 别名设置权限 0-所有群员都可以添加 1-群管理员才能添加 2-主人才能添加 abbrSetAuth: 0 # 米游社攻略图默认来源设置 1-西风驿站 2-原神观测枢 3-派蒙喵喵屋 4-OH是姜姜呀 -defaultSource: 1 \ No newline at end of file +defaultSource: 1 + +# 米游社手动验证 0-关闭 1-开启 +verify: 0 +# 米游社手动验证API +verifyAddr: 'https://hlhs-nb.cn/GeeTest/register' \ No newline at end of file diff --git a/plugins/genshin/model/mys/apiTool.js b/plugins/genshin/model/mys/apiTool.js index 614cc6e..43fb9a1 100644 --- a/plugins/genshin/model/mys/apiTool.js +++ b/plugins/genshin/model/mys/apiTool.js @@ -4,191 +4,212 @@ * 临时处理,后续大概率重写 主要原因(懒) */ export default class apiTool { - /** - * - * @param {用户uid} uid - * @param {区服} server - * @param {是否为星穹铁道或其他游戏? type(bool or string)} isSr - */ - constructor(uid, server, isSr = false) { - this.uid = uid - this.isSr = isSr - this.server = server - this.game='genshin' - if(isSr) this.game='honkaisr' - if(typeof isSr !== 'boolean'){ - this.game=isSr - } + /** + * + * @param {用户uid} uid + * @param {区服} server + * @param {是否为星穹铁道或其他游戏? type(bool or string)} isSr + */ + constructor(uid, server, isSr = false) { + this.uid = uid + this.isSr = isSr + this.server = server + this.game = 'genshin' + if (isSr) this.game = 'honkaisr' + if (typeof isSr !== 'boolean') { + this.game = isSr } + } - getUrlMap = (data = {}) => { - let host, hostRecord - if (['cn_gf01', 'cn_qd01', 'prod_gf_cn','prod_qd_cn'].includes(this.server)) { - host = 'https://api-takumi.mihoyo.com/' - hostRecord = 'https://api-takumi-record.mihoyo.com/' - } else if (['os_usa', 'os_euro', 'os_asia', 'os_cht'].includes(this.server)) { - host = 'https://api-os-takumi.mihoyo.com/' - hostRecord = 'https://bbs-api-os.mihoyo.com/' + getUrlMap = (data = {}) => { + let host, hostRecord + if (['cn_gf01', 'cn_qd01', 'prod_gf_cn','prod_qd_cn'].includes(this.server)) { + host = 'https://api-takumi.mihoyo.com/' + hostRecord = 'https://api-takumi-record.mihoyo.com/' + } else if (['os_usa', 'os_euro', 'os_asia', 'os_cht'].includes(this.server)) { + host = 'https://api-os-takumi.mihoyo.com/' + hostRecord = 'https://bbs-api-os.mihoyo.com/' + } + let urlMap = { + genshin: { + /** 首页宝箱 */ + index: { + url: `${hostRecord}game_record/app/genshin/api/index`, + query: `role_id=${this.uid}&server=${this.server}` + }, + /** 深渊 */ + spiralAbyss: { + url: `${hostRecord}game_record/app/genshin/api/spiralAbyss`, + query: `role_id=${this.uid}&schedule_type=${data.schedule_type || 1}&server=${this.server}` + }, + /** 角色详情 */ + character: { + url: `${hostRecord}game_record/app/genshin/api/character`, + body: { role_id: this.uid, server: this.server } + }, + /** 树脂 */ + dailyNote: { + url: `${hostRecord}game_record/app/genshin/api/dailyNote`, + query: `role_id=${this.uid}&server=${this.server}` + }, + /** 签到信息 */ + bbs_sign_info: { + url: `${host}event/bbs_sign_reward/info`, + query: `act_id=e202009291139501®ion=${this.server}&uid=${this.uid}`, + sign: true + }, + /** 签到奖励 */ + bbs_sign_home: { + url: `${host}event/bbs_sign_reward/home`, + query: `act_id=e202009291139501®ion=${this.server}&uid=${this.uid}`, + sign: true + }, + /** 签到 */ + bbs_sign: { + url: `${host}event/bbs_sign_reward/sign`, + body: { act_id: 'e202009291139501', region: this.server, uid: this.uid }, + sign: true + }, + /** 详情 */ + detail: { + url: `${host}event/e20200928calculate/v1/sync/avatar/detail`, + query: `uid=${this.uid}®ion=${this.server}&avatar_id=${data.avatar_id}` + }, + /** 札记 */ + ys_ledger: { + url: 'https://hk4e-api.mihoyo.com/event/ys_ledger/monthInfo', + query: `month=${data.month}&bind_uid=${this.uid}&bind_region=${this.server}` + }, + /** 养成计算器 */ + compute: { + url: `${host}event/e20200928calculate/v2/compute`, + body: data + }, + blueprintCompute: { + url: `${host}event/e20200928calculate/v1/furniture/compute`, + body: data + }, + /** 养成计算器 */ + blueprint: { + url: `${host}event/e20200928calculate/v1/furniture/blueprint`, + query: `share_code=${data.share_code}®ion=${this.server}` + }, + /** 角色技能 */ + avatarSkill: { + url: `${host}event/e20200928calculate/v1/avatarSkill/list`, + query: `avatar_id=${data.avatar_id}` + }, + /** 七圣召唤数据 */ + basicInfo: { + url: `${hostRecord}game_record/app/genshin/api/gcg/basicInfo`, + query: `role_id=${this.uid}&server=${this.server}` + }, + /**使用兑换码 目前仅限国际服,来自于国服的uid请求已在mysInfo.js的init方法提前拦截 */ + useCdk: { + url: 'PLACE_HOLDER', + query: null + }, + /** 米游社验证 */ + createVerification: { + url: `${hostRecord}game_record/app/card/wapi/createVerification`, + query: 'is_high=true' + }, + /** 米游社验证 */ + verifyVerification: { + url: `${hostRecord}game_record/app/card/wapi/verifyVerification`, + body: data } - let urlMap = { - genshin: { - /** 首页宝箱 */ - index: { - url: `${hostRecord}game_record/app/genshin/api/index`, - query: `role_id=${this.uid}&server=${this.server}` - }, - /** 深渊 */ - spiralAbyss: { - url: `${hostRecord}game_record/app/genshin/api/spiralAbyss`, - query: `role_id=${this.uid}&schedule_type=${data.schedule_type || 1}&server=${this.server}` - }, - /** 角色详情 */ - character: { - url: `${hostRecord}game_record/app/genshin/api/character`, - body: { role_id: this.uid, server: this.server } - }, - /** 树脂 */ - dailyNote: { - url: `${hostRecord}game_record/app/genshin/api/dailyNote`, - query: `role_id=${this.uid}&server=${this.server}` - }, - /** 签到信息 */ - bbs_sign_info: { - url: `${host}event/bbs_sign_reward/info`, - query: `act_id=e202009291139501®ion=${this.server}&uid=${this.uid}`, - sign: true - }, - /** 签到奖励 */ - bbs_sign_home: { - url: `${host}event/bbs_sign_reward/home`, - query: `act_id=e202009291139501®ion=${this.server}&uid=${this.uid}`, - sign: true - }, - /** 签到 */ - bbs_sign: { - url: `${host}event/bbs_sign_reward/sign`, - body: { act_id: 'e202009291139501', region: this.server, uid: this.uid }, - sign: true - }, - /** 详情 */ - detail: { - url: `${host}event/e20200928calculate/v1/sync/avatar/detail`, - query: `uid=${this.uid}®ion=${this.server}&avatar_id=${data.avatar_id}` - }, - /** 札记 */ - ys_ledger: { - url: 'https://hk4e-api.mihoyo.com/event/ys_ledger/monthInfo', - query: `month=${data.month}&bind_uid=${this.uid}&bind_region=${this.server}` - }, - /** 养成计算器 */ - compute: { - url: `${host}event/e20200928calculate/v2/compute`, - body: data - }, - blueprintCompute: { - url: `${host}event/e20200928calculate/v1/furniture/compute`, - body: data - }, - /** 养成计算器 */ - blueprint: { - url: `${host}event/e20200928calculate/v1/furniture/blueprint`, - query: `share_code=${data.share_code}®ion=${this.server}` - }, - /** 角色技能 */ - avatarSkill: { - url: `${host}event/e20200928calculate/v1/avatarSkill/list`, - query: `avatar_id=${data.avatar_id}` - }, - /** 七圣召唤数据 */ - basicInfo: { - url: `${hostRecord}game_record/app/genshin/api/gcg/basicInfo`, - query: `role_id=${this.uid}&server=${this.server}` - }, - /**使用兑换码 目前仅限国际服,来自于国服的uid请求已在myinfo.js的init方法提前拦截 */ - useCdk: { - url: 'PLACE_HOLDER', - query: null - } - }, - honkaisr: { - /** 首页宝箱 */ - index: { - url: `${hostRecord}game_record/app/hkrpg/api/index`, - query: `role_id=${this.uid}&server=${this.server}` - }, - UserGame:{ - url:`${host}common/badge/v1/login/account`, - body: { uid: this.uid, region: this.server,lang:'zh-cn',game_biz:'hkrpg_cn' } - }, - /** - * 开拓阅历接口 - */ - ys_ledger:{ - url:`${host}/event/srledger/month_info`, - query:`region=${this.server}&uid=${this.uid}&month=${data.month}` - }, - /** 角色详情 */ - character: { - url: `${hostRecord}game_record/app/hkrpg/api/avatar/info`, - body: { role_id: this.uid, server: this.server } - }, - /** 树脂 */ - dailyNote: { - url: `${hostRecord}game_record/app/hkrpg/api/note`, - query: `role_id=${this.uid}&server=${this.server}` - }, - /** 签到信息 */ - bbs_sign_info: { - url: `${host}event/luna/info`, - query: `act_id=e202304121516551®ion=${this.server}&uid=${this.uid}`, - sign: true - }, - /** 签到奖励 */ - bbs_sign_home: { - url: `${host}event/luna/home`, - query: `act_id=e202304121516551®ion=${this.server}&uid=${this.uid}`, - sign: true - }, - /** 签到 */ - bbs_sign: { - url: `${host}event/luna/sign`, - body: { act_id:'e202304121516551', region: this.server, uid: this.uid }, - sign: true - }, - } + }, + honkaisr: { + /** 首页宝箱 */ + index: { + url: `${hostRecord}game_record/app/hkrpg/api/index`, + query: `role_id=${this.uid}&server=${this.server}` + }, + UserGame: { + url: `${host}common/badge/v1/login/account`, + body: { uid: this.uid, region: this.server, lang:'zh-cn', game_biz:'hkrpg_cn' } + }, + /** + * 开拓阅历接口 + */ + ys_ledger: { + url: `${host}/event/srledger/month_info`, + query: `region=${this.server}&uid=${this.uid}&month=${data.month}` + }, + /** 角色详情 */ + character: { + url: `${hostRecord}game_record/app/hkrpg/api/avatar/info`, + body: { role_id: this.uid, server: this.server } + }, + /** 树脂 */ + dailyNote: { + url: `${hostRecord}game_record/app/hkrpg/api/note`, + query: `role_id=${this.uid}&server=${this.server}` + }, + /** 签到信息 */ + bbs_sign_info: { + url: `${host}event/luna/info`, + query: `act_id=e202304121516551®ion=${this.server}&uid=${this.uid}`, + sign: true + }, + /** 签到奖励 */ + bbs_sign_home: { + url: `${host}event/luna/home`, + query: `act_id=e202304121516551®ion=${this.server}&uid=${this.uid}`, + sign: true + }, + /** 签到 */ + bbs_sign: { + url: `${host}event/luna/sign`, + body: { act_id:'e202304121516551', region: this.server, uid: this.uid }, + sign: true + }, + /** 米游社验证 */ + createVerification: { + url: 'https://bbs-api.mihoyo.com/misc/api/createVerification', + query: 'is_high=true', + sign: true + }, + /** 米游社验证 */ + verifyVerification: { + url: 'https://bbs-api.mihoyo.com/misc/api/verifyVerification', + body: data } + } + } - if (this.server.startsWith('os')) { - urlMap.genshin.bbs_sign_info.url = 'https://hk4e-api-os.hoyoverse.com/event/sol/info' - urlMap.genshin.bbs_sign_info.query = `act_id=e202102251931481®ion=${this.server}&uid=${this.uid}` - urlMap.genshin.bbs_sign_home.url = 'https://hk4e-api-os.hoyoverse.com/event/sol/home' - urlMap.genshin.bbs_sign_home.query = `act_id=e202102251931481®ion=${this.server}&uid=${this.uid}` - urlMap.genshin.bbs_sign.url = 'https://hk4e-api-os.hoyoverse.com/event/sol/sign' - urlMap.genshin.bbs_sign.body = { act_id: 'e202102251931481', region: this.server, uid: this.uid } - urlMap.genshin.detail.url = 'https://sg-public-api.hoyolab.com/event/calculateos/sync/avatar/detail'// 角色天赋详情 - urlMap.genshin.detail.query = `lang=zh-cn&uid=${this.uid}®ion=${this.server}&avatar_id=${data.avatar_id}` - urlMap.genshin.avatarSkill.url = 'https://sg-public-api.hoyolab.com/event/calculateos/avatar/skill_list'// 查询未持有的角色天赋 - urlMap.genshin.avatarSkill.query = `lang=zh-cn&avatar_id=${data.avatar_id}` - urlMap.genshin.compute.url = 'https://sg-public-api.hoyolab.com/event/calculateos/compute'// 已支持养成计算 - urlMap.genshin.blueprint.url = 'https://sg-public-api.hoyolab.com/event/calculateos/furniture/blueprint' - urlMap.genshin.blueprint.query = `share_code=${data.share_code}®ion=${this.server}&lang=zh-cn` - urlMap.genshin.blueprintCompute.url = 'https://sg-public-api.hoyolab.com/event/calculateos/furniture/compute' - urlMap.genshin.blueprintCompute.body = { lang: 'zh-cn', ...data } - urlMap.genshin.ys_ledger.url = 'https://hk4e-api-os.mihoyo.com/event/ysledgeros/month_info'// 支持了国际服札记 - urlMap.genshin.ys_ledger.query = `lang=zh-cn&month=${data.month}&uid=${this.uid}®ion=${this.server}` - urlMap.genshin.useCdk.url = 'https://sg-hk4e-api.hoyoverse.com/common/apicdkey/api/webExchangeCdkey' - urlMap.genshin.useCdk.query = `uid=${this.uid}®ion=${this.server}&lang=zh-cn&cdkey=${data.cdk}&game_biz=hk4e_global` - } - if(this.isSr&&this.server.includes('official')){ - urlMap.honkaisr.bbs_sign.url=`https://sg-public-api.hoyolab.com/event/luna/os/sign` - urlMap.honkaisr.bbs_sign.body = { act_id: 'e202303301540311', lang: "zh-cn" } - urlMap.honkaisr.bbs_sign_home.url=`https://sg-public-api.hoyolab.com/event/luna/os/home` - urlMap.honkaisr.bbs_sign_home.query=`act_id=e202303301540311®ion=${this.server}&uid=${this.uid}&lang=zh-cn` + if (this.server.startsWith('os')) { + urlMap.genshin.bbs_sign_info.url = 'https://hk4e-api-os.hoyoverse.com/event/sol/info' + urlMap.genshin.bbs_sign_info.query = `act_id=e202102251931481®ion=${this.server}&uid=${this.uid}` + urlMap.genshin.bbs_sign_home.url = 'https://hk4e-api-os.hoyoverse.com/event/sol/home' + urlMap.genshin.bbs_sign_home.query = `act_id=e202102251931481®ion=${this.server}&uid=${this.uid}` + urlMap.genshin.bbs_sign.url = 'https://hk4e-api-os.hoyoverse.com/event/sol/sign' + urlMap.genshin.bbs_sign.body = { act_id: 'e202102251931481', region: this.server, uid: this.uid } + urlMap.genshin.detail.url = 'https://sg-public-api.hoyolab.com/event/calculateos/sync/avatar/detail' // 角色天赋详情 + urlMap.genshin.detail.query = `lang=zh-cn&uid=${this.uid}®ion=${this.server}&avatar_id=${data.avatar_id}` + urlMap.genshin.avatarSkill.url = 'https://sg-public-api.hoyolab.com/event/calculateos/avatar/skill_list' // 查询未持有的角色天赋 + urlMap.genshin.avatarSkill.query = `lang=zh-cn&avatar_id=${data.avatar_id}` + urlMap.genshin.compute.url = 'https://sg-public-api.hoyolab.com/event/calculateos/compute' // 已支持养成计算 + urlMap.genshin.blueprint.url = 'https://sg-public-api.hoyolab.com/event/calculateos/furniture/blueprint' + urlMap.genshin.blueprint.query = `share_code=${data.share_code}®ion=${this.server}&lang=zh-cn` + urlMap.genshin.blueprintCompute.url = 'https://sg-public-api.hoyolab.com/event/calculateos/furniture/compute' + urlMap.genshin.blueprintCompute.body = { lang: 'zh-cn', ...data } + urlMap.genshin.ys_ledger.url = 'https://hk4e-api-os.mihoyo.com/event/ysledgeros/month_info' // 支持了国际服札记 + urlMap.genshin.ys_ledger.query = `lang=zh-cn&month=${data.month}&uid=${this.uid}®ion=${this.server}` + urlMap.genshin.useCdk.url = 'https://sg-hk4e-api.hoyoverse.com/common/apicdkey/api/webExchangeCdkey' + urlMap.genshin.useCdk.query = `uid=${this.uid}®ion=${this.server}&lang=zh-cn&cdkey=${data.cdk}&game_biz=hk4e_global` + } + if (this.isSr && this.server.includes('official')) { + urlMap.honkaisr.bbs_sign.url = 'https://sg-public-api.hoyolab.com/event/luna/os/sign' + urlMap.honkaisr.bbs_sign.body = { act_id: 'e202303301540311', lang: 'zh-cn' } + urlMap.honkaisr.bbs_sign_home.url = 'https://sg-public-api.hoyolab.com/event/luna/os/home' + urlMap.honkaisr.bbs_sign_home.query = `act_id=e202303301540311®ion=${this.server}&uid=${this.uid}&lang=zh-cn` - urlMap.honkaisr.bbs_sign_info.url=`https://sg-public-api.hoyolab.com/event/luna/os/info` - urlMap.honkaisr.bbs_sign_info.query=`act_id=e202303301540311®ion=${this.server}&uid=${this.uid}&lang=zh-cn` - } - return urlMap[this.game] + urlMap.honkaisr.bbs_sign_info.url = 'https://sg-public-api.hoyolab.com/event/luna/os/info' + urlMap.honkaisr.bbs_sign_info.query = `act_id=e202303301540311®ion=${this.server}&uid=${this.uid}&lang=zh-cn` } + return urlMap[this.game] + } } diff --git a/plugins/genshin/model/mys/mysInfo.js b/plugins/genshin/model/mys/mysInfo.js index da124fc..98acac8 100644 --- a/plugins/genshin/model/mys/mysInfo.js +++ b/plugins/genshin/model/mys/mysInfo.js @@ -1,9 +1,12 @@ import MysApi from './mysApi.js' import GsCfg from '../gsCfg.js' import lodash from 'lodash' +import fetch from 'node-fetch' import NoteUser from './NoteUser.js' import MysUser from './MysUser.js' import DailyCache from './DailyCache.js' +import common from '../../../../lib/common/common.js' + export default class MysInfo { static tips = '请先#绑定cookie\n发送【体力帮助】查看配置教程' @@ -214,6 +217,9 @@ export default class MysInfo { } else { res = await mysApi.getData(api, data) res = await mysInfo.checkCode(res, api) + if (res === 'repeat') { + res = await mysApi.getData(api, data) + } } return res @@ -377,6 +383,9 @@ export default class MysInfo { if (res.api === 'detail') res.retcode = 0 break case 1034: + if (await this.bbsVerification()) { + return 'repeat' + } logger.mark(`[米游社查询失败][uid:${this.uid}][qq:${this.userId}] 遇到验证码`) this.e.reply('米游社查询遇到验证码,请稍后再试') break @@ -392,6 +401,47 @@ export default class MysInfo { return res } + /** 刷新米游社验证 */ + async bbsVerification () { + let create = await MysInfo.get(this.e, 'createVerification') + if (!create || create.retcode !== 0) return false + + let verify = await MysInfo.verify(this.e, { uid: this.uid, ...create.data }) + if (!verify) return false + + let submit = await MysInfo.get(this.e, 'verifyVerification', verify) + if (!submit || submit.retcode !== 0) return false + + return true + } + + /** 手动验证 */ + static async verify (e, data) { + if (!data.gt || !data.challenge || !e?.reply) return false + let cfg = { ...GsCfg.getdefSet('mys', 'set'), ...GsCfg.getYaml('mys', 'set', 'config') } + if (!cfg.verify || !cfg.verifyAddr) return false + + /** 传递gt、challenge参数,返回link、result地址 */ + let res = await fetch(cfg.verifyAddr, { + method: 'POST', + body: JSON.stringify(data) + }) + res = await res.json() + if (!res.data) return false + + await e.reply(`请打开地址并完成验证\n${res.data.link}`, true) + for (let i = 0; i < 60; i++) { + let validate = await fetch(res.data.result) + validate = await validate.json() + if (validate.data) { + logger.mark(`[米游社验证成功][uid:${e.uid || data.uid}][qq:${e.user_id}]`) + return validate.data + } + await common.sleep(2000) + } + return false + } + /** 删除失效ck */ async delCk() { if (!this.ckUser) { diff --git a/plugins/genshin/model/mysSign.js b/plugins/genshin/model/mysSign.js index 65d8abb..d5d520e 100644 --- a/plugins/genshin/model/mysSign.js +++ b/plugins/genshin/model/mysSign.js @@ -2,6 +2,7 @@ import moment from 'moment' import lodash from 'lodash' import base from './base.js' import MysApi from './mys/mysApi.js' +import MysInfo from "./mys/mysInfo.js"; import gsCfg from './gsCfg.js' import User from './user.js' import common from '../../../lib/common/common.js' @@ -208,12 +209,24 @@ export default class MysSign extends base { } if (sign.data && sign.data.risk_code === 375) { - this.signMsg = '验证码失败' - sign.message = '验证码失败' - this.is_verify = true - - logger.mark(`[原神签到失败]${this.log}:${sign.message} 第${this.ckNum}个`) - return false + let verify = await MysInfo.verify(this.e, { uid: this.mysApi.uid, ...sign.data }) + if (!verify) { + this.signMsg = '验证码失败' + sign.message = '验证码失败' + this.is_verify = true + + logger.mark(`[原神签到失败]${this.log}:${sign.message} 第${this.ckNum}个`) + return false + } else { + sign = await this.mysApi.getData('bbs_sign', { + headers: { + 'x-rpc-seccode': verify.geetest_seccode, + 'x-rpc-validate': verify.geetest_validate, + 'x-rpc-challenge': verify.geetest_challenge + } + }) + this.signMsg = sign?.message ?? 'Too Many Requests' + } } if (sign.retcode === 0 && (sign?.data.success === 0 || sign?.message === 'OK')) { -- Gitee