|
@@ -225,7 +225,7 @@ define(['$', 'template', 'IScroll', 'product', 'user', 'native', 'config'], func
|
|
|
*/
|
|
|
var tpl = template('home/index', {
|
|
|
showNavBar: !config.isWX && !config.isChubao,
|
|
|
- productsa: a,
|
|
|
+ productsa: products,
|
|
|
productsb: b,
|
|
|
productsc: c,
|
|
|
productsd: d
|
|
@@ -243,10 +243,15 @@ define(['$', 'template', 'IScroll', 'product', 'user', 'native', 'config'], func
|
|
|
*/
|
|
|
$('.spa-page-body', $view).html(tpl);
|
|
|
|
|
|
- /* 不知道是干什么的 */
|
|
|
+ /* 建立IScroll */
|
|
|
setTimeout(function () {
|
|
|
pageData.scroll = new IScroll('#homeScroll', {
|
|
|
- preventDefaultException: {className: /(^|\s)home-content(\s|$)/}
|
|
|
+ preventDefaultException: {className: /(^|\s)home-content(\s|$)/},
|
|
|
+ onScrollMove: function () {
|
|
|
+ if (this.y<this.maxScrollY && this.pointY < 1){
|
|
|
+ this.scrollTo(0, this.maxScrollY, 400);
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
}, 50);
|
|
|
});
|