search-service.js
405 Bytes
const SearchModel = require('./search-api');
module.exports = class extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
this.searchModel = new SearchModel(ctx);
}
async getBrands(params) {
const result = await this.searchModel.getBrands(params);
if (result.code !== 200) {
return [];
}
return result.data;
}
};