Authored by 匡佳华

优惠券详情页添加展示范围

... ... @@ -383,7 +383,22 @@
</div>
</div>
</div>
</div>
<div class="panel-heading">
<h4 class="panel-title">展示范围</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">展示范围</label>
<div class="col-sm-8">
<p>[[showScope]]</p>
</div>
</div>
</div>
</div>
</div>
</script>
... ...
... ... @@ -20,8 +20,8 @@ new common.dropDown({el: '#filter-feeSharingType'});
var couponTypes = ["活动券", "B券", "券码", "生日券", "免邮券", "店铺券", "分享券", "会员营销券"];
var useLimitTypes = ["无限制", "货物件数限制", "订单金额限制"];
// var customTypes = ["新客户", "银卡会员", "金卡会员", "白金卡会员", "普通用户(不含新客)"];
var customTypes = {1: "新客户", 2: "银卡会员", 3: "金卡会员", 4: "白金卡会员", 5: "普通用户(不含新客)", 9: "学生"};
var showScopes = {1: "购物车展示", 2: "详情页展示", 3:"店铺展示"}
var shopPriceLimitsTable = {1: "成交价低于吊牌价三折", 2: "限量商品"};
var thirdTypeEnum = {1: "微信", 2: "支付宝", 3: "微薄"};
... ... @@ -379,6 +379,20 @@ $(document).on('click', '.coupon-info', function () {
item1.customType = "无";
}
//优惠券展示范围
if (item1.showScope) {
console.info("showScope:" + item1.showScope);
item1.showScope = item1.showScope.split(",");
var scopeLen = item1.showScope.length;
var scopes = [];
for(var i = 0; i < scopeLen; i++){
scopes.push(showScopes[item1.showScope[i]]);
}
item1.showScope = scopes.join(",")
}else {
item1.showScope = "无"
}
// shopPriceLimitsTable
if (item1.shopPriceLimits) {
item1.shopPriceLimits = item1.shopPriceLimits.split(",");
... ...