feat(miniapp): add privacy consent and legal pages

Show privacy popup on launch, gate login on legal consent, and link
user agreement and privacy policy pages in the mini program.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-12 12:18:54 +08:00
parent 8928827291
commit 048f25f580
29 changed files with 817 additions and 8 deletions
+2
View File
@@ -1,5 +1,6 @@
const SESSION_KEY = 'tkmind_session';
const { createUuid, SESSION_COOKIE_NAME } = require('./config');
const { clearLegalConsent } = require('./legal-consent');
let apiBaseUrl = '';
let cookie = '';
@@ -225,6 +226,7 @@ async function logout() {
await portalRequest('/auth/logout', { method: 'POST' });
} finally {
clearSession();
clearLegalConsent();
}
}