From 24d2c8a4ba8cd5824936a9098c8e4db65872d6e8 Mon Sep 17 00:00:00 2001 From: terwer Date: Mon, 14 Aug 2023 21:30:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0-=E6=8E=92=E6=9F=A5Notion?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=A7=A3=E6=9E=90=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom.d.ts | 2 +- src/adaptors/api/notion/notionApiAdaptor.ts | 2 +- src/composables/useVueRouter.ts | 6 ++ src/pages/OtherTest.vue | 67 +++++++++++++++++++++ src/utils/constants.ts | 2 +- 5 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 src/pages/OtherTest.vue diff --git a/custom.d.ts b/custom.d.ts index 8e49c0d7..0b66d57b 100644 --- a/custom.d.ts +++ b/custom.d.ts @@ -23,4 +23,4 @@ * questions. */ -declare module "markdown-to-notion" \ No newline at end of file +declare module "zhi-notion-markdown" \ No newline at end of file diff --git a/src/adaptors/api/notion/notionApiAdaptor.ts b/src/adaptors/api/notion/notionApiAdaptor.ts index def1ccf7..135aa397 100644 --- a/src/adaptors/api/notion/notionApiAdaptor.ts +++ b/src/adaptors/api/notion/notionApiAdaptor.ts @@ -154,7 +154,7 @@ class NotionApiAdaptor extends BaseBlogApi { }, children: notionObject, } - this.logger.debug("before createPage, notionObject=>", notionObject) + this.logger.debug("before createPage =>", { markdownText, notionObject }) const resp = await this.notionRequest("/pages", params, "POST") if (resp.object !== "page") { throw new Error("Notion create page error") diff --git a/src/composables/useVueRouter.ts b/src/composables/useVueRouter.ts index af20a591..a894aa2c 100644 --- a/src/composables/useVueRouter.ts +++ b/src/composables/useVueRouter.ts @@ -36,6 +36,7 @@ import PlatformUpdateForm from "~/src/components/set/publish/PlatformUpdateForm. import PlatformQuickAdd from "~/src/components/set/publish/PlatformQuickAdd.vue" import QuickPublish from "~/src/workers/QuickPublish.vue" import SiyuanSetting from "~/src/components/set/SiyuanSetting.vue" +import OtherTest from "~/src/pages/OtherTest.vue" const ApiTest = () => import("~/src/pages/ApiTest.vue") const SiyuanTest = () => import("~/src/components/test/SiyuanTest.vue") @@ -71,6 +72,11 @@ const routes: RouteRecordRaw[] = [ ], }, + { + path: "/test/other", + component: OtherTest, + }, + { path: "/setting", component: Setting, diff --git a/src/pages/OtherTest.vue b/src/pages/OtherTest.vue new file mode 100644 index 00000000..81fbcc42 --- /dev/null +++ b/src/pages/OtherTest.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 61e36239..91588019 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -34,7 +34,7 @@ export const DYNAMIC_CONFIG_KEY = "dynamic-config" /** * 必须使用平台自带的图片上传的平台 */ -export const MUST_USE_OWN_PLATFORM = ["custom_Zhihu", "common_Notion"] +export const MUST_USE_OWN_PLATFORM = ["custom_Zhihu"] /** * 必须使用图床的平台