Authored by weiqingting

Merge branch 'feature_student' into release/4.9.1.0

# Conflicts:
#	apps/product/models/detail.js
#	config/common.js
#	public/scss/common/_good.css
... ... @@ -98,7 +98,6 @@ const getPlatForm = (req) => {
yoho.isiOS = /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(userAgent);
yoho.isAndroid = /Android/i.test(userAgent);
yoho.isApp = /YohoBuy/i.test(req.get('User-Agent')) || (req.query.app_version && req.query.client_type);
console.log(req.query.app_version);
yoho.app_version = req.query.app_version || '';
if (yoho.app_version) {
arrs = yoho.app_version.split('.');
... ... @@ -120,13 +119,14 @@ const getPlatForm = (req) => {
if (isProduction) {
yoho.http = 'https:';
}
yoho.uid = uids && uids.length === 2 ? uids[1] : ''; // 8041246
yoho.uid = uids && uids.length === 2 ? uids[1] : 8041246; // 8041246
yoho.uid = req.user.uid || yoho.uid || req.query.uid || '';
yoho.isLogin = yoho.uid ? true : false;
return co(function*() {
let data = yield getUser(yoho.uid);
yoho.isStudent = data.data && data.data.vip_info && data.data.vip_info.is_student ? true : false;
yoho.isStudent=false;
return yoho;
})();
... ...