Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Showing
9 changed files
with
47 additions
and
33 deletions
@@ -158,6 +158,21 @@ function reMarginFooter(fixedElement) { | @@ -158,6 +158,21 @@ function reMarginFooter(fixedElement) { | ||
158 | $footer.removeClass('hide'); | 158 | $footer.removeClass('hide'); |
159 | }()); | 159 | }()); |
160 | 160 | ||
161 | +(function(w, d, s, j, f) { | ||
162 | + var a = d.createElement(s); | ||
163 | + var m = d.getElementsByTagName(s)[0]; | ||
164 | + | ||
165 | + w.YohoAcquisitionObject = f; | ||
166 | + | ||
167 | + w[f] = function() { | ||
168 | + w[f].p = arguments; | ||
169 | + }; | ||
170 | + | ||
171 | + a.async = 1; | ||
172 | + a.src = j; | ||
173 | + m.parentNode.insertBefore(a, m); | ||
174 | +})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.13.6.3/yas-debug.js', '_yas'); | ||
175 | + | ||
161 | (function() { | 176 | (function() { |
162 | var uid = getUid(); | 177 | var uid = getUid(); |
163 | 178 | ||
@@ -166,7 +181,7 @@ function reMarginFooter(fixedElement) { | @@ -166,7 +181,7 @@ function reMarginFooter(fixedElement) { | ||
166 | window._ozuid = uid;//暴露ozuid | 181 | window._ozuid = uid;//暴露ozuid |
167 | 182 | ||
168 | if (window._yas) { | 183 | if (window._yas) { |
169 | - window._yas(1 * new Date(), '1.0.13.2', 'yohobuy_m', uid, ''); | 184 | + window._yas(1 * new Date(), '1.0.13.6.3', 'yohobuy_m', uid, '', ''); |
170 | } | 185 | } |
171 | }()); | 186 | }()); |
172 | 187 |
@@ -30,6 +30,7 @@ if (likeHammer) { | @@ -30,6 +30,7 @@ if (likeHammer) { | ||
30 | opt = 'ok'; | 30 | opt = 'ok'; |
31 | favorite = 1; | 31 | favorite = 1; |
32 | } | 32 | } |
33 | + | ||
33 | $.ajax({ | 34 | $.ajax({ |
34 | type: 'POST', | 35 | type: 'POST', |
35 | url: '/product/opt/favoriteProduct', | 36 | url: '/product/opt/favoriteProduct', |
@@ -51,19 +52,19 @@ if (likeHammer) { | @@ -51,19 +52,19 @@ if (likeHammer) { | ||
51 | } else { | 52 | } else { |
52 | tip.show(data.message); | 53 | tip.show(data.message); |
53 | } | 54 | } |
55 | + }, | ||
56 | + error: function() { | ||
57 | + tip.show('网络断开连接了~'); | ||
58 | + } | ||
59 | + }); | ||
54 | 60 | ||
55 | // 统计代码:用于统计用户加入或取消商品收藏的动作 | 61 | // 统计代码:用于统计用户加入或取消商品收藏的动作 |
56 | if (window._yas) { | 62 | if (window._yas) { |
57 | window._yas.sendCustomInfo({ | 63 | window._yas.sendCustomInfo({ |
58 | pd: productId, | 64 | pd: productId, |
59 | fa: favorite | 65 | fa: favorite |
60 | - }); | 66 | + }, true); |
61 | } | 67 | } |
62 | - }, | ||
63 | - error: function() { | ||
64 | - tip.show('网络断开连接了~'); | ||
65 | - } | ||
66 | - }); | ||
67 | }); | 68 | }); |
68 | } | 69 | } |
69 | 70 | ||
@@ -75,7 +76,7 @@ if (addToCartHammer) { | @@ -75,7 +76,7 @@ if (addToCartHammer) { | ||
75 | window._yas.sendCustomInfo({ | 76 | window._yas.sendCustomInfo({ |
76 | pd: productId, | 77 | pd: productId, |
77 | by: 1 | 78 | by: 1 |
78 | - }); | 79 | + }, false); |
79 | } | 80 | } |
80 | }); | 81 | }); |
81 | } | 82 | } |
@@ -8,6 +8,7 @@ var $ = require('jquery'), | @@ -8,6 +8,7 @@ var $ = require('jquery'), | ||
8 | Hammer = require('yoho.hammer'), | 8 | Hammer = require('yoho.hammer'), |
9 | lazyLoad = require('yoho.lazyload'); | 9 | lazyLoad = require('yoho.lazyload'); |
10 | 10 | ||
11 | + | ||
11 | //品牌页参数 | 12 | //品牌页参数 |
12 | var $brandHeader = $('#brand-header'), | 13 | var $brandHeader = $('#brand-header'), |
13 | $introBox = $('#intro-box'); | 14 | $introBox = $('#intro-box'); |
@@ -231,6 +232,25 @@ function search(opt) { | @@ -231,6 +232,25 @@ function search(opt) { | ||
231 | loading.hideLoadingMask(); | 232 | loading.hideLoadingMask(); |
232 | 233 | ||
233 | window.rePosFooter(); | 234 | window.rePosFooter(); |
235 | + | ||
236 | + | ||
237 | + // 用于统计点击了商品列表的第几个商品,序号从1开始计算。 | ||
238 | + if (window._yas) { | ||
239 | + switch (navType) { | ||
240 | + case 'newest': | ||
241 | + window._yas(1 * new Date(), '1.0.13.6.3', 'yohobuy_m', window._ozuid, | ||
242 | + '', '.new-goods .good-info .good-detail-img .good-thumb'); | ||
243 | + break; | ||
244 | + case 'price': | ||
245 | + window._yas(1 * new Date(), '1.0.13.6.3', 'yohobuy_m', window._ozuid, | ||
246 | + '', '.new-goods .good-info .good-detail-img .good-thumb'); | ||
247 | + break; | ||
248 | + case 'discount': | ||
249 | + window._yas(1 * new Date(), '1.0.13.6.3', 'yohobuy_m', window._ozuid, | ||
250 | + '', '.new-goods .good-info .good-detail-img .good-thumb'); | ||
251 | + break; | ||
252 | + } | ||
253 | + } | ||
234 | } | 254 | } |
235 | }); | 255 | }); |
236 | 256 | ||
@@ -455,8 +475,3 @@ $listNav.on('touchstart', 'li', function() { | @@ -455,8 +475,3 @@ $listNav.on('touchstart', 'li', function() { | ||
455 | $listNav.find('li').removeClass('bytouch'); | 475 | $listNav.find('li').removeClass('bytouch'); |
456 | }); | 476 | }); |
457 | 477 | ||
458 | -// 用于统计点击了商品列表的第几个商品,序号从1开始计算。 | ||
459 | -if (window._yas) { | ||
460 | - window._yas(1 * new Date(), '1.0.13.2', 'yohobuy_m', window._ozuid, | ||
461 | - '', '#goods-container >div >div .good-thumb >img'); | ||
462 | -} |
@@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
13 | (function() { | 13 | (function() { |
14 | var hm = document.createElement("script"); | 14 | var hm = document.createElement("script"); |
15 | hm.src = "//hm.baidu.com/hm.js?c6ee7218b8321cb65fb2e98f284d8311"; | 15 | hm.src = "//hm.baidu.com/hm.js?c6ee7218b8321cb65fb2e98f284d8311"; |
16 | + hm.async = 1; | ||
16 | var s = document.getElementsByTagName("script")[0]; | 17 | var s = document.getElementsByTagName("script")[0]; |
17 | s.parentNode.insertBefore(hm, s); | 18 | s.parentNode.insertBefore(hm, s); |
18 | })(); | 19 | })(); |
@@ -22,6 +23,7 @@ | @@ -22,6 +23,7 @@ | ||
22 | (function() { | 23 | (function() { |
23 | var hm = document.createElement("script"); | 24 | var hm = document.createElement("script"); |
24 | hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841"; | 25 | hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841"; |
26 | + hm.async = 1; | ||
25 | var s = document.getElementsByTagName("script")[0]; | 27 | var s = document.getElementsByTagName("script")[0]; |
26 | s.parentNode.insertBefore(hm, s); | 28 | s.parentNode.insertBefore(hm, s); |
27 | })(); | 29 | })(); |
@@ -19,18 +19,7 @@ | @@ -19,18 +19,7 @@ | ||
19 | <script src="http://localhost:8000/static/js/sea.js?nowrap"></script> | 19 | <script src="http://localhost:8000/static/js/sea.js?nowrap"></script> |
20 | <script>seajs.config({base: 'http://localhost:8000/'});</script> | 20 | <script>seajs.config({base: 'http://localhost:8000/'});</script> |
21 | {{/if}} | 21 | {{/if}} |
22 | -<script type="text/javascript"> | ||
23 | - (function(w,d,s,j,f){ | ||
24 | - w['YohoAcquisitionObject']=f; | ||
25 | - w[f]=function(){w[f].p=arguments;}; | ||
26 | - var a=d.createElement(s); | ||
27 | - var m=d.getElementsByTagName(s)[0]; | ||
28 | - a.async=1; | ||
29 | - a.src=j; | ||
30 | - m.parentNode.insertBefore(a,m); | ||
31 | - })(window,document,'script','http://cdn.yoho.cn/yas-jssdk/{{yas_version}}/yas.js','_yas'); | ||
32 | -</script> | ||
33 | -{{> layout/use}} | 22 | + {{> layout/use}} |
34 | {{> layout/analysis}} | 23 | {{> layout/analysis}} |
35 | </body> | 24 | </body> |
36 | </html> | 25 | </html> |
@@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets" | @@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets" | ||
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | application.version = "1.2.1" | 53 | application.version = "1.2.1" |
54 | -; JS统计代码的版本号 | ||
55 | -application.yas.version = "1.0.13.2" | ||
56 | 54 | ||
57 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
58 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets" | @@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets" | ||
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | application.version = "1.2.1" | 53 | application.version = "1.2.1" |
54 | -; JS统计代码的版本号 | ||
55 | -application.yas.version = "1.0.13.2" | ||
56 | 54 | ||
57 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
58 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets" | @@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets" | ||
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | application.version = "1.2.1" | 53 | application.version = "1.2.1" |
54 | -; JS统计代码的版本号 | ||
55 | -application.yas.version = "1.0.13.2" | ||
56 | 54 | ||
57 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
58 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets" | @@ -51,8 +51,6 @@ application.assets.path = ROOT_PATH "/assets" | ||
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | application.version = "1.2.1" | 53 | application.version = "1.2.1" |
54 | -; JS统计代码的版本号 | ||
55 | -application.yas.version = "1.0.13.2" | ||
56 | 54 | ||
57 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
58 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
-
Please register or login to post a comment