Authored by 郭成尧

折扣筛选

... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2016-05-30 16:20:03
* @Last Modified by: Targaryen
* @Last Modified time: 2016-06-03 18:41:32
* @Last Modified time: 2016-06-03 18:43:34
*/
'use strict';
... ... @@ -116,8 +116,7 @@ exports.getOutletsChannelData = (params) => {
// 限时嗨购
if (result[2].code === 200) {
channelData.nearOver = outletsProcess.handleOutletsActivityData(result[2].data);
channelData.nearOver.name = '限时嗨购';
channelData.nearOver = outletsProcess.handleOutletsActivityData(result[2].data, '限时嗨购');
}
// 商品列表
... ...
... ... @@ -46,7 +46,7 @@ exports.processProductList = (list, options) => {
if (product.marketPrice === product.salesPrice) {
product.marketPrice = false;
} else if (product.marketPrice && product.salesPrice) {
product.discount = (product.salesPrice / product.marketPrice).toFixed(2) * 10;
product.discount = (product.salesPrice / product.marketPrice * 10).toFixed(1);
}
// 判别默认的商品是否将默认的图片URL赋值到skn
... ... @@ -96,7 +96,7 @@ exports.processProductList = (list, options) => {
// APP访问需要加附加的参数
// 备注:如果以后APP的接口太多,可以把这边参数提取出来,变成一个公共的方法来生成,便于以后管理维护
if (options.isApp) {
product.url += `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":'${product.productId}'}}`; // eslint-disable-line
product.url += `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":'${product.productId}'}}`; // eslint-disable-line
}
if (options.showTags) {
... ... @@ -114,7 +114,7 @@ exports.processProductList = (list, options) => {
if (product.isSoonSoldOut && product.tags.isDiscount) {
product.tags.isNew = false;
} else if (product.tags.isDiscount &&
(product.tags.isNew || product.tags.isLimited || product.tags.isYohood || product.tags.isAdvance)) {
(product.tags.isNew || product.tags.isLimited || product.tags.isYohood || product.tags.isAdvance)) {
// 打折与其它组合则隐藏打折
product.tags.isDiscount = false;
} else if (product.tags.isYohood && product.tags.isNew) {
... ...