diff --git a/coupon/app.js b/coupon/app.js index 5de010d..5d92087 100644 --- a/coupon/app.js +++ b/coupon/app.js @@ -21,6 +21,7 @@ App({ url: config.baseUrl, domain: config.baseUrl, domaintwo: config.baseUrl, + imageBaseUrl: config.imageBaseUrl, phone: '', uid: '', @@ -106,11 +107,11 @@ App({ }; }, - // 修复图片路径:相对路径补全 baseUrl,绝对 URL 或空值原样返回 + // 修复图片路径:相对路径补全图片基地址,绝对 URL 或空值原样返回 fixImageUrl: function (path) { if (!path) return ''; if (path.indexOf('http') === 0) return path; - return this.globalData.url + path; + return this.globalData.imageBaseUrl + path; }, // 获取订单状态文案 diff --git a/coupon/pages/order/order.js b/coupon/pages/order/order.js index 49cea5b..0864c34 100644 --- a/coupon/pages/order/order.js +++ b/coupon/pages/order/order.js @@ -7,7 +7,7 @@ Page({ nav_type: 1, all: true, height: '', - url: app.globalData.url, + url: app.globalData.imageBaseUrl, statusType: ["全部", "待接单", "已接单", "服务中", "待支付", "已完成","已取消"], status: ["", "0", "1", "2", "3","4","-2"], currentType: 0, diff --git a/coupon/pages/orderdetail/orderdetail.js b/coupon/pages/orderdetail/orderdetail.js index 9c05286..660c004 100644 --- a/coupon/pages/orderdetail/orderdetail.js +++ b/coupon/pages/orderdetail/orderdetail.js @@ -14,7 +14,7 @@ Page({ qrcode: '', id: '', item: {}, - url: app.globalData.url, + url: app.globalData.imageBaseUrl, refund: '', charge_phone: '', refund_box: false, diff --git a/coupon/shopping/pages/goddess/goddess.js b/coupon/shopping/pages/goddess/goddess.js index ec08e42..24ad260 100644 --- a/coupon/shopping/pages/goddess/goddess.js +++ b/coupon/shopping/pages/goddess/goddess.js @@ -5,7 +5,7 @@ Page({ data: { height: '', - url: app.globalData.url, + url: app.globalData.imageBaseUrl, seckill_start: '请输入开始日期', seckill_endx: '请输入结束日期', time: 30 * 60 * 60 * 1000, diff --git a/coupon/utils/config.js b/coupon/utils/config.js index 5ef7a41..cd08655 100644 --- a/coupon/utils/config.js +++ b/coupon/utils/config.js @@ -4,6 +4,8 @@ const config = { // baseUrl: 'http://192.168.1.100:8039', // 生产环境(通过 nginx 代理,HTTPS + 域名) baseUrl: 'https://ruilaizipj.com/prod-api', + // 图片/文件访问基地址(不走 /prod-api 代理,MinIO 直接访问) + imageBaseUrl: 'https://ruilaizipj.com', } module.exports = config