Authored by leo

Fixed: 修复销售类目标签管理接口参数异常

... ... @@ -13,7 +13,7 @@ var g = new common.grid({
el: "#basicTable",
parms: function() {
return {
categoryId: $('#categoryId').val(),
categoryId: getCategoryId(),
status: $('.state-select').find('.current').find('input').val()
}
},
... ... @@ -130,3 +130,31 @@ $(document).on('click', '.open-btn', function() {
});
function getCategoryId() {
var categoryId = $('#categoryId').val();
categoryId = categoryId ? categoryId : getCategoryIdFromUrl();
if(categoryId) {
return categoryId;
} else {
common.util.__tip("无法获取销售类目ID,请确认!", "warning");
return false;
}
}
function getCategoryIdFromUrl() {
// sale/category/tag/1#page=1
var uri = location.href + "";
var uriArr = uri.split("/tag/");
if(uriArr && uriArr.length > 0) {
uri = uriArr[1];
var index = uri.indexOf('#');
if(index != -1) {
uri = uri.substring(0, index);
}
return uri;
}
return "";
}
\ No newline at end of file
... ...