TypeError: Cannot set property 'pageNum' of undefined
来源:6-9 商品列表页的开发5

点点点工程师
2017-10-15
$(document).on('click','.pg-item',function () {
console.log('1');
var $this = $(this);
if($this.hasClass('active') || $this.hasClass('disabled')){
return;
}
typeof _this.option.onSelectPage === 'function'
? _this.option.onSelectPage($this.data('value')) : null;
console.log('1');
});
//加载分页信息
loadPageination :function (pageInfo) {
!this.pageination && (this.pageination = new pageination());
this.pageination.render($.extend({}, pageInfo, {
container : $('.pagination'),
onSelectPage :function (pageNum) {
_this.listParam.pageNum = pageNum;
_this.loadList();
}
}));
}
3回答
-
mikyyz
2017-10-24
_this.data.listParam.pageNum = pageNum;
00 -
_张敏258zm_
2017-10-23
var _this = this;
00 -
Rosen
2017-10-15
_this.listParam.pageNum = pageNum; 在这句断点,看_this.listParam是什么东西就知道了
00
相似问题