feat(rednote): add isolated persistent browser H5 entry

This commit is contained in:
xsl
2026-10-19 22:59:10 +08:00
parent 9eec4369da
commit 4af825a5e4
24 changed files with 707 additions and 45 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
})(typeof window !== 'undefined' ? window : this, function() {
'use strict';
function key(user) {
return user && user.kind === 'wechat' && typeof user.id === 'string' && user.id.length <= 128 && user.id
? 'juzi.profile.v1.' + user.kind + '.' + encodeURIComponent(user.id) : null;
return user && ['wechat', 'browser_persistent'].indexOf(user.kind) >= 0 && typeof user.id === 'string' && user.id.length <= 128 && user.id
? (user.kind === 'browser_persistent' ? 'juzi.rednote.profile.v1.' : 'juzi.profile.v1.') + user.kind + '.' + encodeURIComponent(user.id) : null;
}
function age(birth, now) {
if (typeof birth !== 'string' || !/^\d{4}-(0[1-9]|1[0-2])$/.test(birth)) return null;