提示文案更新

This commit is contained in:
Kokomi 2023-02-27 21:31:10 +08:00
parent 20a7c59a9b
commit 860605baed
2 changed files with 17 additions and 4 deletions

View File

@ -28,6 +28,10 @@ let Gacha = {
} }
let gacha = GachaData.analyse(e.user_id, uid, type) let gacha = GachaData.analyse(e.user_id, uid, type)
if (!gacha) {
e.reply('本地暂无抽卡信息')
return true
}
await Common.render('gacha/gacha-detail', { await Common.render('gacha/gacha-detail', {
save_id: uid, save_id: uid,
uid, uid,
@ -53,6 +57,10 @@ let Gacha = {
return false return false
} }
let gacha = GachaData.stat(e.user_id, uid, type) let gacha = GachaData.stat(e.user_id, uid, type)
if (!gacha) {
e.reply('本地暂无抽卡信息')
return true
}
await Common.render('gacha/gacha-stat', { await Common.render('gacha/gacha-stat', {
save_id: uid, save_id: uid,
uid, uid,
@ -64,7 +72,7 @@ let Gacha = {
getFace (uid) { getFace (uid) {
let player = Player.create(uid) let player = Player.create(uid)
let faceChar = Character.get(player.face || '100000003') let faceChar = Character.get(player.face || 10000014)
let imgs = faceChar.imgs let imgs = faceChar.imgs
return { return {
banner: imgs?.banner, banner: imgs?.banner,

View File

@ -1,7 +1,7 @@
import lodash from 'lodash' import lodash from 'lodash'
import { Data } from '../../components/index.js' import { Data } from '../../components/index.js'
import { Character, Weapon } from '../../models/index.js' import { Character, Weapon } from '../../models/index.js'
import { poolName, poolDetail } from '../../resources/meta/info/index.js' import { poolDetail } from '../../resources/meta/info/index.js'
import moment from 'moment' import moment from 'moment'
let poolVersion = [] let poolVersion = []
@ -111,6 +111,9 @@ let GachaData = {
let allNum = 0 let allNum = 0
let itemMap = logData.itemMap let itemMap = logData.itemMap
if (logData.items.length === 0) {
return false
}
lodash.forEach(logData.items, (item) => { lodash.forEach(logData.items, (item) => {
allNum++ allNum++
let ds = itemMap[item.id] let ds = itemMap[item.id]
@ -242,7 +245,6 @@ let GachaData = {
items = items.concat(gachaData.items) items = items.concat(gachaData.items)
lodash.extend(itemMap, gachaData.itemMap || {}) lodash.extend(itemMap, gachaData.itemMap || {})
} }
console.log('gacha data', type)
if (['up', 'char', 'all'].includes(type)) { if (['up', 'char', 'all'].includes(type)) {
loadData(301) loadData(301)
} }
@ -259,6 +261,10 @@ let GachaData = {
let versionData = [] let versionData = []
let currVersion let currVersion
if (lodash.isEmpty(items)) {
return false
}
let getCurr = function () { let getCurr = function () {
if (currVersion && !lodash.isEmpty(currVersion)) { if (currVersion && !lodash.isEmpty(currVersion)) {
let cv = currVersion let cv = currVersion
@ -341,7 +347,6 @@ let GachaData = {
v.version = type === 'all' ? '全部统计' : '常驻池' v.version = type === 'all' ? '全部统计' : '常驻池'
} }
if (!v) { if (!v) {
console.log('no v')
return true return true
} }
currVersion = { currVersion = {