docs: annotate all shared frontend modules in Chinese
This commit is contained in:
1 parent
2be21c1c62
commit
408f8e5c98
55 files changed
+349
No files matched your search
@@ -1,4 +1,6 @@
|
||||
/** 微信扫码绑定的短期续接数据;存储由调用方传入,token 不放进页面跳转 URL。 */
|
||||
var e = `console.wechat-binding`;
|
||||
// 写入期限取服务端截止时间和五分钟上限的较早值,已过期会话立即拒绝。
|
||||
function t(t, n, r = Date.now()) {
|
||||
if (!t.ticket || !t.token) throw Error(`扫码会话无效,请重新扫码`);
|
||||
let i = Math.min(r + 3e5, t.expire_time ? t.expire_time * 1e3 : r + 3e5);
|
||||
@@ -12,6 +14,7 @@ function t(t, n, r = Date.now()) {
|
||||
}),
|
||||
);
|
||||
}
|
||||
// 读取时重新校验结构和期限;格式损坏、过期或异常长有效期均删除,避免继续复用。
|
||||
function n(t, n = Date.now()) {
|
||||
try {
|
||||
let r = JSON.parse(t.getItem(e) || `null`);
|
||||
|
||||
Reference in new issue
Block a user