🎨 调整解析顺序

This commit is contained in:
BTMuli
2023-10-28 14:35:59 +08:00
parent b390c7851e
commit 2a8b97abe9

View File

@@ -10,7 +10,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { appWindow } from "@tauri-apps/api/window"; import { appWindow } from "@tauri-apps/api/window";
import { ref, onMounted, reactive } from "vue"; import { onMounted, reactive, ref } from "vue";
import JsonViewer from "vue-json-viewer"; import JsonViewer from "vue-json-viewer";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
@@ -45,9 +45,13 @@ onMounted(async () => {
return; return;
} }
try { try {
parseData = JSON.parse(jsonData.post.structured_content); parseData = JSON.parse(jsonData.post.content);
} catch (e) { } catch (e) {
isEmpty.value = true; try {
parseData = JSON.parse(jsonData.post.structured_content);
} catch (e) {
isEmpty.value = true;
}
} }
loading.value = false; loading.value = false;
}); });