diff --git a/src/components/userRecord/tur-world-sub.vue b/src/components/userRecord/tur-world-sub.vue
index 017c73a8..229f70e4 100644
--- a/src/components/userRecord/tur-world-sub.vue
+++ b/src/components/userRecord/tur-world-sub.vue
@@ -9,10 +9,22 @@
{{ data.name }}
-
-
- {{ data.offering.name }}-
- {{ data.offering.level }}
+
+
+ {{ data.offerings[0].name }}-
+ {{ data.offerings[0].level }}
+ 级
+
+
+
+
+
+ {{ offer.level }}
级
@@ -33,6 +45,24 @@
%
+
+
+ {{ area.name }}:
+ {{ Math.min(area.exploration_percentage / 10, 100) }}
+ %
+
+
声望等级:
{{ data.reputation }}
@@ -84,6 +114,7 @@ const icon = computed
(() => {
}
.tur-ws-icon {
+ position: relative;
z-index: 1;
width: 64px;
height: 64px;
@@ -96,6 +127,7 @@ const icon = computed(() => {
}
.tur-ws-content {
+ position: relative;
z-index: 1;
width: calc(100% - 68px);
height: 100%;
@@ -111,6 +143,21 @@ const icon = computed(() => {
font-size: 18px;
}
+.tur-ws-offerings {
+ display: flex;
+ align-items: center;
+ justify-content: start;
+ column-gap: 8px;
+}
+
+.tur-ws-areas {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ justify-content: start;
+ gap: 4px 8px;
+}
+
.tur-ws-sub {
display: flex;
align-items: center;
diff --git a/src/pages/User/Record.vue b/src/pages/User/Record.vue
index 4c8fa328..b4994c05 100644
--- a/src/pages/User/Record.vue
+++ b/src/pages/User/Record.vue
@@ -113,6 +113,7 @@ async function loadRecord(): Promise {
const record = await TSUserRecord.getRecord(uidCur.value);
if (!record) return;
recordData.value = record;
+ console.log(recordData.value);
}
async function refreshRecord(): Promise {
diff --git a/src/plugins/Sqlite/utils/transUserRecord.ts b/src/plugins/Sqlite/utils/transUserRecord.ts
index 019a1f84..c62d9aee 100644
--- a/src/plugins/Sqlite/utils/transUserRecord.ts
+++ b/src/plugins/Sqlite/utils/transUserRecord.ts
@@ -124,10 +124,12 @@ function transStat(data: TGApp.Game.Record.Stats): TGApp.Sqlite.Record.Stats {
/**
* @description 将探索信息转换为数据库中的数据
* @since Beta v0.8.1
- * @param {TGApp.Game.Record.WorldExplore[]} data 城市探索信息
- * @returns {TGApp.Sqlite.Record.WorldExplore[]} 转换后的城市探索信息
+ * @param {Array} data 城市探索信息
+ * @returns {Array} 转换后的城市探索信息
*/
-function transWorld(data: TGApp.Game.Record.WorldExplore[]): TGApp.Sqlite.Record.WorldExplore[] {
+function transWorld(
+ data: Array,
+): Array {
const areaParent = data.filter((i) => i.parent_id === 0);
const areaChild = data.filter((i) => i.parent_id !== 0);
const worlds: TGApp.Sqlite.Record.WorldExplore[] = [];
@@ -141,16 +143,11 @@ function transWorld(data: TGApp.Game.Record.WorldExplore[]): TGApp.Sqlite.Record
bg: area.background_image,
cover: area.cover,
exploration: area.exploration_percentage,
+ area_exploration_list: area.area_exploration_list,
children: [],
};
if (area.type === "Reputation") world.reputation = area.level;
- if (area.offerings !== undefined && area.offerings.length > 0) {
- world.offering = {
- name: area.offerings[0].name,
- level: area.offerings[0].level,
- icon: area.offerings[0].icon,
- };
- }
+ if (area.offerings !== undefined && area.offerings.length > 0) world.offerings = area.offerings;
// 对纳塔的特殊处理
if (area.name === "纳塔") {
world.icon =
diff --git a/src/types/Game/Record.d.ts b/src/types/Game/Record.d.ts
index 8b2e0302..94e66a16 100644
--- a/src/types/Game/Record.d.ts
+++ b/src/types/Game/Record.d.ts
@@ -175,7 +175,7 @@ declare namespace TGApp.Game.Record {
/**
* @description 世界探索信息类型
* @interface WorldExplore
- * @since Beta 0.7.2
+ * @since Beta 0.8.1
* @property {number} level - 声望等级
* @property {number} exploration_percentage - 探索千分比
* @property {string} icon - 图标
@@ -195,7 +195,7 @@ declare namespace TGApp.Game.Record {
* @property {boolean} index_active - 索引激活
* @property {boolean} detail_active - 详细激活
* @property {number} seven_status_level - 七天神像等级
- * @property {NataReputation[] | null} nata_reputation - 纳塔声望
+ * @property {NataReputation | null} nata_reputation - 纳塔声望
* @property {number} world_type - 世界类型
*/
type WorldExplore = {
@@ -212,7 +212,7 @@ declare namespace TGApp.Game.Record {
background_image: string;
inner_icon: string;
cover: string;
- area_exploration_list: Array;
+ area_exploration_list: Array;
boss_list: Array;
is_hot: boolean;
index_active: boolean;
@@ -232,6 +232,15 @@ declare namespace TGApp.Game.Record {
*/
type WorldOffering = { name: string; level: number; icon: string };
+ /**
+ * @description 区域探索类型
+ * @interface AreaExploration
+ * @since Beta v0.8.1
+ * @property {string} name - 名称
+ * @property {number} exploration_percentage - 探索千分比
+ */
+ type AreaExploration = { name: string; exploration_percentage: number };
+
/**
* @description 纳塔声望类型
* @interface NataReputation
diff --git a/src/types/Sqlite/Record.d.ts b/src/types/Sqlite/Record.d.ts
index e561d7c5..babce61d 100644
--- a/src/types/Sqlite/Record.d.ts
+++ b/src/types/Sqlite/Record.d.ts
@@ -137,7 +137,7 @@ declare namespace TGApp.Sqlite.Record {
/**
* @description 世界探索信息类型
* @interface WorldExplore
- * @since Beta v0.7.2
+ * @since Beta v0.8.1
* @property {number} id - 地区 ID
* @property {string} name - 地区名称
* @property {string} iconLight - 地区图标(亮)
@@ -145,6 +145,7 @@ declare namespace TGApp.Sqlite.Record {
* @property {string} cover - 封面
* @property {number} reputation - 地区声望等级
* @property {WorldOffering} offering - 地区供奉信息
+ * @property {Array} offerings - 地区供奉列表
* @property {number} exploration - 地区探索进度
* @property {Array} children - 子地区
*/
@@ -156,8 +157,13 @@ declare namespace TGApp.Sqlite.Record {
bg: string;
cover: string;
reputation?: number;
+ /**
+ * @deprecated 已弃用,建议使用 offerings
+ */
offering?: WorldOffering;
+ offerings?: Array;
exploration: number;
+ area_exploration_list?: Array;
children: Array;
};
@@ -171,6 +177,15 @@ declare namespace TGApp.Sqlite.Record {
*/
type WorldOffering = { name: string; level: number; icon: string };
+ /**
+ * @description 区域探索类型
+ * @interface AreaExploration
+ * @since Beta v0.8.1
+ * @property {string} name - 名称
+ * @property {number} exploration_percentage - 探索千分比
+ */
+ type AreaExploration = { name: string; exploration_percentage: number };
+
/**
* @description 子地区类型
* @interface WorldChild
diff --git a/src/utils/toolFunc.ts b/src/utils/toolFunc.ts
index 9c522ac9..7208110e 100644
--- a/src/utils/toolFunc.ts
+++ b/src/utils/toolFunc.ts
@@ -1,7 +1,7 @@
/**
* @file utils/toolFunc.ts
* @description 一些工具函数
- * @since Beta v0.8.0
+ * @since Beta v0.8.1
*/
import { AvatarExtResTypeEnum, AvatarExtTypeEnum } from "@enum/bbs.js";
@@ -220,7 +220,7 @@ export function isColorSimilar(colorBg: string, colorText: string): boolean {
/**
* @description 解析带样式的文本
- * @since Beta v0.8.0
+ * @since Beta v0.8.1
* @param {string} desc - 带样式的文本
* @returns {string} 解析后的文本
*/