我有一个解析函数,用于从后端获取数据。
parse : function(resp){
resp.id = resp.ID;
return resp;
},
我想使用 resp.id 作为将在我的 ajax 帖子中使用的 url 的路径,然后从该 url 获取数据。resp.id 是一个数字。但是当我写以下内容时,resp.ID
在另一个函数中未定义。我也使用过this.respId
,但它的值是未定义的。我的问题是这个 resp.id 没有在 ajaxpost 函数中定义
url: "/Api/v1",
callAjaxPost : function{
url : this.url + "/resp.Id/List",
}