Blame view

apps/cart/router.js 945 Bytes
1 2 3 4 5 6 7 8 9 10
/**
 * 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';
陈轩 authored
11 12 13
const authMW = require('../../doraemon/middleware/auth');

const seckill = require(cRoot + '/seckill');
zhangxiaoru authored
14
const countController = require(`${cRoot}/count`);
lijing authored
15
const payController = require(`${cRoot}/pay`);
16 17

// Your controller here
18 19 20 21 22
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);
23
zhangxiaoru authored
24
router.get('/index/count', countController.cartCount);
lijing authored
25
router.get('/paySuccess/payCod', payController.payCod);// 支付成功,货到付款
lijing authored
26
router.get('/shopping/pay/aliwapreturn', payController.payAli);// 支付成功,支付宝付款
zhangxiaoru authored
27
28
module.exports = router;