router.js
1.05 KB
/**
* router of sub app cart
* @author: htoooth<ht.anglenx@gmail.com>
* @date: 2016/10/19
*/
'use strict';
const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';
const cart = require(`${cRoot}/cart`);
const address = require(`${cRoot}/address`);
const easypay = require(`${cRoot}/easypay`);
router.get('/index/getProductInfo', cart.getProductInfo);
router.get('/coupon/list', cart.getCoupons); // 优惠券列表
router.get('/address/list', address.getList); // 省市区列表信息
router.get('/address/area', address.getArea); // 省市区列表信息
router.post('/address/delete', address.delAddress); // 删除地址
router.post('/address/save', address.saveAddress); // 新增地址/更新地址
router.post('/address/setdefault', address.setDefault); // 设置默认地址
router.get('/easypay', easypay.index); // 限购商品快捷结算页
router.post('/easypay/compute', easypay.compute); // 价格重新计算
router.post('/easypay/submit', easypay.submit); // 限购商品订单提交
module.exports = router;