icqq版本升级至0.3.14,修复标题被覆盖问题,old_android改为安卓8.8.88,兑换码api赋值code_ver。 (#126)
This commit is contained in:
parent
a88d205eb3
commit
1233964e78
|
@ -2,5 +2,5 @@
|
|||
qq:
|
||||
# 密码,为空则用扫码登录,扫码登录现在仅能在同一ip下进行
|
||||
pwd:
|
||||
# 1:安卓手机、 2:aPad 、 3:安卓手表、 4:MacOS 、 5:iPad 、 6:old_Android
|
||||
platform: 5
|
||||
# 1:安卓手机、 2:aPad 、 3:安卓手表、 4:MacOS 、 5:iPad 、 6:安卓8.8.88
|
||||
platform: 6
|
|
@ -31,7 +31,7 @@ async function UpdateTitle() {
|
|||
title += ' iPad'
|
||||
break
|
||||
case 6:
|
||||
title += ' old_Android'
|
||||
title += ' 安卓8.8.88'
|
||||
break
|
||||
default:
|
||||
}
|
||||
|
@ -73,9 +73,6 @@ async function checkInit () {
|
|||
/** 检查qq.yaml */
|
||||
await createQQ()
|
||||
|
||||
//** 更新标题 */
|
||||
await UpdateTitle()
|
||||
|
||||
/** 日志设置 */
|
||||
setLog()
|
||||
|
||||
|
@ -83,5 +80,8 @@ async function checkInit () {
|
|||
|
||||
await redisInit()
|
||||
|
||||
checkRun()
|
||||
await checkRun()
|
||||
|
||||
//** 更新标题 */
|
||||
await UpdateTitle()
|
||||
}
|
||||
|
|
|
@ -33,10 +33,10 @@ export default async function createQQ () {
|
|||
message: '请选择登录端口:',
|
||||
name: 'platform',
|
||||
default: '6',
|
||||
choices: ['old_Android', 'iPad', '安卓手机', '安卓手表', 'MacOS', 'aPad'],
|
||||
choices: ['安卓8.8.88', 'iPad', '安卓手机', '安卓手表', 'MacOS', 'aPad'],
|
||||
filter: (val) => {
|
||||
switch (val) {
|
||||
case 'old_Android':return 6
|
||||
case '安卓8.8.88':return 6
|
||||
case 'iPad':return 5
|
||||
case 'MacOS':return 4
|
||||
case '安卓手机':return 1
|
||||
|
|
|
@ -25,6 +25,7 @@ export class exchange extends plugin {
|
|||
}
|
||||
|
||||
async getCode() {
|
||||
this.code_ver = ''
|
||||
this.now = parseInt(Date.now() / 1000)
|
||||
let actid = await this.getActId()
|
||||
if (!actid) return
|
||||
|
@ -36,8 +37,10 @@ export class exchange extends plugin {
|
|||
if (index.data === null) {
|
||||
return await this.reply(`错误:\n${index.message}`)
|
||||
}
|
||||
|
||||
let index_data = index.data.live;
|
||||
let title = index_data['title'];
|
||||
this.code_ver = index_data['code_ver'];
|
||||
if (index_data.remain > 0) {
|
||||
return await this.reply(`暂无直播兑换码\n${title}`)
|
||||
}
|
||||
|
@ -70,7 +73,7 @@ export class exchange extends plugin {
|
|||
async getData(type) {
|
||||
let url = {
|
||||
index: `https://api-takumi.mihoyo.com/event/miyolive/index`,
|
||||
code: `https://api-takumi-static.mihoyo.com/event/miyolive/refreshCode?version=${this.code_ver}&time=${parseInt(new Date().getTime() / 1000)}`,
|
||||
code: `https://api-takumi-static.mihoyo.com/event/miyolive/refreshCode?version=${this.code_ver}&time=${this.now}`,
|
||||
actId: "https://bbs-api.mihoyo.com/painter/api/user_instant/list?offset=0&size=20&uid=75276550",
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue