feat: 环境变量方案管理API和H5地址
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Agent
2026-03-29 08:40:09 +00:00
parent 58fc2a9d90
commit 750875be74
7 changed files with 45 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
// API基础配置
const BASE_URL = 'https://sales.violin-work.online/api/v1'
const BASE_URL = import.meta.env.VITE_API_BASE_URL || 'https://sales.violin-work.online/api/v1'
// 请求拦截器
const request = (url, method, query = {}, data = {}) => {

View File

@@ -217,7 +217,7 @@ export default {
},
shareOrder() {
// 构建分享链接包含订单号和客户ID
const h5BaseUrl = 'https://sales.violin-work.online/h5'
const h5BaseUrl = import.meta.env.VITE_H5_BASE_URL
const customerId = this.order.customerId || ''
const shareUrl = `${h5BaseUrl}/#/pages/share/order?orderNo=${this.order.orderNo}&customerId=${customerId}`