Authored by leo

Merge branch 'dev_店铺装修配置默认新品' into grey

... ... @@ -85,7 +85,7 @@
<label class="col-sm-2">推荐商品(以英文逗号分隔,最多8): </label>
<div class="col-sm-10">
<input type="text" class="form-control model-default-hotproduct" placeholder="请输入推荐商品,以英文逗号分隔,最多8个SKN"
value="[[resources.defaultHotProducts ? resources.defaultHotProducts.data : '']]" maxlength="90">
value="[[resources.defaultHotProducts && resources.defaultHotProducts.data ? resources.defaultHotProducts.data.toString() : '']]" maxlength="90">
</div>
</div>
<div class="model-main-right-default"></div>
... ...
... ... @@ -1957,6 +1957,8 @@ $(document).on('change', '.model-default-hotproduct', function() {
return;
}
item = +item;
// 最多只能8个SKN
if(skns.length >= 8) {
return;
... ... @@ -1975,7 +1977,7 @@ $(document).on('change', '.model-default-hotproduct', function() {
if(sknList.length === 0) {
if(jsonMain.resources.defaultHotProducts) {
jsonMain.resources.defaultHotProducts.data = '';
jsonMain.resources.defaultHotProducts.data = [];
}
return;
}
... ... @@ -1996,7 +1998,7 @@ $(document).on('change', '.model-default-hotproduct', function() {
if(hotProductResource === undefined) {
hotProductResource = {};
}
hotProductResource.data = sknList;
hotProductResource.data = skns;
jsonMain.resources.defaultHotProducts = hotProductResource;
}
}
... ...