给你两个资料: The one() function has a second argument that accepts an id e.g. .one('users', 1).
one('users', 1).get() translates to /users/1 all('users').getList() translates to /users Unlike all(), one() is not generally used with .getList() without argument. However, if you were to call .one('users', 1).getList('emails') or .one('users', 1).all('emails').getList(), then you would make a GET request to /users/1/emails.
给你两个资料:
The one() function has a second argument that accepts an id e.g. .one('users', 1).
one('users', 1).get() translates to /users/1
all('users').getList() translates to /users
Unlike all(), one() is not generally used with .getList() without argument. However, if you were to call .one('users', 1).getList('emails') or .one('users', 1).all('emails').getList(), then you would make a GET request to /users/1/emails.
——来自http://stackoverflow.com/ques...
还有作者官方的回答:https://github.com/mgonto/res...