diff --git a/src/assets/css/anno-parser.css b/src/assets/css/anno-parser.css
new file mode 100644
index 00000000..ca075f79
--- /dev/null
+++ b/src/assets/css/anno-parser.css
@@ -0,0 +1,12 @@
+/*
+ * @description 游戏公告解析 css
+ * @since Alpha v0.1.1
+ */
+/* todo 样式美化 */
+.anno-content {
+ font-size: 16px;
+ line-height: 2;
+}
+
+.anno-content p span {
+}
diff --git a/src/assets/index.css b/src/assets/index.css
index 41f000cb..d2f1ef54 100644
--- a/src/assets/index.css
+++ b/src/assets/index.css
@@ -1,23 +1,13 @@
@import "fonts/index.css";
-@import "css/mys-parser.css";
/*
* @description 米游社解析 json
* @since Alpha v0.1.1
*/
-.mys-post-json {
+.dev-json {
padding: 20px;
border-radius: 20px;
-}
-
-.mys-post-json * {
- color: #faf7e8 !important;
- background-color: #2b2b2b !important;
- font-family: "Consolas", monospace;
-}
-
-.mys-post-json .jv-toggle {
- background-color: #faf7e8 !important;
+ font-family: Consolas, serif;
}
/* card action 内的按钮 */
diff --git a/src/pages/Announcements.vue b/src/pages/Announcements.vue
index 5609cb86..34b7c02a 100644
--- a/src/pages/Announcements.vue
+++ b/src/pages/Announcements.vue
@@ -21,19 +21,29 @@
- {{ item.title }}
+
+ {{ item.title }}
+
{{ item.subtitle }}
-
+
-
+
查看
- mdi-calendar {{ item.start_time.split(" ")[0] }} -
+
+ mdi-calendar
+ {{ item.start_time.split(" ")[0] }} -
{{ item.end_time.split(" ")[0] }}
+ id: {{ item.id }}
+
+
+
+
+ 查看数据
+
@@ -47,17 +57,24 @@
{{ item.title }}
{{ item.subtitle }}
-
+
-
+
查看
-
+
mdi-calendar
{{ item.start_time.split(" ")[0] }} -
{{ item.end_time.split(" ")[0] }}
+ id: {{ item.id }}
+
+
+
+
+ 查看数据
+
@@ -77,6 +94,10 @@ import GenshinOper from "../plugins/Genshin";
import { createTGWindow } from "../utils/TGWindow";
// interface
import { AnnoListData, AnnoListCard } from "../plugins/Genshin/interface/announcement";
+import useAppStore from "../store/modules/app";
+
+// store
+const appStore = useAppStore();
// loading
const loading = ref(true);
@@ -94,7 +115,7 @@ const annoData = ref({} as AnnoListData);
onMounted(async () => {
loadingTitle.value = "正在获取公告数据";
- annoData.value = await GenshinOper.Announcement.get.list();
+ annoData.value = await GenshinOper.Announcement.getList();
loadingTitle.value = "正在转换公告数据";
const listCards = GenshinOper.Announcement.card(annoData.value);
const activityCard = listCards.filter(item => item.type_label === "活动公告");
@@ -121,6 +142,16 @@ async function toPost(item: AnnoListCard) {
}).href;
createTGWindow(path, "游戏内公告", item.title, 960, 720, false);
}
+
+async function toJson(item: AnnoListCard) {
+ const path = router.resolve({
+ name: "游戏内公告(JSON)",
+ params: {
+ anno_id: item.id,
+ },
+ }).href;
+ createTGWindow(path, "游戏内公告-JSON", item.title, 960, 720, false);
+}
diff --git a/src/views/t-anno.vue b/src/views/t-anno.vue
index 7d32bf2f..c4514d76 100644
--- a/src/views/t-anno.vue
+++ b/src/views/t-anno.vue
@@ -5,8 +5,8 @@
{{ annoData.title }}
{{ annoData.subtitle }}
-
![cover]()
-
+
![cover]()
+