function fenyefun(count) {
layui.use('laypage', function() {
var laypage = layui.laypage;
laypage.render({
elem: 'fenye', //id
count: count,//商品数量
limit: 10,
layout:['page'],
jump: function(obj, first) {
prodata.page = obj.curr++;
$.ajax({
url: phptitle + "Product/index",
dataType: 'json',
type: 'post',
data: prodata,
success: function(res) {
if (checkcode(res)) {
vm.list = res.data.list;
}
},
error: function() {
layer.msg('获取数据失败', {
icon: 2
});
}
});
}
});
});
}