fix(workshop): rewrites 账号跳转 param 中文未解码——补 decodeURIComponent v22-fix

- #/rewrites/<编码账号名> 的 param 未经 decode,中文账号名(俊希等)以编码串进入搜索词匹配不到
- renderRewrites 开头 decodeURIComponent(initAccount)(try/catch 防坏 URI)
- 纯前端,无需重启
This commit is contained in:
maogeigei committed 2026-09-02 19:00:29 +08:00
1 parent ac6fb3c7a1
commit 7cfe9c62b6
1 file changed
+1
@@ -922,6 +922,7 @@ async function renderVideoDetail(view, id) {
/* ================= AI写脚本 ================= */
async function renderRewrites(view, initAccount) { /* v22:initAccount=账号列表 AI脚本列跳转进入,预筛该账号 */
try { initAccount = decodeURIComponent(initAccount || ''); } catch (e) { initAccount = ''; } /* hash 路径段 param 未解码,中文账号名需还原(v22 fix) */
let state = { search: initAccount || '', parsed: '', days: '30', page: 1, pageSize: 20, batch: false };
async function load() {
const d = await api('/api/dsh/videos?search=' + encodeURIComponent(state.search) + '&parsed=' + state.parsed + '&days=' + state.days + '&page=' + state.page + '&pageSize=' + state.pageSize);