parent
							
								
									56a9b331f4
								
							
						
					
					
						commit
						4e73dc8f43
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			@ -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: `<style> .head_box { background: url(${this._path}/plugins/genshin/resources/StarRail/img/worldcard/星穹列车.png) #fff; background-position-x: -10px; background-repeat: no-repeat; background-size: 540px; background-position-y: -100px; </style>`,
 | 
			
		||||
        headStyle: `<style> .head_box { background: url(${this._path}/plugins/genshin/resources/StarRail/img/worldcard/${headImg}) #fff; background-position-x: -10px; background-repeat: no-repeat; background-size: 540px; background-position-y: -100px; </style>`,
 | 
			
		||||
        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: `<style> .head_box { background: url(${this._path}/plugins/genshin/resources/img/namecard/${headImg}.png) #fff; background-position-x: 42px; background-repeat: no-repeat; background-size: auto 101%; }</style>`,
 | 
			
		||||
      headStyle: `<style> .head_box { background: url(${this._path}/plugins/genshin/resources/img/namecard/${headImg}) #fff; background-position-x: 42px; background-repeat: no-repeat; background-size: auto 101%; }</style>`,
 | 
			
		||||
      srtempFile: ''
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 = `<style> .head_box { background: url(${this.screenData.pluResPath}img/roleIndex/namecard/${lodash.random(1, 8)}.png) #f5f5f5; background-position-x: 30px; background-repeat: no-repeat; border-radius: 15px; font-family: tttgbnumber; padding: 10px 20px; position: relative; background-size: auto 101%; }</style>`
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 = `<style> .head_box { background: url(${this.screenData.pluResPath}img/roleIndex/namecard/${lodash.random(1, 8)}.png) #f5f5f5; background-position-x: 30px; background-repeat: no-repeat; border-radius: 15px; font-family: tttgbnumber; padding: 10px 20px; position: relative; background-size: auto 101%; }</style>`
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  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/')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
  <link rel="preload" href="{{pluResPath}}img/other/bg4.png" as="image">
 | 
			
		||||
  <link rel="preload" href="{{pluResPath}}img/other/bg105.png" as="image">
 | 
			
		||||
  <link rel="preload" href="{{pluResPath}}img/abyss/bg.png" as="image">
 | 
			
		||||
  {{@headIndexStyle}}
 | 
			
		||||
  {{@headStyle}}
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
  <link rel="preload" href="{{pluResPath}}img/other/bg4.png" as="image">
 | 
			
		||||
  <link rel="preload" href="{{pluResPath}}img/other/bg105.png" as="image">
 | 
			
		||||
  <link rel="preload" href="{{pluResPath}}img/abyss/bg.png" as="image">
 | 
			
		||||
  {{@headIndexStyle}}
 | 
			
		||||
  {{@headStyle}}
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
  <link rel="preload" href="{{pluResPath}}img/other/bg4.png" as="image">
 | 
			
		||||
  <link rel="preload" href="{{pluResPath}}img/other/bg105.png" as="image">
 | 
			
		||||
  <link rel="preload" href="{{pluResPath}}img/abyss/bg.png" as="image">
 | 
			
		||||
  {{@headIndexStyle}}
 | 
			
		||||
  {{@headStyle}}
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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,9 +282,11 @@ body {
 | 
			
		|||
  border-radius: 2px;
 | 
			
		||||
  padding: 3px 7px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.homes_hidden {
 | 
			
		||||
  display: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.logo {
 | 
			
		||||
  font-size: 12px;
 | 
			
		||||
  font-family: "tttgbnumber";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,18 +1,24 @@
 | 
			
		|||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
  <meta http-equiv="content-type" content="text/html;charset=utf-8" />
 | 
			
		||||
  <link rel="shortcut icon" href="#" />
 | 
			
		||||
    <link rel="stylesheet" type="text/css" href="{{pluResPath}}html/roleExplore/roleExplore.css"/>
 | 
			
		||||
  <link rel="stylesheet" type="text/css" href="{{pluResPath}}html/roleExplore/roleExplore.css" />
 | 
			
		||||
  <link rel="preload" href="{{resPath}}/font/tttgbnumber.ttf" as="font">
 | 
			
		||||
  <link rel="preload" href="{{pluResPath}}img/other/原神.png" as="image">
 | 
			
		||||
  {{@headIndexStyle}}
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <div class="container" id="container">
 | 
			
		||||
    <div class="head_box">
 | 
			
		||||
        <div class="id_text">ID: {{uid}}</div>
 | 
			
		||||
        <div class="day_text">{{activeDay}}</div>
 | 
			
		||||
      <img class="icon" src="{{avatar}}">
 | 
			
		||||
      <p class="id_text">{{gamename}} | <span
 | 
			
		||||
          style="font-size:15px;color:#1e1f20;margin-left: -2px">Lv.{{gamelevel}}</span></p>
 | 
			
		||||
      <div class="day_text">
 | 
			
		||||
        {{gamefwq}} | UID{{uid}}
 | 
			
		||||
      </div>
 | 
			
		||||
      <img class="genshin_logo" src="{{pluResPath}}img/other/原神.png">
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="data_box">
 | 
			
		||||
| 
						 | 
				
			
			@ -21,13 +27,35 @@
 | 
			
		|||
      <div class="data_line">
 | 
			
		||||
        {{each val item}}
 | 
			
		||||
        <div class="data_line_item">
 | 
			
		||||
            <div class="num">{{item.num}}</div>
 | 
			
		||||
          <div style="color:{{ item.color }};font-size:15px" class="num">{{item.num}}
 | 
			
		||||
            {{ if item.extra}}<span style="font-size:11px;color:#757575;margin-left: -4px">/{{item.extra}}</span>{{/if}}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="lable">{{item.lable}}</div>
 | 
			
		||||
        </div>
 | 
			
		||||
        {{/each}}
 | 
			
		||||
      </div>
 | 
			
		||||
      {{/each}}
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    {{if basicInfo.level>0}}
 | 
			
		||||
    <div class="basicInfo">
 | 
			
		||||
      <div class="tab_lable">七圣召唤</div>
 | 
			
		||||
      <div class="basicInfo_header">
 | 
			
		||||
        <div class="basicInfo_icon"><span>{{basicInfo.level}}</span></div>
 | 
			
		||||
        <div class="basicInfo_right">
 | 
			
		||||
          <div class="item">
 | 
			
		||||
            <div>已收集角色牌</div>
 | 
			
		||||
            <div>{{basicInfo.avatar_card_num_gained}}/{{basicInfo.avatar_card_num_total}}</div>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="item">
 | 
			
		||||
            <div>已收集行动牌</div>
 | 
			
		||||
            <div>{{basicInfo.action_card_num_gained}}/{{basicInfo.action_card_num_total}}</div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
 | 
			
		||||
    <div class="explor_box">
 | 
			
		||||
      <div class="tab_lable">地图探险</div>
 | 
			
		||||
      {{each explor val}}
 | 
			
		||||
| 
						 | 
				
			
			@ -43,6 +71,7 @@
 | 
			
		|||
    </div>
 | 
			
		||||
    <div class="logo">Created By Yunzai-Bot</div>
 | 
			
		||||
  </div>
 | 
			
		||||
  </body>
 | 
			
		||||
  <script type="text/javascript"></script>
 | 
			
		||||
</body>
 | 
			
		||||
<script type="text/javascript"></script>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
  <meta http-equiv="content-type" content="text/html;charset=utf-8" />
 | 
			
		||||
  <link rel="shortcut icon" href="#" />
 | 
			
		||||
  <link rel="stylesheet" type="text/css" href="{{pluResPath}}html/roleIndex/roleIndex.css" />
 | 
			
		||||
| 
						 | 
				
			
			@ -11,11 +12,12 @@
 | 
			
		|||
  <link rel="preload" href="{{pluResPath}}img/other/bg105.png" as="image">
 | 
			
		||||
  <link rel="preload" href="{{pluResPath}}img/abyss/bg.png" as="image">
 | 
			
		||||
  {{@headIndexStyle}}
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <div class="container" id="container">
 | 
			
		||||
    <div class="head_box">
 | 
			
		||||
        <div class="id_text">ID: {{uid}}</div>
 | 
			
		||||
      <div class="id_text">UID: {{uid}}</div>
 | 
			
		||||
      <div class="day_text">{{activeDay}}</div>
 | 
			
		||||
      <img class="genshin_logo" src="{{pluResPath}}img/other/原神.png" />
 | 
			
		||||
    </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -25,13 +27,17 @@
 | 
			
		|||
      <div class="data_line">
 | 
			
		||||
        {{each val item}}
 | 
			
		||||
        <div class="data_line_item">
 | 
			
		||||
            <div class="num">{{item.num}}</div>
 | 
			
		||||
          <div style="color:{{ item.color }};font-size:16px" class="num">
 | 
			
		||||
            {{item.num}} {{ if item.extra}}<span
 | 
			
		||||
              style="font-size: 12px; color: #757575; margin-left: -4px">/{{item.extra}}</span>{{/if}}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="lable">{{item.lable}}</div>
 | 
			
		||||
        </div>
 | 
			
		||||
        {{/each}}
 | 
			
		||||
      </div>
 | 
			
		||||
      {{/each}}
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    {{if avatars.length>0}}
 | 
			
		||||
    <div class="avatars_box">
 | 
			
		||||
      <div class="tab_lable">我的角色</div>
 | 
			
		||||
| 
						 | 
				
			
			@ -42,7 +48,8 @@
 | 
			
		|||
          <span class="life life{{val.actived_constellation_num}}"> {{val.actived_constellation_num}}命</span>
 | 
			
		||||
          {{/if}}
 | 
			
		||||
          <div class="bg{{val.rarity}}"></div>
 | 
			
		||||
            <img class="role_img" src="{{pluResPath}}img/role/{{val.name}}{{val.costumesLogo}}.png" onerror="whenError(this)" />
 | 
			
		||||
          <img class="role_img" src="{{pluResPath}}img/role/{{val.name}}{{val.costumesLogo}}.png"
 | 
			
		||||
            onerror="whenError(this)" />
 | 
			
		||||
          <div class="desc">Lv.{{val.level}} ❤{{val.fetter}}</div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="text_box">
 | 
			
		||||
| 
						 | 
				
			
			@ -54,7 +61,8 @@
 | 
			
		|||
          <div class="weapon_name_box">
 | 
			
		||||
            <div class="weapon_name">{{val.weapon.showName}}</div>
 | 
			
		||||
            <div class="weapon_level">
 | 
			
		||||
                Lv.{{val.weapon.level}}{{ if val.weapon.affix_level>1}}<span class="weapon_affix">{{val.weapon.affix_level}}</span>{{/if}}
 | 
			
		||||
              Lv.{{val.weapon.level}}{{ if val.weapon.affix_level>1}}<span
 | 
			
		||||
                class="weapon_affix">{{val.weapon.affix_level}}</span>{{/if}}
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -81,8 +89,8 @@
 | 
			
		|||
      <div class="basicInfo_covers">
 | 
			
		||||
        {{each basicInfo.covers val}}
 | 
			
		||||
        <div><img src="{{val.image}}" alt=""> </div>
 | 
			
		||||
          {{/each}}</div>
 | 
			
		||||
       
 | 
			
		||||
        {{/each}}
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
    {{if abyss.time}}
 | 
			
		||||
| 
						 | 
				
			
			@ -105,11 +113,8 @@
 | 
			
		|||
            {{ if val.life>0}}
 | 
			
		||||
            <span class="life life{{val.life}}">{{val.life}}命</span>
 | 
			
		||||
            {{/if}}
 | 
			
		||||
              <img
 | 
			
		||||
                class="role_img bg{{val.rarity}}"
 | 
			
		||||
                src="{{pluResPath}}img/role/{{val.name}}.png"
 | 
			
		||||
                onerror="whenError(this)"
 | 
			
		||||
              />
 | 
			
		||||
            <img class="role_img bg{{val.rarity}}" src="{{pluResPath}}img/role/{{val.name}}.png"
 | 
			
		||||
              onerror="whenError(this)" />
 | 
			
		||||
            <div class="desc">{{val.value}}次</div>
 | 
			
		||||
            <img class="fill_img" src="{{pluResPath}}img/other/fill.png" />
 | 
			
		||||
          </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -122,43 +127,28 @@
 | 
			
		|||
          <div class="item">战斗次数:{{abyss.total_battle_times}}次</div>
 | 
			
		||||
          <div class="item">
 | 
			
		||||
            最多击破:{{abyss.defeat.num}}
 | 
			
		||||
              <img
 | 
			
		||||
                src="{{pluResPath}}img/side/{{abyss.defeat.name}}.png"
 | 
			
		||||
                class="line-icon two_img"
 | 
			
		||||
                onerror="whenError(this,'side')"
 | 
			
		||||
              />
 | 
			
		||||
            <img src="{{pluResPath}}img/side/{{abyss.defeat.name}}.png" class="line-icon two_img"
 | 
			
		||||
              onerror="whenError(this,'side')" />
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="row two">
 | 
			
		||||
          <div class="item">
 | 
			
		||||
              承受伤害:{{abyss.take_damage.num}}<img
 | 
			
		||||
                src="{{pluResPath}}img/side/{{abyss.take_damage.name}}.png"
 | 
			
		||||
                class="line-icon"
 | 
			
		||||
                onerror="whenError(this,'side')"
 | 
			
		||||
              />
 | 
			
		||||
            承受伤害:{{abyss.take_damage.num}}<img src="{{pluResPath}}img/side/{{abyss.take_damage.name}}.png"
 | 
			
		||||
              class="line-icon" onerror="whenError(this,'side')" />
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="item">
 | 
			
		||||
              元素战技:{{abyss.normal_skill.num}}<img
 | 
			
		||||
                src="{{pluResPath}}img/side/{{abyss.normal_skill.name}}.png"
 | 
			
		||||
                class="line-icon two_img"
 | 
			
		||||
                onerror="whenError(this,'side')"
 | 
			
		||||
              />
 | 
			
		||||
            元素战技:{{abyss.normal_skill.num}}<img src="{{pluResPath}}img/side/{{abyss.normal_skill.name}}.png"
 | 
			
		||||
              class="line-icon two_img" onerror="whenError(this,'side')" />
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="row">
 | 
			
		||||
          <div class="item">
 | 
			
		||||
              最强一击:{{abyss.damage.num}}<img
 | 
			
		||||
                src="{{pluResPath}}img/side/{{abyss.damage.name}}.png"
 | 
			
		||||
                class="line-icon"
 | 
			
		||||
                onerror="whenError(this,'side')"
 | 
			
		||||
              />
 | 
			
		||||
            最强一击:{{abyss.damage.num}}<img src="{{pluResPath}}img/side/{{abyss.damage.name}}.png" class="line-icon"
 | 
			
		||||
              onerror="whenError(this,'side')" />
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="item">
 | 
			
		||||
              元素爆发:{{abyss.energy_skill.num}}<img
 | 
			
		||||
                src="{{pluResPath}}img/side/{{abyss.energy_skill.name}}.png"
 | 
			
		||||
                class="line-icon two_img"
 | 
			
		||||
                onerror="whenError(this,'side')"
 | 
			
		||||
              />
 | 
			
		||||
            元素爆发:{{abyss.energy_skill.num}}<img src="{{pluResPath}}img/side/{{abyss.energy_skill.name}}.png"
 | 
			
		||||
              class="line-icon two_img" onerror="whenError(this,'side')" />
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -169,14 +159,15 @@
 | 
			
		|||
    {{/if}}
 | 
			
		||||
    <div class="logo">Created By Yunzai-Bot</div>
 | 
			
		||||
  </div>
 | 
			
		||||
  </body>
 | 
			
		||||
  <script type="text/javascript">
 | 
			
		||||
    function whenError(a,type) {
 | 
			
		||||
</body>
 | 
			
		||||
<script type="text/javascript">
 | 
			
		||||
  function whenError(a, type) {
 | 
			
		||||
    // if(!type){
 | 
			
		||||
    //   type = "role"
 | 
			
		||||
    // }
 | 
			
		||||
    // a.onerror = null;
 | 
			
		||||
    // a.src = "{{pluResPath}}img/"+type+"/荧.png";
 | 
			
		||||
  }
 | 
			
		||||
  </script>
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
		Loading…
	
		Reference in New Issue