     const redirectUrl = new URL(/^https?/.test(redirect) ? redirect : location.origin + redirect)
            if (!search.toString()) {
                // 兼容之前的预览链接格式
                redirectUrl.searchParams.set('preview', true)
            } else {
                search.forEach((val, key) => {
                    redirectUrl.searchParams.set(key, val)
                })
            }

            const xhr = new XMLHttpRequest()
            xhr.onreadystatechange = function (e) {
  