Merge branch 'fix/0523-ch' into msb_test

feature/md-0530-ch
ch 2 years ago
commit d586378092

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-05 14:40:00 * @Date: 2022-05-05 14:40:00
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-23 21:15:35 * @LastEditTime: 2022-05-26 19:04:26
* @Description: 根据git分支生成对应环境的环境变量 * @Description: 根据git分支生成对应环境的环境变量
* 开发时如果环境变量换了可以不用重启服务直接运行node env.config.js即可 * 开发时如果环境变量换了可以不用重启服务直接运行node env.config.js即可
*/ */
@ -12,18 +12,22 @@ const path = require('path');
const envConfig = { const envConfig = {
dev : { dev : {
baseUrl: 'https://k8s-horse-gateway.mashibing.cn', baseUrl: 'https://k8s-horse-gateway.mashibing.cn',
staticUrl : 'https://k8s-shop-app.mashibing.cn',
imUrl : 'wss://k8s-horse-gateway.mashibing.cn' imUrl : 'wss://k8s-horse-gateway.mashibing.cn'
}, },
test : { test : {
baseUrl: 'https://k8s-horse-gateway.mashibing.cn', baseUrl: 'https://k8s-horse-gateway.mashibing.cn',
staticUrl : 'https://k8s-shop-app.mashibing.cn',
imUrl : 'wss://k8s-horse-gateway.mashibing.cn' imUrl : 'wss://k8s-horse-gateway.mashibing.cn'
}, },
beta : { beta : {
baseUrl: 'https://you-gateway.mashibing.com', baseUrl: 'https://you-gateway.mashibing.com',
staticUrl : 'https://you-app.mashibing.com',
imUrl : 'wss://you-gateway.mashibing.com' imUrl : 'wss://you-gateway.mashibing.com'
}, },
prod : { prod : {
baseUrl: 'https://you-gateway.mashibing.com', baseUrl: 'https://you-gateway.mashibing.com',
staticUrl : 'https://you-app.mashibing.com',
imUrl : 'wss://you-gateway.mashibing.com' imUrl : 'wss://you-gateway.mashibing.com'
} }
} }

@ -2,10 +2,11 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-06 15:33:55 * @Date: 2022-05-06 15:33:55
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-06 21:02:39 * @LastEditTime: 2022-05-26 19:04:50
* @Description: file content * @Description: file content
*/ */
import { ApiPostWxH5Pay, ApiPostWxJsApiPay } from '@/common/api/wx'; import { ApiPostWxH5Pay, ApiPostWxJsApiPay } from '@/common/api/wx';
import ENV from '@/common/config/env';
import { Wxpay } from './wxpay'; import { Wxpay } from './wxpay';
export const pay = ({orderId, openId, payType})=>{ export const pay = ({orderId, openId, payType})=>{
if(payType === 'wxpay'){ if(payType === 'wxpay'){
@ -49,7 +50,7 @@ export const pay = ({orderId, openId, payType})=>{
uni.$u.toast(error.message); uni.$u.toast(error.message);
return false; return false;
} }
const redirect_url = decodeURIComponent(`https://you-app.mashibing.com/payResult?orderId=${orderId}&payType=wxh5`); const redirect_url = decodeURIComponent(`${ENV.staticUrl}/payResult?orderId=${orderId}&payType=wxh5`);
window.location.href = `${result.dataInfo.payUrl}&redirect_url=${redirect_url}`; window.location.href = `${result.dataInfo.payUrl}&redirect_url=${redirect_url}`;
} }
// #ednif // #ednif

Loading…
Cancel
Save