Authored by 陈峰

Merge branch 'feature/cart' into 'release/5.4.1'

支付相关配置添加



See merge request !219
@@ -9,14 +9,7 @@ @@ -9,14 +9,7 @@
9 const isProduction = process.env.NODE_ENV === 'production'; 9 const isProduction = process.env.NODE_ENV === 'production';
10 const isTest = process.env.NODE_ENV === 'test'; 10 const isTest = process.env.NODE_ENV === 'test';
11 11
12 -module.exports = {  
13 - app: 'h5',  
14 - appVersion: '5.4', // 调用api的版本  
15 - port: 6001,  
16 - siteUrl: '//m.yohobuy.com',  
17 - assetUrl: '//127.0.0.1:5001',  
18 - testCode: 'yoho4946abcdef#$%&!@',  
19 - domains: { 12 +const domains = {
20 api: 'http://api-test3.yohops.com:9999/', 13 api: 'http://api-test3.yohops.com:9999/',
21 service: 'http://service-test3.yohops.com:9999/', 14 service: 'http://service-test3.yohops.com:9999/',
22 liveApi: 'http://testapi.live.yohops.com:9999/', 15 liveApi: 'http://testapi.live.yohops.com:9999/',
@@ -30,7 +23,16 @@ module.exports = { @@ -30,7 +23,16 @@ module.exports = {
30 imSocket: 'wss://imsocket.yohobuy.com:443', 23 imSocket: 'wss://imsocket.yohobuy.com:443',
31 imCs: 'https://imhttp.yohobuy.com/api', 24 imCs: 'https://imhttp.yohobuy.com/api',
32 imServer: 'https://imhttp.yohobuy.com/server' 25 imServer: 'https://imhttp.yohobuy.com/server'
33 - }, 26 +};
  27 +
  28 +module.exports = {
  29 + app: 'h5',
  30 + appVersion: '5.4', // 调用api的版本
  31 + port: 6001,
  32 + siteUrl: '//m.yohobuy.com',
  33 + assetUrl: '//127.0.0.1:5001',
  34 + testCode: 'yoho4946abcdef#$%&!@',
  35 + domains: domains,
34 subDomains: { 36 subDomains: {
35 host: '.m.yohobuy.com', 37 host: '.m.yohobuy.com',
36 default: '//m.yohobuy.com', 38 default: '//m.yohobuy.com',
@@ -91,20 +93,20 @@ module.exports = { @@ -91,20 +93,20 @@ module.exports = {
91 service: 'alipay.wap.create.direct.pay.by.user', 93 service: 'alipay.wap.create.direct.pay.by.user',
92 partner: '2088701661478015', 94 partner: '2088701661478015',
93 inputCharset: 'utf-8', 95 inputCharset: 'utf-8',
94 - notifyUrl: 'payment/alipay_notify', 96 + notifyUrl: domains.service + 'payment/alipay_notify',
95 returnUrl: '/shopping/pay/aliwapreturn', 97 returnUrl: '/shopping/pay/aliwapreturn',
96 signType: 'MD5', 98 signType: 'MD5',
97 paymentType: '1', 99 paymentType: '1',
98 alipayKey: 'kcxawi9bb07mzh0aq2wcirsf9znusobw', 100 alipayKey: 'kcxawi9bb07mzh0aq2wcirsf9znusobw',
99 sellerMail: 'zfb@yoho.cn', 101 sellerMail: 'zfb@yoho.cn',
100 - merchantUrl: 'http://m.yohobuy.com/home/orders/detail?order_code=' 102 + merchantUrl: 'http://m.yohobuy.com/home/orderDetail?order_code='
101 }, 103 },
102 WxPayConfig: { 104 WxPayConfig: {
103 appId: 'wx75e5a7c0c88e45c2', 105 appId: 'wx75e5a7c0c88e45c2',
104 mchId: '1227694201', 106 mchId: '1227694201',
105 key: '7e6f3307b64cc87c79c472814b88f7fb', 107 key: '7e6f3307b64cc87c79c472814b88f7fb',
106 appSecret: 'ce21ae4a3f93852279175a167e54509b', 108 appSecret: 'ce21ae4a3f93852279175a167e54509b',
107 - notifyUrl: 'payment/alipay_notify', 109 + notifyUrl: domains.service + 'payment/weixin_notify',
108 } 110 }
109 }; 111 };
110 112
@@ -135,7 +137,27 @@ if (isProduction) { @@ -135,7 +137,27 @@ if (isProduction) {
135 open: false, 137 open: false,
136 url: 'http://123.206.2.55/strategy' 138 url: 'http://123.206.2.55/strategy'
137 }, 139 },
138 - zookeeperServer: 'web.zookeeper.yohoops.org:2181' 140 + zookeeperServer: 'web.zookeeper.yohoops.org:2181',
  141 + alipayConfig: {
  142 + payUrl: 'https://mapi.alipay.com/gateway.do',
  143 + service: 'alipay.wap.create.direct.pay.by.user',
  144 + partner: '2088701661478015',
  145 + inputCharset: 'utf-8',
  146 + notifyUrl: 'http://service.yoho.yohoops.org/payment/alipay_notify',
  147 + returnUrl: '/shopping/pay/aliwapreturn',
  148 + signType: 'MD5',
  149 + paymentType: '1',
  150 + alipayKey: 'kcxawi9bb07mzh0aq2wcirsf9znusobw',
  151 + sellerMail: 'zfb@yoho.cn',
  152 + merchantUrl: 'http://m.yohobuy.com/home/orderDetail?order_code='
  153 + },
  154 + WxPayConfig: {
  155 + appId: 'wx75e5a7c0c88e45c2',
  156 + mchId: '1227694201',
  157 + key: '7e6f3307b64cc87c79c472814b88f7fb',
  158 + appSecret: 'ce21ae4a3f93852279175a167e54509b',
  159 + notifyUrl: 'http://service.yoho.yohoops.org/payment/weixin_notify',
  160 + }
139 }); 161 });
140 } else if (isTest) { 162 } else if (isTest) {
141 Object.assign(module.exports, { 163 Object.assign(module.exports, {
@@ -158,6 +180,26 @@ if (isProduction) { @@ -158,6 +180,26 @@ if (isProduction) {
158 reconnect: 5000, 180 reconnect: 5000,
159 retries: 0 181 retries: 0
160 }, 182 },
161 - useCache: true 183 + useCache: true,
  184 + alipayConfig: {
  185 + payUrl: 'https://mapi.alipay.com/gateway.do',
  186 + service: 'alipay.wap.create.direct.pay.by.user',
  187 + partner: '2088701661478015',
  188 + inputCharset: 'utf-8',
  189 + notifyUrl: (process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/') + 'payment/alipay_notify',
  190 + returnUrl: '/shopping/pay/aliwapreturn',
  191 + signType: 'MD5',
  192 + paymentType: '1',
  193 + alipayKey: 'kcxawi9bb07mzh0aq2wcirsf9znusobw',
  194 + sellerMail: 'zfb@yoho.cn',
  195 + merchantUrl: 'http://m.yohobuy.com/home/orderDetail?order_code='
  196 + },
  197 + WxPayConfig: {
  198 + appId: 'wx75e5a7c0c88e45c2',
  199 + mchId: '1227694201',
  200 + key: '7e6f3307b64cc87c79c472814b88f7fb',
  201 + appSecret: 'ce21ae4a3f93852279175a167e54509b',
  202 + notifyUrl: (process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/') + 'payment/weixin_notify',
  203 + }
162 }); 204 });
163 } 205 }
@@ -81,7 +81,7 @@ $addressForm.on('submit', function() { @@ -81,7 +81,7 @@ $addressForm.on('submit', function() {
81 isSubmiting = true; 81 isSubmiting = true;
82 loading.showLoadingMask(); 82 loading.showLoadingMask();
83 $submit.css('background', '#777'); 83 $submit.css('background', '#777');
84 - console.log(window.queryString.refer); 84 +
85 $.ajax({ 85 $.ajax({
86 method: 'POST', 86 method: 'POST',
87 url: '/home/saveAddress', 87 url: '/home/saveAddress',