Authored by OF1706

fav branch

... ... @@ -126,7 +126,6 @@ module.exports = {
index,
newProduct,
reduction,
notice,
cancelNotice,
cancel
... ...
... ... @@ -183,7 +183,6 @@ const favoriteProductListAsync = (uid, page, limit, selectedSort, subscribe, red
result.goods = getGoodsInfo(productList, page, limit);
result.pager = pager(total, Object.assign(query, {hasCheckAll: true}));
result.pager.hasCheckAll = true;
return result;
})();
... ... @@ -351,6 +350,9 @@ const disableNoticeAsync = (uid, id) => {
})();
};
/**
* ids 是 group,品牌删除
*/
const cancelBrandAsync = co(function * (uid, ids ,group) {
if (group.bid) {
yield favoriteApi.cancel.brand(uid, group.bid);
... ... @@ -385,6 +387,6 @@ module.exports = {
reductionAsync,
enableNoticeAsync,
disableNoticeAsync,
cancelBrandAsync,
cancelAsync,
cancelBrandAsync
};
... ...
... ... @@ -39,6 +39,11 @@ exports.handlePagerData = (total, params) => {
result.curPage = currentPage;
result.totalPages = totalPage;
if (params.hasCheckAll) {
result.hasCheckAll = true;
delete params.hasCheckAll;
}
if (currentPage === 1) {
// 当前页为 1,一定没有上一页
delete result.prePage;
... ... @@ -66,11 +71,6 @@ exports.handlePagerData = (total, params) => {
return result;
}
if (params.hasCheckAll) {
result.hasCheckAll = true;
delete params.hasCheckAll;
}
// 页码临时数据
let pages = [];
... ...