Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mvvmdemo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LouisWang
mvvmdemo
Commits
56dbe874
Commit
56dbe874
authored
Jun 28, 2020
by
TaylorZhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(项目):更新xxApi文件规范
parent
0c1fe3e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
mvvm-demo/src/main/java/com/autocareai/mvvmdemo/demo/api/DemoApi.kt
+2
-3
No files found.
mvvm-demo/src/main/java/com/autocareai/mvvmdemo/demo/api/DemoApi.kt
View file @
56dbe874
...
...
@@ -15,8 +15,7 @@ import com.autocareai.mvvmdemo.demo.enity.UserEntity
*/
object
DemoApi
{
// 登录
private
const
val
LOGIN
=
"user/login"
// TODO: 2020/6/28 Api类中不需要定义网络请求路径常量,在实际项目中直接在方法中以ApiVersion.version + 路径即可
/**
* 登录
...
...
@@ -25,7 +24,7 @@ object DemoApi {
* @param password 密码
*/
fun
login
(
phone
:
String
,
password
:
String
):
HttpObservable
<
UserEntity
>
{
return
HttpUtil
.
postForm
(
LOGIN
)
return
HttpUtil
.
postForm
(
"user/login"
)
.
param
(
"username"
,
phone
)
.
param
(
"password"
,
password
)
.
asResponse
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment