diff --git a/client/js/common/grid.js b/client/js/common/grid.js index 6bee41d..4c02e67 100644 --- a/client/js/common/grid.js +++ b/client/js/common/grid.js @@ -107,33 +107,26 @@ grid.prototype = { } }); - if (!p.page && !urlParam.page) p.page = 1; - if (!p.size && !urlParam.size) p.size = 10; - + $.each(urlParam, function(key, value) { + if (!param[key]) { + param[key] = value; + } + }); if (param.page !== p.page) { param.page = p.page; } else { param.page = urlParam.page; } - if (!param.size) { - param.size = urlParam.size; - } - - if (!param.productStatusStr) { - param.productStatusStr = urlParam.productStatusStr; - } - if (param.productStatusStr == 'all') { param.productStatusStr = ''; } + if (param.isInfoMiss == 'N') { + param.isInfoMiss = ''; + } var urlHash = ''; $.each(param, function(key, value) { - urlParam[key]=value; - }); - - $.each(urlParam, function(key, value) { if (value || value == '0') { urlHash += key + '=' + value + '&&'; } @@ -227,12 +220,12 @@ grid.prototype = { // p.complete && p.complete(); }, error: function(res) { - console.log("error~~",res); + console.log("error~~", res); clearTimeout(timeid); - if (res.status==429) { - timeid=setTimeout(function(){ + if (res.status == 429) { + timeid = setTimeout(function() { g.reload(); - },800); + }, 800); } g.__pagination({ total: 0, diff --git a/client/js/goods/netsale.js b/client/js/goods/netsale.js index b29d733..729ac4a 100644 --- a/client/js/goods/netsale.js +++ b/client/js/goods/netsale.js @@ -82,7 +82,8 @@ var g = new common.grid({ productStatus: common.util.__input("productStatus"), size: common.util.__input("size"), productStatusStr: t.value, - tab: $('#basicTab').find('.active').index() + tab: $('#basicTab').find('.active').index(), + isInfoMiss: t.isInfoMiss }; }, columns: [{ @@ -214,7 +215,7 @@ var g = new common.grid({ render: function(item) { var html = []; html.push('<p style="color: red;">'); - var arr = item.missInfo.split(','); + var arr = item.missInfo ? item.missInfo.split(',') : ''; for (var i in arr) { var item1 = $.trim(arr[i]); if (item) { @@ -264,6 +265,11 @@ var t = new common.tab({ }, click: function() { this._init(t.active); + if (t.active == 3) { + t.isInfoMiss = 'Y'; + } else { + t.isInfoMiss = 'N'; + } g.init($("#gridurl").val()); }, columns: [{ diff --git a/server/config/common.js b/server/config/common.js index 2474ac2..3137fdb 100644 --- a/server/config/common.js +++ b/server/config/common.js @@ -17,7 +17,7 @@ var config = { // domain:'http://172.16.6.240:8088/platform',// 王书生 // domain: 'http://172.16.6.124:8088/platform',//陈超 //http://172.16.6.124:8088/platform/product/queryAllProductAttr - //domain: 'http://172.16.6.227:8088/platform', //玛丽 + //domain: 'http://172.16.6.146:8088/platform', //玛丽 // domain: 'http://192.168.102.202:8088/platform', //domain:'http://172.16.6.197:8080/yohobuy-platform-web',//葛超 // domain: 'http://192.168.102.202:8088/platform', diff --git a/server/interface/goods.js b/server/interface/goods.js index 7fe7948..770e6a4 100644 --- a/server/interface/goods.js +++ b/server/interface/goods.js @@ -79,6 +79,9 @@ exports.res = [{ }, { name: 'productStatusStr', type: 'string' + }, { + name: 'isInfoMiss', + type: 'string' }] }, { //网销信息 -> tab页 @@ -334,7 +337,7 @@ exports.res = [{ }, { name: 'productStandardRelationStr', type: 'string' - },{ + }, { name: 'productMaterial', type: 'string' }] @@ -707,92 +710,92 @@ exports.res = [{ }, //***********************************陶雨******************************* { - //保存搜索顺序 - route: '/netSale/saveSearchSort', - method: 'POST', - url: '/product/saveSearchSort', - params: [{ - name: 'searchSortList', - type: 'string' - }] -}, { - //查找热搜词 - route: '/netSale/queryHotSearchTerms', - method: 'POST', - url: '/searchWords/queryHotSearchTerms', - params: [{ - name: 'page', - type: 'number' - }, { - name: 'size', - type: 'number', - def: 10 - }] -}, { - //查找洗涤提示 - route: '/netSale/getAll4Select', - method: 'POST', - url: '/washTips/getAll4Select/', - params: [] -}, { - //查找材质参数 - route: '/netSale/queryAllBySortId4Select', - method: 'POST', - url: '/productMaterial/queryAllBySortId4Select', - params: [{ - name: 'param', - type: 'number' - }] -}, { - //查找所有商品参数信息 //暂时没用 - route: '/netSale/queryAllGoodsParams', - method: 'POST', - apis: { - washTipsList: { - url: '/washTips/getAll4Select/' - }, - materialList: { - url: 'productMaterial/queryAllBySortId4Select', - params: [{ - name: 'param', - type: 'number' - }], - isJsonRaw: true + //保存搜索顺序 + route: '/netSale/saveSearchSort', + method: 'POST', + url: '/product/saveSearchSort', + params: [{ + name: 'searchSortList', + type: 'string' + }] + }, { + //查找热搜词 + route: '/netSale/queryHotSearchTerms', + method: 'POST', + url: '/searchWords/queryHotSearchTerms', + params: [{ + name: 'page', + type: 'number' + }, { + name: 'size', + type: 'number', + def: 10 + }] + }, { + //查找洗涤提示 + route: '/netSale/getAll4Select', + method: 'POST', + url: '/washTips/getAll4Select/', + params: [] + }, { + //查找材质参数 + route: '/netSale/queryAllBySortId4Select', + method: 'POST', + url: '/productMaterial/queryAllBySortId4Select', + params: [{ + name: 'param', + type: 'number' + }] + }, { + //查找所有商品参数信息 //暂时没用 + route: '/netSale/queryAllGoodsParams', + method: 'POST', + apis: { + washTipsList: { + url: '/washTips/getAll4Select/' + }, + materialList: { + url: 'productMaterial/queryAllBySortId4Select', + params: [{ + name: 'param', + type: 'number' + }], + isJsonRaw: true + } } - } -}, { - //保存搜索关键词 - route: '/netSale/saveNetSaleSearchKeys', - method: 'POST', - url: '/product/saveNetSaleSearchKeys', - params: [{ - name: 'productSkn', - type: 'number' - }, { - name: 'searchKeys', - type: 'string' - }] -}, { - //保存商品参数 - route: '/netSale/saveProductParam', - method: 'POST', - url: '/product/saveProductParam', - params: [{ - name: 'productSkn', - type: 'number' - }, { - name: 'attributeProValuesOne', - type: 'string' - }, { - name: 'productStandardRelationStr', - type: 'string' - },{ - name: 'productMaterial', - type: 'string' - }] -}, -//************************************weiqingting********************** -//商品描述 + }, { + //保存搜索关键词 + route: '/netSale/saveNetSaleSearchKeys', + method: 'POST', + url: '/product/saveNetSaleSearchKeys', + params: [{ + name: 'productSkn', + type: 'number' + }, { + name: 'searchKeys', + type: 'string' + }] + }, { + //保存商品参数 + route: '/netSale/saveProductParam', + method: 'POST', + url: '/product/saveProductParam', + params: [{ + name: 'productSkn', + type: 'number' + }, { + name: 'attributeProValuesOne', + type: 'string' + }, { + name: 'productStandardRelationStr', + type: 'string' + }, { + name: 'productMaterial', + type: 'string' + }] + }, + //************************************weiqingting********************** + //商品描述 { route: '/netSale/saveProductDesc', method: 'POST',