Showing
13 changed files
with
14 additions
and
17 deletions
@@ -20,7 +20,6 @@ const path = require('path'); | @@ -20,7 +20,6 @@ const path = require('path'); | ||
20 | const compression = require('compression'); | 20 | const compression = require('compression'); |
21 | const bodyParser = require('body-parser'); | 21 | const bodyParser = require('body-parser'); |
22 | const cookieParser = require('cookie-parser'); | 22 | const cookieParser = require('cookie-parser'); |
23 | -const favicon = require('serve-favicon'); | ||
24 | const uuid = require('uuid'); | 23 | const uuid = require('uuid'); |
25 | 24 | ||
26 | const pkg = require('./package.json'); | 25 | const pkg = require('./package.json'); |
@@ -74,7 +73,6 @@ app.use(global.yoho.hbs({ | @@ -74,7 +73,6 @@ app.use(global.yoho.hbs({ | ||
74 | 73 | ||
75 | app.use(global.yoho.middleware()); | 74 | app.use(global.yoho.middleware()); |
76 | 75 | ||
77 | -app.use(favicon(path.join(__dirname, '/favicon.ico'))); | ||
78 | app.use(bodyParser.json()); | 76 | app.use(bodyParser.json()); |
79 | app.use(bodyParser.urlencoded({ | 77 | app.use(bodyParser.urlencoded({ |
80 | extended: false | 78 | extended: false |
@@ -10,7 +10,7 @@ const inviteTitle = { | @@ -10,7 +10,7 @@ const inviteTitle = { | ||
10 | normal: '有货 邀请好友赢福利' | 10 | normal: '有货 邀请好友赢福利' |
11 | }; | 11 | }; |
12 | const _ = require('lodash'); | 12 | const _ = require('lodash'); |
13 | -const md5 = require('md5'); | 13 | +const md5 = require('yoho-md5'); |
14 | const secretKey = '5466ee572bcbc75830d044e66ab429bc';// 秘钥 | 14 | const secretKey = '5466ee572bcbc75830d044e66ab429bc';// 秘钥 |
15 | 15 | ||
16 | 16 |
@@ -188,7 +188,7 @@ const payCod = (req, res, next) => { | @@ -188,7 +188,7 @@ const payCod = (req, res, next) => { | ||
188 | 188 | ||
189 | let param = { | 189 | let param = { |
190 | uid: req.user.uid, | 190 | uid: req.user.uid, |
191 | - udid: req.sessionID || require('md5')(req.ip) || 'yoho', | 191 | + udid: req.sessionID || require('yoho-md5')(req.ip) || 'yoho', |
192 | orderCode: req.query.order_code, | 192 | orderCode: req.query.order_code, |
193 | contentCode: '78d0fb6c97d691863286edcb4d8abfa9', | 193 | contentCode: '78d0fb6c97d691863286edcb4d8abfa9', |
194 | client_id: req.cookies._yasvd || '', | 194 | client_id: req.cookies._yasvd || '', |
@@ -234,7 +234,7 @@ const payAli = (req, res, next) => { | @@ -234,7 +234,7 @@ const payAli = (req, res, next) => { | ||
234 | 234 | ||
235 | let param = { | 235 | let param = { |
236 | uid: req.user.uid, | 236 | uid: req.user.uid, |
237 | - udid: req.sessionID || require('md5')(req.ip) || 'yoho', | 237 | + udid: req.sessionID || require('yoho-md5')(req.ip) || 'yoho', |
238 | orderCode: req.query.out_trade_no, | 238 | orderCode: req.query.out_trade_no, |
239 | contentCode: '78d0fb6c97d691863286edcb4d8abfa9' | 239 | contentCode: '78d0fb6c97d691863286edcb4d8abfa9' |
240 | }; | 240 | }; |
@@ -285,7 +285,7 @@ const payZero = (req, res, next) => { | @@ -285,7 +285,7 @@ const payZero = (req, res, next) => { | ||
285 | 285 | ||
286 | let param = { | 286 | let param = { |
287 | uid: req.user.uid, | 287 | uid: req.user.uid, |
288 | - udid: req.sessionID || require('md5')(req.ip) || 'yoho', | 288 | + udid: req.sessionID || require('yoho-md5')(req.ip) || 'yoho', |
289 | orderCode: req.query.order_code, | 289 | orderCode: req.query.order_code, |
290 | contentCode: '78d0fb6c97d691863286edcb4d8abfa9', | 290 | contentCode: '78d0fb6c97d691863286edcb4d8abfa9', |
291 | isPay: true | 291 | isPay: true |
@@ -11,7 +11,7 @@ const helpers = global.yoho.helpers; | @@ -11,7 +11,7 @@ const helpers = global.yoho.helpers; | ||
11 | const common = require('./common'); | 11 | const common = require('./common'); |
12 | const sign = require('./sign'); | 12 | const sign = require('./sign'); |
13 | const payHelpersBank = require('./bank'); | 13 | const payHelpersBank = require('./bank'); |
14 | -const md5 = require('md5'); | 14 | +const md5 = require('yoho-md5'); |
15 | const logger = global.yoho.logger; | 15 | const logger = global.yoho.logger; |
16 | 16 | ||
17 | const ALIPAY_URL = 'https://mapi.alipay.com/gateway.do'; | 17 | const ALIPAY_URL = 'https://mapi.alipay.com/gateway.do'; |
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | const config = global.yoho.config; | 9 | const config = global.yoho.config; |
10 | const helpers = global.yoho.helpers; | 10 | const helpers = global.yoho.helpers; |
11 | const sign = require('./sign'); | 11 | const sign = require('./sign'); |
12 | -const md5 = require('md5'); | 12 | +const md5 = require('yoho-md5'); |
13 | const moment = require('moment'); | 13 | const moment = require('moment'); |
14 | const logger = global.yoho.logger; | 14 | const logger = global.yoho.logger; |
15 | const AlipayConfig = config.alipayConfig; | 15 | const AlipayConfig = config.alipayConfig; |
@@ -14,7 +14,7 @@ const rp = require('request-promise'); | @@ -14,7 +14,7 @@ const rp = require('request-promise'); | ||
14 | const Promise = require('bluebird'); | 14 | const Promise = require('bluebird'); |
15 | const co = Promise.coroutine; | 15 | const co = Promise.coroutine; |
16 | const sign = require('./sign'); | 16 | const sign = require('./sign'); |
17 | -const md5 = require('md5'); | 17 | +const md5 = require('yoho-md5'); |
18 | const moment = require('moment'); | 18 | const moment = require('moment'); |
19 | const common = require('./common'); | 19 | const common = require('./common'); |
20 | 20 |
@@ -11,7 +11,7 @@ const serviceAPI = global.yoho.ServiceAPI; | @@ -11,7 +11,7 @@ const serviceAPI = global.yoho.ServiceAPI; | ||
11 | const utils = '../../../utils'; | 11 | const utils = '../../../utils'; |
12 | const productProcess = require(`${utils}/product-process`); | 12 | const productProcess = require(`${utils}/product-process`); |
13 | const ApipayConfig = global.yoho.config.alipayConfig; | 13 | const ApipayConfig = global.yoho.config.alipayConfig; |
14 | -const md5 = require('md5'); | 14 | +const md5 = require('yoho-md5'); |
15 | const payApi = require('./pay-api'); | 15 | const payApi = require('./pay-api'); |
16 | const helpers = global.yoho.helpers; | 16 | const helpers = global.yoho.helpers; |
17 | const _ = require('lodash'); | 17 | const _ = require('lodash'); |
@@ -25,7 +25,7 @@ const praiseArticle = (req, res, next) => { | @@ -25,7 +25,7 @@ const praiseArticle = (req, res, next) => { | ||
25 | /* 判断参数是否有效 */ | 25 | /* 判断参数是否有效 */ |
26 | let id = req.body.id, | 26 | let id = req.body.id, |
27 | opt = req.body.opt || 'ok', | 27 | opt = req.body.opt || 'ok', |
28 | - udid = req.sessionID || require('md5')(req.ip) || 'yoho'; | 28 | + udid = req.sessionID || require('yoho-md5')(req.ip) || 'yoho'; |
29 | 29 | ||
30 | if (!stringProcess.isNumeric(id)) { | 30 | if (!stringProcess.isNumeric(id)) { |
31 | res.json({ code: 400, message: '非法请求', data: '' }); | 31 | res.json({ code: 400, message: '非法请求', data: '' }); |
@@ -21,7 +21,7 @@ exports.index = (req, res, next) => { | @@ -21,7 +21,7 @@ exports.index = (req, res, next) => { | ||
21 | let params = { | 21 | let params = { |
22 | uid: req.user.uid, | 22 | uid: req.user.uid, |
23 | channel: req.query.channel || 1, | 23 | channel: req.query.channel || 1, |
24 | - udid: require('md5')(req.ip) | 24 | + udid: require('yoho-md5')(req.ip) |
25 | }; | 25 | }; |
26 | 26 | ||
27 | let studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true); | 27 | let studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true); |
@@ -15,7 +15,7 @@ const AlipayStrategy = require('./models/passport-alipay').Strategy; | @@ -15,7 +15,7 @@ const AlipayStrategy = require('./models/passport-alipay').Strategy; | ||
15 | 15 | ||
16 | const _ = require('lodash'); | 16 | const _ = require('lodash'); |
17 | 17 | ||
18 | -// const md5 = require('md5'); | 18 | +// const md5 = require('yoho-md5'); |
19 | 19 | ||
20 | const config = global.yoho.config; | 20 | const config = global.yoho.config; |
21 | const logger = global.yoho.logger; | 21 | const logger = global.yoho.logger; |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | const _ = require('lodash'); | 8 | const _ = require('lodash'); |
9 | const passport = require('passport'); | 9 | const passport = require('passport'); |
10 | 10 | ||
11 | -// const md5 = require('md5'); | 11 | +// const md5 = require('yoho-md5'); |
12 | const uuid = require('uuid'); | 12 | const uuid = require('uuid'); |
13 | const cookie = global.yoho.cookie; | 13 | const cookie = global.yoho.cookie; |
14 | const helpers = global.yoho.helpers; | 14 | const helpers = global.yoho.helpers; |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | 'use strict'; | 8 | 'use strict'; |
9 | const util = require('util'); | 9 | const util = require('util'); |
10 | const _ = require('lodash'); | 10 | const _ = require('lodash'); |
11 | -const md5 = require('md5'); | 11 | +const md5 = require('yoho-md5'); |
12 | const passport = require('passport-strategy'); | 12 | const passport = require('passport-strategy'); |
13 | 13 | ||
14 | // 支付宝网关地址 | 14 | // 支付宝网关地址 |
@@ -33,7 +33,6 @@ | @@ -33,7 +33,6 @@ | ||
33 | "feed": "^0.3.1", | 33 | "feed": "^0.3.1", |
34 | "geetest": "^4.1.1", | 34 | "geetest": "^4.1.1", |
35 | "lodash": "^4.17.4", | 35 | "lodash": "^4.17.4", |
36 | - "md5": "^2.1.0", | ||
37 | "memory-cache": "^0.1.6", | 36 | "memory-cache": "^0.1.6", |
38 | "moment": "^2.17.1", | 37 | "moment": "^2.17.1", |
39 | "oneapm": "^1.2.20", | 38 | "oneapm": "^1.2.20", |
@@ -45,10 +44,10 @@ | @@ -45,10 +44,10 @@ | ||
45 | "passport-weixin": "^0.1.0", | 44 | "passport-weixin": "^0.1.0", |
46 | "request": "^2.81.0", | 45 | "request": "^2.81.0", |
47 | "request-promise": "^3.0.0", | 46 | "request-promise": "^3.0.0", |
48 | - "serve-favicon": "^2.4.0", | ||
49 | "uuid": "^2.0.3", | 47 | "uuid": "^2.0.3", |
50 | "xml2js": "^0.4.17", | 48 | "xml2js": "^0.4.17", |
51 | "yoho-express-session": "^2.0.0", | 49 | "yoho-express-session": "^2.0.0", |
50 | + "yoho-md5": "^2.0.0", | ||
52 | "yoho-node-lib": "^0.2.8", | 51 | "yoho-node-lib": "^0.2.8", |
53 | "yoho-zookeeper": "^1.0.8" | 52 | "yoho-zookeeper": "^1.0.8" |
54 | }, | 53 | }, |
-
Please register or login to post a comment