From 22f86baa3b70ae5663405ff5d3dc93572eb88966 Mon Sep 17 00:00:00 2001 From: daihh Date: Mon, 13 Jun 2022 22:54:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 16 ++++++++++++++-- package.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 package.json diff --git a/config/index.js b/config/index.js index 1c2ee4f..16b021c 100644 --- a/config/index.js +++ b/config/index.js @@ -13,12 +13,24 @@ if(process.env.NODE_ENV === 'development'){ oldApiBaseUrl = '/uboeApi'; fileUrl = 'http://localhost:9090/cdn/upload'; loginPath='/pages/login/login'; -}else{ +}else if(process.env.NODE_ENV === 'preview'){ // 生产环境 apiBaseUrl = '/systemapi'; oldApiBaseUrl = '/uboeApi'; fileUrl = 'https://u-pre.boe.com/file/upload'; - loginPath='https://u-pre.boe.com/m'; + loginPath='https://u-pre.boe.com/m/preview'; +}else if(process.env.NODE_ENV === 'testing'){ + // 生产环境 + apiBaseUrl = '/systemapi'; + oldApiBaseUrl = '/uboeApi'; + fileUrl = 'https://u-pre.boe.com/file/upload'; + loginPath='https://u-pre.boe.com/m/testing'; +}else{ + // 生产环境 + apiBaseUrl = '/systemapi'; + oldApiBaseUrl = '/uboeApi'; + fileUrl = 'https://u.boe.com/file/upload'; + loginPath='https://u.boe.com/m/production'; } export default { diff --git a/package.json b/package.json new file mode 100644 index 0000000..80e4f21 --- /dev/null +++ b/package.json @@ -0,0 +1,42 @@ +{ + "name": "mobile", + "version": "1.0.0", + "description": "移动端代码", + "main": "main.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/mobile.git" + }, + "keywords": [], + "author": "", + "license": "ISC", + "uni-app": { + "scripts": { + "h5:testing": { + "BROWSER": "Chrome", + "title": "build:testing", + "env": { + "UNI_PLATFORM": "h5", + "ENV_TYPE": "testing" + }, + "define": { + + } + }, + "h5:preview": { + "BROWSER": "Chrome", + "title": "build:preview", + "env": { + "UNI_PLATFORM": "h5", + "ENV_TYPE": "preview" + }, + "define": { + + } + } + } + } +}