Authored by OF1706

coupons list

... ... @@ -53,23 +53,15 @@ const getCouponsList = (uid, type, page, limit)=>{
result[i].value = item.couponValue;
result[i].validity = item.couponValidity;
result[i].useRemark = item.couponDetailInfomation;
if (!_.isEmpty(item.sortNameLimit)) {
result[i].categorys = item.sortNameLimit.join('、');
}
if (!_.isEmpty(item.brandNameLimit)) {
result[i].brands = item.brandNameLimit.join('、');
}
if (limits.indexOf('1') >= 0) {
extra.push('3折以下');
}
if (limits.indexOf('2') >= 0) {
extra.push('限量');
}
result[i].extraPro = extra.join('、');
result[i].isNoLimit = item.isNoLimit === 'true' ? true : false;
result[i].explains = _.isEmpty(item.explains) ? false : item.explains;
result[i].proListUrl = helpers.urlFormat('', {cpc_id: item.couponId,
result[i].notes = item.notes;
result[i].proListUrl = helpers.urlFormat('', {cpc_id: item.couponId,coupon_code: item.couponCode,
phrase: encodeURIComponent('以下商品可使用 【' + item.couponDetailInfomation + '】优惠券')}, 'list');
result[i].rule = item.rule4ShortName || '';
result[i].overState = item.overState || '';
... ...
... ... @@ -41,11 +41,7 @@
</div>
<div class="coupons-info">
<div class="coupons-text">
{{#categorys}}<p>限品类:{{.}}</p>{{/categorys}}
{{#brands}}<p>限品牌:{{.}}</p>{{/brands}}
{{#if isNoLimit}}<p>全场通用</p>{{/if}}
<p>特例商品({{extraPro}}等特例商品)暂不支持使用优惠券。</p>
{{#explains}}<p>说明:{{.}}</p>{{/explains}}
{{notes}}
</div>
</div>
<div class="coupons-opt">
... ...
... ... @@ -1656,9 +1656,10 @@ exports.getSearchParams = params => {
}
// 优惠券商品列表
if (params && params.cpc_id) {
if (params && params.cpc_id && params.coupon_code) {
Object.assign(nparams, {
coupon_id: params.cpc_id,
coupon_code: params.coupon_code,
method: 'app.search.coupon'
});
}
... ...
... ... @@ -233,9 +233,10 @@ exports.getBrands4Filter = (params) => {
}
// 优惠券商品列表
if (params && params.cpc_id) {
if (params && params.cpc_id && params.coupon_code) {
Object.assign(nparams, {
coupon_id: params.cpc_id,
coupon_code: params.coupon_code,
method: 'app.coupon.aggBrand'
});
}
... ...