Authored by 毕凯

Merge branch 'release/1019' into 'master'

Release/1019



See merge request !1014
@@ -27,7 +27,7 @@ router.post('/check/submit', validateCode.check, check.submit); @@ -27,7 +27,7 @@ router.post('/check/submit', validateCode.check, check.submit);
27 router.get('/questionnaire', auth, question.list); 27 router.get('/questionnaire', auth, question.list);
28 router.post('/questionnaire/check', question.check); 28 router.post('/questionnaire/check', question.check);
29 router.post('/questionnaire/submit', question.submit); 29 router.post('/questionnaire/submit', question.submit);
30 -router.get('/questionnaire/:id', auth, question.detail); 30 +router.get('/questionnaire/:id', question.detail);
31 router.get('/material', auth, materialNew.list); 31 router.get('/material', auth, materialNew.list);
32 32
33 module.exports = router; 33 module.exports = router;
@@ -4,7 +4,6 @@ const aes = require('./aes-pwd'); @@ -4,7 +4,6 @@ const aes = require('./aes-pwd');
4 const authcode = require('../../../utils/authcode'); 4 const authcode = require('../../../utils/authcode');
5 const logger = global.yoho.logger; 5 const logger = global.yoho.logger;
6 const sign = global.yoho.sign; 6 const sign = global.yoho.sign;
7 -const api = global.yoho.API;  
8 const uuid = require('uuid'); 7 const uuid = require('uuid');
9 const url = require('url'); 8 const url = require('url');
10 const md5 = require('yoho-md5'); 9 const md5 = require('yoho-md5');
@@ -30,7 +29,7 @@ class AuthModel extends global.yoho.BaseModel { @@ -30,7 +29,7 @@ class AuthModel extends global.yoho.BaseModel {
30 param.shopping_key = shoppingKey; 29 param.shopping_key = shoppingKey;
31 } 30 }
32 31
33 - return api.post('', param); 32 + return this.post({data: param});
34 } 33 }
35 34
36 signinAes(area, profile, password, shoppingKey, ip, isSkip, from) { 35 signinAes(area, profile, password, shoppingKey, ip, isSkip, from) {
@@ -49,12 +48,8 @@ class AuthModel extends global.yoho.BaseModel { @@ -49,12 +48,8 @@ class AuthModel extends global.yoho.BaseModel {
49 48
50 logger.info(`${profile}, login from ${ip}`); 49 logger.info(`${profile}, login from ${ip}`);
51 50
52 - return api.post('', param, {  
53 - headers: {  
54 - 'user-agent': 'yoho/nodejs',  
55 - 'X-YOHO-IP': ip,  
56 - 'X-Forwarded-For': ip  
57 - } 51 + return this.post({
  52 + data: param
58 }); 53 });
59 } 54 }
60 55
@@ -71,7 +66,7 @@ class AuthModel extends global.yoho.BaseModel { @@ -71,7 +66,7 @@ class AuthModel extends global.yoho.BaseModel {
71 param.shopping_key = params.shoppingKey; 66 param.shopping_key = params.shoppingKey;
72 } 67 }
73 68
74 - return api.get('', param); 69 + return this.get({data: param});
75 } 70 }
76 71
77 profile(uid) { 72 profile(uid) {
@@ -80,7 +75,7 @@ class AuthModel extends global.yoho.BaseModel { @@ -80,7 +75,7 @@ class AuthModel extends global.yoho.BaseModel {
80 method: 'app.passport.profile' 75 method: 'app.passport.profile'
81 }; 76 };
82 77
83 - return api.get('', param); 78 + return this.get({data: param});
84 } 79 }
85 80
86 thirdSign(params, clientSecret) { 81 thirdSign(params, clientSecret) {
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 a.async = 1; 12 a.async = 1;
13 a.src = j; 13 a.src = j;
14 m.parentNode.insertBefore(a, m); 14 m.parentNode.insertBefore(a, m);
15 - }(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/2.4.6/yas.js', '_yas')); 15 + }(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/2.4.7/yas.js', '_yas'));
16 16
17 var _hmt = _hmt || []; 17 var _hmt = _hmt || [];
18 18
@@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
56 uid = uid === 0 ? '' : uid; 56 uid = uid === 0 ? '' : uid;
57 window._ozuid = uid; // 暴露ozuid 57 window._ozuid = uid; // 暴露ozuid
58 if (window._yas) { 58 if (window._yas) {
59 - window._yas(1 * new Date(), '2.4.6', 'yohobuy_m', uid, '', ''); 59 + window._yas(1 * new Date(), '2.4.7', 'yohobuy_m', uid, '', '');
60 } 60 }
61 61
62 setTimeout(function() { 62 setTimeout(function() {
@@ -73,7 +73,7 @@ @@ -73,7 +73,7 @@
73 "xml2js": "^0.4.19", 73 "xml2js": "^0.4.19",
74 "yoho-express-session": "^2.0.0", 74 "yoho-express-session": "^2.0.0",
75 "yoho-md5": "^2.0.0", 75 "yoho-md5": "^2.0.0",
76 - "yoho-node-lib": "=0.5.7", 76 + "yoho-node-lib": "=0.5.10",
77 "yoho-zookeeper": "^1.0.8" 77 "yoho-zookeeper": "^1.0.8"
78 }, 78 },
79 "devDependencies": { 79 "devDependencies": {