diff --git a/component/bi/bi.js b/component/bi/bi.js index bd5f3b5..4275516 100644 --- a/component/bi/bi.js +++ b/component/bi/bi.js @@ -219,6 +219,9 @@ class BiCard extends HTMLElement { if (xhr.readyState === 4 && xhr.status === 200) { let response = xhr.response; resolve(response); + } else if (xhr.status === 401) { + if (typeof ajax_login === "function") ajax_login(); + else window.open("https://passport.gter.net/?referer=" + escape(location.href), "_self"); } }; @@ -241,6 +244,9 @@ class BiCard extends HTMLElement { if (xhr.readyState === 4 && xhr.status === 200) { let response = xhr.response; resolve(JSON.parse(response)); + } else if (xhr.status === 401) { + if (typeof ajax_login === "function") ajax_login(); + else window.open("https://passport.gter.net/?referer=" + escape(location.href), "_self"); } }; diff --git a/component/hot-search/hot-search.js b/component/hot-search/hot-search.js index f12504f..a4f776c 100644 --- a/component/hot-search/hot-search.js +++ b/component/hot-search/hot-search.js @@ -7,8 +7,12 @@ export const hotSearch = defineComponent({ props: {}, setup(props) { + let valueUrl = ref(""); + onMounted(() => { init(); + const valueA = document.querySelector(".valueA"); + valueUrl.value = valueA.innerText; }); const init = () => { @@ -20,10 +24,10 @@ export const hotSearch = defineComponent({ const list = ref([]); - return { list }; + return { valueUrl, list }; }, components: {}, - template: `
+
+