Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
ccbikai
9 years ago
Commit
70cd5627e7dc2b0e894197f38a457a9facd7118f
2 parents
821c0f3b
6e8aa434
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
24 deletions
library/LibModels/Wap/Product/NewsaleData.php
static/js/guang/home.js
static/js/guang/list.js
template/m.yohobuy.com/partials/layout/analysis.phtml
template/m.yohobuy.com/partials/layout/footer.phtml
yohobuy/m.yohobuy.com/application/models/Product/Search.php
library/LibModels/Wap/Product/NewsaleData.php
View file @
70cd562
...
...
@@ -112,7 +112,7 @@ class NewsaleData
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
,
600
);
// 缓存1
0分钟
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
,
1800
);
// 缓存3
0分钟
}
/**
...
...
static/js/guang/home.js
View file @
70cd562
...
...
@@ -15,8 +15,7 @@ var $loadMoreInfo = $('#load-more-info');
var
$loading
=
$
(
''
),
$noMore
=
$
(
''
);
var
winH
=
$
(
window
).
height
(),
loadMoreH
=
$loadMoreInfo
.
height
();
var
winH
=
$
(
window
).
height
();
var
$infoList
=
$
(
'#info-list'
),
$infos
=
$infoList
.
children
(
'.info-list'
),
...
...
@@ -107,7 +106,9 @@ navHammer.on('tap', function(e) {
});
$
(
document
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
loadMoreH
-
50
)
{
loadMore
(
$infos
.
not
(
'.hide'
),
state
[
curType
]);
var
$c
=
$infos
.
not
(
'.hide'
);
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
0.25
*
$c
.
height
())
{
loadMore
(
$c
,
state
[
curType
]);
}
});
\ No newline at end of file
...
...
static/js/guang/list.js
View file @
70cd562
...
...
@@ -9,8 +9,7 @@ var $ = require('jquery');
var
info
=
require
(
'./info'
),
loadMore
=
info
.
loadMore
;
var
winH
=
$
(
window
).
height
(),
loadMoreH
=
$
(
'#load-more'
).
height
();
var
winH
=
$
(
window
).
height
();
var
$author
=
$
(
'#author-infos'
);
var
$tag
=
$
(
'#tag'
);
...
...
@@ -41,9 +40,7 @@ if ($tag.length > 0) {
}
$
(
document
).
scroll
(
function
()
{
//设置50px阈值
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
loadMoreH
-
50
)
{
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
0.25
*
$infos
.
height
())
{
loadMore
(
$infos
,
setting
);
}
});
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/analysis.phtml
View file @
70cd562
...
...
@@ -27,16 +27,4 @@
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script type="text/javascript">
(function(w,d,s,j,f){
w['YohoAcquisitionObject']=f;
w[f]=function(){w[f].p=arguments;};
var a=d.createElement(s);
var m=d.getElementsByTagName(s)[0];
a.async=1;
a.src=j;
m.parentNode.insertBefore(a,m);
})(window,document,'script','http://cdn.yoho.cn/yas-jssdk/1.0.8/yas.js','_yas');
</script>
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/footer.phtml
View file @
70cd562
...
...
@@ -20,7 +20,20 @@
<script>seajs.config(
{
base:
'http://localhost:8000/'
}
);</script>
{
{/if
}
}
{
{>
layout/analysis
}
}
<script
type=
"text/javascript"
>
(function(w,d,s,j,f)
{
w['YohoAcquisitionObject']=f;
w[f]=function(){w[f].p=arguments;
}
;
var
a=d.createElement(s);
var
m=d.getElementsByTagName(s)
[
0
]
;
a.async=
1
;
a.src=j;
m.parentNode.insertBefore(a,m);
})(window,document,'script','http://cdn.yoho.cn/yas-jssdk/
1.0
.
8
/yas.js','_yas');
</script>
{
{>
layout/use
}
}
{
{>
layout/analysis
}
}
</body>
</html>
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/models/Product/Search.php
View file @
70cd562
...
...
@@ -55,7 +55,7 @@ class SearchModel
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
,
600
);
// 缓存1
0分钟
Cache
::
set
(
$key
,
$result
,
1800
);
// 缓存3
0分钟
}
}
...
...
Please
register
or
login
to post a comment