Merge remote-tracking branch 'origin/release/4.9.1.0' into release/4.9.1.0
Showing
6 changed files
with
31 additions
and
22 deletions
@@ -7,7 +7,7 @@ const queryString = require('querystring'); | @@ -7,7 +7,7 @@ const queryString = require('querystring'); | ||
7 | const Promise = require('bluebird'); | 7 | const Promise = require('bluebird'); |
8 | const co = Promise.coroutine; | 8 | const co = Promise.coroutine; |
9 | const headerModel = require('../../../doraemon/models/header'); // 头部model | 9 | const headerModel = require('../../../doraemon/models/header'); // 头部model |
10 | -const _=require('lodash'); | 10 | +const _ = require('lodash'); |
11 | 11 | ||
12 | 12 | ||
13 | const getResource = code => { | 13 | const getResource = code => { |
@@ -103,10 +103,8 @@ const getPlatForm = (req) => { | @@ -103,10 +103,8 @@ const getPlatForm = (req) => { | ||
103 | 103 | ||
104 | yoho.app_version = versions && versions.length === 2 ? versions[1] : ''; | 104 | yoho.app_version = versions && versions.length === 2 ? versions[1] : ''; |
105 | yoho.app_version = yoho.app_version || req.query.app_version || ''; | 105 | yoho.app_version = yoho.app_version || req.query.app_version || ''; |
106 | - console.log("yoho.app_version"); | ||
107 | - console.log(yoho.app_version); | ||
108 | if (yoho.app_version) { | 106 | if (yoho.app_version) { |
109 | - yoho.app_version=_.toString(yoho.app_version); | 107 | + yoho.app_version = _.toString(yoho.app_version); |
110 | arrs = yoho.app_version.split('.'); | 108 | arrs = yoho.app_version.split('.'); |
111 | if (arrs.length > 2) { | 109 | if (arrs.length > 2) { |
112 | if (arrs[0] && +arrs[0] < 4) { | 110 | if (arrs[0] && +arrs[0] < 4) { |
@@ -350,7 +348,7 @@ exports.verifystudent = (req, res, next) => { | @@ -350,7 +348,7 @@ exports.verifystudent = (req, res, next) => { | ||
350 | Promise.all([verifiedStudentTotal(), vip(), verifyStudent(uid, params.college_name, params.education_degree, params.enrollment_year, params.token)]) | 348 | Promise.all([verifiedStudentTotal(), vip(), verifyStudent(uid, params.college_name, params.education_degree, params.enrollment_year, params.token)]) |
351 | .then((datas) => { | 349 | .then((datas) => { |
352 | let isverify = false, | 350 | let isverify = false, |
353 | - prompt = '您的学校信息未通审核'; | 351 | + prompt = '您的学校信息未通过审核'; |
354 | 352 | ||
355 | if (datas[2].code === 200) { | 353 | if (datas[2].code === 200) { |
356 | if (datas[2].code === 200) { | 354 | if (datas[2].code === 200) { |
@@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
47 | </span> | 47 | </span> |
48 | </a> | 48 | </a> |
49 | {{else}} | 49 | {{else}} |
50 | - <div class="main-right-use" > | 50 | + <div class="main-right-use" href='{{../image.url}}'> |
51 | <span class="on-receive on-lingqu no-bg"> | 51 | <span class="on-receive on-lingqu no-bg"> |
52 | <p>点击</p> | 52 | <p>点击</p> |
53 | <p>领取</p> | 53 | <p>领取</p> |
@@ -61,6 +61,7 @@ const postcssPlugin = (et) => { | @@ -61,6 +61,7 @@ const postcssPlugin = (et) => { | ||
61 | group = group === '' ? 'yo' : group; | 61 | group = group === '' ? 'yo' : group; |
62 | 62 | ||
63 | file.retina = true; | 63 | file.retina = true; |
64 | + file.radio = 2; | ||
64 | 65 | ||
65 | return group ? Promise.resolve(group) : Promise.reject(group); | 66 | return group ? Promise.resolve(group) : Promise.reject(group); |
66 | } | 67 | } |
@@ -411,7 +411,7 @@ $(document).on('click', '.s-submit', function() { | @@ -411,7 +411,7 @@ $(document).on('click', '.s-submit', function() { | ||
411 | C_ID: C_ID, | 411 | C_ID: C_ID, |
412 | SRC_ID: 5, | 412 | SRC_ID: 5, |
413 | SUBMIT_RES: 1 | 413 | SUBMIT_RES: 1 |
414 | - }, false); | 414 | + }, true); |
415 | } | 415 | } |
416 | 416 | ||
417 | location.href = data.data; | 417 | location.href = data.data; |
@@ -64,7 +64,9 @@ function getUrlParam(name) { | @@ -64,7 +64,9 @@ function getUrlParam(name) { | ||
64 | 64 | ||
65 | $('.on-lingqu', 'div.main-right-use').on('click', function() { | 65 | $('.on-lingqu', 'div.main-right-use').on('click', function() { |
66 | var $curDom = $(this), | 66 | var $curDom = $(this), |
67 | - req = ''; | 67 | + req = '', |
68 | + href = '', | ||
69 | + a = ''; | ||
68 | 70 | ||
69 | if (getUrlParam('app_version')) { | 71 | if (getUrlParam('app_version')) { |
70 | req += '&app_version=' + getUrlParam('app_version'); | 72 | req += '&app_version=' + getUrlParam('app_version'); |
@@ -73,6 +75,8 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() { | @@ -73,6 +75,8 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() { | ||
73 | if (getUrlParam('uid')) { | 75 | if (getUrlParam('uid')) { |
74 | req += '&uid=' + getUrlParam('uid'); | 76 | req += '&uid=' + getUrlParam('uid'); |
75 | } | 77 | } |
78 | + | ||
79 | + | ||
76 | if (!$curDom.hasClass('received')) { | 80 | if (!$curDom.hasClass('received')) { |
77 | $.ajax({ | 81 | $.ajax({ |
78 | url: '//m.yohobuy.com/coupon/receiveCoupon?code=a83b7d55324fb65f96c1f85a3387ebd8' + req, | 82 | url: '//m.yohobuy.com/coupon/receiveCoupon?code=a83b7d55324fb65f96c1f85a3387ebd8' + req, |
@@ -93,8 +97,11 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() { | @@ -93,8 +97,11 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() { | ||
93 | location.href = newUrl; | 97 | location.href = newUrl; |
94 | } else { | 98 | } else { |
95 | if (status) { | 99 | if (status) { |
96 | - $curDom.html('').removeClass('on-receive').removeClass('no-bg'); | ||
97 | - $curDom.addClass('received'); | 100 | + href = $curDom.parent('.main-right-use').attr('href'); |
101 | + $curDom.parent('.main-right-use').wrap('<a class=\'main-right-use\' href=' + href + '></a>'); | ||
102 | + a = $curDom.parent('.main-right-use').parent('a'); | ||
103 | + a.html('<span class="received"></span>'); | ||
104 | + | ||
98 | tip.show('领券成功'); | 105 | tip.show('领券成功'); |
99 | } else { | 106 | } else { |
100 | tip.show(msg); | 107 | tip.show(msg); |
@@ -266,18 +273,21 @@ $('.s-activity', '.s-section').click(function() { | @@ -266,18 +273,21 @@ $('.s-activity', '.s-section').click(function() { | ||
266 | }); | 273 | }); |
267 | $('.good-info', '.goods-list').click(function() { | 274 | $('.good-info', '.goods-list').click(function() { |
268 | var options; | 275 | var options; |
269 | - var url = $(this).find('.good-detail-img').find('.good-thumb').attr('href'); | ||
270 | - var index = $(this).index(); | ||
271 | - var tid = $(this).parents('.s-section').data('template-id'); | 276 | + |
277 | + // var url = $(this).find('.good-detail-img').find('.good-thumb').attr('href'); | ||
278 | + // var index = $(this).index(); | ||
279 | + // var tid = $(this).parents('.s-section').data('template-id'); | ||
280 | + var index = $(this).index; | ||
281 | + var goodids = $(this).find('.good-thumb').attr('href').match(/"product_skn":([^}]+)/, 'g'); | ||
282 | + var goodid = goodids && goodids.length === 2 ? goodids[1] : ''; | ||
272 | 283 | ||
273 | options = { | 284 | options = { |
274 | - EVENT: 'YB_STUDENT_VIP_FLR', | ||
275 | - C_ID: C_ID, | ||
276 | - F_ID: tid || 4, | ||
277 | - F_NAME: '学生专享专区', | ||
278 | - F_URL: url, | ||
279 | - F_INDEX: 4, | ||
280 | - I_INDEX: index | 285 | + EVENT: 'YB_STUDENT_VIP_GDS_LIST', |
286 | + PRD_NUM: index, | ||
287 | + PRD_ID: goodid, | ||
288 | + ACTION_ID: 0, | ||
289 | + SORT_TYPE: 4, | ||
290 | + REC_ID: Date.now() | ||
281 | }; | 291 | }; |
282 | if (window._yas && window._yas.sendCustomInfo) { | 292 | if (window._yas && window._yas.sendCustomInfo) { |
283 | window._yas.sendCustomInfo(options, true); | 293 | window._yas.sendCustomInfo(options, true); |
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | 61 | ||
62 | &.received { | 62 | &.received { |
63 | width: 113px; | 63 | width: 113px; |
64 | - height: 134px; | 64 | + height: 140px; |
65 | background-image: url("/channel/received.png"); | 65 | background-image: url("/channel/received.png"); |
66 | position: absolute; | 66 | position: absolute; |
67 | top: 0; | 67 | top: 0; |
@@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
70 | 70 | ||
71 | &.zero { | 71 | &.zero { |
72 | width: 111px; | 72 | width: 111px; |
73 | - height: 134px; | 73 | + height: 140px; |
74 | background-image: url("/channel/zero.png"); | 74 | background-image: url("/channel/zero.png"); |
75 | position: absolute; | 75 | position: absolute; |
76 | top: 0; | 76 | top: 0; |
-
Please register or login to post a comment