update.js
511 Bytes
/**
* app版本判断
* @date: 2017/5/10
*/
'use strict';
module.exports = (req, res, next) => {
let versionArr,
appVersion = req.yoho.isApp;
if (appVersion) {
versionArr = appVersion.split('.');
if (versionArr[0] < 5 || versionArr[1] < 7 || versionArr[1] < 1) {
return res.redirect('http://m.yohobuy.com/passport/update?openby:yohobuy={"action":"go.h5","params":{"islogin":"N", "url":"http://m.yohobuy.com/passport/update"}}');
}
}
next();
};