...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2017-04-26 17:19:19
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2017-05-02 13:51:31
|
|
|
* @Last Modified time: 2017-05-02 14:40:52
|
|
|
*/
|
|
|
'use strict';
|
|
|
|
...
|
...
|
@@ -10,7 +10,7 @@ const lazyLoad = require('yoho-jquery-lazyload'); |
|
|
|
|
|
import {Controller} from 'yoho-mvc';
|
|
|
import {
|
|
|
NavView
|
|
|
ListView
|
|
|
} from './view';
|
|
|
import {
|
|
|
Guang
|
...
|
...
|
@@ -22,14 +22,14 @@ class IndexController extends Controller { |
|
|
|
|
|
lazyLoad($('img.lazy'));
|
|
|
|
|
|
this.navView = new NavView();
|
|
|
this.listView = new ListView();
|
|
|
this.guangModel = new Guang();
|
|
|
|
|
|
this.page = 1;
|
|
|
this.onLoading = false;
|
|
|
|
|
|
this.navView.on('tabchange', this.tabChange.bind(this));
|
|
|
this.navView.on('loadmore', this.loadMore.bind(this));
|
|
|
this.listView.on('tabchange', this.tabChange.bind(this));
|
|
|
this.listView.on('loadmore', this.loadMore.bind(this));
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -47,7 +47,7 @@ class IndexController extends Controller { |
|
|
let $result = $(result);
|
|
|
|
|
|
lazyLoad($result.find('img.lazy'));
|
|
|
this.navView.listChange($result);
|
|
|
this.listView.listChange($result);
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
@@ -64,14 +64,14 @@ class IndexController extends Controller { |
|
|
let noResult = !result || result.length < 1 || (result.list && result.list.length < 1);
|
|
|
|
|
|
if (noResult) {
|
|
|
this.navView.listAppend('<div class="search-divide">没有更多内容了...</div>');
|
|
|
this.listView.listAppend('<div class="search-divide">没有更多内容了...</div>');
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
let $result = $(result);
|
|
|
|
|
|
lazyLoad($result.find('img.lazy'));
|
|
|
this.navView.listAppend($result);
|
|
|
this.listView.listAppend($result);
|
|
|
|
|
|
this.onLoading = false;
|
|
|
});
|
...
|
...
|
|