Authored by leo

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

@@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
85 <label class="col-sm-2">推荐商品(以英文逗号分隔,最多8): </label> 85 <label class="col-sm-2">推荐商品(以英文逗号分隔,最多8): </label>
86 <div class="col-sm-10"> 86 <div class="col-sm-10">
87 <input type="text" class="form-control model-default-hotproduct" placeholder="请输入推荐商品,以英文逗号分隔,最多8个SKN" 87 <input type="text" class="form-control model-default-hotproduct" placeholder="请输入推荐商品,以英文逗号分隔,最多8个SKN"
88 - value="[[resources.defaultHotProducts ? resources.defaultHotProducts.data : '']]" maxlength="90"> 88 + value="[[resources.defaultHotProducts && resources.defaultHotProducts.data ? resources.defaultHotProducts.data.toString() : '']]" maxlength="90">
89 </div> 89 </div>
90 </div> 90 </div>
91 <div class="model-main-right-default"></div> 91 <div class="model-main-right-default"></div>
@@ -1957,6 +1957,8 @@ $(document).on('change', '.model-default-hotproduct', function() { @@ -1957,6 +1957,8 @@ $(document).on('change', '.model-default-hotproduct', function() {
1957 return; 1957 return;
1958 } 1958 }
1959 1959
  1960 + item = +item;
  1961 +
1960 // 最多只能8个SKN 1962 // 最多只能8个SKN
1961 if(skns.length >= 8) { 1963 if(skns.length >= 8) {
1962 return; 1964 return;
@@ -1975,7 +1977,7 @@ $(document).on('change', '.model-default-hotproduct', function() { @@ -1975,7 +1977,7 @@ $(document).on('change', '.model-default-hotproduct', function() {
1975 1977
1976 if(sknList.length === 0) { 1978 if(sknList.length === 0) {
1977 if(jsonMain.resources.defaultHotProducts) { 1979 if(jsonMain.resources.defaultHotProducts) {
1978 - jsonMain.resources.defaultHotProducts.data = ''; 1980 + jsonMain.resources.defaultHotProducts.data = [];
1979 } 1981 }
1980 return; 1982 return;
1981 } 1983 }
@@ -1996,7 +1998,7 @@ $(document).on('change', '.model-default-hotproduct', function() { @@ -1996,7 +1998,7 @@ $(document).on('change', '.model-default-hotproduct', function() {
1996 if(hotProductResource === undefined) { 1998 if(hotProductResource === undefined) {
1997 hotProductResource = {}; 1999 hotProductResource = {};
1998 } 2000 }
1999 - hotProductResource.data = sknList; 2001 + hotProductResource.data = skns;
2000 jsonMain.resources.defaultHotProducts = hotProductResource; 2002 jsonMain.resources.defaultHotProducts = hotProductResource;
2001 } 2003 }
2002 } 2004 }