...
|
...
|
@@ -109,16 +109,21 @@ const getPlatForm = (req) => { |
|
|
if (yoho.app_version) {
|
|
|
yoho.app_version = _.toString(yoho.app_version);
|
|
|
arrs = yoho.app_version.split('.');
|
|
|
if (arrs.length > 2) {
|
|
|
if (arrs[0] && +arrs[0] < 4) {
|
|
|
isNewVersion = false;
|
|
|
} else if (arrs[1] && +arrs[1] < 9) {
|
|
|
isNewVersion = false;
|
|
|
} else if (arrs[2] && +arrs[2] <= 0) {
|
|
|
isNewVersion = false;
|
|
|
} else {
|
|
|
isNewVersion = true;
|
|
|
}
|
|
|
// if (arrs.length > 2) {
|
|
|
// if (arrs[0] && +arrs[0] < 4) {
|
|
|
// isNewVersion = false;
|
|
|
// } else if (arrs[1] && +arrs[1] < 9) {
|
|
|
// isNewVersion = false;
|
|
|
// } else if (arrs[2] && +arrs[2] <= 0) {
|
|
|
// isNewVersion = false;
|
|
|
// } else {
|
|
|
// isNewVersion = true;
|
|
|
// }
|
|
|
// }
|
|
|
if (arrs[0] >= 5) {
|
|
|
isNewVersion = true;
|
|
|
} else if (+arrs[0] === 4 && +arrs[1] === 9 && +arrs[2] > 0) {
|
|
|
isNewVersion = true;
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -323,15 +328,15 @@ exports.school = (req, res, next) => { |
|
|
exports.verifyidentity = (req, res, next) => {
|
|
|
// let uid=req.user.id;
|
|
|
let params = req.body;
|
|
|
let uid = req.__USER__.uid;
|
|
|
let url = 'http://m.yohobuy.com/activity/student/verify?' +
|
|
|
queryString.stringify({
|
|
|
college_name: params.college_name,
|
|
|
education_degree: params.education_degree,
|
|
|
enrollment_year: params.enrollment_year
|
|
|
enrollment_year: params.enrollment_year,
|
|
|
uid: req.__USER__.isApp ? uid : '',
|
|
|
}) + '&';
|
|
|
|
|
|
let uid = req.__USER__.uid;
|
|
|
|
|
|
verifyIdentity(uid, params.cert_no, params.name, url).then((result) => {
|
|
|
res.json(result);
|
|
|
}).catch(next);
|
...
|
...
|
|