ApiService代码-----------
/**
* 注册
* @param mobile
* @param password
* @return
*/
@GET("user/reg")
Flowable<ResigterBean> getRegService(@Query("mobile") String mobile,@Query("password") String password);
/**
* 登录
* @param mobile
* @param password
* @return
*/
@GET("user/login")
Flowable<LoginBean> getLogService(@Query("mobile") String mobile,@Query("password") String password);
BaseUrl代码---
//登录和注册和共用
public static final String REG_URL="http://120.27.23.105/";
注册页面布局----------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#EDEEEE">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="20dp"
android:background="#FF7802"
>
<TextView
android:layout_width="0dp"
android:layout_weight="0.5"
android:layout_height="wrap_content"
android:background="@drawable/left"
android:id="@+id/fan"/>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginLeft="20dp"
android:layout_height="wrap_content"
android:text="新用户注册"
android:textSize="20sp"/>
</LinearLayout>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp"
android:id="@+id/ename"
android:hint="请输入用户名"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp"
android:id="@+id/epass"
android:hint="请输入密码"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"