Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
bdc8ce1368960174aab9d26c4781bc9f3c10ea0e
1 parent
9d0a64ac
APP打开时,不加载第三方统计代码
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
13 deletions
static/js/plugin/filter.js
static/js/product/shop.js
template/m.yohobuy.com/actions/product/index/shop.phtml
template/m.yohobuy.com/partials/layout/analysis.phtml
static/js/plugin/filter.js
View file @
bdc8ce1
...
...
@@ -6,7 +6,7 @@
*/
var
$
=
require
(
'jquery'
),
IScroll
=
require
(
'iscroll/iscroll-probe'
)
IScroll
=
require
(
'iscroll/iscroll-probe'
)
,
Hammer
=
require
(
'yoho.hammer'
);
var
$filter
;
...
...
static/js/product/shop.js
View file @
bdc8ce1
...
...
@@ -193,7 +193,10 @@ function newData(callback) {
req
.
callBack
=
function
(
data
)
{
$
(
'#new-arrival'
).
append
(
data
);
navInfo
.
new
.
page
++
;
myScroll
.
refresh
();
//myScroll.refresh();
setTimeout
(
function
()
{
myScroll
&&
myScroll
.
refresh
();
},
0
);
lazyLoad
(
$
(
'#new-arrival .lazy'
));
scH
=
$
(
'#scroller'
).
outerHeight
();
searching
=
false
;
...
...
@@ -218,7 +221,10 @@ function hotData(callback) {
req
.
callBack
=
function
(
data
)
{
$
(
'#popularity'
).
append
(
data
);
navInfo
.
hot
.
page
++
;
myScroll
.
refresh
();
//myScroll.refresh();
setTimeout
(
function
()
{
myScroll
&&
myScroll
.
refresh
();
},
0
);
lazyLoad
(
$
(
'#popularity .lazy'
));
scH
=
$
(
'#scroller'
).
outerHeight
();
searching
=
false
;
...
...
@@ -264,7 +270,10 @@ function tabChange(dom, index) {
$nav1
.
removeClass
(
'fixed-top absolute'
);
$nav2
.
removeClass
(
'fixed-top absolute'
);
}
myScroll
&&
myScroll
.
refresh
();
//myScroll && myScroll.refresh();
setTimeout
(
function
()
{
myScroll
&&
myScroll
.
refresh
();
},
0
);
scH
=
$
(
'#scroller'
).
outerHeight
();
if
(
!
$nav1
.
hasClass
(
'hide'
))
{
myScroll
&&
myScroll
.
scrollTo
(
0
,
0
-
imgH
);
...
...
@@ -425,6 +434,8 @@ function scrollHandler() {
});
}
}
$
(
'#scroller'
).
trigger
(
'scroll'
);
}
document
.
addEventListener
(
'touchmove'
,
function
(
e
)
{
...
...
@@ -441,7 +452,7 @@ document.addEventListener('touchmove', function(e) {
//window ready 后重新refresh iscroll
$
(
window
).
ready
(
function
()
{
myScroll
&&
myScroll
.
refresh
();
//
myScroll && myScroll.refresh();
imgH
=
$
(
'#nav-top'
).
outerHeight
();
nav1H
=
$
(
'#nav'
).
outerHeight
();
main1H
=
$
(
'#nav-main'
).
height
();
...
...
@@ -478,7 +489,7 @@ $(window).ready(function() {
multiSwiper
&&
multiSwiper
.
startAutoplay
();
$
(
'#scroller'
).
trigger
(
'scroll'
);
//
$('#scroller').trigger('scroll');
scrollHandler
.
bind
(
this
)();
});
lazyLoad
(
$
(
'img.lazy'
));
...
...
@@ -660,7 +671,10 @@ function search(opt) {
window
.
rePosFooter
();
myScroll
&&
myScroll
.
refresh
();
//myScroll && myScroll.refresh();
setTimeout
(
function
()
{
myScroll
&&
myScroll
.
refresh
();
},
0
);
reNav1Pos
();
bindGoodThumbClick
();
...
...
@@ -913,7 +927,7 @@ function postCollect(info) {
}
setTimeout
(
function
()
{
myScroll
.
refresh
();
myScroll
&&
myScroll
.
refresh
();
scH
=
$
(
'#scroller'
).
outerHeight
();
},
500
);
searching
=
false
;
...
...
template/m.yohobuy.com/actions/product/index/shop.phtml
View file @
bdc8ce1
...
...
@@ -6,7 +6,7 @@
<div
id=
"nav-top"
>
{
{>
layout/page_header
}
}
<!--
tar
modifield
160826
-->
<input
type=
"hidden"
name=
"app_version"
value=
"{{appV
ersion}}"
>
<input
type=
"hidden"
id=
"app_version"
name=
"app_version"
value=
"{{app_v
ersion}}"
>
<input
type=
"hidden"
name=
"shop_id"
value=
"{{shopId}}"
>
<input
type=
"hidden"
name=
"brand"
value=
"{{brand}}"
>
<input
type=
"hidden"
name=
"favId"
value=
"{{favId}}"
>
...
...
@@ -114,6 +114,7 @@
</div>
</div>
{
{/if
}
}
</div>
<div
class=
"discount-area first"
id=
"navlist2"
>
...
...
@@ -164,6 +165,7 @@
</div>
</div>
</div>
<div
id=
"new-arrival"
class=
"new-arrival main hide"
></div>
<div
id=
"popularity"
class=
"popularity main hide"
></div>
...
...
template/m.yohobuy.com/partials/layout/analysis.phtml
View file @
bdc8ce1
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W958MG" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>
var appVersionDom = document.getElementById("app_version");
if (!appVersionDom || !appVersionDom.value) {
var _hmt = _hmt || [];
function async_load(){
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?e5b83a487a4458aa5abca43f5779b764";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?e5b83a487a4458aa5abca43f5779b764";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
...
...
@@ -16,4 +18,5 @@
})(window,document,'script','dataLayer','GTM-W958MG');
}
window.addEventListener('load', async_load, false);
}
</script>
...
...
Please
register
or
login
to post a comment