router.js
1.07 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
/**
* router of sub app common
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2016/10/11
*/
'use strict';
const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';
var multipart = require('connect-multiparty');
var multipartMiddleware = multipart();
const rvCtrl = require(`${cRoot}/recent-view`);
const uploadCtrl = require(`${cRoot}/upload`);
const erp2goods = require(`${cRoot}/erp2goods`);
const getBanner = require(`${cRoot}/getBanner`);
const passport = require(`${cRoot}/passport`);
const suggestFeedBack = require(`${cRoot}/suggestFeedBack`);
const main = require(`${cRoot}/index`);
router.get('/recentReview', rvCtrl.index); // 最近浏览
router.post('/getRecommend', rvCtrl.getRecommend); // 为你优选
router.post('/upload/image', multipartMiddleware, uploadCtrl.uploadImg);
router.get('/erp2goods', erp2goods.find);
router.get('/getbanner', getBanner.index);
router.get('/passport', passport.index);
router.get('/suggestfeedback', suggestFeedBack.getFeedBack);
router.get('/header/nav', main.headerNav);
module.exports = router;