diff --git a/apps/gacha/GachaData.js b/apps/gacha/GachaData.js index 8381879b..2eb40292 100644 --- a/apps/gacha/GachaData.js +++ b/apps/gacha/GachaData.js @@ -213,6 +213,19 @@ let GachaData = { noWaiRate = (noWaiRate * 100).toFixed(1) } + fiveLog.unshift({ + id: 888, + isUp: true, + count: noFiveNum, + date: moment().format('MM-DD') + }) + itemMap['888'] = { + name: '即将获得', + star: 5, + abbr: '即将获得', + img: 'gacha/imgs/no-avatar.webp' + } + return { stat: { allNum, @@ -362,9 +375,22 @@ let GachaData = { }) versionData.push(getCurr()) + let stat = {} + lodash.forEach(versionData, (ds) => { + lodash.forEach(ds.stats, (num, key) => { + if (!stat[key]) { + stat[key] = num + } else { + stat[key] += num + } + }) + }) + stat.avgUpNum = stat.upNum === 0 ? 0 : ((stat.totalNum / stat.upNum).toFixed(1)) + return { versionData, - itemMap + itemMap, + totalStat: stat } }, diff --git a/resources/gacha/gacha-detail.css b/resources/gacha/gacha-detail.css index 6d6dab6f..0bfc05eb 100644 --- a/resources/gacha/gacha-detail.css +++ b/resources/gacha/gacha-detail.css @@ -1,9 +1,14 @@ .avatar-cont { background: rgba(0, 0, 0, 0.1); } +.user-banner .stat-li { + width: auto; + min-width: 75px; +} .gacha-list .gacha-item { height: 38px; display: flex; + background: rgba(0, 0, 0, 0.4); } .gacha-list .gacha-item .date { width: 97px; @@ -53,13 +58,27 @@ .gacha-list .gacha-item.wai .process { background-color: rgba(85, 85, 85, 0.8); } +.gacha-list .gacha-item.wai .bar { + position: relative; +} +.gacha-list .gacha-item.wai .bar:after { + content: ""; + display: block; + position: absolute; + right: -33px; + top: -2px; + width: 30px; + height: 30px; + background: url('./imgs/wai.webp') center no-repeat; + background-size: 100% 100%; +} .gacha-list .gacha-item.up .name { - background: rgba(0, 0, 0, 0.5); + /*background: rgba(0, 0, 0, .5);*/ color: #ffd484; } .gacha-list .gacha-item.up .process, .gacha-list .gacha-item.up .icon { - background-color: rgba(0, 0, 0, 0.5); + /* background-color: rgba(0, 0, 0, .5);*/ } .gacha-list .icon { width: 32px; @@ -87,7 +106,6 @@ padding-right: 15px; } .gacha-list .process .bar { - background: green; border-radius: 0 5px 5px 0; height: 26px; line-height: 26px; @@ -100,11 +118,11 @@ min-width: 18px; } .gacha-list .process .bar.good { - background: #6939b7; + background: #168b2c; color: #fff; } .gacha-list .process .bar.normal { - background: #168b2c; + background: #6939b7; color: #fff; } .gacha-list .process .bar.bad { diff --git a/resources/gacha/gacha-detail.html b/resources/gacha/gacha-detail.html index 7d595f91..09e66bca 100644 --- a/resources/gacha/gacha-detail.html +++ b/resources/gacha/gacha-detail.html @@ -7,7 +7,7 @@ {{/block}} -{{ set statMap = { allNum:'抽卡总数', fiveNum:'金卡数', fiveAvg:'平均出金' } }} +{{ set statMap = { allNum:'抽卡总数', fiveNum:'金卡数',wai:'歪 T.T',fourNum:'紫卡数', fiveAvg:'平均出金', upYs:'UP原石' } }} {{block 'main'}}