Authored by chaogeng

Merge branch 'dev_6.0逛优化' into test6.0

@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 <div class="form-group"> 40 <div class="form-group">
41 <label for="advertCode" class="col-sm-2 control-label">广告码:</label> 41 <label for="advertCode" class="col-sm-2 control-label">广告码:</label>
42 <div class="col-sm-10"> 42 <div class="col-sm-10">
43 - <input type="text" value="[[advertCode]]" name="content" id="advertCode" placeholder="广告码" required="required" class="form-control"> 43 + <input type="text" value="[[advertCode||'']]" name="content" id="advertCode" placeholder="广告码" class="form-control">
44 </div> 44 </div>
45 </div> 45 </div>
46 46
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 </select> 52 </select>
53 </div> 53 </div>
54 <div class="col-sm-2"> 54 <div class="col-sm-2">
55 - <select class="form-control" id="minSortId"> 55 + <select class="form-control" id="minSortId" required>
56 <option value="[[minSortId||'-1']]">[[minSortName||'请选择二级分类']]</option> 56 <option value="[[minSortId||'-1']]">[[minSortName||'请选择二级分类']]</option>
57 </select> 57 </select>
58 </div> 58 </div>
@@ -556,6 +556,7 @@ @@ -556,6 +556,7 @@
556 </div> 556 </div>
557 <div class="col-sm-5"> 557 <div class="col-sm-5">
558 <a id="search" class="go-search btn btn-primary">搜索商品</a> 558 <a id="search" class="go-search btn btn-primary">搜索商品</a>
  559 + <a id="searchLimit" class="go-search btn btn-primary">搜限购商品</a>
