icqq版本升级至0.3.14,修复标题被覆盖问题,old_android改为安卓8.8.88,兑换码api赋值code_ver。 (#126)

This commit is contained in:
小飞 2023-05-22 11:41:15 +08:00 committed by GitHub
parent a88d205eb3
commit 1233964e78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 10 deletions

View File

@ -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

View File

@ -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()
} }

View File

@ -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

View File

@ -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",
} }