记录提示修改,修复抽卡记录bug

This commit is contained in:
Le-niao 2022-07-18 09:35:59 +08:00
parent 872733eeea
commit 4929aecb57
3 changed files with 10 additions and 7 deletions

View File

@ -22,8 +22,8 @@
|#抽卡记录|统计抽卡数据|
|#导出记录|抽卡记录xlsx导出|
|#导出记录json|抽卡记录json导出|
|xlsx文件导|咕咕咕中|
|json文件导|咕咕咕中|
|xlsx文件导|咕咕咕中|
|json文件导|咕咕咕中|
|添加表情|咕咕咕中|
|添加图片|咕咕咕中|
|添加其他|咕咕咕中|

View File

@ -77,12 +77,14 @@ export default class ExportLog extends base {
logger.mark(`${this.e.logFnc} 导出成功${this.uid}.xlsx`)
this.e.reply(`文件${this.uid}.xlsx上传中请耐心等待...`)
res = await this.e.friend.sendFile(saveFile).catch((err) => {
this.e.reply(`发送文件${this.uid}.xlsx失败请稍后再试`)
logger.error(`${this.e.logFnc} 发送文件失败 ${JSON.stringify(err)}`)
})
if (res) this.e.reply(`导出成功:${this.uid}.xlsx\n请接收文件`)
if (res) this.e.reply('上传成功,请接收文件')
}
async getUid () {

View File

@ -49,6 +49,7 @@ export default class GachaLog extends base {
this.isLogUrl = true
this.all = []
let data = await this.getLogData()
this.e.msg = `[uid:${this.uid}]`
@ -210,8 +211,8 @@ export default class GachaLog extends base {
let logJson = this.readJson()
/** 第一次获取增加提示 */
if (lodash.isEmpty(logJson.list)) {
await this.e.reply(`开始获取${this.typeName}记录,请稍候...`)
if (lodash.isEmpty(logJson.list) && this.type == 301) {
await this.e.reply(`开始获取${this.typeName}记录,首次获取数据较多,请耐心等待...`)
}
let logRes = await this.getAllLog(logJson.ids, authkey)
@ -247,14 +248,14 @@ export default class GachaLog extends base {
}
if (!res?.data?.list || res.data.list.length <= 0) {
logger.mark(`${this.e.logFnc} 获取${this.typeName}记录完成,共${Number(page) - 1}`)
logger.mark(`${this.e.logFnc}[uid:${this.uid}] 获取${this.typeName}记录完成,共${Number(page) - 1}`)
return { hasErr: false, list: [] }
}
let list = []
for (let val of res.data.list) {
if (ids.includes(val.id)) {
logger.mark(`${this.e.logFnc} 获取${this.typeName}记录完成,暂无新记录`)
logger.mark(`${this.e.logFnc}[uid:${this.uid}] 获取${this.typeName}记录完成,暂无新记录`)
return { hasErr: false, list }
} else {
list.push(val)