wildpig 1.0.6 → 1.0.7
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 +1 -1
- package/scripts/WildPig.ts +1 -1
- package/src/router/guard.tsx +0 -1
package/package.json
CHANGED
package/scripts/WildPig.ts
CHANGED
|
@@ -31,7 +31,7 @@ export const startServer = () => {
|
|
|
31
31
|
const metaRes = await metaRoutes[pathname]();
|
|
32
32
|
meta = await metaRes.json();
|
|
33
33
|
}
|
|
34
|
-
return new Response(htmlString.replace("{{TITLE}}", meta?.title || "
|
|
34
|
+
return new Response(htmlString.replace("{{TITLE}}", meta?.title || "WildPig"), {
|
|
35
35
|
headers: {
|
|
36
36
|
"content-type": "text/html; charset=utf-8",
|
|
37
37
|
"Access-Control-Allow-Origin": "*",
|
package/src/router/guard.tsx
CHANGED
|
@@ -5,7 +5,6 @@ export const RouterGuard = () => {
|
|
|
5
5
|
browserRouter.subscribe(({ location }) => {
|
|
6
6
|
// navigationType 值:'PUSH' | 'POP' | 'REPLACE'
|
|
7
7
|
const url = location.pathname + location.search;
|
|
8
|
-
console.log('[router] url=', url);
|
|
9
8
|
// apiGetMeta(location.pathname);
|
|
10
9
|
// 请求对应的meta api,修改title
|
|
11
10
|
fetch("/_WILDPIG_META_API" + url).then(res => res.json()).then(({title}) => {
|