Showing
1 changed file
with
9 additions
and
7 deletions
@@ -9,6 +9,8 @@ | @@ -9,6 +9,8 @@ | ||
9 | const router = require('express').Router(); // eslint-disable-line | 9 | const router = require('express').Router(); // eslint-disable-line |
10 | const cRoot = './controllers'; | 10 | const cRoot = './controllers'; |
11 | 11 | ||
12 | +const auth = require(`${global.middleware}/auth`); | ||
13 | + | ||
12 | const cart = require(`${cRoot}/cart`); | 14 | const cart = require(`${cRoot}/cart`); |
13 | const address = require(`${cRoot}/address`); | 15 | const address = require(`${cRoot}/address`); |
14 | const easypay = require(`${cRoot}/easypay`); | 16 | const easypay = require(`${cRoot}/easypay`); |
@@ -24,14 +26,14 @@ router.post('/address/delete', address.delAddress); // 删除地址 | @@ -24,14 +26,14 @@ router.post('/address/delete', address.delAddress); // 删除地址 | ||
24 | router.post('/address/save', address.saveAddress); // 新增地址/更新地址 | 26 | router.post('/address/save', address.saveAddress); // 新增地址/更新地址 |
25 | router.post('/address/setdefault', address.setDefault); // 设置默认地址 | 27 | router.post('/address/setdefault', address.setDefault); // 设置默认地址 |
26 | 28 | ||
27 | -router.get('/ensure', ensure.index); // 限购商品快捷结算页 | ||
28 | -router.get('/ensure/coupons', ensure.getCoupons); // 限购商品快捷结算页 | ||
29 | -router.post('/ensure/compute', ensure.compute); // 价格重新计算 | ||
30 | -router.post('/ensure/submit', ensure.submit); // 价格重新计算 | 29 | +router.get('/ensure', auth, ensure.index); // 限购商品快捷结算页 |
30 | +router.get('/ensure/coupons', auth, ensure.getCoupons); // 限购商品快捷结算页 | ||
31 | +router.post('/ensure/compute', auth, ensure.compute); // 价格重新计算 | ||
32 | +router.post('/ensure/submit', auth, ensure.submit); // 价格重新计算 | ||
31 | 33 | ||
32 | -router.get('/easypay', easypay.index); // 限购商品快捷结算页 | ||
33 | -router.post('/easypay/compute', easypay.compute); // 价格重新计算 | ||
34 | -router.post('/easypay/submit', easypay.submit); // 限购商品订单提交 | 34 | +router.get('/easypay', auth, easypay.index); // 限购商品快捷结算页 |
35 | +router.post('/easypay/compute', auth, easypay.compute); // 价格重新计算 | ||
36 | +router.post('/easypay/submit', auth, easypay.submit); // 限购商品订单提交 | ||
35 | 37 | ||
36 | router.get('/cart', cart.cart); | 38 | router.get('/cart', cart.cart); |
37 | router.post('/cart/select', cart.selectProduct); | 39 | router.post('/cart/select', cart.selectProduct); |
-
Please register or login to post a comment