Authored by weiqingting

添加 app_version 到 User-Agent

... ... @@ -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,10 @@ 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');
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) {
... ...
... ... @@ -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>
... ...
... ... @@ -416,6 +416,14 @@ $(document).on('click', '.s-submit', function() {
location.href = data.data;
} else {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
EVENT: 'YB_STUDENT_ATTCT_SUBMIT',
C_ID: C_ID,
SRC_ID: 5,
SUBMIT_RES: 2
}, false);
}
tip.show(data.message);
}
... ...
... ... @@ -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);
... ...