{ "name" : "实验室小程序", "appid" : "__UNI__20A0072", "description" : "", "versionName" : "1.0.0", "versionCode" : "100", "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { "usingComponents" : true, "nvueStyleCompiler" : "uni-app", "compilerVersion" : 3, "splashscreen" : { "alwaysShowBeforeRender" : true, "waiting" : true, "autoclose" : true, "delay" : 0 }, "uniCloud" : { "service" : "v3-lab-xcx", "version" : "1.0.0" }, /* 模块配置 */ "modules" : {}, /* 应用发布信息 */ "distribute" : { /* android打包配置 */ "android" : { "permissions" : [ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ] }, /* ios打包配置 */ "ios" : {}, /* SDK配置 */ "sdkConfigs" : {} } }, /* 快应用特有相关 */ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { "appid" : "wxc9180acf05b65dee", "setting" : { "urlCheck" : false, "minified" : true }, "usingComponents" : true, "permission" : {}, "optimization" : { "subPackages" : true } }, "mp-alipay" : { "usingComponents" : true }, "mp-baidu" : { "usingComponents" : true }, "mp-toutiao" : { "usingComponents" : true }, "uniStatistics" : { "enable" : false }, "h5" : { "router" : { "mode" : "hash" // 路由模式 }, "devServer" : { "https" : false, // 是否启用 https 协议,默认false "port" : 8080, // 端口号 "disableHostCheck" : true, // 禁用 Host 检查,默认false "proxy" : { // 与vue中的proxyTable配置大致上一致,此处我同时代理了两个 "/dev" : { // 测试 "target" : "http://xxx.xxx.x.xxx:xxxx", // 目标接口域名 "changeOrigin" : true, // 是否跨域 "secure" : false, // 设置支持https协议的代理 "pathRewrite" : { "^/dev" : "" } // 这个一定要加,意思就是把你项目中一dev开头的接口自动替换为 target + pathRewrite第二个参数来进行数据的请求(pathRewrite没有第二个参数的话直接为target) }, "/pre" : { // 预发布 "target" : "http://xxx.xxx.x.xxx", // 目标接口域名 "changeOrigin" : true, // 是否跨域 "secure" : false, // 设置支持https协议的代理 "pathRewrite" : { "^/pre" : "/api" } // 此处pathRewrite加第二个参数是因为我的接口最后都有一个/api,在这个地方加/api等价于直接在target后加/api } } } } }