...
|
...
|
@@ -7,13 +7,529 @@ const Promise = require('bluebird'); |
|
|
const co = Promise.coroutine;
|
|
|
const _ = require('lodash');
|
|
|
const Api = require('./shop-api');
|
|
|
const SearchApi = require('./search-api');
|
|
|
const helpers = global.yoho.helpers;
|
|
|
|
|
|
const shopHandler = require('./shop-handler');
|
|
|
const searchHandler = require('./search-handler');
|
|
|
const headerModel = require('../../../doraemon/models/header');
|
|
|
const productProcess = require('../../../utils/product-process');
|
|
|
|
|
|
const DEFAULT_IMG = '01091c21f2317a64f123f1649fbbccf7ba';
|
|
|
|
|
|
// 经典店铺list url
|
|
|
const shopListUrl = '/product/shoplist';
|
|
|
|
|
|
const needParams = ['query', 'msort', 'misort', 'category_id', 'gender', 'shelveTime'];
|
|
|
|
|
|
/**
|
|
|
* channel=>gender
|
|
|
*/
|
|
|
const _getGender = (channel) => {
|
|
|
let gender;
|
|
|
|
|
|
switch (channel) {
|
|
|
case 'boys':
|
|
|
gender = '1,3';
|
|
|
break;
|
|
|
case 'girls':
|
|
|
gender = '2,3';
|
|
|
break;
|
|
|
default:
|
|
|
gender = '1,2,3';
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
return gender;
|
|
|
};
|
|
|
|
|
|
|
|
|
function _getShopData(channel, params, shopInfo) {
|
|
|
params = params || {};
|
|
|
|
|
|
let gender = _getGender(channel),
|
|
|
shopId = params.shopId;
|
|
|
let resData = {shopId: shopId};
|
|
|
|
|
|
return co(function* () {
|
|
|
let result = yield Promise.props({
|
|
|
header: headerModel.requestHeaderData(channel), // 头部数据
|
|
|
sort: this.searchApi.getSortList({shop_id: shopId}),
|
|
|
decorator: this.searchApi.getShopDecorator(shopId), // 店铺装修数据
|
|
|
product: this.searchApi.getProductList(Object.assign({
|
|
|
shop_id: shopId,
|
|
|
need_filter: 'no'
|
|
|
}, params), 'shop'), // 搜索店铺商品
|
|
|
brands: this.searchApi.getShopBrands(shopId), // 店铺品牌数据
|
|
|
coupons: this.api.shopCouponListAsync(shopId), // 店铺优惠券数据
|
|
|
shopInfo: shopInfo ? Promise.resolve(shopInfo) : this.api.getShopInfo(shopId)
|
|
|
});
|
|
|
|
|
|
if (!shopInfo) {
|
|
|
shopInfo = _.get(result, 'shopInfo.data', {});
|
|
|
}
|
|
|
|
|
|
Object.assign(resData,
|
|
|
result.header, // 头部数据
|
|
|
searchHandler.handlePathNavData({brandName: shopInfo.shop_name}, params, 'shop', channel), // 面包屑导航
|
|
|
searchHandler.getBrandShopSeo(channel, {shopName: shopInfo.shop_name}, params) // 店铺SEO
|
|
|
);
|
|
|
|
|
|
_.set(resData, 'headerData.header', true);
|
|
|
|
|
|
// 店铺装修
|
|
|
if (result.decorator.code === 200) {
|
|
|
Object.assign(resData, shopHandler.getShopDecorator(result.decorator.data, params, shopId));
|
|
|
|
|
|
_.set(resData, 'shopTopBanner.brandIntro', {
|
|
|
shopId: shopId,
|
|
|
brandName: shopInfo.shop_name || '',
|
|
|
brandCont: shopInfo.shop_intro || ''
|
|
|
});
|
|
|
} else {
|
|
|
return Promise.reject('No ShopDecorator data');
|
|
|
}
|
|
|
|
|
|
// 获取商品数据和顶部筛选条件
|
|
|
if (result.product.code === 200) {
|
|
|
let data = result.product.data;
|
|
|
let allGoods = {
|
|
|
name: '全部商品 ALL',
|
|
|
sort: searchHandler.handleOptsData(params, _.get(data, 'total', 0)),
|
|
|
list: productProcess.processProductList(_.get(data, 'product_list', []), {
|
|
|
newCoverSort: true,
|
|
|
showDiscount: false,
|
|
|
gender: gender
|
|
|
}),
|
|
|
href: `/product/shoplist?navBar=1&shopId=${shopId}`
|
|
|
};
|
|
|
|
|
|
_.set(allGoods, 'sort.newPage', true); // 启用新的分页导航
|
|
|
|
|
|
resData.allGoods = allGoods;
|
|
|
}
|
|
|
|
|
|
// 店铺类目
|
|
|
if (result.sort.code === 200) {
|
|
|
let groupSort = _.get(result.sort, 'data', []);
|
|
|
|
|
|
resData.leftContent = searchHandler.handleSortData(groupSort, params, params, shopListUrl);
|
|
|
|
|
|
_.set(resData, 'brandShopAd', {baseUrl: shopListUrl});
|
|
|
|
|
|
if (resData.allGoods) {
|
|
|
Object.assign(resData.allGoods, searchHandler.setShopSort(groupSort, Object.assign({},
|
|
|
params, {page: 1})), searchHandler.setGenderFilter(params));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 店铺优惠券
|
|
|
if (result.coupons.data && !_.isEmpty(result.coupons.data)) {
|
|
|
resData.coupon = searchHandler.handleBrandShopCoupons(result.coupons.data, {shopId: shopId});
|
|
|
}
|
|
|
|
|
|
let sknList = []; // 资源位配置商品skn
|
|
|
let prodList = _.concat(_.get(resData, 'newArrivel.list', []),
|
|
|
_.get(resData, 'hotSingle.list', []));
|
|
|
|
|
|
_.forEach(prodList, value => {
|
|
|
sknList.push(value.productSkn);
|
|
|
});
|
|
|
|
|
|
let apiMethod = [
|
|
|
this.searchApi.getProductList({
|
|
|
viewNum: sknList.length,
|
|
|
query: _.join(_.uniq(sknList), ',')
|
|
|
}, 'shop')
|
|
|
];
|
|
|
|
|
|
// 店铺品牌
|
|
|
if (result.brands.code === 200 && result.brands.data) {
|
|
|
let brands = [];
|
|
|
|
|
|
_.forEach(result.brands.data, value => {
|
|
|
brands.push(value.brand_id);
|
|
|
});
|
|
|
|
|
|
resData.shopBrands = brands.join(',');
|
|
|
}
|
|
|
|
|
|
let subRes = yield Promise.all(apiMethod);
|
|
|
|
|
|
// 设置资源位商品封面图
|
|
|
if (subRes[0].code === 200) {
|
|
|
let list = {};
|
|
|
|
|
|
prodList = productProcess.processProductList(_.get(subRes[0], 'data.product_list', []), {
|
|
|
newCoverSort: true,
|
|
|
showDiscount: false,
|
|
|
gender: gender
|
|
|
});
|
|
|
|
|
|
_.forEach(prodList, value => {
|
|
|
list[value.product_skn] = {
|
|
|
img: value.default_images,
|
|
|
title: value.product_name,
|
|
|
price: `¥${value.sales_price}`
|
|
|
};
|
|
|
});
|
|
|
|
|
|
if (_.has(resData, 'newArrivel.list')) {
|
|
|
_.forEach(resData.newArrivel.list, value => {
|
|
|
if (list[value.productSkn]) {
|
|
|
Object.assign(value, list[value.productSkn]);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
if (_.has(resData, 'hotSingle.list')) {
|
|
|
_.forEach(resData.hotSingle.list, value => {
|
|
|
if (list[value.productSkn]) {
|
|
|
Object.assign(value, list[value.productSkn]);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
resData.trendInfo = true; // 展示店铺推荐文章
|
|
|
|
|
|
return resData;
|
|
|
}).bind(this)();
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取基础模板店铺数据
|
|
|
*/
|
|
|
function _getBaseShopData(channel, params, shopInfo) {
|
|
|
params = params || {};
|
|
|
|
|
|
let searchParams = searchHandler.getSearchParams(params);
|
|
|
let shopId = params.shopId;
|
|
|
|
|
|
return co(function* () {
|
|
|
let result = yield Promise.props({
|
|
|
header: headerModel.requestHeaderData(channel), // 头部数据
|
|
|
sort: this.searchApi.getSortList({shop_id: shopId}),
|
|
|
decorator: this.searchApi.getShopDecorator(shopId), // 店铺装修数据
|
|
|
product: this.searchApi.getProductList(Object.assign(searchParams,
|
|
|
{shop_id: shopId}), 'shop'), // 搜索店铺商品
|
|
|
coupons: this.api.shopCouponListAsync(shopId), // 店铺优惠券数据
|
|
|
shopInfo: shopInfo ? Promise.resolve(shopInfo) : this.api.getShopInfo(shopId)
|
|
|
});
|
|
|
|
|
|
if (!shopInfo) {
|
|
|
shopInfo = _.get(result, 'shopInfo.data', {});
|
|
|
}
|
|
|
|
|
|
const shopName = shopInfo.shop_name;
|
|
|
|
|
|
let resData = {
|
|
|
shopId: shopId,
|
|
|
brand: Object.assign({brandShopAd: true},
|
|
|
searchHandler.handlePathNavData({brandName: shopName}, params, 'shop', channel))
|
|
|
};
|
|
|
|
|
|
Object.assign(resData,
|
|
|
result.header, // 头部数据
|
|
|
searchHandler.getBrandShopSeo(channel, {shopName: shopName}, params));
|
|
|
|
|
|
_.set(resData, 'headerData.header', true);
|
|
|
_.set(resData, 'brand.shopBanner', {
|
|
|
shopId: shopId,
|
|
|
shopName: shopName,
|
|
|
shopHome: `/?shopId=${shopId}`,
|
|
|
shopIntro: `/shop${shopId}-about`
|
|
|
});
|
|
|
|
|
|
// 店铺装修
|
|
|
if (result.decorator.code === 200) {
|
|
|
let data = result.decorator.data || {},
|
|
|
decorator = shopHandler.getShopDecorator(data, {}, shopId, true);
|
|
|
|
|
|
Object.assign(resData.brand.shopBanner, decorator.shopTopBannerBase || {});
|
|
|
|
|
|
// 设置店招高度
|
|
|
_.set(resData, 'brand.shopBanner.bannerHeight', 150);
|
|
|
|
|
|
if (decorator.signboard) {
|
|
|
_.set(resData, 'brand.signboard', decorator.signboard);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 获取左侧类目数据
|
|
|
if (result.sort.code === 200) {
|
|
|
let dps = {shopId: shopId};
|
|
|
|
|
|
_.forEach(needParams, value => {
|
|
|
if (params[value]) {
|
|
|
dps[value] = params[value];
|
|
|
}
|
|
|
});
|
|
|
|
|
|
Object.assign(resData.brand, {
|
|
|
leftContent: searchHandler.handleSortData(result.sort.data, dps, params)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 获取商品数据和顶部筛选条件
|
|
|
if (result.product.code === 200) {
|
|
|
let data = result.product.data;
|
|
|
let filters = Object.assign(searchHandler.handleFilterDataAll(data, params),
|
|
|
resData.brand.leftContent.sort);
|
|
|
|
|
|
filters.checkedConditions.conditions = _.concat(filters.checkedConditions.conditions,
|
|
|
resData.brand.leftContent.checked);
|
|
|
|
|
|
Object.assign(resData.brand, {
|
|
|
filters: filters,
|
|
|
opts: searchHandler.handleOptsData(params, data.total, data.filter),
|
|
|
totalCount: data.total,
|
|
|
footPager: searchHandler.handlePagerData(data.total, params),
|
|
|
goods: productProcess.processProductList(data.product_list,
|
|
|
Object.assign({showDiscount: false, from: {type: 'shop', params: params}}, params)),
|
|
|
hasNextPage: searchHandler.handleNextPage(params, data.total),
|
|
|
|
|
|
// 最近浏览记录
|
|
|
latestWalk: 7
|
|
|
});
|
|
|
|
|
|
// 店铺页不显示品牌筛选项
|
|
|
_.unset(resData, 'brand.filters.brand');
|
|
|
}
|
|
|
|
|
|
// 店铺优惠券
|
|
|
if (result.coupons && !_.isEmpty(result.coupons.data)) {
|
|
|
_.set(resData, 'brand.coupon',
|
|
|
searchHandler.handleBrandShopCoupons(result.coupons.data, {shopId: shopId}));
|
|
|
}
|
|
|
|
|
|
return resData;
|
|
|
}).bind(this)();
|
|
|
}
|
|
|
|
|
|
function getShopInfoAsync(domain, channel, params) {
|
|
|
let resData;
|
|
|
let shopId = _.get(params, 'shopId');
|
|
|
|
|
|
return co(function* () {
|
|
|
let data, shopInfo;
|
|
|
|
|
|
_.unset(params, 'domain');
|
|
|
domain = _.toLower(domain);
|
|
|
|
|
|
if (shopId) { // 带id访问
|
|
|
let result = yield this.api.getShopInfo(shopId);
|
|
|
|
|
|
data = result.data;
|
|
|
|
|
|
// 根据店铺ID,未取到店铺信息,跳转至首页
|
|
|
if (result.code !== 200 || _.isEmpty(data)) {
|
|
|
return {redirect: helpers.urlFormat('')};
|
|
|
}
|
|
|
|
|
|
let lowResDomain = _.toLower(data.shop_domain);
|
|
|
|
|
|
// 根据店铺ID取到的店铺domain与链接中domain不一致,跳转至店铺域名下(解决店铺域名与品牌域名混用的问题)
|
|
|
if (lowResDomain !== domain) {
|
|
|
return {redirect: helpers.urlFormat('', params, lowResDomain)};
|
|
|
}
|
|
|
|
|
|
shopInfo = data;
|
|
|
} else { // 以店铺域名方式直接访问
|
|
|
let result = yield this.searchApi.getBrandData({domain: domain});
|
|
|
|
|
|
data = result.data;
|
|
|
|
|
|
// 未取到domain信息,跳转至首页
|
|
|
if (result.code !== 200) {
|
|
|
return {redirect: helpers.urlFormat('')};
|
|
|
}
|
|
|
|
|
|
// domain类型不为店铺,跳转至搜索
|
|
|
if (data.type * 1 !== 2) {
|
|
|
let d = {query: domain};
|
|
|
|
|
|
if (data.id) {
|
|
|
d.brand = data.id;
|
|
|
}
|
|
|
|
|
|
return {redirect: helpers.urlFormat('', d, 'search')};
|
|
|
}
|
|
|
|
|
|
params.shopId = data.shop_id;
|
|
|
}
|
|
|
|
|
|
if (+data.shop_template_type === 2) { // 经典店铺
|
|
|
resData = yield this._getShopData(channel, params, shopInfo);
|
|
|
} else {
|
|
|
resData = yield this._getBaseShopData(channel, params, shopInfo);
|
|
|
}
|
|
|
|
|
|
return Object.assign(resData, {templateType: +data.shop_template_type});
|
|
|
}).bind(this)();
|
|
|
}
|
|
|
|
|
|
function getShopListInfoAsync(channel, params) {
|
|
|
let gender = _getGender(channel),
|
|
|
shopId = params.shopId,
|
|
|
navBar = params.navBar || 1;
|
|
|
|
|
|
let searchParams = searchHandler.getSearchParams(params);
|
|
|
|
|
|
return co(function* () {
|
|
|
let result = yield Promise.props({
|
|
|
header: headerModel.requestHeaderData(channel), // 头部数据
|
|
|
shopInfo: this.api.getShopInfo(shopId), // 店铺介绍
|
|
|
decorator: this.searchApi.getShopDecorator(shopId), // 店铺装修数据
|
|
|
sort: this.searchApi.getSortList({shop_id: shopId}),
|
|
|
product: this.searchApi.getProductList(Object.assign(searchParams,
|
|
|
{shop_id: shopId}), 'shop'), // 搜索店铺商品
|
|
|
|
|
|
// 如果有店内搜索,则并行查询店铺所有商品,搜索不到商品则显示所有商品
|
|
|
allProduct: params.query ? this.searchApi.getProductList(Object.assign(searchParams,
|
|
|
{shop_id: shopId, query: ''}), 'shop') : Promise.resolve({})
|
|
|
});
|
|
|
|
|
|
let resData = {headerData: Object.assign(result.header.headerData, {header: true})};
|
|
|
|
|
|
Object.assign(resData, searchHandler.handlePathNavData({}, params, 'shop', channel));
|
|
|
|
|
|
// 店铺装修
|
|
|
if (result.decorator.code === 200) {
|
|
|
Object.assign(resData, shopHandler.getShopDecorator(result.decorator.data, params, shopId));
|
|
|
|
|
|
// 设置shop nav选中状态
|
|
|
_.set(resData, `navigationBar[${navBar}].current`, true);
|
|
|
|
|
|
if (result.shopInfo.code === 200) {
|
|
|
let data = _.get(result, 'shopInfo.data', {});
|
|
|
|
|
|
_.set(resData, 'shopTopBanner.brandIntro', {
|
|
|
shopId: shopId,
|
|
|
brandName: data.shop_name || '',
|
|
|
brandCont: data.shop_intro || ''
|
|
|
});
|
|
|
|
|
|
// 店铺SEO
|
|
|
Object.assign(resData, searchHandler.getBrandShopSeo(channel, {
|
|
|
shopName: data.shop_name
|
|
|
}, params));
|
|
|
}
|
|
|
} else {
|
|
|
return Promise.reject('No ShopDecorator data');
|
|
|
}
|
|
|
|
|
|
// 获取商品数据和顶部筛选条件
|
|
|
if (result.product.code === 200) {
|
|
|
let info = result.product;
|
|
|
let goodsList = _.get(info, 'data.product_list', []);
|
|
|
|
|
|
if (goodsList.length) {
|
|
|
let totalPage = _.get(info, 'data.total', 1);
|
|
|
|
|
|
Object.assign(resData, {
|
|
|
filters: searchHandler.handleFilterDataAll(info.data, params),
|
|
|
opts: searchHandler.handleOptsData(params, totalPage),
|
|
|
goods: productProcess.processProductList(goodsList, {
|
|
|
newCoverSort: true,
|
|
|
showDiscount: false,
|
|
|
gender: _getGender(channel),
|
|
|
query: params.query
|
|
|
}),
|
|
|
hasNextPage: searchHandler.handleNextPage(params, totalPage),
|
|
|
footPager: searchHandler.handlePagerData(totalPage, params)
|
|
|
});
|
|
|
|
|
|
_.set(resData, 'filters.checkedConditions.clearUrl',
|
|
|
`?navBar=${params.navBar}&shopId=${params.shopId}`);
|
|
|
} else {
|
|
|
resData.searchEmpty = true;
|
|
|
|
|
|
let data = _.get(result, 'allProduct.data.total', 0);
|
|
|
let plist = _.get(data, 'product_list', []);
|
|
|
|
|
|
if (params.query && plist.length) {
|
|
|
resData.allGoods = {
|
|
|
name: '全部商品 ALL',
|
|
|
sort: searchHandler.handleOptsData(params, data.total || 0),
|
|
|
list: productProcess.processProductList(plist, {
|
|
|
newCoverSort: true,
|
|
|
showDiscount: false,
|
|
|
gender: gender
|
|
|
})
|
|
|
};
|
|
|
|
|
|
_.set(resData.allGoods, 'sort.newPage', true); // 启用新的分页导航
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (result.sort.code === 200) {
|
|
|
let groupSort = _.get(result.sort, 'data', []),
|
|
|
noPageQs = Object.assign({}, params, {page: 1});
|
|
|
|
|
|
resData.leftContent = searchHandler.handleSortData(groupSort, noPageQs, params);
|
|
|
|
|
|
_.set(resData, 'brandShopAd', {baseUrl: shopListUrl});
|
|
|
|
|
|
if (resData.allGoods) {
|
|
|
Object.assign(resData.allGoods, searchHandler.setShopSort(groupSort, noPageQs));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
resData.criteo = {skn: searchHandler.getCriteo(_.get(resData, 'goods'))};
|
|
|
|
|
|
return resData;
|
|
|
}).bind(this)();
|
|
|
}
|
|
|
|
|
|
function getShopGoodsData(shopId, channel, params) {
|
|
|
let gender = _getGender(channel);
|
|
|
let resData = {};
|
|
|
|
|
|
_.unset(params, '_pjax');
|
|
|
return Promise.all([
|
|
|
this.searchApi.getProductList(Object.assign({shop_id: shopId}, params), 'shop'), // 搜索店铺商品
|
|
|
this.searchApi.getSortList({shop_id: shopId}) // 根据店铺id获取分类
|
|
|
]).then(result => {
|
|
|
// 获取商品数据和顶部筛选条件
|
|
|
if (result[0].code === 200) {
|
|
|
Object.assign(resData, {
|
|
|
sort: searchHandler.handleOptsData(params, _.get(result[0], 'data.total', 0)),
|
|
|
list: productProcess.processProductList(_.get(result[0], 'data.product_list', []), {
|
|
|
newCoverSort: true,
|
|
|
showDiscount: false,
|
|
|
gender: gender
|
|
|
})
|
|
|
});
|
|
|
_.set(resData, 'sort.newPage', true); // 启用新的分页导航
|
|
|
}
|
|
|
|
|
|
if (result[1].code === 200) {
|
|
|
let groupSort = _.get(result[1], 'data', []);
|
|
|
|
|
|
Object.assign(resData, searchHandler.setShopSort(groupSort, Object.assign({}, params,
|
|
|
{page: 1})), searchHandler.setGenderFilter(params));
|
|
|
}
|
|
|
|
|
|
return resData;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
module.exports = class extends global.yoho.BaseModel {
|
|
|
constructor(ctx) {
|
|
|
super(ctx);
|
|
|
this.api = new Api(ctx);
|
|
|
this.searchApi = new SearchApi(ctx);
|
|
|
|
|
|
this._getShopData = _getShopData.bind(this);
|
|
|
this._getBaseShopData = _getBaseShopData.bind(this);
|
|
|
|
|
|
this.getShopInfoAsync = getShopInfoAsync.bind(this);
|
|
|
this.getShopListInfoAsync = getShopListInfoAsync.bind(this);
|
|
|
this.getShopGoodsData = getShopGoodsData.bind(this);
|
|
|
}
|
|
|
|
|
|
getShopBannerAsync(shopId) {
|
...
|
...
|
@@ -27,7 +543,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
}
|
|
|
|
|
|
queryShopByBrandIdAsync(sid, bid) {
|
|
|
return co(function * () {
|
|
|
return co(function* () {
|
|
|
let result = yield this.api.queryShopsByBrandId(sid, bid);
|
|
|
|
|
|
if (_.get(result, 'code') !== 200) {
|
...
|
...
|
@@ -37,4 +553,42 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
return _.get(result, 'data[0]', {});
|
|
|
}).bind(this)();
|
|
|
}
|
|
|
|
|
|
|
|
|
getShopArticleByBrandsAsync(brands) {
|
|
|
let resData = {};
|
|
|
|
|
|
brands = _.split(brands, ',');
|
|
|
|
|
|
if (!brands.length) {
|
|
|
return Promise.resolve(resData);
|
|
|
}
|
|
|
|
|
|
return Promise.all(brands.map(value => this.searchApi.getArticleByBrand(value))).then(result => {
|
|
|
let articleList = [];
|
|
|
|
|
|
for (let i = 0; i < result.length; i++) {
|
|
|
articleList = _.concat(articleList, _.get(result[i], 'data', []));
|
|
|
}
|
|
|
|
|
|
if (articleList.length >= 3) {
|
|
|
articleList.length = 3;
|
|
|
|
|
|
resData.trendInfo = {
|
|
|
name: '潮流资讯 HOT ITEMS',
|
|
|
trendList: articleList.map(value => {
|
|
|
return {
|
|
|
href: helpers.urlFormat(`/guang/${value.id}.html`, null),
|
|
|
src: helpers.getForceSourceUrl(value.src) +
|
|
|
'?imageView2/1/w/{width}/h/{height}',
|
|
|
mainTitle: value.title,
|
|
|
Subtitle: value.intro
|
|
|
};
|
|
|
})
|
|
|
};
|
|
|
}
|
|
|
|
|
|
return resData;
|
|
|
});
|
|
|
}
|
|
|
}; |
...
|
...
|
|