mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 03:20:52 +08:00
更正sk绑定时星穹铁道数据异常问题(#81)
This commit is contained in:
parent
ceaf5f2903
commit
a389028b57
@ -199,6 +199,7 @@ const boards = {
|
|||||||
name: '崩坏星穹铁道',
|
name: '崩坏星穹铁道',
|
||||||
actid: 'e202304121516551',
|
actid: 'e202304121516551',
|
||||||
biz:'hkrpg_cn',
|
biz:'hkrpg_cn',
|
||||||
|
osbiz: 'hkrpg_global',
|
||||||
url: "https://bbs.mihoyo.com/sr/",
|
url: "https://bbs.mihoyo.com/sr/",
|
||||||
signUrl(data, type, api) { //预留方法方便后续迭代
|
signUrl(data, type, api) { //预留方法方便后续迭代
|
||||||
let dataUrl = {}
|
let dataUrl = {}
|
||||||
|
@ -391,7 +391,7 @@ export default class user {
|
|||||||
let msg = e?.msg;
|
let msg = e?.msg;
|
||||||
//暂时先这样吧,等有空再优化~
|
//暂时先这样吧,等有空再优化~
|
||||||
this.allSign = {
|
this.allSign = {
|
||||||
findModel: ["崩坏3", "崩坏2", '原神', '未定事件簿'],
|
findModel: ["崩坏3", "崩坏2", '原神', '未定事件簿', '崩坏星穹铁道'],
|
||||||
"崩坏3": {
|
"崩坏3": {
|
||||||
bindGame: 0,
|
bindGame: 0,
|
||||||
sign: 0,
|
sign: 0,
|
||||||
@ -788,16 +788,20 @@ export default class user {
|
|||||||
res = await this.getData('getLtoken', { cookies: this.cookies }, false)
|
res = await this.getData('getLtoken', { cookies: this.cookies }, false)
|
||||||
v2Sk = await this.getData('getByStokenV2', { headers: { Cookie: this.cookies } }, false)
|
v2Sk = await this.getData('getByStokenV2', { headers: { Cookie: this.cookies } }, false)
|
||||||
}
|
}
|
||||||
res = await this.getData("userGameInfo", this.ForumData[1], false)
|
let list = []
|
||||||
if (res?.retcode != 0) {
|
for (let item of ['崩坏星穹铁道', '原神']) {
|
||||||
return false;
|
let result = await this.getData("userGameInfo",this.getDataList(item)[0], false)
|
||||||
|
if (result?.retcode != 0) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
// console.log(res,this.e.sk)
|
list.push(...result?.data?.list)
|
||||||
|
}
|
||||||
|
if(list.length==0) return false;
|
||||||
let uids = []
|
let uids = []
|
||||||
for (let s of res.data.list) {
|
for (let s of list) {
|
||||||
let datalist = {}
|
let datalist = {}
|
||||||
let uid = s.game_uid
|
let uid = s.game_uid
|
||||||
uids.push(uid)
|
uids.push(s.region_name+':'+uid)
|
||||||
datalist[uid] = {
|
datalist[uid] = {
|
||||||
stuid: this.e?.sk?.get('stuid') || this.e.stuid,
|
stuid: this.e?.sk?.get('stuid') || this.e.stuid,
|
||||||
stoken: v2Sk?.data?.token?.token || this.e?.sk?.get('stoken') || data?.data?.list[0].token,
|
stoken: v2Sk?.data?.token?.token || this.e?.sk?.get('stoken') || data?.data?.list[0].token,
|
||||||
@ -805,11 +809,13 @@ export default class user {
|
|||||||
mid: this.e?.sk?.get('mid') || v2Sk?.data?.user_info?.mid,
|
mid: this.e?.sk?.get('mid') || v2Sk?.data?.user_info?.mid,
|
||||||
uid: uid,
|
uid: uid,
|
||||||
userId: this.e.user_id,
|
userId: this.e.user_id,
|
||||||
is_sign: true
|
is_sign: true,
|
||||||
|
region_name:s.region_name,
|
||||||
|
region:s.region
|
||||||
}
|
}
|
||||||
await gsCfg.saveBingStoken(this.e.user_id, datalist)
|
await gsCfg.saveBingStoken(this.e.user_id, datalist)
|
||||||
}
|
}
|
||||||
let msg = `uid:${uids.join(',')}\nstoken绑定成功您可通过下列指令进行操作:`;
|
let msg = `${uids.join('\n')}\nstoken绑定成功您可通过下列指令进行操作:`;
|
||||||
msg += '\n【#米币查询】查询米游币余额'
|
msg += '\n【#米币查询】查询米游币余额'
|
||||||
msg += '\n【#mys原神签到】获取米游币'
|
msg += '\n【#mys原神签到】获取米游币'
|
||||||
msg += '\n【#更新抽卡记录】更新抽卡记录'
|
msg += '\n【#更新抽卡记录】更新抽卡记录'
|
||||||
|
Loading…
Reference in New Issue
Block a user