router.js
2.28 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
47
48
49
50
51
52
53
54
55
56
/**
* api router
* @author: chenfeng <feng.chen@yoho.cn>
* @date: 29/06/2017
*/
const express = require('express');
const router = express.Router(); // eslint-disable-line
const qiniu = require('./controllers/qiniu');
const wechat = require('./controllers/wechat');
const prize = require('./controllers/prize');
const shoes = require('./controllers/shoes');
const yohood = require('./controllers/yohood');
const coupon = require('./controllers/coupon');
const excel = require('./controllers/excel');
const multipart = require('connect-multiparty');
const mutilpartMiddleware = multipart();
router.get('/gettoken', qiniu.getToken);
router.get('/share/getSignPackage', wechat.getSignPackage);
router.get('/prize/checkPrize', prize.checkPrize);
router.post('/prize/getPrize', prize.getPrize);
router.post('/prize/getNewPrize', prize.getNewPrize);
router.post('/prize/updatePrize', prize.updatePrize);
router.post('/info/saveUserInfo', prize.saveUserInfo);
// router.get('/excel/xml', excel.excelToXml);
// router.get('/excel/sendMail', excel.sendMail);
router.get('/excel/load', excel.getExcelData);
router.get('/excel/loady100', excel.getY100Data);
router.get('/excel/deletey100', excel.deleteY100Data);
router.post('/excel/loady100file', mutilpartMiddleware, excel.getY100ExcelFile);
router.get('/shoes/checkFriend', shoes.checkAddFriends);
router.get('/shoes/checkPlayed', shoes.checkUserPlayed);
router.post('/shoes/saveResult', shoes.saveUserResult);
router.get('/shoes/getUserShareInfo', shoes.getUserShareInfo);
router.get('/shoes/getUserPlayInfo', shoes.getUserPlayInfo);
// yohood
router.get('/yohood/getBrandList', yohood.getBrandList);
router.get('/yohood/getBrandById', yohood.getBrandById);
router.get('/yohood/getNewsList', yohood.getNewsList);
router.get('/yohood/getNewsDetail', yohood.getNewsDetail);
router.get('/yohood/getRecommend', yohood.getRecommend);
router.get('/yohood/getResource', yohood.getYohoBuyResource);
router.get('/yohood/getShopProduct', yohood.getYohoBuyShopProduct);
router.get('/yohood/getCoupon', yohood.getCoupon);
// coupon
router.get('/coupon/getCouponList', coupon.couponList);
router.get('/coupon/getCouponSendFlags', coupon.couponSendFlag);
router.post('/coupon/couponGet', coupon.couponGet);
router.get('/coupon/couponUserOwner', coupon.couponUserOwner);
module.exports = router;