Merge branch 'release/5.4.1' of http://git.yoho.cn/fe/yohobuy-node into release/5.4.1
Showing
5 changed files
with
40 additions
and
9 deletions
@@ -59,7 +59,6 @@ | @@ -59,7 +59,6 @@ | ||
59 | }, { | 59 | }, { |
60 | isSelect: true, | 60 | isSelect: true, |
61 | labelText: '省份:', | 61 | labelText: '省份:', |
62 | - tips: '注:标"*"的为支持货到付款的地区', | ||
63 | tipsUrl: '/help/?category_id=48', | 62 | tipsUrl: '/help/?category_id=48', |
64 | selects: [{ | 63 | selects: [{ |
65 | key: 'province' | 64 | key: 'province' |
@@ -161,7 +160,7 @@ | @@ -161,7 +160,7 @@ | ||
161 | 160 | ||
162 | return { | 161 | return { |
163 | code: 400, | 162 | code: 400, |
164 | - message: '缺失必填项' | 163 | + message: '请填写完整的省市区信息' |
165 | }; | 164 | }; |
166 | } | 165 | } |
167 | let respData = yield addressApi.saveAddressData(query); | 166 | let respData = yield addressApi.saveAddressData(query); |
@@ -63,6 +63,7 @@ | @@ -63,6 +63,7 @@ | ||
63 | <label for="{{key}}">{{labelText}}</label> | 63 | <label for="{{key}}">{{labelText}}</label> |
64 | <input type="text" name='{{key}}' id="{{key}}" class="input-1 width-150" value="{{value}}"> | 64 | <input type="text" name='{{key}}' id="{{key}}" class="input-1 width-150" value="{{value}}"> |
65 | {{/if}} | 65 | {{/if}} |
66 | + {{#if tips}} | ||
66 | <span class="form-prompt form-info" id="{{key}}-tip"> | 67 | <span class="form-prompt form-info" id="{{key}}-tip"> |
67 | {{tips}} | 68 | {{tips}} |
68 | {{#isSelect}} | 69 | {{#isSelect}} |
@@ -71,6 +72,7 @@ | @@ -71,6 +72,7 @@ | ||
71 | <!--</a>--> | 72 | <!--</a>--> |
72 | {{/isSelect}} | 73 | {{/isSelect}} |
73 | </span> | 74 | </span> |
75 | + {{/if}} | ||
74 | </div> | 76 | </div> |
75 | {{/each}} | 77 | {{/each}} |
76 | </div> | 78 | </div> |
@@ -13,7 +13,7 @@ var _gaq = _gaq || []; | @@ -13,7 +13,7 @@ var _gaq = _gaq || []; | ||
13 | (function() { | 13 | (function() { |
14 | _gaq.push(['_setAccount', 'UA-48997038-32']); | 14 | _gaq.push(['_setAccount', 'UA-48997038-32']); |
15 | _gaq.push(['_trackPageview']); | 15 | _gaq.push(['_trackPageview']); |
16 | - var ga = document.createElement('script'); | 16 | + var ga = document.createElement('script'); |
17 | ga.type = 'text/javascript'; ga.async = true; | 17 | ga.type = 'text/javascript'; ga.async = true; |
18 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | 18 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
19 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | 19 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
@@ -60,3 +60,19 @@ var _gaq = _gaq || []; | @@ -60,3 +60,19 @@ var _gaq = _gaq || []; | ||
60 | s.parentNode.insertBefore(bp, s); | 60 | s.parentNode.insertBefore(bp, s); |
61 | })(); | 61 | })(); |
62 | </script> | 62 | </script> |
63 | +<!-- 品众统计 --> | ||
64 | +<script type='text/javascript'> | ||
65 | + var _fxcmd=_fxcmd||[]; | ||
66 | + _fxcmd.sid='bb3b16fa1106a6ab8619da0095755f32'; | ||
67 | + _fxcmd.trackAll=false; | ||
68 | + // 参数配置(可选)... | ||
69 | + // 追踪配置(可选)... | ||
70 | + (function () { | ||
71 | + var _pzfx=document['createElement']('script'); | ||
72 | + _pzfx.type='text/javascript'; | ||
73 | + _pzfx.async=true; | ||
74 | + _pzfx.src='//static.w3t.cn/fx/1/1/fx.js'; | ||
75 | + var sc=document.getElementsByTagName('script')[0]; | ||
76 | + sc.parentNode.insertBefore(_pzfx,sc); | ||
77 | + })(); | ||
78 | +</script> |
@@ -694,7 +694,7 @@ $('#order-submit').click(function() { | @@ -694,7 +694,7 @@ $('#order-submit').click(function() { | ||
694 | url: '/cart/ensure/submit', | 694 | url: '/cart/ensure/submit', |
695 | data: order | 695 | data: order |
696 | }).then(function(data) { | 696 | }).then(function(data) { |
697 | - var rdata, subTip, | 697 | + var rdata, subTip, newUser, |
698 | tongJi = { | 698 | tongJi = { |
699 | num: 0, | 699 | num: 0, |
700 | skn: [], | 700 | skn: [], |
@@ -763,6 +763,19 @@ $('#order-submit').click(function() { | @@ -763,6 +763,19 @@ $('#order-submit').click(function() { | ||
763 | }).track('MC.ROh.yqkx8jgGASmo3McexF7XE0'); | 763 | }).track('MC.ROh.yqkx8jgGASmo3McexF7XE0'); |
764 | } | 764 | } |
765 | 765 | ||
766 | + // 品众统计 | ||
767 | + if (window._fxcmd) { | ||
768 | + newUser = window.cookie('__NEW_USER') || 0; | ||
769 | + | ||
770 | + window._fxcmd.push(['trackOrder', { | ||
771 | + oid: rdata.order_code, | ||
772 | + otp: rdata.order_amount, | ||
773 | + u_info: window.getUser(), | ||
774 | + u_type: newUser | ||
775 | + }, []]); | ||
776 | + window.setCookie('__NEW_USER', 0); | ||
777 | + } | ||
778 | + | ||
766 | location.href = rdata.url; | 779 | location.href = rdata.url; |
767 | } | 780 | } |
768 | } else if (data.message) { | 781 | } else if (data.message) { |
@@ -777,5 +790,8 @@ multiPackage.init(); | @@ -777,5 +790,8 @@ multiPackage.init(); | ||
777 | coupon.init(); | 790 | coupon.init(); |
778 | yohoCoin.init(); | 791 | yohoCoin.init(); |
779 | 792 | ||
793 | +// 获取用户是否新客(品众统计)写cookie | ||
794 | +$.ajax({type: 'GET', url: '/home/newuser'}); | ||
795 | + | ||
780 | // 订单确认页默认埋点 | 796 | // 订单确认页默认埋点 |
781 | yas.givePoint('YB_SC_ORDER_ENSURE'); | 797 | yas.givePoint('YB_SC_ORDER_ENSURE'); |
@@ -43,8 +43,7 @@ var address = { | @@ -43,8 +43,7 @@ var address = { | ||
43 | loadAreaData: function(pCode, toDomId, defaultValue, allCode) { | 43 | loadAreaData: function(pCode, toDomId, defaultValue, allCode) { |
44 | var the = this, | 44 | var the = this, |
45 | $toDom = $('#' + toDomId), | 45 | $toDom = $('#' + toDomId), |
46 | - i = 0, | ||
47 | - point = ''; | 46 | + i = 0; |
48 | 47 | ||
49 | var active, | 48 | var active, |
50 | val, | 49 | val, |
@@ -76,12 +75,11 @@ var address = { | @@ -76,12 +75,11 @@ var address = { | ||
76 | $toDom.append('<option value="0">' + defaultValue + '</option>'); | 75 | $toDom.append('<option value="0">' + defaultValue + '</option>'); |
77 | if (toDomId === the.streetsDomId) { | 76 | if (toDomId === the.streetsDomId) { |
78 | allCode === pCode ? selectAll = 'selected' : selectAll = ''; | 77 | allCode === pCode ? selectAll = 'selected' : selectAll = ''; |
79 | - $toDom.append('<option value="' + pCode + '" ' + selectAll + '>*全部</option>'); | 78 | + $toDom.append('<option value="' + pCode + '" ' + selectAll + '>全部</option>'); |
80 | } | 79 | } |
81 | for (i in jsonData.options) { | 80 | for (i in jsonData.options) { |
82 | if (jsonData.options[i]) { | 81 | if (jsonData.options[i]) { |
83 | val = jsonData.options[i]; | 82 | val = jsonData.options[i]; |
84 | - point = (toDomId === the.streetsDomId && val.is_support === 'Y') ? '*' : ''; | ||
85 | nId = val.value; | 83 | nId = val.value; |
86 | selecter = ''; | 84 | selecter = ''; |
87 | 85 | ||
@@ -89,7 +87,7 @@ var address = { | @@ -89,7 +87,7 @@ var address = { | ||
89 | nId === allCode.substr(0, nId.length)) { | 87 | nId === allCode.substr(0, nId.length)) { |
90 | selecter = 'selected'; | 88 | selecter = 'selected'; |
91 | } | 89 | } |
92 | - $toDom.append('<option value="' + nId + '" ' + selecter + '>' + point + val.text + '</option>'); | 90 | + $toDom.append('<option value="' + nId + '" ' + selecter + '>' + val.text + '</option>'); |
93 | } | 91 | } |
94 | } | 92 | } |
95 | } | 93 | } |
-
Please register or login to post a comment