Skip to content

Commit

Permalink
🎨 调整解析顺序
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Oct 28, 2023
1 parent b390c78 commit 2a8b97a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/views/t-post-json.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</template>
<script lang="ts" setup>
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 { useRoute } from "vue-router";
Expand Down Expand Up @@ -45,9 +45,13 @@ onMounted(async () => {
return;
}
try {
parseData = JSON.parse(jsonData.post.structured_content);
parseData = JSON.parse(jsonData.post.content);
} catch (e) {
isEmpty.value = true;
try {
parseData = JSON.parse(jsonData.post.structured_content);
} catch (e) {
isEmpty.value = true;
}
}
loading.value = false;
});
Expand Down

0 comments on commit 2a8b97a

Please sign in to comment.