index.js 834 Bytes
'use strict';
const _ = require('lodash');

class SeoIndexModel extends global.yoho.BaseModel {
    constructor(ctx) {
        super(ctx);
    }

    searchMipHandle(params) {
        return Promise.all([
            this.searchList(params),
            this.searchList(params),
            this.searchList(params)
        ]).then(rdata => {
            console.log(rdata, ' --- ');
            return rdata;
        });
    }

    searchList(params) {
        params = _.assign({
            limit: 60,
            status: 1,
            sales: 'Y',
            stocknumber: 1,
            method: 'app.search.li',
            attribute_not: 2
        }, params);

        return this.get({
            data: params,
            param: {
                cache: true
            }
        });
    }
}

module.exports = SeoIndexModel;