From 4e73dc8f4360da01cb73f212455d18e5f402f271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=AE=E5=B8=AE?= <3102509561@qq.com> Date: Tue, 29 Aug 2023 13:02:57 +0000 Subject: [PATCH] =?UTF-8?q?!89=20=E7=BB=99=E6=8E=A2=E7=B4=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9B=B4=E5=A4=9A=E5=86=85=E5=AE=B9=E3=80=81=E4=B8=8A?= =?UTF-8?q?=E4=B8=80=E4=B8=AApr=E8=A2=AB=E5=90=9E=E4=BA=86=20*=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20*=20=E4=BC=98=E5=8C=96=20*=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E8=8E=B7=E5=8F=96=20*=20=E4=B8=83=E5=9C=A3?= =?UTF-8?q?=20*=20=E4=BF=AE=E5=A4=8D=20*=20=E4=BF=AE=E5=A4=8D=20*=20?= =?UTF-8?q?=E7=BB=99=E6=8E=A2=E7=B4=A2=E5=A2=9E=E5=8A=A0=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/genshin/defSet/role/index.yaml | 32 ++ plugins/genshin/model/base.js | 15 +- plugins/genshin/model/deck.js | 9 +- plugins/genshin/model/ledger.js | 11 +- plugins/genshin/model/roleIndex.js | 285 ++++++++++------ plugins/genshin/resources/html/deck/deck.html | 2 +- .../resources/html/deckCard/deckCard.html | 2 +- .../resources/html/deckList/deckList.html | 2 +- .../html/roleExplore/roleExplore.css | 141 +++++++- .../html/roleExplore/roleExplore.html | 109 +++--- .../resources/html/roleIndex/roleIndex.html | 319 +++++++++--------- 11 files changed, 595 insertions(+), 332 deletions(-) create mode 100644 plugins/genshin/defSet/role/index.yaml diff --git a/plugins/genshin/defSet/role/index.yaml b/plugins/genshin/defSet/role/index.yaml new file mode 100644 index 0000000..fe168e4 --- /dev/null +++ b/plugins/genshin/defSet/role/index.yaml @@ -0,0 +1,32 @@ +# 成就 +achievement: 1037 +# 角色数 +avatar: 70 +# 等级 +level: 60 +# 总宝箱 +all_chest: 5682 +# 奇馈宝箱 +magic_chest: 186 +# 华丽宝箱 +luxurious_chest: 224 +# 珍贵宝箱 +precious_chest: 593 +# 精致宝箱 +exquisite_chest: 1896 +# 普通宝箱 +common_chest: 2759 +# 传送点 +way_point: 348 +# 秘境 +domain: 54 +# 风神瞳 +anemoculus: 66 +# 岩神瞳 +geoculus: 131 +# 雷神瞳 +electroculus: 181 +# 草神瞳 +dendroculus: 271 +# 水神瞳 +hydroculus: 85 \ No newline at end of file diff --git a/plugins/genshin/model/base.js b/plugins/genshin/model/base.js index cde7dbf..c2b06d1 100644 --- a/plugins/genshin/model/base.js +++ b/plugins/genshin/model/base.js @@ -1,3 +1,5 @@ +import fs from 'node:fs' +import _ from 'lodash' export default class base { constructor(e = {}) { @@ -18,26 +20,27 @@ export default class base { * @param pluResPath 插件资源路径 */ get screenData() { - let headImg = '林尼' - - if (this.e?.isSr) + if (this.e?.isSr) { + let headImg = _.sample(fs.readdirSync(`${this._path}/plugins/genshin/resources/StarRail/img/worldcard`).filter(file => file.endsWith('.png'))) return { saveId: this.userId, cwd: this._path, tplFile: `./plugins/genshin/resources/StarRail/html/${this.model}/${this.model}.html`, /** 绝对路径 */ pluResPath: `${this._path}/plugins/genshin/resources/StarRail/`, - headStyle: ``, + headStyle: ``, srtempFile: 'StarRail/' } - + } + + let headImg = _.sample(fs.readdirSync(`${this._path}/plugins/genshin/resources/img/namecard`).filter(file => file.endsWith('.png'))) return { saveId: this.userId, cwd: this._path, tplFile: `./plugins/genshin/resources/html/${this.model}/${this.model}.html`, /** 绝对路径 */ pluResPath: `${this._path}/plugins/genshin/resources/`, - headStyle: ``, + headStyle: ``, srtempFile: '' } } diff --git a/plugins/genshin/model/deck.js b/plugins/genshin/model/deck.js index 35851bf..2702f15 100644 --- a/plugins/genshin/model/deck.js +++ b/plugins/genshin/model/deck.js @@ -1,13 +1,10 @@ import base from './base.js' import MysInfo from './mys/mysInfo.js' -import lodash from 'lodash' export default class Deck extends base { constructor(e) { super(e) this.model = 'deck' - - this.headIndexStyle = `` } async getIndex(id, list = false) { @@ -36,8 +33,7 @@ export default class Deck extends base { saveId: this.e.uid, nickname: res.data.nickname, level: res.data.level, - Data, - headIndexStyle: this.headIndexStyle + Data } return data } @@ -54,8 +50,7 @@ export default class Deck extends base { ...this.screenData, uid: this.e.uid, saveId: this.e.uid, - ...res, - headIndexStyle: this.headIndexStyle + ...res } return data } diff --git a/plugins/genshin/model/ledger.js b/plugins/genshin/model/ledger.js index ff1fcf5..448aadb 100644 --- a/plugins/genshin/model/ledger.js +++ b/plugins/genshin/model/ledger.js @@ -120,7 +120,7 @@ export default class Ledger extends base { ledgerInfo.color = [] ledgerInfo.month_data.group_by.forEach((item) => { - if (this.e.isSr){ + if (this.e.isSr) { item.color = this.color[this.action[item.action]] item.action_name = item.action_name.slice(0, 4) } else { @@ -132,8 +132,9 @@ export default class Ledger extends base { ledgerInfo.group_by = JSON.stringify(ledgerInfo.month_data.group_by) ledgerInfo.color = JSON.stringify(ledgerInfo.color) - let files = fs.readdirSync('./plugins/genshin/resources/StarRail/img/role').filter(file => file.endsWith('.webp')) - let icon = lodash.sample(files) + let icon = '' + if(this.e.isSr) + icon = lodash.sample(fs.readdirSync(`${this._path}/plugins/genshin/resources/StarRail/img/role`).filter(file => file.endsWith('.webp'))) let week = [ '星期日', @@ -144,12 +145,12 @@ export default class Ledger extends base { '星期五', '星期六' ] - let srday = `${week[moment().day()]}` return { saveId: this.e.uid, uid: this.e.uid, - day, icon, srday, + day, icon, + srday: `${week[moment().day()]}`, nowDay: moment(new Date()).format('YYYY年MM月DD日'), ...ledgerInfo, ...this.screenData diff --git a/plugins/genshin/model/roleIndex.js b/plugins/genshin/model/roleIndex.js index 6e1157c..5b59f12 100644 --- a/plugins/genshin/model/roleIndex.js +++ b/plugins/genshin/model/roleIndex.js @@ -4,15 +4,16 @@ import gsCfg from './gsCfg.js' import lodash from 'lodash' import moment from 'moment' import fs from 'node:fs' - +let dsz = '待实装' let imgFile = {} export default class RoleIndex extends base { - constructor (e) { + constructor(e) { super(e) this.model = 'roleIndex' this.other = gsCfg.getdefSet('role', 'other') this.wother = gsCfg.getdefSet('weapon', 'other') + this.lable = gsCfg.getdefSet('role', 'index') this.area = { 蒙德: 1, @@ -31,12 +32,12 @@ export default class RoleIndex extends base { this.headIndexStyle = `` } - static async get (e) { + static async get(e) { let roleIndex = new RoleIndex(e) return await roleIndex.getIndex() } - async getIndex () { + async getIndex() { let ApiData = { index: '', spiralAbyss: { schedule_type: 1 }, @@ -60,7 +61,7 @@ export default class RoleIndex extends base { return data } - dealData (data) { + dealData(data) { let [resIndex, resAbyss, resDetail, basicInfo] = data let avatars = resDetail.avatars || [] @@ -111,11 +112,34 @@ export default class RoleIndex extends base { } let stats = resIndex.stats || {} + + let percentage = lodash.round( + ((stats.precious_chest_number + + stats.luxurious_chest_number + + stats.exquisite_chest_number + + stats.common_chest_number + + stats.magic_chest_number) / + this.lable.all_chest) * + 100, + 1 + ) + + let afterPercentage = + (percentage < 60 + ? 'D' + : percentage < 70 + ? 'C' + : percentage < 80 + ? 'B' + : percentage < 90 + ? 'A' + : 'S') + `[${percentage}%]` + let line = [ [ - { lable: '成就', num: stats.achievement_number }, - { lable: '角色数', num: stats.avatar_number }, - { lable: '等级', num: resIndex?.role?.level ?? 0 }, + { lable: '成就', num: stats.achievement_number, extra: this.lable.achievement }, + { lable: '角色数', num: stats.avatar_number, extra: this.lable.avatar }, + { lable: '等级', num: resIndex?.role?.level ?? 0, extra: this.lable.level }, { lable: '总宝箱', num: @@ -123,14 +147,32 @@ export default class RoleIndex extends base { stats.luxurious_chest_number + stats.exquisite_chest_number + stats.common_chest_number + - stats.magic_chest_number + stats.magic_chest_number, + extra: this.lable.all_chest + }, + { + + lable: '获取率', + num: afterPercentage, + color: + afterPercentage.substr(0, 1) == 'D' + ? '#12a182' + : afterPercentage.substr(0, 1) == 'C' + ? '#2775b6' + : afterPercentage.substr(0, 1) == 'B' + ? '#806d9e' + : afterPercentage.substr(0, 1) == 'A' + ? '#c04851' + : afterPercentage.substr(0, 1) == 'S' + ? '#f86b1d' + : '', } ], [ - { lable: '华丽宝箱', num: stats.luxurious_chest_number }, - { lable: '珍贵宝箱', num: stats.precious_chest_number }, - { lable: '精致宝箱', num: stats.exquisite_chest_number }, - { lable: '普通宝箱', num: stats.common_chest_number } + { lable: '华丽宝箱', num: stats.luxurious_chest_number, extra: this.lable.luxurious_chest }, + { lable: '珍贵宝箱', num: stats.precious_chest_number, extra: this.lable.precious_chest }, + { lable: '精致宝箱', num: stats.exquisite_chest_number, extra: this.lable.exquisite_chest }, + { lable: '普通宝箱', num: stats.common_chest_number, extra: this.lable.common_chest } ] ] @@ -146,32 +188,30 @@ export default class RoleIndex extends base { let explor = [] let explor2 = [] - let explor3 = [] - let expArr = ['枫丹', '须弥', '层岩地下', '层岩巨渊'] - let expArr2 = ['渊下宫', '稻妻', '雪山', '璃月'] - let expArr3 = ['蒙德'] + let expArr = ['枫丹', '须弥', '层岩巨渊', '渊下宫', '稻妻'] + let expArr2 = ['雪山', '璃月', '蒙德'] for (let val of expArr) { - let tmp = { lable: val, num: `${(worldExplorations[this.area[val]]?.exploration_percentage ?? 0) / 10}%` } + let tmp = { + lable: val, + num: `${(worldExplorations[this.area[val]]?.exploration_percentage ?? 0) / 10}%` + } explor.push(tmp) } for (let val of expArr2) { - let tmp = { lable: val, num: `${(worldExplorations[this.area[val]]?.exploration_percentage ?? 0) / 10}%` } + let tmp = { + lable: val, + num: `${(worldExplorations[this.area[val]]?.exploration_percentage ?? 0) / 10}%` + } explor2.push(tmp) } - for (let val of expArr3) { - let tmp = { lable: val, num: `${(worldExplorations[this.area[val]]?.exploration_percentage ?? 0) / 10}%` } - explor3.push(tmp) - } - - explor3.push({ lable: '家园等级', num: homesLevel }) + explor2.push({ lable: '家园等级', num: homesLevel }) line.push(explor) line.push(explor2) - line.push(explor3) if (avatars.length > 0) { // 重新排序 @@ -198,7 +238,7 @@ export default class RoleIndex extends base { } // 处理深渊数据 - abyssAll (roleArr, resAbyss) { + abyssAll(roleArr, resAbyss) { let abyss = {} if (roleArr.length <= 0) { @@ -285,24 +325,14 @@ export default class RoleIndex extends base { } } - dayCount (num) { - let year = Math.floor(num / 365) - let month = Math.floor((num % 365) / 30.41) - let day = Math.floor((num % 365) % 30.41) - let msg = '' - if (year > 0) { - msg += year + '年' - } - if (month > 0) { - msg += month + '个月' - } - if (day > 0) { - msg += day + '天' - } + dayCount(num) { + let daysDifference = Math.floor((new Date() - new Date('2020-09-28')) / (1000 * 60 * 60 * 24)) + let days = Math.floor(num) + let msg = '活跃天数:' + days + `/${daysDifference}天` return msg } - async roleCard () { + async roleCard() { this.model = 'roleCard' let res = await MysInfo.get(this.e, 'index') @@ -311,7 +341,7 @@ export default class RoleIndex extends base { return this.roleCardData(res.data) } - roleCardData (res) { + roleCardData(res) { this.initFile() let stats = res.stats @@ -336,7 +366,8 @@ export default class RoleIndex extends base { { lable: '珍贵宝箱', num: stats.precious_chest_number }, { lable: '精致宝箱', num: stats.exquisite_chest_number }, { lable: '普通宝箱', num: stats.common_chest_number }, - { lable: '奇馈宝箱', num: stats.magic_chest_number } + { lable: '奇馈宝箱', num: stats.magic_chest_number }, + { lable: '传送点', num: stats.way_point_number }, ] ] @@ -358,11 +389,12 @@ export default class RoleIndex extends base { } explor2 = explor2.concat([ - { lable: '水神瞳', num: stats.hydroculus_number }, { lable: '草神瞳', num: stats.dendroculus_number }, { lable: '雷神瞳', num: stats.electroculus_number }, { lable: '岩神瞳', num: stats.geoculus_number }, - { lable: '风神瞳', num: stats.anemoculus_number } + { lable: '风神瞳', num: stats.anemoculus_number }, + { lable: '水神瞳', num: stats.hydroculus_number }, + { lable: '秘境', num: stats.domain_number } ]) line.push(explor1) @@ -395,65 +427,119 @@ export default class RoleIndex extends base { } } - async roleExplore () { + async roleExplore() { this.model = 'roleExplore' - let res = await MysInfo.get(this.e, 'index') + let ApiData = { + index: '', + basicInfo: '' + } + let res = await MysInfo.get(this.e, ApiData) - if (!res || res.retcode !== 0) return false + if (!res || res[0].retcode !== 0) return false - return this.roleExploreData(res.data) + let ret = [] + res.forEach((v) => ret.push(v.data)) + + return this.roleExploreData(ret) } - roleExploreData (res) { - let stats = res.stats + async roleExploreData(res) { + let [resIndex, basicInfo] = res + + let stats = resIndex.stats + let percentage = lodash.round( + ((stats.precious_chest_number + + stats.luxurious_chest_number + + stats.exquisite_chest_number + + stats.common_chest_number + + stats.magic_chest_number) * + 100) / + this.lable.all_chest, + 2 + ) + + let afterPercentage = + percentage < 60 + ? 'D' + : (percentage < 70 + ? 'C' + : percentage < 80 + ? 'B' + : percentage < 90 + ? 'A' + : 'S') + `[${percentage}%]` + + let daysDifference = Math.floor((new Date() - new Date('2020-09-28')) / (1000 * 60 * 60 * 24)) + let line = [ [ - { lable: '成就', num: stats.achievement_number }, - { lable: '角色数', num: stats.avatar_number }, - { lable: '等级', num: res?.role?.level ?? 0 }, + { lable: '角色数', num: stats.avatar_number, extra: this.lable.avatar }, + { lable: '传送点', num: stats.way_point_number, extra: this.lable.way_point }, + { lable: '秘境', num: stats.domain_number, extra: this.lable.domain }, + { lable: '成就', num: stats.achievement_number, extra: this.lable.achievement }, + { lable: '活跃天数', num: stats.active_day_number, extra: `${daysDifference}` } + ], + [ + { lable: '深境螺旋', num: stats.spiral_abyss }, { - lable: '总宝箱', + lable: '宝箱总数', num: stats.precious_chest_number + stats.luxurious_chest_number + stats.exquisite_chest_number + stats.common_chest_number + - stats.magic_chest_number - } + stats.magic_chest_number, + extra: this.lable.all_chest + }, + { + lable: '宝箱获取率', + num: afterPercentage, + color: + afterPercentage.substr(0, 1) == 'D' + ? '#12a182' + : afterPercentage.substr(0, 1) == 'C' + ? '#2775b6' + : afterPercentage.substr(0, 1) == 'B' + ? '#806d9e' + : afterPercentage.substr(0, 1) == 'A' + ? '#c04851' + : afterPercentage.substr(0, 1) == 'S' + ? '#f86b1d' + : '', + }, + { lable: '普通宝箱', num: stats.common_chest_number, extra: this.lable.common_chest }, + { lable: '精致宝箱', num: stats.exquisite_chest_number, extra: this.lable.exquisite_chest }, ], [ - { lable: '华丽宝箱', num: stats.luxurious_chest_number }, - { lable: '珍贵宝箱', num: stats.precious_chest_number }, - { lable: '精致宝箱', num: stats.exquisite_chest_number }, - { lable: '普通宝箱', num: stats.common_chest_number } + { lable: '珍贵宝箱', num: stats.precious_chest_number, extra: this.lable.precious_chest }, + { lable: '华丽宝箱', num: stats.luxurious_chest_number, extra: this.lable.luxurious_chest }, + { lable: '奇馈宝箱', num: stats.magic_chest_number, extra: this.lable.magic_chest }, + { lable: '风神瞳', num: stats.anemoculus_number, extra: this.lable.anemoculus }, + { lable: '岩神瞳', num: stats.geoculus_number, extra: this.lable.geoculus } ], [ - { lable: '奇馈宝箱', num: stats.magic_chest_number }, - { lable: '传送点', num: stats.way_point_number }, - { lable: '水神瞳', num: stats.hydroculus_number }, - { lable: '草神瞳', num: stats.dendroculus_number } + { lable: '雷神瞳', num: stats.electroculus_number, extra: this.lable.electroculus }, + { lable: '草神瞳', num: stats.dendroculus_number, extra: this.lable.dendroculus }, + { lable: '水神瞳', num: stats.hydroculus_number, extra: this.lable.hydroculus }, + { lable: '火神瞳', num: `${dsz}`, extra: 0 }, + { lable: '冰神瞳', num: `${dsz}`, extra: 0 } ], - [ - { lable: '雷神瞳', num: stats.electroculus_number }, - { lable: '岩神瞳', num: stats.geoculus_number }, - { lable: '风神瞳', num: stats.anemoculus_number }, - { lable: '秘境', num: stats.domain_number } - ] ] // 尘歌壶 - if (res.homes && res.homes.length > 0) { + if (resIndex.homes && resIndex.homes.length > 0) { line.push([ - { lable: '家园等级', num: res.homes[0].level }, - { lable: '最高仙力', num: res.homes[0].comfort_num }, - { lable: '获得摆设', num: res.homes[0].item_num }, - { lable: '历史访客', num: res.homes[0].visit_num } + { lable: '家园等级', num: resIndex.homes[0].level }, + { lable: '最高仙力', num: resIndex.homes[0].comfort_num }, + { lable: '洞天名称', num: resIndex.homes[0].comfort_level_name }, + { lable: '获得摆设', num: resIndex.homes[0].item_num }, + { lable: '历史访客', num: resIndex.homes[0].visit_num } ]) } - res.world_explorations = lodash.orderBy(res.world_explorations, ['id'], ['desc']) + resIndex.world_explorations = lodash.orderBy(resIndex.world_explorations, ['id'], ['desc']) let explor = [] - for (let val of res.world_explorations) { + for (let val of resIndex.world_explorations) { if (val.id == 7) continue val.name = this.areaName[val.id] ? this.areaName[val.id] : lodash.truncate(val.name, { length: 6 }) @@ -468,15 +554,11 @@ export default class RoleIndex extends base { ] } - if (['蒙德', '璃月', '稻妻', '须弥', '枫丹'].includes(val.name)) { - tmp.line.push({ - name: '声望', - text: `${val.level}级` - }) - } + if (['蒙德', '璃月', '稻妻', '须弥', '枫丹'].includes(val.name)) + tmp.line.push({ name: '声望', text: `${val.level}级` }) if (val.id == 6) { - let underground = lodash.find(res.world_explorations, function (o) { + let underground = lodash.find(resIndex.world_explorations, function (o) { return o.id == 7 }) if (underground) { @@ -488,15 +570,14 @@ export default class RoleIndex extends base { } if (['雪山', '稻妻', '层岩巨渊', '须弥', '枫丹'].includes(val.name)) { - if (val.offerings[0].name.includes('流明石')) { + if (val.offerings[0].name.includes('流明石')) val.offerings[0].name = '流明石' - } - if (val.offerings[0].name == '恒那兰那的梦之树') { - val.offerings[0].name = '梦之树' - } - if (val.offerings[0].name == '露景泉') { + + if (val.offerings[0].name.includes('露景泉')) val.offerings[0].name = '露景泉' - } + + if (val.offerings[0].name == '恒那兰那的梦之树') + val.offerings[0].name = '梦之树' tmp.line.push({ name: val.offerings[0].name, @@ -507,18 +588,32 @@ export default class RoleIndex extends base { explor.push(tmp) } + let avatar = '' + if (this.e.member?.getAvatarUrl) + avatar = await this.e.member.getAvatarUrl() + else if (this.e.friend?.getAvatarUrl) + avatar = await this.e.friend.getAvatarUrl() + else + avatar = lodash.sample(fs.readdirSync(`${this._path}/plugins/genshin/resources/img/role`).filter(file => file.endsWith('.png'))) + return { saveId: this.e.uid, uid: this.e.uid, activeDay: this.dayCount(stats.active_day_number), line, explor, + basicInfo, headIndexStyle: this.headIndexStyle, - ...this.screenData + ...this.screenData, + gamename: resIndex?.role?.nickname ?? 0, + avatar, + gameavatar: resIndex?.role?.avatar ?? 0, + gamelevel: resIndex?.role?.level ?? 0, + gamefwq: resIndex?.role?.region } } - initFile () { + initFile() { if (imgFile['刻晴']) return imgFile let path = './plugins/genshin/resources/img/gacha/' let character = fs.readdirSync(path + 'character/') diff --git a/plugins/genshin/resources/html/deck/deck.html b/plugins/genshin/resources/html/deck/deck.html index 526774b..83798de 100644 --- a/plugins/genshin/resources/html/deck/deck.html +++ b/plugins/genshin/resources/html/deck/deck.html @@ -11,7 +11,7 @@ - {{@headIndexStyle}} + {{@headStyle}} diff --git a/plugins/genshin/resources/html/deckCard/deckCard.html b/plugins/genshin/resources/html/deckCard/deckCard.html index 032e62e..603ae13 100644 --- a/plugins/genshin/resources/html/deckCard/deckCard.html +++ b/plugins/genshin/resources/html/deckCard/deckCard.html @@ -11,7 +11,7 @@ - {{@headIndexStyle}} + {{@headStyle}} diff --git a/plugins/genshin/resources/html/deckList/deckList.html b/plugins/genshin/resources/html/deckList/deckList.html index 6334b08..798aa64 100644 --- a/plugins/genshin/resources/html/deckList/deckList.html +++ b/plugins/genshin/resources/html/deckList/deckList.html @@ -11,7 +11,7 @@ - {{@headIndexStyle}} + {{@headStyle}} diff --git a/plugins/genshin/resources/html/roleExplore/roleExplore.css b/plugins/genshin/resources/html/roleExplore/roleExplore.css index 8b6320b..a586c73 100644 --- a/plugins/genshin/resources/html/roleExplore/roleExplore.css +++ b/plugins/genshin/resources/html/roleExplore/roleExplore.css @@ -4,45 +4,138 @@ font-weight: normal; font-style: normal; } + * { margin: 0; padding: 0; box-sizing: border-box; user-select: none; } + body { font-size: 18px; color: #1e1f20; transform: scale(1.5); transform-origin: 0 0; } + .container { width: 470px; padding: 10px 15px; background-color: #f5f6fb; } + .base_info { position: relative; padding-left: 10px; } + .head_box { box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%); } -.head_box .id_text{ - font-size: 24px; + +.head_box .icon { + position: absolute; + left: 20px; + width: 50px; + border-radius: 50%; + border: 2px solid #d3bc8e; } -.head_box .day_text{ + +.head_box .id_text { font-size: 20px; + margin-bottom: 5px; + position: relative; + left: 70px; } + +.head_box .day_text { + font-size: 16px; + position: relative; + left: 53px; + text-indent: 1em; + display: flex; +} + +.head_box .name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 5em; +} + .head_box .genshin_logo { position: absolute; top: 1px; right: 15px; width: 97px; } -.uid{ - font-family: tttgbnumber; + +.basicInfo { + padding: 10px 5px 15px; + background: #f5f5f5; + box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%); + border-radius: 15px; + position: relative; + margin-bottom: 20px; } + +.basicInfo_header { + display: flex; +} + +.basicInfo_icon { + display: inline-block; + position: relative; +} + +.basicInfo_icon { + background-image: url(../../img/deck/七圣召唤.png); + background-size: 70px 70px; + background-repeat: no-repeat; + width: 67px; + color: #fff; + text-align: center; + font-size: 35px; + line-height: 70px; + margin: 10px 10px 0; +} + +.basicInfo_right { + display: inline-block; + width: calc(78% - 15px); + padding: 10px 0px; + margin-left: 7px; +} + +.basicInfo_right .item { + width: 100%; + padding: 5px 10px 0; + height: 29px; + color: #877254; + font-size: 13px; + border: 1px solid #ebeadc; + margin: 5px 0; + background-color: #f5eee4; + display: flex; +} + +.basicInfo_right .item div:first-child { + width: 50%; +} + +.basicInfo_right .item div:nth-child(2) { + width: 50%; + text-align: right; +} + +.uid { + margin: 20px 10px 10px; + text-shadow: 0 0 3px #000, 2px 2px 4px rgba(0, 0, 0, 0.7); + text-align: right; + color: #fff; +} + .uid:before { content: " "; position: absolute; @@ -53,6 +146,7 @@ body { top: 0; background: #d3bc8d; } + .data_box { border-radius: 15px; margin-top: 20px; @@ -63,41 +157,54 @@ body { padding: 20px 15px 5px 15px; position: relative; } + .tab_lable { position: absolute; top: -10px; left: -8px; background: #d4b98c; - color:#fff; + color: #fff; font-size: 14px; padding: 3px 10px; border-radius: 15px 0px 15px 15px; z-index: 20; } + .data_line { display: flex; justify-content: space-around; margin-bottom: 14px; } + .data_line_item { width: 100px; text-align: center; /*margin: 0 20px;*/ } + .num { font-family: tttgbnumber; - font-size: 24px; + font-size: 10px; } -.explor_box .num{ + +.num span { + font-family: tttgbnumber; + color: #7f858a; + font-size: 9px; +} + +.explor_box .num { font-family: tttgbnumber; font-size: 16px; } + .lable { font-size: 14px; color: #7f858a; line-height: 1; margin-top: 3px; } + .explor_box { position: relative; font-size: 16px; @@ -105,12 +212,13 @@ body { flex-wrap: wrap; justify-content: space-between; border-radius: 15px; - margin-top: 10px; + margin-top: 20px; margin-bottom: 12px; background: #fff; box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%); padding: 15px; } + .explor_box .item { margin-top: 10px; /*margin-right: 10px;*/ @@ -123,43 +231,50 @@ body { border-radius: 6px; color: #fff; line-height: 1; - background: #394467 url(../../img/other/world-exploration-frame.png) center center - no-repeat; + background: #394467 url(../../img/other/world-exploration-frame.png) center center no-repeat; background-origin: content-box; background-size: 100% 97%; } + .explor_box .icon { width: 62px; margin-left: 3px; } + .explor_box .content { margin-left: 4px; width: 130px; } + .explor_box .content p { margin: 7px 0; } + .explor_box .name { /* color: #fff; */ font-weight: 500; white-space: nowrap; } + .progress { position: relative; width: 120px; height: 3px; background-color: rgba(0, 0, 0, 0.3); } + .progress .value { position: absolute; right: 0; top: -14px; font-size: 12px; } + .progress .bar { height: 100%; background-color: #d3bc8d; } + .explor_box .prestige { color: #1e1f20; background: #e9e5dc; @@ -167,12 +282,14 @@ body { border-radius: 2px; padding: 3px 7px; } + .homes_hidden { display: none; } + .logo { font-size: 12px; font-family: "tttgbnumber"; text-align: center; color: #7994a7; -} +} \ No newline at end of file diff --git a/plugins/genshin/resources/html/roleExplore/roleExplore.html b/plugins/genshin/resources/html/roleExplore/roleExplore.html index 96b0e05..d7e51da 100644 --- a/plugins/genshin/resources/html/roleExplore/roleExplore.html +++ b/plugins/genshin/resources/html/roleExplore/roleExplore.html @@ -1,48 +1,77 @@ - - - - - - - {{@headIndexStyle}} - - -
-
-
ID: {{uid}}
-
{{activeDay}}
- + + + + + + + + {{@headIndexStyle}} + + + +
+
+ +

