diff --git a/config/request.js b/config/request.js index 792e4c9..1920aa6 100644 --- a/config/request.js +++ b/config/request.js @@ -5,12 +5,12 @@ import { baseUrl } from "./api.js"; const HOST = location && location.origin export default () => { - + let envRead = process.env // 初始化请求配置 uni.$u.http.setConfig((config) => { - // #ifdef APP-PLUS - config.baseURL = baseUrl; // 测试地址 - // #endif + if(envRead.NODE_ENV == 'product'){ + config.baseURL = baseUrl; // 测试地址 + } return config }); diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html index 7d9ffab..cea245d 100644 --- a/unpackage/dist/build/web/index.html +++ b/unpackage/dist/build/web/index.html @@ -1,2 +1,2 @@