diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..2ca3b6c --- /dev/null +++ b/.env.development @@ -0,0 +1,7 @@ +# 开发环境配置 +ENV = 'development' + +# 若依管理系统/开发环境 +VUE_APP_BASE_API = '/dev-api' + + diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..5cc1499 --- /dev/null +++ b/.env.production @@ -0,0 +1,5 @@ +# 生产环境配置 +ENV = 'production' + +# 若依管理系统/生产环境 +VUE_APP_BASE_API = '/dev-api' diff --git a/App.vue b/App.vue index e6f4f3b..5a12d45 100644 --- a/App.vue +++ b/App.vue @@ -4,6 +4,8 @@ // app内禁止横屏 plus.screen.lockOrientation('portrait-primary') console.log('App Launch') + + console.log(process.env.NODE_ENV,'当前运行环境····') }, onShow: function() { console.log('App Show') diff --git a/apis/http.js b/apis/http.js index f2441fb..b535f40 100644 --- a/apis/http.js +++ b/apis/http.js @@ -1,6 +1,8 @@ + +const ENV = process.env.NODE_ENV class HttpConfig { // #ifdef H5 - baseUrl = "/api" + // baseUrl = "/api" // #endif // #ifdef APP-PLUS // baseUrl = "http://112.29.103.165:21624" @@ -15,17 +17,20 @@ class HttpConfig { // baseUrl = "http://10.40.92.52:28080" // baseUrl = "http://10.40.92.140:28080" // baseUrl = "https://z.csgmall.com.cn/gl" - baseUrl = "http://192.168.2.160:39080" // 梁超 + // baseUrl = "http://192.168.2.160:39080" // 梁超 + // baseUrl = "http://192.168.2.218:39080" // 福 + target = "http://192.168.2.218:39080" // 开发阶段后台ip // #endif // 基地址 (部署时使用 需要加 dev-api) // authPath = `${this.baseUrl}/dev-api/auth` // systemPath = `${this.baseUrl}/dev-api/system` // basePath = `${this.baseUrl}/dev-api/base` // materialPath = `${this.baseUrl}/dev-api/material` - authPath = `${this.baseUrl}/auth` - systemPath = `${this.baseUrl}/system` - basePath = `${this.baseUrl}/material/base` - materialPath = `${this.baseUrl}/material` + baseUrl = ENV === 'production' ? '/api' : target + authPath = ENV === 'production' ? `${this.baseUrl}/dev-api/auth` : `${this.baseUrl}/auth` + systemPath = ENV === 'production' ? `${this.baseUrl}/dev-api/system` : `${this.baseUrl}/system` + basePath = ENV === 'production' ? `${this.baseUrl}/dev-api/material/base` : `${this.baseUrl}/material/base` + materialPath = ENV === 'production' ? `${this.baseUrl}/dev-api/material` : `${this.baseUrl}/material` // 短链 serviceUrl = { login: { @@ -115,10 +120,10 @@ class HttpConfig { backMaterialReceiveList: '/backReceive/getbackReceiveList', // 获取退料接收列表 backMaterialReceiveDetail: '/backReceive/receiveView', backMaterialSetNumBack: '/backReceive/setNumBack', - backMaterialQrcodeQuery:'/backReceive/qrcodeQuery', - backMaterialSetCodeBack:'/backReceive/setCodeBack', - backReceiveCodeQuery:"/backReceive/codeQuery", - backReceiveEndBack:"/backReceive/endBack", + backMaterialQrcodeQuery: '/backReceive/qrcodeQuery', + backMaterialSetCodeBack: '/backReceive/setCodeBack', + backReceiveCodeQuery: "/backReceive/codeQuery", + backReceiveEndBack: "/backReceive/endBack", seeBackMaterialDetail: '/backReceive/backReceiveRecord', // 查看退料明细 searchRfid: '/backReceive/rfidCodeQuery', // 查询rfid subRfid: '/backReceive/setRfidCodeBack', // rfid接收 diff --git a/pages/newBuyDetail/newBuyDetail.vue b/pages/newBuyDetail/newBuyDetail.vue index 7ea669d..6d12485 100644 --- a/pages/newBuyDetail/newBuyDetail.vue +++ b/pages/newBuyDetail/newBuyDetail.vue @@ -3,12 +3,12 @@ - - + --> 规格型号{{ item.specificationType }} - 待入库数量 - + + + - - - 审核 - + + + + + 审核 @@ -101,10 +102,10 @@ font-weight: normal; text-align: center; "> - 是否通过审批? + 是否确认入库? - 通过 + 确认 驳回