From e7abf0d0ca5a89f4eb07bc87c8550417abfcf906 Mon Sep 17 00:00:00 2001 From: xiaosi <2652281683@qq.com> Date: Mon, 27 Nov 2023 17:15:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91urls?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=9A=E6=8E=A5=E5=8F=A3=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/urls.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/config/urls.js diff --git a/src/config/urls.js b/src/config/urls.js new file mode 100644 index 0000000..6244c5f --- /dev/null +++ b/src/config/urls.js @@ -0,0 +1,9 @@ +/** + * 接口地址列表 + */ + +const { APP_DEVELOPMENT_BASE_URL, APP_PRODUCTION_BASE_URL, MODE } = import.meta.env; // 获取环境变量 +export const { [MODE]: BASE_URL = APP_DEVELOPMENT_BASE_URL } = { development: APP_DEVELOPMENT_BASE_URL, production: APP_PRODUCTION_BASE_URL }; // 声明变量 BASE_URL 并赋值 + +// 登录 +export const EXAMPLE_API = `${BASE_URL}xxxxxxxx`;