mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-12 07:55:11 +08:00
feat: 新增战报弹窗与舰队模拟器,重构UI组件
新增 BattleReportDialog、SpyReportDialog、NumberWithTooltip 等组件,完善舰队模拟器功能。重构并引入 Sheet、Sidebar、Tooltip、Skeleton 等 UI 组件,优化界面结构。实现 battle.worker 支持战斗计算,增加 universeStore、fleetStorageLogic 等核心逻辑,完善多语言与类型定义。
This commit is contained in:
@@ -5,11 +5,12 @@ import pkg from '../../package.json'
|
||||
export const encryptData = (data: any): string => {
|
||||
try {
|
||||
const jsonStr = JSON.stringify(data)
|
||||
return CryptoJS.AES.encrypt(jsonStr, pkg.name).toString()
|
||||
const encrypted = CryptoJS.AES.encrypt(jsonStr, pkg.name).toString()
|
||||
return encrypted
|
||||
} catch (error) {
|
||||
console.error('数据加密失败:', error)
|
||||
return ''
|
||||
console.error(error)
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
// 数据解密
|
||||
@@ -19,7 +20,7 @@ export const decryptData = (data: string): any => {
|
||||
const decryptedStr = bytes.toString(CryptoJS.enc.Utf8)
|
||||
return JSON.parse(decryptedStr)
|
||||
} catch (error) {
|
||||
console.error('数据解密失败:', error)
|
||||
console.error(error)
|
||||
return {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user