更正`*体力`查询问题
This commit is contained in:
commit
41c26dd5f5
|
@ -99,9 +99,35 @@ export default class apiTool {
|
||||||
url: `${hostRecord}game_record/app/hkrpg/api/index`,
|
url: `${hostRecord}game_record/app/hkrpg/api/index`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}`
|
query: `role_id=${this.uid}&server=${this.server}`
|
||||||
},
|
},
|
||||||
|
basicInfo: {
|
||||||
|
url: `${hostRecord}game_record/app/hkrpg/api/role/basicInfo`,
|
||||||
|
query: `role_id=${this.uid}&server=${this.server}`
|
||||||
|
},
|
||||||
UserGame: {
|
UserGame: {
|
||||||
url: `${host}common/badge/v1/login/account`,
|
url: `${host}binding/api/getUserGameRolesByCookie`,
|
||||||
body: { uid: this.uid, region: this.server, lang: 'zh-cn', game_biz: 'hkrpg_cn' }
|
query: `game_biz=hkrpg_cn`
|
||||||
|
},
|
||||||
|
/** 深渊 (混沌回忆) */
|
||||||
|
spiralAbyss: {
|
||||||
|
url: `${hostRecord}game_record/app/hkrpg/api/challenge`,
|
||||||
|
query: `role_id=${this.uid}&schedule_type=${data.schedule_type || 1}&server=${this.server}`
|
||||||
|
},
|
||||||
|
avatarInfo: {
|
||||||
|
url: `${hostRecord}game_record/app/hkrpg/api/avatar/info`,
|
||||||
|
query: `need_wiki=true&role_id=${this.uid}&server=${this.server}`
|
||||||
|
},
|
||||||
|
/** 体力接口fp参数用于避开验证码 */
|
||||||
|
getFp: {
|
||||||
|
url: `https://public-data-api.mihoyo.com/device-fp/api/getFp`,
|
||||||
|
body: {
|
||||||
|
seed_id: data.seed_id,
|
||||||
|
device_id: data.deviceId,
|
||||||
|
platform: '5',
|
||||||
|
seed_time: new Date().getTime() + '',
|
||||||
|
ext_fields: '{"userAgent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/2.40.1","browserScreenSize":281520,"maxTouchPoints":5,"isTouchSupported":true,"browserLanguage":"zh-CN","browserPlat":"iPhone","browserTimeZone":"Asia/Shanghai","webGlRender":"Apple GPU","webGlVendor":"Apple Inc.","numOfPlugins":0,"listOfPlugins":"unknown","screenRatio":3,"deviceMemory":"unknown","hardwareConcurrency":"4","cpuClass":"unknown","ifNotTrack":"unknown","ifAdBlock":0,"hasLiedResolution":1,"hasLiedOs":0,"hasLiedBrowser":0}',
|
||||||
|
app_name: 'account_cn',
|
||||||
|
device_fp: '38d7ee834d1e9'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 开拓阅历接口
|
* 开拓阅历接口
|
||||||
|
@ -112,8 +138,8 @@ export default class apiTool {
|
||||||
},
|
},
|
||||||
/** 角色详情 */
|
/** 角色详情 */
|
||||||
character: {
|
character: {
|
||||||
url: `${hostRecord}game_record/app/hkrpg/api/avatar/info`,
|
url: `${hostRecord}game_record/app/hkrpg/api/avatar/basic`,
|
||||||
body: { role_id: this.uid, server: this.server }
|
query: `role_id=${this.uid}&server=${this.server}`
|
||||||
},
|
},
|
||||||
/** 树脂 */
|
/** 树脂 */
|
||||||
dailyNote: {
|
dailyNote: {
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default class MysApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
getUrl(type, data = {}) {
|
getUrl(type, data = {}) {
|
||||||
let urlMap = this.apiTool.getUrlMap(data)
|
let urlMap = this.apiTool.getUrlMap({...data,deviceId:this.device})
|
||||||
if (!urlMap[type]) return false
|
if (!urlMap[type]) return false
|
||||||
|
|
||||||
let { url, query = '', body = '', sign = '' } = urlMap[type]
|
let { url, query = '', body = '', sign = '' } = urlMap[type]
|
||||||
|
|
|
@ -16,25 +16,31 @@ export default class Note extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getData () {
|
async getData () {
|
||||||
let res = await MysInfo.get(this.e, 'dailyNote')
|
let seed_id=lodash.sample('abcdefghijklmnopqrstuvwxyz0123456789',16).replace(/,/g, '')
|
||||||
|
let device_fp=await MysInfo.get(this.e, 'getFp',{
|
||||||
|
seed_id
|
||||||
|
})
|
||||||
|
let res = await MysInfo.get(this.e, 'dailyNote',{headers:{
|
||||||
|
'x-rpc-device_fp':device_fp?.data?.device_fp
|
||||||
|
}})
|
||||||
let resUser
|
let resUser
|
||||||
if (!res || res.retcode !== 0) return false
|
if (!res || res.retcode !== 0) return false
|
||||||
console.log(this.e.isSr, res)
|
|
||||||
/** 截图数据 */
|
/** 截图数据 */
|
||||||
let data = this.e.isSr ? this.noteSr(res) : this.noteData(res)
|
let data = this.e.isSr ? this.noteSr(res) : this.noteData(res)
|
||||||
console.log(data)
|
|
||||||
let screenData = this.screenData
|
let screenData = this.screenData
|
||||||
if (this.e.isSr) {
|
if (this.e.isSr) {
|
||||||
screenData.tplFile = './plugins/genshin/resources/StarRail/html/dailyNote/dailyNote.html'
|
screenData.tplFile = './plugins/genshin/resources/StarRail/html/dailyNote/dailyNote.html'
|
||||||
resUser = await MysInfo.get(this.e, 'UserGame')
|
resUser = await MysInfo.get(this.e, 'UserGame')
|
||||||
console.log('resUser', resUser)
|
resUser.data?.list?.forEach(v=> this.e.uid.includes(v.game_biz) )
|
||||||
if (!resUser || resUser.retcode !== 0) return false
|
if (!resUser || resUser.retcode !== 0) return false
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
name: this.e.sender.card,
|
name: this.e.sender.card,
|
||||||
quality: 80,
|
quality: 80,
|
||||||
...screenData,
|
...screenData,
|
||||||
...data, ...resUser?.data
|
...data, ...resUser?.data?.list[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +48,7 @@ export default class Note extends base {
|
||||||
let { data } = res
|
let { data } = res
|
||||||
let nowDay = moment().date()
|
let nowDay = moment().date()
|
||||||
let nowUnix = Number(moment().format('X'))
|
let nowUnix = Number(moment().format('X'))
|
||||||
|
|
||||||
/** 树脂 */
|
/** 树脂 */
|
||||||
let resinMaxTime
|
let resinMaxTime
|
||||||
if (data.stamina_recover_time > 0) {
|
if (data.stamina_recover_time > 0) {
|
||||||
|
|
Loading…
Reference in New Issue