...
|
...
|
@@ -9,7 +9,7 @@ const helpers = global.yoho.helpers; |
|
|
const goodsHbs = require(`${ROOT_PATH}/hbs/partials/seo/index.hbs`);
|
|
|
const util = require(`${ROOT_PATH}/libs/util`);
|
|
|
const redis = require(`${ROOT_PATH}/libs/redis`);
|
|
|
const SIZE = 3000;
|
|
|
const SIZE = 2500;
|
|
|
const GOODS_URL = 'http://spiderwebhook.yoho.cn/dist/goods-xml';
|
|
|
|
|
|
class SeoIndexModel extends global.yoho.BaseModel {
|
...
|
...
|
@@ -201,6 +201,14 @@ class SeoIndexModel extends global.yoho.BaseModel { |
|
|
return sData;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
getGoodsPage() {
|
|
|
return this.searchList({page: 1, limit: 1}).then(rdata => {
|
|
|
let total = _.get(rdata, 'data.total', 0);
|
|
|
|
|
|
return Math.ceil(total / SIZE);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
module.exports = SeoIndexModel; |
...
|
...
|
|