diff --git a/.env.development b/.env.development index 344e5378..a95d140d 100644 --- a/.env.development +++ b/.env.development @@ -13,5 +13,9 @@ VUE_APP_BASE_API = 'http://47.102.220.189:58089/api/bizsvr' # VUE_APP_BASE_API = 'http://47.96.189.20:58089/api/bizsvr' +VUE_APP_PRINTER_HOST = '192.168.88.100:17080' + + + # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/.env.production b/.env.production index 88459410..0e7620a5 100644 --- a/.env.production +++ b/.env.production @@ -4,8 +4,10 @@ VUE_APP_TITLE = 管理系统 # 生产环境配置 ENV = 'production' -VUE_APP_VERSION = '20240516' +VUE_APP_VERSION = '20240520' # 管理系统/生产环境 VUE_APP_PDOMAIN = 'tanex56' VUE_APP_BASE_API = 'https://api.emis.tanex56.com/api/bizsvr' + +VUE_APP_PRINTER_HOST = '127.0.0.1:17080' diff --git a/.env.staging b/.env.staging index 2a9b0d09..a1fb67c7 100644 --- a/.env.staging +++ b/.env.staging @@ -12,3 +12,5 @@ VUE_APP_VERSION = '20240516' VUE_APP_BASE_API = '/stage-api' VUE_APP_PDOMAIN = 'tanex56' VUE_APP_BASE_API = 'http://api.emis.tanex56.com/api/bizsvr' + +VUE_APP_PRINTER_HOST = '127.0.0.1:17080' diff --git a/src/utils/TanexPrinterSdk.js b/src/utils/TanexPrinterSdk.js index fbb5b24f..fe19e930 100644 --- a/src/utils/TanexPrinterSdk.js +++ b/src/utils/TanexPrinterSdk.js @@ -20,8 +20,8 @@ class TanexPrinterSdk { VERSION="1.0.0" MAX_SENT_RETRY_COUNT = 9; - WS_URL = "ws://127.0.0.1:17080/ws"; - HTTP_GET_PDF = "http://127.0.0.1:17080/api/downPdfFile"; + WS_URL = 'ws://'+process.env.VUE_APP_PRINTER_HOST+'/ws'; + HTTP_GET_PDF = 'http://'+process.env.VUE_APP_PRINTER_HOST+'/api/downPdfFile'; // WS_URL = "ws://192.168.88.100:17080/ws"; // HTTP_GET_PDF = "http://192.168.88.100:17080/api/downPdfFile";