Authored by 陈峰

Merge branch 'master' into feature/demote

@@ -109,16 +109,21 @@ const getPlatForm = (req) => { @@ -109,16 +109,21 @@ const getPlatForm = (req) => {
109 if (yoho.app_version) { 109 if (yoho.app_version) {
110 yoho.app_version = _.toString(yoho.app_version); 110 yoho.app_version = _.toString(yoho.app_version);
111 arrs = yoho.app_version.split('.'); 111 arrs = yoho.app_version.split('.');
112 - if (arrs.length > 2) {  
113 - if (arrs[0] && +arrs[0] < 4) {  
114 - isNewVersion = false;  
115 - } else if (arrs[1] && +arrs[1] < 9) {  
116 - isNewVersion = false;  
117 - } else if (arrs[2] && +arrs[2] <= 0) {  
118 - isNewVersion = false;  
119 - } else {  
120 - isNewVersion = true;  
121 - } 112 + // if (arrs.length > 2) {
  113 + // if (arrs[0] && +arrs[0] < 4) {
  114 + // isNewVersion = false;
  115 + // } else if (arrs[1] && +arrs[1] < 9) {
  116 + // isNewVersion = false;
  117 + // } else if (arrs[2] && +arrs[2] <= 0) {
  118 + // isNewVersion = false;
  119 + // } else {
  120 + // isNewVersion = true;
  121 + // }
  122 + // }
  123 + if (arrs[0] >= 5) {
  124 + isNewVersion = true;
  125 + } else if (+arrs[0] === 4 && +arrs[1] === 9 && +arrs[2] > 0) {
  126 + isNewVersion = true;
122 } 127 }
123 } 128 }
124 129
@@ -323,15 +328,15 @@ exports.school = (req, res, next) => { @@ -323,15 +328,15 @@ exports.school = (req, res, next) => {
323 exports.verifyidentity = (req, res, next) => { 328 exports.verifyidentity = (req, res, next) => {
324 // let uid=req.user.id; 329 // let uid=req.user.id;
325 let params = req.body; 330 let params = req.body;
  331 + let uid = req.__USER__.uid;
326 let url = 'http://m.yohobuy.com/activity/student/verify?' + 332 let url = 'http://m.yohobuy.com/activity/student/verify?' +
327 queryString.stringify({ 333 queryString.stringify({
328 college_name: params.college_name, 334 college_name: params.college_name,
329 education_degree: params.education_degree, 335 education_degree: params.education_degree,
330 - enrollment_year: params.enrollment_year 336 + enrollment_year: params.enrollment_year,
  337 + uid: req.__USER__.isApp ? uid : '',
331 }) + '&'; 338 }) + '&';
332 339
333 - let uid = req.__USER__.uid;  
334 -  
335 verifyIdentity(uid, params.cert_no, params.name, url).then((result) => { 340 verifyIdentity(uid, params.cert_no, params.name, url).then((result) => {
336 res.json(result); 341 res.json(result);
337 }).catch(next); 342 }).catch(next);
@@ -87,7 +87,7 @@ let switchChannel = (req, res, next) => { @@ -87,7 +87,7 @@ let switchChannel = (req, res, next) => {
87 } 87 }
88 88
89 // 设置浏览器缓存5分钟 300000ms 89 // 设置浏览器缓存5分钟 300000ms
90 - res.set('Expires', (new Date(_.now() + 300000)).toGMTString()); 90 + // res.set('Expires', (new Date(_.now() + 300000)).toGMTString());
91 next(); 91 next();
92 }; 92 };
93 93