HaniBlindBox/honey_box/common/env.js
zpc e4a1f055c1 fix: 修复微信支付回调无法接收的问题
1. 添加 /api/pay/notify 回调路由(兼容微信配置的回调地址)
2. 修复 attach 值匹配逻辑,支持 order_{type} 和 infinite_{type} 格式
3. 添加钻石订单 (order_product) 的回调处理逻辑
4. 添加 OrderAttachType.OrderProduct 常量
2026-02-09 16:22:56 +08:00

40 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 项目环境配置文件
* 集中管理所有环境相关的配置参数
*
* 更新说明:
* - 2026年迁移至 .NET 10 后端
* - 开发环境http://localhost:5238 http://192.168.195.15:2822
* - 测试环境:
* - 生产环境:
*/
// 测试环境配置 - .NET 10 后端
const testing = {
// baseUrl: 'https://app.zpc-xy.com/honey/api',
baseUrl: 'https://api.hanimanghe.top',
// baseUrl: 'http://192.168.1.24:5238',
// baseUrl: 'http://192.168.195.15:2822',
imageUrl: 'https://youdas-1308826010.cos.ap-shanghai.myqcloud.com',
loginPage: '',
wxAppId: ''
};
// 根据环境变量选择对应配置
let currentEnv = testing; //production;//testing;//production_wz;
// 衍生配置
const config = {
...currentEnv,
// API请求完整路径
apiBaseUrl: currentEnv.baseUrl + '/api/',
// 微信登录重定向URL
wxLoginUrl: `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${currentEnv.wxAppId}&redirect_uri=${escape(currentEnv.loginPage)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`,
// 图片资源路径
imageBaseUrl: currentEnv.imageUrl + '/static/web',
// 图标资源路径
iconBaseUrl: currentEnv.imageUrl + '/static/web/static/'
};
export default config;