router.js
945 Bytes
/**
* router of sub app cart
* @author: xuan.chen@yoho.cn<xuan.chen@yoho.cn>
* @date: 2016/09/26
*/
'use strict';
const router = require('express').Router(); //eslint-disable-line
const cRoot = './controllers';
const authMW = require('../../doraemon/middleware/auth');
const seckill = require(cRoot + '/seckill');
const countController = require(`${cRoot}/count`);
const payController = require(`${cRoot}/pay`);
// Your controller here
router.all('/index/seckill/', authMW);
router.all('/index/seckill/*', authMW);
router.get('/index/seckill/', seckill.ensure);
router.post('/index/seckill/compute', seckill.compute);
router.post('/index/seckill/submit', seckill.submit);
router.get('/index/count', countController.cartCount);
router.get('/paySuccess/payCod', payController.payCod);// 支付成功,货到付款
router.get('/shopping/pay/aliwapreturn', payController.payAli);// 支付成功,支付宝付款
module.exports = router;