Add utility functions for handling public URLs and update API base URL logic
- Implement getProductionApiBaseUrl and normalizePublicUrl functions to manage API URLs based on the browser's origin. - Update API base URL in request configuration to use getProductionApiBaseUrl. - Enhance QR code handling in ParticipatingCompaniesTab and OutdoorFairList components to normalize URLs. - Create a deployment script for frontend builds and server uploads. - Add tests for the new URL utility functions.
This commit is contained in:
@@ -17,8 +17,7 @@ export default {
|
||||
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
|
||||
'/api/': {
|
||||
// 要代理的地址
|
||||
target: localBackendUrl,
|
||||
// target: 'http://39.98.44.136:6024/api/shihezi/', // 线上环境
|
||||
target: 'http://39.98.44.136:6024/api/shihezi/', // 线上环境
|
||||
// target: 'http://wykj.cdwsx.com/api',// 后端
|
||||
// target: 'http://ks.zhaopinzao8dian.com/api/ks',
|
||||
// 配置了这个可以从 http 代理到 https
|
||||
|
||||
Reference in New Issue
Block a user