559 <a id="searchBLK" class="go-search btn btn-primary">BLK商品</a> 560 <a id="searchBLK" class="go-search btn btn-primary">BLK商品</a>
560 <a id="searchGlobal" class="go-search btn btn-primary">搜全球购</a> 561 <a id="searchGlobal" class="go-search btn btn-primary">搜全球购</a>
561 </div> 562 </div>
@@ -608,7 +609,7 @@ @@ -608,7 +609,7 @@
608 </div> 609 </div>
609 </div> 610 </div>
610 611
611 - <div class="gird" id="goodsgird" appType="0" containGlobal="N" is_global="N"> 612 + <div class="gird" id="goodsgird" appType="0" containGlobal="N" is_global="N" isLimitBuy="N">
612 </div> 613 </div>
613 </div> 614 </div>
614 </script> 615 </script>
@@ -146,7 +146,12 @@ function articleCategoryOP(prefix, url, item) { @@ -146,7 +146,12 @@ function articleCategoryOP(prefix, url, item) {
146 $('#maxsord').show(); 146 $('#maxsord').show();
147 new common.dropDown({ 147 new common.dropDown({
148 el: "#parentId", 148 el: "#parentId",
149 - ajax: 'guangGetSortList' 149 + ajax: 'guangGetSortList',
  150 + params: function () {
  151 + return {
  152 + parentId: 0
  153 + };
  154 + }
150 }); 155 });
151 } else { 156 } else {
152 $('#maxsord').hide(); 157 $('#maxsord').hide();
@@ -803,22 +803,41 @@ var goodsgird = new common.grid({ @@ -803,22 +803,41 @@ var goodsgird = new common.grid({
803 var appType = $("#goodsgird").attr("appType"); 803 var appType = $("#goodsgird").attr("appType");
804 var containGlobal = $("#goodsgird").attr("containGlobal"); 804 var containGlobal = $("#goodsgird").attr("containGlobal");
805 var isGlobal = $("#goodsgird").attr("isGlobal"); 805 var isGlobal = $("#goodsgird").attr("isGlobal");
806 - return {  
807 - status: 1,  
808 - sales: "Y",  
809 - stocknumber: "1",  
810 - attribute_not: "2",  
811 - query: common.util.__input('skns'),  
812 - price: price,  
813 - color: Bll2.getIds(Bll.sorts[0].list),  
814 - style: Bll2.getIds(Bll.sorts[1].list),//风格先不管  
815 - msort: Bll2.getIds(Bll.sorts[2].list),  
816 - brand: Bll2.getIds(Bll.sorts[3].list),  
817 - gender: Bll2.getIds(Bll.sorts[4].list),  
818 - app_type:appType,  
819 - contain_global:containGlobal,  
820 - is_global:isGlobal  
821 - }; 806 + var isLimitBuy = $("#goodsgird").attr("isLimitBuy");
  807 + if(isLimitBuy == 'N'){
  808 + return {
  809 + status: 1,
  810 + sales: "Y",
  811 + stocknumber: "1",
  812 + attribute_not: "2",
  813 + query: common.util.__input('skns'),
  814 + price: price,
  815 + color: Bll2.getIds(Bll.sorts[0].list),
  816 + style: Bll2.getIds(Bll.sorts[1].list),//风格先不管
  817 + msort: Bll2.getIds(Bll.sorts[2].list),
  818 + brand: Bll2.getIds(Bll.sorts[3].list),
  819 + gender: Bll2.getIds(Bll.sorts[4].list),
  820 + app_type:appType,
  821 + contain_global:containGlobal,
  822 + is_global:isGlobal
  823 + };
  824 + }else {
  825 + return {
  826 + isLimitbuy: "Y",
  827 + attribute_not: "2",
  828 + query: common.util.__input('skns'),
  829 + price: price,
  830 + color: Bll2.getIds(Bll.sorts[0].list),
  831 + style: Bll2.getIds(Bll.sorts[1].list),//风格先不管
  832 + msort: Bll2.getIds(Bll.sorts[2].list),
  833 + brand: Bll2.getIds(Bll.sorts[3].list),
  834 + gender: Bll2.getIds(Bll.sorts[4].list),
  835 + /*app_type:appType,*/
  836 + contain_global:containGlobal,
  837 + is_global:isGlobal
  838 + };
  839 + }
  840 +
822 }, 841 },
823 columns: [ 842 columns: [
824 { 843 {
@@ -1035,6 +1054,23 @@ $(document).on("click", "#search", function () { @@ -1035,6 +1054,23 @@ $(document).on("click", "#search", function () {
1035 $("#goodsgird").attr("appType","0"); 1054 $("#goodsgird").attr("appType","0");
1036 $("#goodsgird").attr("containGlobal","N"); 1055 $("#goodsgird").attr("containGlobal","N");
1037 $("#goodsgird").attr("isGlobal","N"); 1056 $("#goodsgird").attr("isGlobal","N");
  1057 + $("#goodsgird").attr("isLimitBuy","N");
  1058 + if (goodsgird.grid) {
  1059 + goodsgird.reload(1);
  1060 + } else {
  1061 + goodsgird.init('/yohosearch/search');
  1062 + }
  1063 +});
  1064 +
  1065 +/**
  1066 + * 手动输入中“搜限购商品”按钮
  1067 + */
  1068 +$(document).on("click", "#searchLimit", function () {
  1069 + $(".goods-list").show();
  1070 + $("#goodsgird").attr("appType","0");
  1071 + $("#goodsgird").attr("containGlobal","N");
  1072 + $("#goodsgird").attr("isGlobal","N");
  1073 + $("#goodsgird").attr("isLimitBuy","Y");
1038 if (goodsgird.grid) { 1074 if (goodsgird.grid) {
1039 goodsgird.reload(1); 1075 goodsgird.reload(1);
1040 } else { 1076 } else {
@@ -1050,6 +1086,7 @@ $(document).on("click", "#searchBLK", function () { @@ -1050,6 +1086,7 @@ $(document).on("click", "#searchBLK", function () {
1050 $("#goodsgird").attr("appType","1"); 1086 $("#goodsgird").attr("appType","1");
1051 $("#goodsgird").attr("containGlobal","N"); 1087 $("#goodsgird").attr("containGlobal","N");
1052 $("#goodsgird").attr("isGlobal","N"); 1088 $("#goodsgird").attr("isGlobal","N");
  1089 + $("#goodsgird").attr("isLimitBuy","N");
1053 if (goodsgird.grid) { 1090 if (goodsgird.grid) {
1054 goodsgird.reload(1); 1091 goodsgird.reload(1);
1055 } else { 1092 } else {
@@ -1065,6 +1102,7 @@ $(document).on("click", "#searchGlobal", function () { @@ -1065,6 +1102,7 @@ $(document).on("click", "#searchGlobal", function () {
1065 $("#goodsgird").attr("appType",""); 1102 $("#goodsgird").attr("appType","");
1066 $("#goodsgird").attr("containGlobal","Y"); 1103 $("#goodsgird").attr("containGlobal","Y");
1067 $("#goodsgird").attr("isGlobal","Y"); 1104 $("#goodsgird").attr("isGlobal","Y");
  1105 + $("#goodsgird").attr("isLimitBuy","N");
1068 if (goodsgird.grid) { 1106 if (goodsgird.grid) {
1069 goodsgird.reload(1); 1107 goodsgird.reload(1);
1070 } else { 1108 } else {
@@ -37,7 +37,12 @@ new common.dropDown({ @@ -37,7 +37,12 @@ new common.dropDown({
37 37
38 new common.dropDown({ 38 new common.dropDown({
39 el: "#maxSortId", 39 el: "#maxSortId",
40 - ajax: 'guangGetSortList' 40 + ajax: 'guangGetSortList',
  41 + params: function () {
  42 + return {
  43 + parentId: 0
  44 + };
  45 + }
41 }); 46 });
42 47
43 new common.dropDown({ 48 new common.dropDown({