Authored by 徐炜

Merge remote-tracking branch 'origin/release/4.9.1.0' into release/4.9.1.0

... ... @@ -7,7 +7,7 @@ const queryString = require('querystring');
const Promise = require('bluebird');
const co = Promise.coroutine;
const headerModel = require('../../../doraemon/models/header'); // 头部model
const _=require('lodash');
const _ = require('lodash');
const getResource = code => {
... ... @@ -103,10 +103,8 @@ const getPlatForm = (req) => {
yoho.app_version = versions && versions.length === 2 ? versions[1] : '';
yoho.app_version = yoho.app_version || req.query.app_version || '';
console.log("yoho.app_version");
console.log(yoho.app_version);
if (yoho.app_version) {
yoho.app_version=_.toString(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) {
... ... @@ -350,7 +348,7 @@ exports.verifystudent = (req, res, next) => {
Promise.all([verifiedStudentTotal(), vip(), verifyStudent(uid, params.college_name, params.education_degree, params.enrollment_year, params.token)])
.then((datas) => {
let isverify = false,
prompt = '您的学校信息未通审核';
prompt = '您的学校信息未通审核';
if (datas[2].code === 200) {
if (datas[2].code === 200) {
... ...
... ... @@ -47,7 +47,7 @@
</span>
</a>
{{else}}
<div class="main-right-use" >
<div class="main-right-use" href='{{../image.url}}'>
<span class="on-receive on-lingqu no-bg">
<p>点击</p>
<p>领取</p>
... ...
... ... @@ -61,6 +61,7 @@ const postcssPlugin = (et) => {
group = group === '' ? 'yo' : group;
file.retina = true;
file.radio = 2;
return group ? Promise.resolve(group) : Promise.reject(group);
}
... ...
... ... @@ -411,7 +411,7 @@ $(document).on('click', '.s-submit', function() {
C_ID: C_ID,
SRC_ID: 5,
SUBMIT_RES: 1
}, false);
}, true);
}
location.href = data.data;
... ...
... ... @@ -64,7 +64,9 @@ function getUrlParam(name) {
$('.on-lingqu', 'div.main-right-use').on('click', function() {
var $curDom = $(this),
req = '';
req = '',
href = '',
a = '';
if (getUrlParam('app_version')) {
req += '&app_version=' + getUrlParam('app_version');
... ... @@ -73,6 +75,8 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() {
if (getUrlParam('uid')) {
req += '&uid=' + getUrlParam('uid');
}
if (!$curDom.hasClass('received')) {
$.ajax({
url: '//m.yohobuy.com/coupon/receiveCoupon?code=a83b7d55324fb65f96c1f85a3387ebd8' + req,
... ... @@ -93,8 +97,11 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() {
location.href = newUrl;
} else {
if (status) {
$curDom.html('').removeClass('on-receive').removeClass('no-bg');
$curDom.addClass('received');
href = $curDom.parent('.main-right-use').attr('href');
$curDom.parent('.main-right-use').wrap('<a class=\'main-right-use\' href=' + href + '></a>');
a = $curDom.parent('.main-right-use').parent('a');
a.html('<span class="received"></span>');
tip.show('领券成功');
} else {
tip.show(msg);
... ... @@ -266,18 +273,21 @@ $('.s-activity', '.s-section').click(function() {
});
$('.good-info', '.goods-list').click(function() {
var options;
var url = $(this).find('.good-detail-img').find('.good-thumb').attr('href');
var index = $(this).index();
var tid = $(this).parents('.s-section').data('template-id');
// var url = $(this).find('.good-detail-img').find('.good-thumb').attr('href');
// var index = $(this).index();
// var tid = $(this).parents('.s-section').data('template-id');
var index = $(this).index;
var goodids = $(this).find('.good-thumb').attr('href').match(/"product_skn":([^}]+)/, 'g');
var goodid = goodids && goodids.length === 2 ? goodids[1] : '';
options = {
EVENT: 'YB_STUDENT_VIP_FLR',
C_ID: C_ID,
F_ID: tid || 4,
F_NAME: '学生专享专区',
F_URL: url,
F_INDEX: 4,
I_INDEX: index
EVENT: 'YB_STUDENT_VIP_GDS_LIST',
PRD_NUM: index,
PRD_ID: goodid,
ACTION_ID: 0,
SORT_TYPE: 4,
REC_ID: Date.now()
};
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo(options, true);
... ...
... ... @@ -61,7 +61,7 @@
&.received {
width: 113px;
height: 134px;
height: 140px;
background-image: url("/channel/received.png");
position: absolute;
top: 0;
... ... @@ -70,7 +70,7 @@
&.zero {
width: 111px;
height: 134px;
height: 140px;
background-image: url("/channel/zero.png");
position: absolute;
top: 0;
... ...