Authored by 刘传洋

Merge branch 'release/5.4.1' of http://git.yoho.cn/fe/yohobuy-node into release/5.4.1

... ... @@ -59,7 +59,6 @@
}, {
isSelect: true,
labelText: '省份:',
tips: '注:标"*"的为支持货到付款的地区',
tipsUrl: '/help/?category_id=48',
selects: [{
key: 'province'
... ... @@ -161,7 +160,7 @@
return {
code: 400,
message: '缺失必填项'
message: '请填写完整的省市区信息'
};
}
let respData = yield addressApi.saveAddressData(query);
... ...
... ... @@ -63,6 +63,7 @@
<label for="{{key}}">{{labelText}}</label>
<input type="text" name='{{key}}' id="{{key}}" class="input-1 width-150" value="{{value}}">
{{/if}}
{{#if tips}}
<span class="form-prompt form-info" id="{{key}}-tip">
{{tips}}
{{#isSelect}}
... ... @@ -71,6 +72,7 @@
<!--</a>-->
{{/isSelect}}
</span>
{{/if}}
</div>
{{/each}}
</div>
... ...
... ... @@ -13,7 +13,7 @@ var _gaq = _gaq || [];
(function() {
_gaq.push(['_setAccount', 'UA-48997038-32']);
_gaq.push(['_trackPageview']);
var ga = document.createElement('script');
var ga = document.createElement('script');
ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
... ... @@ -60,3 +60,19 @@ var _gaq = _gaq || [];
s.parentNode.insertBefore(bp, s);
})();
</script>
<!-- 品众统计 -->
<script type='text/javascript'>
var _fxcmd=_fxcmd||[];
_fxcmd.sid='bb3b16fa1106a6ab8619da0095755f32';
_fxcmd.trackAll=false;
// 参数配置(可选)...
// 追踪配置(可选)...
(function () {
var _pzfx=document['createElement']('script');
_pzfx.type='text/javascript';
_pzfx.async=true;
_pzfx.src='//static.w3t.cn/fx/1/1/fx.js';
var sc=document.getElementsByTagName('script')[0];
sc.parentNode.insertBefore(_pzfx,sc);
})();
</script>
... ...
... ... @@ -694,7 +694,7 @@ $('#order-submit').click(function() {
url: '/cart/ensure/submit',
data: order
}).then(function(data) {
var rdata, subTip,
var rdata, subTip, newUser,
tongJi = {
num: 0,
skn: [],
... ... @@ -763,6 +763,19 @@ $('#order-submit').click(function() {
}).track('MC.ROh.yqkx8jgGASmo3McexF7XE0');
}
// 品众统计
if (window._fxcmd) {
newUser = window.cookie('__NEW_USER') || 0;
window._fxcmd.push(['trackOrder', {
oid: rdata.order_code,
otp: rdata.order_amount,
u_info: window.getUser(),
u_type: newUser
}, []]);
window.setCookie('__NEW_USER', 0);
}
location.href = rdata.url;
}
} else if (data.message) {
... ... @@ -777,5 +790,8 @@ multiPackage.init();
coupon.init();
yohoCoin.init();
// 获取用户是否新客(品众统计)写cookie
$.ajax({type: 'GET', url: '/home/newuser'});
// 订单确认页默认埋点
yas.givePoint('YB_SC_ORDER_ENSURE');
... ...
... ... @@ -43,8 +43,7 @@ var address = {
loadAreaData: function(pCode, toDomId, defaultValue, allCode) {
var the = this,
$toDom = $('#' + toDomId),
i = 0,
point = '';
i = 0;
var active,
val,
... ... @@ -76,12 +75,11 @@ var address = {
$toDom.append('<option value="0">' + defaultValue + '</option>');
if (toDomId === the.streetsDomId) {
allCode === pCode ? selectAll = 'selected' : selectAll = '';
$toDom.append('<option value="' + pCode + '" ' + selectAll + '>*全部</option>');
$toDom.append('<option value="' + pCode + '" ' + selectAll + '>全部</option>');
}
for (i in jsonData.options) {
if (jsonData.options[i]) {
val = jsonData.options[i];
point = (toDomId === the.streetsDomId && val.is_support === 'Y') ? '*' : '';
nId = val.value;
selecter = '';
... ... @@ -89,7 +87,7 @@ var address = {
nId === allCode.substr(0, nId.length)) {
selecter = 'selected';
}
$toDom.append('<option value="' + nId + '" ' + selecter + '>' + point + val.text + '</option>');
$toDom.append('<option value="' + nId + '" ' + selecter + '>' + val.text + '</option>');
}
}
}
... ...