diff --git a/public/tauri.png b/public/tauri.png
new file mode 100644
index 00000000..12a4a7aa
Binary files /dev/null and b/public/tauri.png differ
diff --git a/src/pages/Config.vue b/src/pages/Config.vue
index 61c76156..d316f15e 100644
--- a/src/pages/Config.vue
+++ b/src/pages/Config.vue
@@ -15,11 +15,7 @@
-
+
{{ versionTauri }}
@@ -68,6 +64,18 @@
/>
+
+ 开发者模式
+ 开启后将显示调试信息
+
+
+
+
diff --git a/src/pages/News.vue b/src/pages/News.vue
index 390fe888..c089e775 100644
--- a/src/pages/News.vue
+++ b/src/pages/News.vue
@@ -31,6 +31,12 @@
查看
id:{{ item.post_id }}
+
+
+
+
+ JSON
+
@@ -58,9 +64,17 @@
查看
id:{{ item.post_id }}
- 进行中
- 已结束
- 评选中
+
+ 进行中
+ 已结束
+ 评选中
+
+
+
+
+
+ JSON
+
@@ -87,6 +101,12 @@
查看
id:{{ item.post_id }}
+
+
+
+
+ JSON
+
@@ -200,18 +220,18 @@ async function toPost(post_id: string) {
const postUrl = `file:\\\\\\${appStore.dataPath.temp}\\${post.post_id}.html`;
createTGWindow(postUrl, "MysPost", post.subject, 960, 720, false);
}
-async function logPost(post_id: string) {
+async function toJson(post_id: string) {
const post = await getPost(post_id).then(res => {
return res.data;
});
// 将 json 保存到 文件
await fs.writeTextFile(
- `${appStore.dataPath.temp}\\${post_id}_log.json`,
+ `${appStore.dataPath.temp}\\${post_id}.json`,
JSON.stringify(post, null, 4)
);
- const logUrl = `file:\\\\\\${appStore.dataPath.temp}\\${post_id}_log.json`;
+ const logUrl = `file:\\\\\\${appStore.dataPath.temp}\\${post_id}.json`;
// 打开窗口
- createTGWindow(logUrl, "MysPostLog", post_id, 960, 720, false);
+ createTGWindow(logUrl, "MysPostJson", post_id, 960, 720, false);
}
async function getPost(post_id: string): Promise {
return http
diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts
index e81cd467..7b4bbea0 100644
--- a/src/store/modules/app.ts
+++ b/src/store/modules/app.ts
@@ -32,6 +32,8 @@ const useAppStore = defineStore({
},
// 咨讯页渲染模式
structureRender: true, // 是否采用结构化渲染,否则采用 raw 渲染
+ // 开发者模式
+ devMode: false,
// 数据路径
dataPath: {
app: appDataDir,
@@ -81,6 +83,8 @@ const useAppStore = defineStore({
this.loading = false;
// 初始化咨讯页渲染模式
this.structureRender = true;
+ // 初始化开发者模式
+ this.devMode = false;
// 初始化用户数据路径
this.userPath = {
achievements: `${userDataDir}\\achievements.json`,