登录注册接口

This commit is contained in:
fengjignqi
2026-11-06 10:51:01 +08:00
parent 834c83e08c
commit 3f182903e6
19 changed files with 822 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/lanhu_test_green" />
<corners android:radius="99dp" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/lanhu_test_green" />
<corners android:radius="4dp" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#FFFFFF" />
<corners android:radius="99dp" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#FF6900" />
<corners android:radius="12dp" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#FF6900" />
<corners android:radius="8dp" />
</shape>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="#FFF3EA" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#FFFFFF" />
<stroke android:width="1dp" android:color="#EDEFF2" />
<corners android:radius="12dp" />
</shape>

View File

@@ -0,0 +1,209 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 蓝湖临时预览:找回密码,按 393dp 宽设计稿还原。仅布局,未接入业务。 -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/lanhu_test_page_bg"
android:orientation="vertical"
tools:theme="@android:style/Theme.Material.Light.NoActionBar">
<RelativeLayout
android:id="@+id/rl_title"
android:layout_width="match_parent"
android:layout_height="44dp">
<ImageView
android:id="@+id/img_back"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_centerVertical="true"
android:layout_marginStart="20dp"
android:contentDescription="@string/lanhu_test_back"
android:scaleType="fitCenter"
android:src="@mipmap/lanhu_test_icon_back" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:fontFamily="sans-serif"
android:gravity="center"
android:includeFontPadding="false"
android:text="@string/lanhu_test_reset_password"
android:textColor="#000000"
android:textSize="16sp" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true"
android:orientation="vertical"
android:paddingBottom="30dp">
<!-- “注册用户”为本张原稿中的实际文案。 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="22dp"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical"
android:includeFontPadding="false"
android:text="@string/lanhu_test_register_user"
android:textColor="@color/lanhu_test_text"
android:textSize="20sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="30dp"
android:background="@drawable/lanhu_test_input_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="20dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@null"
android:src="@drawable/lanhu_test_icon_phone" />
<EditText
android:id="@+id/ed_phone_input"
style="@style/LanhuTestResetInput"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="4dp"
android:layout_weight="1"
android:hint="@string/lanhu_test_account_hint"
android:imeOptions="actionNext"
android:inputType="textEmailAddress" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/lanhu_test_input_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="20dp"
android:paddingEnd="10dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@null"
android:src="@drawable/lanhu_test_icon_code" />
<EditText
android:id="@+id/ed_code_input"
style="@style/LanhuTestResetInput"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="4dp"
android:layout_weight="1"
android:hint="@string/lanhu_test_code_hint"
android:imeOptions="actionNext"
android:inputType="number"
android:maxLength="6" />
<TextView
android:id="@+id/tv_get_code"
android:layout_width="101dp"
android:layout_height="33dp"
android:background="@drawable/lanhu_test_code_bg"
android:fontFamily="sans-serif"
android:gravity="center"
android:includeFontPadding="false"
android:text="@string/lanhu_test_get_code"
android:textColor="#FFFFFF"
android:textSize="13sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/lanhu_test_input_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="20dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@null"
android:src="@drawable/lanhu_test_icon_password" />
<EditText
android:id="@+id/ed_password_input"
style="@style/LanhuTestResetInput"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="4dp"
android:layout_weight="1"
android:hint="@string/lanhu_test_password_hint"
android:imeOptions="actionNext"
android:inputType="textPassword" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/lanhu_test_input_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="20dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@null"
android:src="@drawable/lanhu_test_icon_password" />
<EditText
android:id="@+id/ed_confirm_password_input"
style="@style/LanhuTestResetInput"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="4dp"
android:layout_weight="1"
android:hint="@string/lanhu_test_confirm_password_hint"
android:imeOptions="actionDone"
android:inputType="textPassword" />
</LinearLayout>
<TextView
android:id="@+id/tv_reset_confirm"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="40dp"
android:background="@drawable/lanhu_test_confirm_bg"
android:fontFamily="sans-serif"
android:gravity="center"
android:includeFontPadding="false"
android:text="@string/lanhu_test_confirm"
android:textColor="#FFFFFF"
android:textSize="14sp" />
</LinearLayout>
</ScrollView>
</LinearLayout>

View File

