From b9c9cac6791516c50dc9d82d85c1eae8ed093228 Mon Sep 17 00:00:00 2001 From: LittleChest Date: Sat, 27 Sep 2025 10:24:55 +0800 Subject: [PATCH] app: Legacy model --- src/App.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index c6d336e..41508e0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -42,7 +42,8 @@
性别:{{ genderDisplay }}
- + @@ -63,6 +64,7 @@ const photoBlob = ref(null) const loading = ref(false) const debug = ref('') const errorMsg = ref('') +const legacyModel = ref(false) const saveConsent = ref(true) const age = ref(null) const gender = ref(null) @@ -153,7 +155,10 @@ async function uploadPhoto() { const form = new FormData() form.append('face', photoBlob.value, 'selfie.jpg') let url = 'https://api.littlew.top/age' - if (saveConsent.value) url += '?save=true' + const params = [] + if (saveConsent.value) params.push('save=true') + if (legacyModel.value) params.push('legacy=true') + if (params.length) url += '?' + params.join('&') const resp = await fetch(url, { method: 'POST', body: form }, { credentials: 'include' }) const text = await resp.text() try {