@@ -2,6 +2,11 @@
* 应用全局配置
* 环境自动检测(基于微信小程序官方 API)
*/
+// #ifdef H5
+// H5 端:走同域相对路径,由 nginx 将 /api 代理到后端 9083
+let API_BASE_URL = ''
+// #endif
+// #ifndef H5
let API_BASE_URL = 'http://localhost:9083'
try {
@@ -23,6 +28,7 @@ try {
} catch (e) {
// 非小程序环境(H5/dev),使用默认地址
}
export default {
API_BASE_URL,
@@ -1,6 +1,6 @@
module.exports = {
outputDir: 'dist',
- publicPath: '/',
+ publicPath: '/admin/',
devServer: {
port: 8083,
proxy: {