Authored by weiqingting

提交

@@ -80,17 +80,9 @@ var util={ @@ -80,17 +80,9 @@ var util={
80 result = result.replace(reg, args[1][key]); 80 result = result.replace(reg, args[1][key]);
81 } 81 }
82 } 82 }
83 - //clear {xxx} 83 + }
84 var reg = new RegExp("({.*})", "g"); 84 var reg = new RegExp("({.*})", "g");
85 result = result.replace(reg, ''); 85 result = result.replace(reg, '');
86 - } else {  
87 - for (var i = 1; i < args.length; i++) {  
88 - if (args[i] != undefined) {  
89 - var reg = new RegExp("({[" + (i - 1) + "]})", "g");  
90 - result = result.replace(reg, args[i]);  
91 - }  
92 - }  
93 - }  
94 } 86 }
95 } 87 }
96 return result; 88 return result;
@@ -77,10 +77,9 @@ var dropDown = require('../common/dropDown'); @@ -77,10 +77,9 @@ var dropDown = require('../common/dropDown');
77 $.ajax({ 77 $.ajax({
78 type: 'POST', 78 type: 'POST',
79 dataType: 'json', 79 dataType: 'json',
80 - url: '/product/sort/update', 80 + url: status?"/erpproduct/sorter/open":"/erpproduct/sorter/close",
81 data: { 81 data: {
82 - id: $target.closest('td').attr('data-id'),  
83 - status: status 82 + param: $target.closest('td').attr('data-id')
84 } 83 }
85 }).then(function (data) { 84 }).then(function (data) {
86 85
@@ -118,6 +118,24 @@ exports.res = [ @@ -118,6 +118,24 @@ exports.res = [
118 } 118 }
119 ] 119 ]
120 },{ 120 },{
  121 + route:"/erpproduct/sorter/open",
  122 + method: 'POST',
  123 + url: '/product/publishProductSort',
  124 + isJsonRaw:true,
  125 + params: [{
  126 + name: 'param',
  127 + type: 'Number'
  128 + }]
  129 + },{
  130 + route:"/erpproduct/sorter/close",
  131 + method: 'POST',
  132 + url: '/product/closeProductSort',
  133 + isJsonRaw:true,
  134 + params: [{
  135 + name: 'param',
  136 + type: 'Number'
  137 + }]
  138 + },{
121 //商品管理>【产品属性】页面渲染 139 //商品管理>【产品属性】页面渲染
122 route: '/erpproduct/attribute/index', 140 route: '/erpproduct/attribute/index',
123 method: 'GET', 141 method: 'GET',