function getData(object,url,dataObject) {
var table = $("#table_product_list");
var tbody = table.children("tbody").first();
$.ajax({
url: url,
type: "get",
data: dataObject,
traditional: true,
success: function (data) {
//清空原有数据
tbody.empty();
//设置样式
$(".loader").css("display","none");
object.attr("disabled",false);
//显示产品统计数据
$("#product_count_data").text(data.productCount);
if (data.productList.length > 0) {
for (var i = 0; i < data.productList.length; i++) {
var isEnabledClass;
var isEnabledTitle;
var isEnabled;
switch (data.productList[i].product_isEnabled) {
case 0:
isEnabledClass = "td_success";
isEnabledTitle = "产品正常销售中";
isEnabled = "销售中";
break;
case 2:
isEnabledClass = "td_warn";
isEnabledTitle = "产品显示在主页促销中";
isEnabled = "促销中";
break;
default:
isEnabledClass = "td_error";
isEnabledTitle = "产品缺货或违规停售中";
isEnabled = "停售中";
break;
}
从网上看了一段代码 其中ajax的url就写为了url 后台接收到了
@RequestMapping(value = "admin/product",method = RequestMethod.GET)
想问下那个url是怎么取的