router.js
1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* 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`);
const ensure = require(`${cRoot}/order-ensure`);
router.get('/index/getProductInfo', cart.getProductInfo);
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('/ensure', ensure.index); // 限购商品快捷结算页
router.get('/ensure/coupons', ensure.getCoupons); // 限购商品快捷结算页
router.post('/ensure/compute', ensure.compute); // 价格重新计算
router.post('/ensure/submit', ensure.submit); // 价格重新计算
router.get('/easypay', easypay.index); // 限购商品快捷结算页
router.post('/easypay/compute', easypay.compute); // 价格重新计算
router.post('/easypay/submit', easypay.submit); // 限购商品订单提交
router.get('/cart', cart.cart);
router.post('/index/select', cart.selectProduct);
router.post('/index/modifyNum', cart.modifyProductNum);
router.post('/index/add', cart.cartAdd);
router.post('/index/updateProduct', cart.modifyProduct);
router.post('/index/remove', cart.removeProduct);
router.post('/index/fav', cart.moveToFav);
router.post('/index/checkFav', cart.checkFav);
router.get('/index/getProductData', cart.getProductData);
router.post('/index/swapGift', cart.swapGift);
router.get('/index/queryPromotionGift', cart.queryPromotionGift);
module.exports = router;