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