Skip to content

Commit

Permalink
feat: 适配知乎完成
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 9, 2023
1 parent 8db460c commit 5a2406a
Show file tree
Hide file tree
Showing 9 changed files with 191 additions and 117 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ archive.zip
components.d.ts

# test
coverage
coverage
testdata
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"syncWidgetRepo": "python scripts/sync_widget_repo.py"
},
"devDependencies": {
"@terwer/esbuild-config-custom": "^1.0.12",
"@terwer/esbuild-config-custom": "^1.2.0",
"@terwer/eslint-config-custom": "^1.3.6",
"@types/node": "^18.17.3",
"@types/node": "^18.17.4",
"@vitejs/plugin-vue": "^4.2.3",
"@vitest/coverage-v8": "^0.34.1",
"@vue/test-utils": "^2.4.1",
Expand All @@ -43,8 +43,8 @@
"typescript": "^5.1.6",
"unplugin-auto-import": "^0.16.6",
"unplugin-vue-components": "^0.25.1",
"vercel": "^31.2.2",
"vite": "^4.4.9",
"vercel": "^31.2.3",
"vite": "^4.3.9",
"vite-plugin-html": "^3.2.0",
"vite-plugin-node-polyfills": "^0.8.2",
"vitest": "^0.34.1",
Expand Down
107 changes: 56 additions & 51 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions scripts/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

# 设置环境变量
os.environ['IS_SERVE'] = 'true'
os.environ['VITE_DEFAULT_TYPE'] = 'siyuan'
os.environ['VITE_SIYUAN_API_URL'] = URL
os.environ['VITE_SIYUAN_AUTH_TOKEN'] = TOKEN
os.environ['VITE_SIYUAN_COOKIE'] = COOKIE
Expand Down
13 changes: 6 additions & 7 deletions src/adaptors/api/base/baseBlogApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,15 @@ export class BaseBlogApi extends BlogApi {
* 网页授权通用的请求代理
*
* @param url - url
* @param headers - headers
* @param params - 参数
* @param method - method
@param contentType -
* @param contentType -
* @param headers - headers,默认是[]
* @param params - 参数,默认是 {}
* @param method - 方法,默认是GET
* @param contentType - 类型,默认是 application/json
*/
protected async proxyFetch(
url: string,
headers: any[],
params: any,
headers: any[] = [],
params: any = {},
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" = "GET",
contentType: string = "application/json"
): Promise<any> {
Expand Down
Loading

0 comments on commit 5a2406a

Please sign in to comment.