From c756e74778bde0f005f440051a5e364a29d395c8 Mon Sep 17 00:00:00 2001 From: Dawn_Ocean <1785590531@qq.com> Date: Thu, 7 Mar 2024 23:54:59 +0800 Subject: [PATCH] remove oreo id from service --- .env.dev | 3 +-- .env.prod | 3 +-- src/service/index.ts | 19 ------------------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/.env.dev b/.env.dev index 658720d..aad0433 100644 --- a/.env.dev +++ b/.env.dev @@ -1,4 +1,3 @@ # 配置文档参考 https://taro-docs.jd.com/docs/next/env-mode-config TARO_APP_ID="wx636eb7cf2b84f305" -TARO_APP_API="http://127.0.0.1:9527" -TARO_APP_API_OREO="http://127.0.0.1:9527" \ No newline at end of file +TARO_APP_API="http://127.0.0.1:9527" \ No newline at end of file diff --git a/.env.prod b/.env.prod index 5e0975d..b438210 100644 --- a/.env.prod +++ b/.env.prod @@ -1,3 +1,2 @@ TARO_APP_ID="wx636eb7cf2b84f305" -TARO_APP_API="" -TARO_APP_API_OREO="" \ No newline at end of file +TARO_APP_API="" \ No newline at end of file diff --git a/src/service/index.ts b/src/service/index.ts index b7f2bd1..0617a44 100644 --- a/src/service/index.ts +++ b/src/service/index.ts @@ -39,22 +39,3 @@ export function getUrl(path: string): string { return ''; } } - -/** - * Get URL of Oreo backend - * @param path Relative path to base url, begins with `/` - * @returns Full url - * - * @example - * // see example of `getUrl` - */ -export function getUrlOreo(path: string): string { - const baseUrlOreo = process.env.TARO_APP_API_OREO; - // console.log('buo:', baseUrlOreo); - if (baseUrlOreo) { - return baseUrlOreo + path; - } else { - console.log('env TARO_APP_API_OREO is undefined'); - return ''; - } -}