{{gamename}} | Lv.{{gamelevel}}

+
+ {{gamefwq}} | UID{{uid}}
-
-
数据总览
- {{each line val}} -
- {{each val item}} -
-
{{item.num}}
-
{{item.lable}}
+ +
+
+
数据总览
+ {{each line val}} +
+ {{each val item}} +
+
{{item.num}} + {{ if item.extra}}/{{item.extra}}{{/if}}
+
{{item.lable}}
+
+ {{/each}} +
+ {{/each}} +
+ + {{if basicInfo.level>0}} +
+
七圣召唤
+
+
{{basicInfo.level}}
+
+
+
已收集角色牌
+
{{basicInfo.avatar_card_num_gained}}/{{basicInfo.avatar_card_num_total}}
+
+
+
已收集行动牌
+
{{basicInfo.action_card_num_gained}}/{{basicInfo.action_card_num_total}}
+
+
+
+
+ {{/if}} + +
+
地图探险
+ {{each explor val}} +
+ +
+ {{each val.line line}} +

{{line.name}}:{{line.text}}

{{/each}}
- {{/each}}
-
-
地图探险
- {{each explor val}} -
- -
- {{each val.line line}} -

{{line.name}}:{{line.text}}

- {{/each}} -
-
- {{/each}} -
- + {{/each}}
- - - + +
+ + + + \ No newline at end of file diff --git a/plugins/genshin/resources/html/roleIndex/roleIndex.html b/plugins/genshin/resources/html/roleIndex/roleIndex.html index f3bd70c..b33057f 100644 --- a/plugins/genshin/resources/html/roleIndex/roleIndex.html +++ b/plugins/genshin/resources/html/roleIndex/roleIndex.html @@ -1,182 +1,173 @@ - - - - - - - - - - - {{@headIndexStyle}} - - -
-
-
ID: {{uid}}
-
{{activeDay}}
- + + + + + + + + + + + + {{@headIndexStyle}} + + + +
+
+
UID: {{uid}}
+
{{activeDay}}
+ +
+
+
数据总览
+ {{each line val}} +
+ {{each val item}} +
+
+ {{item.num}} {{ if item.extra}}/{{item.extra}}{{/if}} +
+
{{item.lable}}
+
+ {{/each}}
-
-
数据总览
- {{each line val}} -
- {{each val item}} -
-
{{item.num}}
-
{{item.lable}}
+ {{/each}} +
+ + {{if avatars.length>0}} +
+
我的角色
+ {{each avatars val}} +
+
+ {{ if val.actived_constellation_num>0}} + {{val.actived_constellation_num}}命 + {{/if}} +
+ +
Lv.{{val.level}} ❤{{val.fetter}}
+
+
+
+
+ +
+
+
+
{{val.weapon.showName}}
+
+ Lv.{{val.weapon.level}}{{ if val.weapon.affix_level>1}}{{val.weapon.affix_level}}{{/if}} +
+
+
+
+ + {{/each}} +
+ {{/if}} {{if basicInfo.level>0}} +
+
七圣召唤
+
+
{{basicInfo.level}}
+
+
+
已收集角色牌
+
{{basicInfo.avatar_card_num_gained}}/{{basicInfo.avatar_card_num_total}}
+
+
+
已收集行动牌
+
{{basicInfo.action_card_num_gained}}/{{basicInfo.action_card_num_total}}
+
+
+
+
+ {{each basicInfo.covers val}} +
+ {{/each}} +
+
+ {{/if}} + {{if abyss.time}} +
+
+
+
ID:{{uid}}
+
时间:{{abyss.time}}
+
+
+
最深抵达:{{abyss.max_floor}}
+
星数:{{abyss.totalStar}}
+
+
+
+
出战角色
+
+ {{each abyss.list val}} +
+ {{ if val.life>0}} + {{val.life}}命 + {{/if}} + +
{{val.value}}次
+
{{/each}}
- {{/each}}
- {{if avatars.length>0}} -
-
我的角色
- {{each avatars val}} -
-
- {{ if val.actived_constellation_num>0}} - {{val.actived_constellation_num}}命 - {{/if}} -
- -
Lv.{{val.level}} ❤{{val.fetter}}
-
-
-
-
- -
-
-
-
{{val.weapon.showName}}
-
- Lv.{{val.weapon.level}}{{ if val.weapon.affix_level>1}}{{val.weapon.affix_level}}{{/if}} -
-
+
+
战斗数据
+
+
战斗次数:{{abyss.total_battle_times}}次
+
+ 最多击破:{{abyss.defeat.num}} +
- - {{/each}} -
- {{/if}} {{if basicInfo.level>0}} -
-
七圣召唤
-
-
{{basicInfo.level}}
-
-
-
已收集角色牌
-
{{basicInfo.avatar_card_num_gained}}/{{basicInfo.avatar_card_num_total}}
-
-
-
已收集行动牌
-
{{basicInfo.action_card_num_gained}}/{{basicInfo.action_card_num_total}}
-
-
+
+
+ 承受伤害:{{abyss.take_damage.num}} +
+
+ 元素战技:{{abyss.normal_skill.num}} +
-
- {{each basicInfo.covers val}} -
- {{/each}}
- -
- {{/if}} - {{if abyss.time}} -
-
ID:{{uid}}
-
时间:{{abyss.time}}
+ 最强一击:{{abyss.damage.num}}
-
最深抵达:{{abyss.max_floor}}
-
星数:{{abyss.totalStar}}
-
-
-
-
出战角色
-
- {{each abyss.list val}} -
- {{ if val.life>0}} - {{val.life}}命 - {{/if}} - -
{{val.value}}次
- -
- {{/each}} -
-
-
-
战斗数据
-
-
战斗次数:{{abyss.total_battle_times}}次
-
- 最多击破:{{abyss.defeat.num}} - -
-
-
-
- 承受伤害:{{abyss.take_damage.num}} -
-
- 元素战技:{{abyss.normal_skill.num}} -
-
-
-
- 最强一击:{{abyss.damage.num}} -
-
- 元素爆发:{{abyss.energy_skill.num}} -
+ 元素爆发:{{abyss.energy_skill.num}}
- {{/if}} - {{if msg}} -
{{msg}}
- {{/if}} -
- - - + {{/if}} + {{if msg}} +
{{msg}}
+ {{/if}} + +
+ + + + \ No newline at end of file