Switch to a different algroithm.

This commit is contained in:
yuanhau 2025-05-21 10:20:33 +08:00
parent 25927ad13c
commit f8879b307c
9 changed files with 72 additions and 16 deletions

24
pages/test.vue Normal file
View file

@ -0,0 +1,24 @@
<script setup lang="ts">
import CheckKidUnfriendlyContent from "~/components/checks/checkKidUnfriendlyContent";
const title = ref("");
const system = ref("");
const checkTitle = async () => {
if (!title.value) return;
system.value = await CheckKidUnfriendlyContent(title.value);
};
</script>
<template>
<div
class="flex flex-col absolute h-screen w-full inset-0 justify-center align-center text-center"
>
<h1 class="text-4xl m-2">標體</h1>
<div class="flex flex-row justify-center align-center gap-2">
<input type="text" class="text-black rounded-xl p-2 w-[300px]" />
<button @click="checkTitle" class="rounded-xl bg-sky-600 p-2">
Find
</button>
</div>
<div>{{ system }}</div>
</div>
<div class="h-screen"></div>
</template>

View file

@ -2,9 +2,10 @@
import CheckKidUnfriendlyContent from "~/components/checks/checkKidUnfriendlyContent";
const title = ref("");
const system = ref(false);
const testingReturn = ref("");
const checkTitle = async () => {
if (!title.value) return;
system.value = await CheckKidUnfriendlyContent(title.value);
testingReturn.value = await CheckKidUnfriendlyContent(title.value);
};
useSeoMeta({
title: "這個文章是不是使用偏色情的標體?",
@ -16,11 +17,7 @@ useSeoMeta({
>
<h1 class="text-4xl m-2">這個文章是不是使用偏色情的標體</h1>
<div class="flex flex-row justify-center align-center gap-2">
<input
type="text"
v-model="title"
class="text-black rounded-xl p-2 w-[300px]"
/>
<input type="text" class="text-black rounded-xl p-2 w-[300px]" />
<button @click="checkTitle" class="rounded-xl bg-sky-600 p-2">
Find
</button>
@ -28,5 +25,6 @@ useSeoMeta({
<span v-if="system" class="text-red-400 text-8xl m-8"></span>
<span v-else class="text-white">不是</span>
</div>
<div>{{ testingReturn }}</div>
<div class="h-screen"></div>
</template>