@@ -0,0 +1,240 @@
<?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:background="@color/white"
android:orientation="vertical">
<View
android:id="@+id/statusBarView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/white" />
<RelativeLayout
android:id="@+id/rl_title"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
android:background="@color/white">
<include
android:id="@+id/include_title"
layout="@layout/include_activity_back_layout" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="@dimen/dp_30">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_30"
android:text="创建账号"
android:textColor="@color/color_333333"
android:textSize="24sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_8"
android:text="使用手机号完成注册"
android:textColor="@color/color_gray_tab"
android:textSize="13sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_30"
android:background="@drawable/shape_login_input_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="@dimen/dp_15">
<ImageView
android:layout_width="@dimen/dp_18"
android:layout_height="@dimen/dp_18"
android:contentDescription="@null"
android:src="@mipmap/icon_phone" />
<EditText
android:id="@+id/ed_phone_input"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:hint="请输入手机号"
android:inputType="phone"
android:maxLength="20"
android:paddingLeft="@dimen/dp_12"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_12"
android:background="@drawable/shape_login_input_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="@dimen/dp_15">
<ImageView
android:layout_width="@dimen/dp_18"
android:layout_height="@dimen/dp_18"
android:contentDescription="@null"
android:src="@mipmap/icon_phone_code" />
<EditText
android:id="@+id/ed_code_input"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:background="@null"
android:hint="请输入验证码"
android:inputType="number"
android:maxLength="6"
android:paddingLeft="@dimen/dp_12"
android:textSize="15sp" />
<TextView
android:id="@+id/tv_get_code"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.5"
android:gravity="right|center_vertical"
android:text="获取验证码"
android:textColor="@color/color_zhu"
android:textSize="16sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_12"
android:background="@drawable/shape_login_input_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="@dimen/dp_15">
<EditText
android:id="@+id/ed_password_input"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:hint="设置密码"
android:inputType="textPassword"
android:maxLength="20"
android:paddingLeft="@dimen/dp_4"
android:textSize="15sp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_6"
android:text="8-20 位,需同时包含大小写字母和数字"
android:textColor="@color/color_gray_tab"
android:textSize="12sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_12"
android:background="@drawable/shape_login_input_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="@dimen/dp_15">
<EditText
android:id="@+id/ed_confirm_password_input"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:hint="请再次输入密码"
android:inputType="textPassword"
android:maxLength="20"
android:paddingLeft="@dimen/dp_4"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_12"
android:background="@drawable/shape_login_input_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="@dimen/dp_15">
<EditText
android:id="@+id/ed_invite_code_input"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:hint="邀请码(选填)"
android:inputType="textVisiblePassword"
android:maxLength="32"
android:paddingLeft="@dimen/dp_4"
android:textSize="15sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_register_confirm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_25"
android:background="@drawable/shape_login_btn_bg"
android:gravity="center"
android:paddingVertical="@dimen/dp_15"
android:text="注册"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/realtive_read_finish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_25"
android:gravity="center_vertical"
android:orientation="horizontal">
<RadioButton
android:id="@+id/checkbox_read"
android:layout_width="@dimen/dp_14"
android:layout_height="@dimen/dp_14"
android:background="@drawable/select_radio"
android:button="@null"
android:clickable="false" />
<TextView
android:id="@+id/tv_agreement_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:autoLink="none"
android:lineSpacingExtra="4dp"
android:textColor="@color/color_gray_tab"
android:textSize="11sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- English translations for login_layout only. -->
<string name="login_design_welcome">Welcome back</string>
<string name="login_design_points">Get 100 points on registration</string>
<string name="login_design_phone">Phone Number</string>
<string name="login_design_phone_hint">Please enter your phone number</string>
<string name="login_design_code">Verification Code</string>
<string name="login_design_code_hint">Please enter the verification code</string>
<string name="login_design_get_code">Get code</string>
<string name="login_design_password">Password</string>
<string name="login_design_password_hint">Please enter your password</string>
<string name="login_design_password_login">Sign in with password</string>
<string name="login_design_sms_login">Sign in with SMS code</string>
<string name="login_design_log_in">Log in</string>
<string name="login_design_agreement_description">Agree to the User Agreement and Privacy Policy</string>
<string name="login_design_agreement">I have read and agree to the <annotation key="agreement" value="user"><font color="#FF6900">User Agreement</font></annotation> and <annotation key="agreement" value="privacy"><font color="#FF6900">Privacy Policy</font></annotation></string>
<string name="login_design_other_methods">Other sign-in methods</string>
<string name="login_design_email">Sign in with email</string>
<string name="login_design_no_account">Don\'t have an account?</string>
<string name="login_design_sign_up">Sign up now</string>
<string name="login_design_resend_countdown">Resend in %1$d s</string>
<string name="login_design_resend">Resend code</string>
</resources>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="lanhu_test_page_bg">#F9F9F9</color>
<color name="lanhu_test_text">#222222</color>
<color name="lanhu_test_hint">#999999</color>
<color name="lanhu_test_green">#00CA9D</color>
<string name="lanhu_test_back">返回</string>
<string name="lanhu_test_reset_password">找回密码</string>
<string name="lanhu_test_register_user">注册用户</string>
<string name="lanhu_test_account_hint">请输入手机号/邮箱号</string>
<string name="lanhu_test_code_hint">请输入验证码</string>
<string name="lanhu_test_get_code">获取验证码</string>
<string name="lanhu_test_password_hint">请输入密码</string>
<string name="lanhu_test_confirm_password_hint">请再次输入密码</string>
<string name="lanhu_test_confirm">确定</string>
<style name="LanhuTestResetInput">
<item name="android:background">@null</item>
<item name="android:padding">0dp</item>
<item name="android:minWidth">0dp</item>
<item name="android:minHeight">0dp</item>
<item name="android:fontFamily">sans-serif</item>
<item name="android:gravity">center_vertical</item>
<item name="android:includeFontPadding">false</item>
<item name="android:singleLine">true</item>
<item name="android:textColor">@color/lanhu_test_text</item>
<item name="android:textColorHint">@color/lanhu_test_hint</item>
<item name="android:textSize">14sp</item>
</style>
</resources>