Authored by 郭成尧

paycenter-router-redirect

... ... @@ -55,4 +55,7 @@ router.get('/index/new/advanceBuy', indexController.advanceBuy); // 获取购物
router.post('/index/new/giftinfo', indexController.giftinfo); // 获取购物车加价购商品数据,chosepanel
// 支付中心 URL,由于微信安全限制,在现有 URL 后追加 new ,通过 subDomain 中间件转发到此
router.get('/home/orders/paynew', authMW, payController.payCenter);
module.exports = router;
... ...
... ... @@ -29,8 +29,6 @@ const suggest = require(`${cRoot}/suggest`);
const message = require(`${cRoot}/message`);
const onlineService = require(`${cRoot}/onlineService`);
const payController = require('../cart/controllers/pay');
// const myDetail = require(`${cRoot}/myDetail);
... ... @@ -134,7 +132,4 @@ router.get('/installment/card-detail', installment.cardDetail); // 银行å¡è¯¦æ
router.get('/installment/delBankCard', installment.delBankCard); // 删除绑定
router.get('/installment/setMasterCard', installment.setMasterCard); // 切换主卡
// 支付中心 URL,由于微信安全限制,在现有 URL 后追加 new
router.get('/orders/paynew', auth, payController.payCenter);
module.exports = router;
... ...
... ... @@ -11,6 +11,11 @@ const helpers = global.yoho.helpers;
module.exports = () => {
return (req, res, next) => {
if (/^\/home\/orders\/paynew/.test(req.url)) {
// 支付中心,由于微信安全配置限制在 home/orders 路径下,需要转发,误删!!!
req.url = `/cart${req.url}`;
}
if (/^\/coupon\/floor/.test(req.url)) {
// 领券中心 兼容php的url
req.url = `/activity${req.url}`;
... ...