jeawin-astro 3.0.16 → 3.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ import loadingImg from "../assets/images/loading.gif";
|
|
|
14
14
|
import SearchInput from "./formitem/searchinput.astro";
|
|
15
15
|
const { channel_name, site_id, list_tpl } = Astro.props;
|
|
16
16
|
|
|
17
|
-
const { all_langs, jeawin_api_domain } = Astro.locals;
|
|
17
|
+
const { all_langs, jeawin_api_domain, jeawin_form_api_domain } = Astro.locals;
|
|
18
18
|
|
|
19
19
|
const site = Astro.site;
|
|
20
20
|
|
|
@@ -69,7 +69,7 @@ let btn_active_class = `relative z-10 inline-flex items-center bg-[var(--themeCo
|
|
|
69
69
|
<search-result-list
|
|
70
70
|
data-site={site}
|
|
71
71
|
data-site_id={site_id}
|
|
72
|
-
data-
|
|
72
|
+
data-jeawin_form_api_domain={jeawin_form_api_domain}
|
|
73
73
|
data-list_tpl={list_tpl}
|
|
74
74
|
data-btn_class={btn_class}
|
|
75
75
|
data-btn_active_class={btn_active_class}
|
|
@@ -16,7 +16,7 @@ interface Props {
|
|
|
16
16
|
canonical: string;
|
|
17
17
|
url?: string;
|
|
18
18
|
}
|
|
19
|
-
const { base_url, jeawin_api_domain } = Astro.locals;
|
|
19
|
+
const { base_url, jeawin_api_domain, jeawin_form_api_domain } = Astro.locals;
|
|
20
20
|
let { canonical, url } = Astro.props;
|
|
21
21
|
if (!canonical) {
|
|
22
22
|
canonical = `${base_url}${url}`;
|
|
@@ -43,7 +43,7 @@ if (!canonical) {
|
|
|
43
43
|
<script
|
|
44
44
|
type="text/javascript"
|
|
45
45
|
define:vars={{
|
|
46
|
-
SERVER_ADMIN:
|
|
46
|
+
SERVER_ADMIN: jeawin_form_api_domain,
|
|
47
47
|
canonical: canonical,
|
|
48
48
|
}}
|
|
49
49
|
>
|
|
@@ -16,7 +16,7 @@ export function SearchResultListInit() {
|
|
|
16
16
|
super();
|
|
17
17
|
|
|
18
18
|
const site = this.dataset.site;
|
|
19
|
-
const
|
|
19
|
+
const jeawin_form_api_domain = this.dataset.jeawin_form_api_domain;
|
|
20
20
|
const site_id = this.dataset.site_id;
|
|
21
21
|
|
|
22
22
|
const list_tpl = this.dataset.list_tpl;
|
|
@@ -248,7 +248,7 @@ export function SearchResultListInit() {
|
|
|
248
248
|
searchKeywordElem.innerHTML = search_keyword;
|
|
249
249
|
|
|
250
250
|
const req = await fetchJsonp(
|
|
251
|
-
`${
|
|
251
|
+
`${jeawin_form_api_domain}/api/search/results?q=${search_keyword}&site_id=${site_id}&ct=${ct}&callback=?&referrer=${encodeURIComponent(
|
|
252
252
|
document.referrer
|
|
253
253
|
)}&page=${page}`,
|
|
254
254
|
{
|