登录相关功能修改,包括重置密码,绑定手机号
This commit is contained in:
@@ -1,78 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.yizhuan.erban"> <!-- 云信集成小米推送 end -->
|
||||
<uses-sdk tools:overrideLibrary="com.huawei.android.hms.base,com.huawei.android.hms.push" />
|
||||
<!-- bugly所需权限 -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- ShareSdk权限申请 -->
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 谷歌内购权限 -->
|
||||
<uses-permission android:name="com.android.vending.BILLING" /> <!-- Required -->
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_PHONE_STATE"
|
||||
tools:node="remove" />
|
||||
<uses-permission
|
||||
android:name="android.permission.ACCESS_FINE_LOCATION"
|
||||
tools:node="remove" />
|
||||
<uses-permission
|
||||
android:name="android.permission.ACCESS_COARSE_LOCATION"
|
||||
tools:node="remove" />
|
||||
|
||||
<queries>
|
||||
<package android:name="com.facebook.katana" />
|
||||
<package android:name="jp.naver.line.android" />
|
||||
<package android:name="com.android.vending" />
|
||||
</queries> <!-- 云信权限声明 -->
|
||||
<!-- 控制呼吸灯,振动器等,用于新消息提醒 -->
|
||||
<uses-permission android:name="android.permission.FLASHLIGHT" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" /> <!-- 外置存储存取权限 -->
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- 多媒体相关 -->
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
||||
<uses-permission android:name="android.permission.REORDER_TASKS" />
|
||||
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" /> <!-- 如果需要实时音视频通话模块,下面的权限也是必须的。否则,可以不加 -->
|
||||
<uses-feature
|
||||
android:glEsVersion="0x00020000"
|
||||
android:required="true" /> <!-- SDK 权限申明, 第三方 APP 接入时,请将 com.netease.nim.demo 替换为自己的包名 -->
|
||||
<!-- 和下面的 uses-permission 一起加入到你的 AndroidManifest 文件中。 -->
|
||||
<permission
|
||||
android:name="${applicationId}.permission.RECEIVE_MSG"
|
||||
android:protectionLevel="signature" /> <!-- 接收 SDK 消息广播权限, 第三方 APP 接入时,请将 com.netease.nim.demo 替换为自己的包名 -->
|
||||
<uses-permission android:name="com.xteam.xchat.permission.RECEIVE_MSG" /> <!-- 云信集成小米推送 start -->
|
||||
<permission
|
||||
android:name="${applicationId}.permission.MIPUSH_RECEIVE"
|
||||
android:protectionLevel="signature" />
|
||||
|
||||
<uses-permission android:name="${applicationId}.permission.MIPUSH_RECEIVE" /> <!-- 云信集成华为推送 -->
|
||||
<uses-permission android:name="com.coloros.mcs.permission.RECIEVE_MCS_MESSAGE" /> <!-- 云信集成oppo推送 -->
|
||||
<uses-permission android:name="com.heytap.mcs.permission.RECIEVE_MCS_MESSAGE" /> <!-- 云信集成魅族推送 start -->
|
||||
<!-- 兼容flyme5.0以下版本,魅族内部集成pushSDK必填,不然无法收到消息,将{你的包名} 改开发者App的包名 -->
|
||||
<uses-permission android:name="com.meizu.flyme.push.permission.RECEIVE" />
|
||||
|
||||
<permission
|
||||
android:name="${applicationId}.push.permission.MESSAGE"
|
||||
android:protectionLevel="signature" />
|
||||
|
||||
<uses-permission android:name="${applicationId}.push.permission.MESSAGE" /> <!-- 兼容flyme3.0配置权限 -->
|
||||
<uses-permission android:name="com.meizu.c2dm.permission.RECEIVE" />
|
||||
|
||||
<permission
|
||||
android:name="${applicationId}.permission.C2D_MESSAGE"
|
||||
android:protectionLevel="signature" />
|
||||
|
||||
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
|
||||
package="com.yizhuan.erban">
|
||||
|
||||
<application
|
||||
android:name=".application.XChatApplication"
|
||||
@@ -87,104 +16,9 @@
|
||||
tools:replace="android:name,android:allowBackup">
|
||||
<!-- 刘海屏适配 begin -->
|
||||
<!-- 小米 -->
|
||||
<meta-data
|
||||
android:name="notch.config"
|
||||
android:value="portrait|landscape" /> <!-- 华为 -->
|
||||
<meta-data
|
||||
android:name="android.notch_support"
|
||||
android:value="true" />
|
||||
<meta-data
|
||||
android:name="android.max_aspect"
|
||||
android:value="2.4" /> <!-- 刘海屏适配 end -->
|
||||
<provider
|
||||
android:name=".utils.BuglyFileProvider"
|
||||
android:authorities="${applicationId}.fileProvider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true"
|
||||
tools:replace="name,authorities,exported,grantUriPermissions">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/provider_paths"
|
||||
tools:replace="name,resource" />
|
||||
</provider> <!-- 云信配置 begin ##################################################### -->
|
||||
<!--
|
||||
APP key, 可以在这里设置,也可以在 SDKOptions 中提供。
|
||||
如果 SDKOptions 中提供了,取 SDKOptions 中的值。
|
||||
-->
|
||||
<meta-data
|
||||
android:name="com.netease.nim.appKey"
|
||||
android:value="09bde8b3d86b98a6612bc3fc92709799" />
|
||||
<!--
|
||||
声明云信后台服务,如需保持后台推送,使用独立进程效果会更好。
|
||||
ca46478c438dda51d25306f52fe7506b
|
||||
09bde8b3d86b98a6612bc3fc92709799
|
||||
-->
|
||||
<service
|
||||
android:name="com.netease.nimlib.service.NimService"
|
||||
android:process=":core" /> <!-- 运行后台辅助服务 -->
|
||||
<service
|
||||
android:name="com.netease.nimlib.service.NimService$Aux"
|
||||
android:process=":core" /> <!-- 声明云信后台辅助服务 -->
|
||||
<service
|
||||
android:name="com.netease.nimlib.job.NIMJobService"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
android:process=":core" />
|
||||
<!--
|
||||
云信SDK的监视系统启动和网络变化的广播接收器,用户开机自启动以及网络变化时候重新登录,
|
||||
保持和 NimService 同一进程
|
||||
-->
|
||||
<receiver
|
||||
android:name="com.netease.nimlib.service.NimReceiver"
|
||||
android:exported="false"
|
||||
android:process=":core">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
|
||||
</intent-filter>
|
||||
</receiver> <!-- 云信进程间通信 Receiver -->
|
||||
<receiver android:name="com.netease.nimlib.service.ResponseReceiver" /> <!-- 云信进程间通信service -->
|
||||
<service android:name="com.netease.nimlib.service.ResponseService" /> <!-- 申明本地电话状态(通话状态)的广播接收器,第三方APP集成时音视频模块时,如果需要在App中处理网络通话与本地电话的交互请加上此接收器 -->
|
||||
<!-- 在Demo的示例代码中是在Application进行了网络通话与本地电话的互斥处理 -->
|
||||
<receiver
|
||||
android:name=".reciever.IncomingCallReceiver"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.PHONE_STATE" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".reciever.NotificationClickReceiver" /> <!-- 云信进程间通信provider -->
|
||||
<!-- 配置的service和receiver -->
|
||||
<provider
|
||||
android:name="com.netease.nimlib.ipc.NIMContentProvider"
|
||||
android:authorities="${applicationId}.ipc.provider"
|
||||
android:process=":core" /> <!-- 配置的service和receiver -->
|
||||
<meta-data
|
||||
android:name="design_width"
|
||||
android:value="768" />
|
||||
<meta-data
|
||||
android:name="design_height"
|
||||
android:value="1280" /> <!-- Autolayout####################################################配置 -->
|
||||
<activity
|
||||
android:name="com.soundcloud.android.crop.CropImageActivity"
|
||||
android:screenOrientation="portrait" /> <!-- tinker配置 begin ########################################################## -->
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/provider_paths" />
|
||||
</provider>
|
||||
|
||||
<receiver
|
||||
android:name="com.adjust.sdk.AdjustReferrerReceiver"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.INSTALL_PACKAGES">
|
||||
<intent-filter>
|
||||
<action android:name="com.android.vending.INSTALL_REFERRER" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
android:screenOrientation="portrait" /> <!-- 华为 -->
|
||||
<activity
|
||||
android:name="com.darsh.multipleimageselect.activities.AlbumSelectActivity"
|
||||
android:configChanges="orientation|screenSize"
|
||||
@@ -202,12 +36,16 @@
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</activity> <!-- 刘海屏适配 end -->
|
||||
<activity
|
||||
android:name="com.mob.tools.MobUIShell"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" /> <!-- 云信配置 begin ##################################################### -->
|
||||
<!--
|
||||
APP key, 可以在这里设置,也可以在 SDKOptions 中提供。
|
||||
如果 SDKOptions 中提供了,取 SDKOptions 中的值。
|
||||
-->
|
||||
<activity
|
||||
android:name="com.vele.peko.lineapi.LineAuthenticationCallbackActivity"
|
||||
android:exported="true"
|
||||
@@ -216,19 +54,19 @@
|
||||
|
||||
<!-- 集成line客户端登录授权,需要添如下格式的过滤器 -->
|
||||
<intent-filter>
|
||||
<data android:scheme="lineauth" />
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:scheme="lineauth" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name=".service.DaemonService"
|
||||
android:enabled="true" />
|
||||
|
||||
<!--
|
||||
声明云信后台服务,如需保持后台推送,使用独立进程效果会更好。
|
||||
ca46478c438dda51d25306f52fe7506b
|
||||
09bde8b3d86b98a6612bc3fc92709799
|
||||
-->
|
||||
<activity
|
||||
android:name=".other.activity.SplashActivity"
|
||||
android:exported="true"
|
||||
@@ -248,54 +86,60 @@
|
||||
<intent-filter>
|
||||
|
||||
<!-- 此处scheme值需要替换为后台设置中的scheme值 -->
|
||||
<data
|
||||
android:host="main"
|
||||
android:scheme="pekoapp" />
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="main"
|
||||
android:scheme="pekoapp" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</activity> <!-- 运行后台辅助服务 -->
|
||||
<activity
|
||||
android:name=".home.activity.AssociationActivity"
|
||||
android:label="@string/association_list"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 声明云信后台辅助服务 -->
|
||||
<activity
|
||||
android:name=".ui.login.LoginPhoneActivity"
|
||||
android:label="@string/main_androidmanifest_01"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait" />
|
||||
<!--
|
||||
云信SDK的监视系统启动和网络变化的广播接收器,用户开机自启动以及网络变化时候重新登录,
|
||||
保持和 NimService 同一进程
|
||||
-->
|
||||
<activity
|
||||
android:name=".ui.login.LoginCodeActivity"
|
||||
android:label="@string/main_androidmanifest_02"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 云信进程间通信 Receiver -->
|
||||
<activity
|
||||
android:name=".ui.login.BindPhoneActivity"
|
||||
android:label="@string/main_androidmanifest_03"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 云信进程间通信service -->
|
||||
<activity
|
||||
android:name=".ui.login.BindCodeActivity"
|
||||
android:label="@string/main_androidmanifest_04"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 申明本地电话状态(通话状态)的广播接收器,第三方APP集成时音视频模块时,如果需要在App中处理网络通话与本地电话的交互请加上此接收器 -->
|
||||
<!-- 在Demo的示例代码中是在Application进行了网络通话与本地电话的互斥处理 -->
|
||||
<activity
|
||||
android:name=".UserGuideActivity"
|
||||
android:label="@string/main_androidmanifest_05"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.search.SearchActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 云信进程间通信provider -->
|
||||
<!-- 配置的service和receiver -->
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:label="Peko"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
|
||||
android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> <!-- 配置的service和receiver -->
|
||||
<activity
|
||||
android:name=".ui.keepalive.OnePiexlActivity"
|
||||
android:screenOrientation="portrait"
|
||||
@@ -303,7 +147,7 @@
|
||||
<activity
|
||||
android:name=".NimMiddleActivity"
|
||||
android:noHistory="true"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- Autolayout####################################################配置 -->
|
||||
<activity
|
||||
android:name=".avroom.activity.AVRoomActivity"
|
||||
android:hardwareAccelerated="true"
|
||||
@@ -311,7 +155,7 @@
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AVRoomTheme"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
android:windowSoftInputMode="adjustPan" /> <!-- tinker配置 begin ########################################################## -->
|
||||
<activity
|
||||
android:name=".avroom.activity.RoomSettingActivity"
|
||||
android:label="@string/main_androidmanifest_07"
|
||||
@@ -383,7 +227,7 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.withdraw.WithdrawActivity"
|
||||
android:screenOrientation="portrait" /> <!-- 提现绑定银行卡 -->
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.withdraw.bankcard.BindWithdrawBankCardActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -450,7 +294,7 @@
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" /> <!-- 提现绑定银行卡 -->
|
||||
<activity
|
||||
android:name=".ui.im.avtivity.AddBlackListActivity"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
@@ -484,7 +328,7 @@
|
||||
<activity
|
||||
android:name=".family.view.activity.FamilyPlazaActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" /> <!-- android:launchMode="singleTask" -->
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".family.view.activity.FamilyHomeActivity"
|
||||
android:screenOrientation="portrait"
|
||||
@@ -560,7 +404,7 @@
|
||||
<activity
|
||||
android:name=".luckymoney.view.LuckyMoneyDetailActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" /> <!-- android:launchMode="singleTask" -->
|
||||
<activity
|
||||
android:name=".family.view.activity.FamilyMemberCurrencyActivity"
|
||||
android:screenOrientation="portrait"
|
||||
@@ -647,7 +491,7 @@
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".avroom.activity.RecordForPKActivity"
|
||||
android:screenOrientation="portrait" /> <!-- 模厅 -->
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".module_hall.hall.activity.ModuleHallActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -707,7 +551,7 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".module_hall.income.IncomeDetailActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 模厅 -->
|
||||
<activity
|
||||
android:name=".module_hall.team.activity.HallTeamMessageActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -718,11 +562,11 @@
|
||||
android:name="com.yizhuan.tutu.mentoring_relationship.activity.MentoringRelationshipActivity"
|
||||
android:label="@string/main_androidmanifest_030"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" /> <!-- 推荐位 -->
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".avroom.recommendcard.MyRecommendCardActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait" /> <!-- 房间内私聊 -->
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.yizhuan.tutu.room_chat.activity.NimRoomP2PMessageActivity"
|
||||
android:theme="@style/room_message_activity" />
|
||||
@@ -745,8 +589,7 @@
|
||||
<activity
|
||||
android:name="com.yizhuan.tutu.room_chat.activity.NimHallTeamRoomMessageActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/room_message_activity" /> <!-- 房间内私聊 -->
|
||||
<!-- 萝卜-签到-任务 -->
|
||||
android:theme="@style/room_message_activity" />
|
||||
<activity
|
||||
android:name=".bills.activities.BillGiftIncomeGroupActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -758,7 +601,7 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".radish.task.activity.TaskCenterActivity"
|
||||
android:screenOrientation="portrait" /> <!-- 萝卜-签到-任务 -->
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.patriarch.PatriarchModeActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -781,10 +624,10 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".miniworld.activity.MiniWorldGuestPageActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 推荐位 -->
|
||||
<activity
|
||||
android:name=".miniworld.activity.TopicMainActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 房间内私聊 -->
|
||||
<activity
|
||||
android:name=".miniworld.activity.MiniWorldEditActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -798,7 +641,7 @@
|
||||
<activity
|
||||
android:name=".miniworld.activity.MWTeamRoomMessageAct"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/room_message_activity" /> <!-- 房间内私聊 -->
|
||||
android:theme="@style/room_message_activity" />
|
||||
<activity
|
||||
android:name=".miniworld.activity.MiniWorldGroupThemeActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -807,23 +650,24 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".miniworld.activity.AllTopicActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 房间内私聊 -->
|
||||
<!-- 萝卜-签到-任务 -->
|
||||
<activity
|
||||
android:name=".miniworld.activity.MiniWorldSearchActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".miniworld.activity.MiniWorldMainActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".ui.im.friend.ActFriendList" /> <!-- 银行卡列表 -->
|
||||
<activity android:name=".ui.im.friend.ActFriendList" />
|
||||
<activity
|
||||
android:name=".bank_card.activity.BankCardListActivity"
|
||||
android:screenOrientation="portrait" /> <!-- 解除绑定银行卡 -->
|
||||
android:screenOrientation="portrait" /> <!-- 萝卜-签到-任务 -->
|
||||
<activity
|
||||
android:name=".bank_card.activity.BankCardListUnbindActivity"
|
||||
android:screenOrientation="portrait" /> <!-- 绑定银行卡 -->
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".bank_card.activity.BankCardBindActivity"
|
||||
android:screenOrientation="portrait" /> <!-- 隐私政策 -->
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".bank_card.activity.AddBankCardAgreementActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -832,7 +676,7 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".home.activity.CommunityNoticeAct"
|
||||
android:screenOrientation="portrait" /> <!-- 社区 -->
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".community.publish.view.PublishActivity"
|
||||
android:launchMode="singleTop"
|
||||
@@ -847,7 +691,7 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".community.photo.BigPhotoActivity"
|
||||
android:screenOrientation="portrait" /> <!-- 知乎相册 -->
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.zhihu.matisse.ui.MatisseActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -856,7 +700,7 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.zhihu.matisse.internal.ui.SelectedPreviewActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 房间内私聊 -->
|
||||
<activity
|
||||
android:name=".ui.wallet.sendgold.SendGoldActivity"
|
||||
android:screenOrientation="portrait"
|
||||
@@ -876,22 +720,22 @@
|
||||
<activity
|
||||
android:name=".pay.activity.GiveGoldSearchActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" /> <!-- 隐私设置 -->
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".ui.setting.PrivacySettingActivity"
|
||||
android:screenOrientation="portrait" /> <!-- 通知提醒设置 -->
|
||||
android:screenOrientation="portrait" /> <!-- 银行卡列表 -->
|
||||
<activity
|
||||
android:name=".ui.setting.NoticeSettingActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 解除绑定银行卡 -->
|
||||
<activity
|
||||
android:name=".ui.login.LoginActivity"
|
||||
android:label="@string/main_androidmanifest_031"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 绑定银行卡 -->
|
||||
<activity
|
||||
android:name=".ui.webview.DialogWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
android:windowSoftInputMode="adjustPan" /> <!-- 隐私政策 -->
|
||||
<activity
|
||||
android:name=".ui.webview.DatingRuleWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
@@ -900,22 +744,17 @@
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
<activity
|
||||
android:name=".ui.login.LoginPasswordActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 社区 -->
|
||||
<activity
|
||||
android:name=".ui.setting.ResetPasswordActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
|
||||
<activity
|
||||
android:name=".module_hall.hall.activity.SuperAdminManageActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".module_hall.hall.activity.SuperAdminAddActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".module_hall.hall.activity.SuperAdminRoomSetActivity" />
|
||||
<activity android:name=".module_hall.hall.activity.SuperAdminRoomSetActivity" /> <!-- 知乎相册 -->
|
||||
<activity
|
||||
android:name=".avroom.anotherroompk.RoomPKCreateActivity"
|
||||
android:theme="@style/dialog_web_view_activity"
|
||||
@@ -943,10 +782,10 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".vip.VipMainActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- 隐私设置 -->
|
||||
<activity
|
||||
android:name=".vip.VipSettingActivity"
|
||||
android:screenOrientation="portrait" /> <!-- com.yizhuan.xchat_android_core.skill -->
|
||||
android:screenOrientation="portrait" /> <!-- 通知提醒设置 -->
|
||||
<activity
|
||||
android:name=".skill.activity.AddSkillActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -964,7 +803,7 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".skill.activity.SkillDetailActivity"
|
||||
android:screenOrientation="portrait" /> <!-- CP -->
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".relation.cp.activity.CpTaskActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -1015,7 +854,7 @@
|
||||
android:name=".earn.activity.EarnWithdrawActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" /> <!-- com.yizhuan.xchat_android_core.skill -->
|
||||
<activity
|
||||
android:name=".earn.activity.BindWithdrawMsgActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
|
||||
@@ -1026,6 +865,172 @@
|
||||
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.login.AuthorizationCodeActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.login.AreaCodeActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<meta-data
|
||||
android:name="notch.config"
|
||||
android:value="portrait|landscape" />
|
||||
<meta-data
|
||||
android:name="android.notch_support"
|
||||
android:value="true" />
|
||||
<meta-data
|
||||
android:name="android.max_aspect"
|
||||
android:value="2.4" />
|
||||
<meta-data
|
||||
android:name="com.netease.nim.appKey"
|
||||
android:value="09bde8b3d86b98a6612bc3fc92709799" /> <!-- CP -->
|
||||
<meta-data
|
||||
android:name="design_width"
|
||||
android:value="768" />
|
||||
<meta-data
|
||||
android:name="design_height"
|
||||
android:value="1280" />
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
|
||||
<provider
|
||||
android:name=".utils.BuglyFileProvider"
|
||||
android:authorities="${applicationId}.fileProvider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true"
|
||||
tools:replace="name,authorities,exported,grantUriPermissions">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/provider_paths"
|
||||
tools:replace="name,resource" />
|
||||
</provider>
|
||||
<provider
|
||||
android:name="com.netease.nimlib.ipc.NIMContentProvider"
|
||||
android:authorities="${applicationId}.ipc.provider"
|
||||
android:process=":core" />
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/provider_paths" />
|
||||
</provider>
|
||||
|
||||
<receiver
|
||||
android:name="com.netease.nimlib.service.NimReceiver"
|
||||
android:exported="false"
|
||||
android:process=":core">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name="com.netease.nimlib.service.ResponseReceiver" />
|
||||
<receiver
|
||||
android:name=".reciever.IncomingCallReceiver"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.PHONE_STATE" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".reciever.NotificationClickReceiver" />
|
||||
<receiver
|
||||
android:name="com.adjust.sdk.AdjustReferrerReceiver"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.INSTALL_PACKAGES">
|
||||
<intent-filter>
|
||||
<action android:name="com.android.vending.INSTALL_REFERRER" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<service
|
||||
android:name="com.netease.nimlib.service.NimService"
|
||||
android:process=":core" />
|
||||
<service
|
||||
android:name="com.netease.nimlib.service.NimService$Aux"
|
||||
android:process=":core" />
|
||||
<service
|
||||
android:name="com.netease.nimlib.job.NIMJobService"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
android:process=":core" />
|
||||
<service android:name="com.netease.nimlib.service.ResponseService" />
|
||||
<service
|
||||
android:name=".service.DaemonService"
|
||||
android:enabled="true" />
|
||||
</application>
|
||||
<!-- bugly所需权限 -->
|
||||
<permission
|
||||
android:name="${applicationId}.permission.RECEIVE_MSG"
|
||||
android:protectionLevel="signature" /> <!-- ShareSdk权限申请 -->
|
||||
<permission
|
||||
android:name="${applicationId}.permission.MIPUSH_RECEIVE"
|
||||
android:protectionLevel="signature" /> <!-- 谷歌内购权限 -->
|
||||
<permission
|
||||
android:name="${applicationId}.push.permission.MESSAGE"
|
||||
android:protectionLevel="signature" /> <!-- Required -->
|
||||
<permission
|
||||
android:name="${applicationId}.permission.C2D_MESSAGE"
|
||||
android:protectionLevel="signature" />
|
||||
|
||||
<queries>
|
||||
<package android:name="com.facebook.katana" />
|
||||
<package android:name="jp.naver.line.android" />
|
||||
<package android:name="com.android.vending" />
|
||||
</queries>
|
||||
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||
<uses-feature
|
||||
android:glEsVersion="0x00020000"
|
||||
android:required="true" />
|
||||
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- 云信权限声明 -->
|
||||
<!-- 控制呼吸灯,振动器等,用于新消息提醒 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- 外置存储存取权限 -->
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <!-- 多媒体相关 -->
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_PHONE_STATE"
|
||||
tools:node="remove" />
|
||||
<uses-permission
|
||||
android:name="android.permission.ACCESS_FINE_LOCATION"
|
||||
tools:node="remove" />
|
||||
<uses-permission
|
||||
android:name="android.permission.ACCESS_COARSE_LOCATION"
|
||||
tools:node="remove" />
|
||||
<uses-permission android:name="android.permission.FLASHLIGHT" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" /> <!-- 如果需要实时音视频通话模块,下面的权限也是必须的。否则,可以不加 -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <!-- SDK 权限申明, 第三方 APP 接入时,请将 com.netease.nim.demo 替换为自己的包名 -->
|
||||
<!-- 和下面的 uses-permission 一起加入到你的 AndroidManifest 文件中。 -->
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <!-- 接收 SDK 消息广播权限, 第三方 APP 接入时,请将 com.netease.nim.demo 替换为自己的包名 -->
|
||||
<uses-permission android:name="android.permission.INTERNET" /> <!-- 云信集成小米推送 start -->
|
||||
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
||||
<uses-permission android:name="android.permission.REORDER_TASKS" /> <!-- 云信集成华为推送 -->
|
||||
<uses-permission android:name="com.xteam.xchat.permission.RECEIVE_MSG" /> <!-- 云信集成oppo推送 -->
|
||||
<uses-permission android:name="${applicationId}.permission.MIPUSH_RECEIVE" /> <!-- 云信集成魅族推送 start -->
|
||||
<!-- 兼容flyme5.0以下版本,魅族内部集成pushSDK必填,不然无法收到消息,将{你的包名} 改开发者App的包名 -->
|
||||
<uses-permission android:name="com.coloros.mcs.permission.RECIEVE_MCS_MESSAGE" />
|
||||
<uses-permission android:name="com.heytap.mcs.permission.RECIEVE_MCS_MESSAGE" />
|
||||
<uses-permission android:name="com.meizu.flyme.push.permission.RECEIVE" /> <!-- 兼容flyme3.0配置权限 -->
|
||||
<uses-permission android:name="${applicationId}.push.permission.MESSAGE" />
|
||||
<uses-permission android:name="com.meizu.c2dm.permission.RECEIVE" />
|
||||
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
|
||||
|
||||
<uses-sdk tools:overrideLibrary="com.huawei.android.hms.base,com.huawei.android.hms.push" />
|
||||
|
||||
</manifest>
|
@@ -57,6 +57,7 @@ import com.yizhuan.erban.common.widget.dialog.DialogUiHelper;
|
||||
import com.yizhuan.erban.ui.im.avtivity.NimP2PMessageActivity;
|
||||
import com.yizhuan.erban.ui.login.AddUserInfoActivity;
|
||||
import com.yizhuan.erban.ui.login.LoginCodeActivity;
|
||||
import com.yizhuan.erban.ui.login.LoginPhoneActivity;
|
||||
import com.yizhuan.erban.ui.pay.ChargeActivity;
|
||||
import com.yizhuan.erban.ui.setting.ResetPasswordActivity;
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
|
||||
@@ -971,7 +972,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
*/
|
||||
private boolean isNeedToHandleBroadcastMessageActivity() {
|
||||
List<Class> acts = new ArrayList<>();
|
||||
// acts.add(LoginPhoneActivity.class);
|
||||
acts.add(LoginPhoneActivity.class);
|
||||
acts.add(LoginCodeActivity.class);
|
||||
acts.add(ResetPasswordActivity.class);
|
||||
acts.add(AddUserInfoActivity.class);
|
||||
|
@@ -18,7 +18,6 @@ import androidx.fragment.app.FragmentManager;
|
||||
import com.jungly.gridpasswordview.GridPasswordView;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.setting.ModifyPwdActivity;
|
||||
import com.yizhuan.erban.ui.setting.VerifyPhoneActivity;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
|
||||
|
||||
|
@@ -0,0 +1,80 @@
|
||||
package com.yizhuan.erban.ui.login
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.view.View
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityAreaCodeBinding
|
||||
import com.yizhuan.erban.ui.login.bean.CountryBean
|
||||
|
||||
/**
|
||||
* 区号
|
||||
* Created by wushaocheng
|
||||
* Date: 2022/11/28
|
||||
*/
|
||||
class AreaCodeActivity : BaseViewBindingActivity<ActivityAreaCodeBinding>() {
|
||||
|
||||
private val mCountries = ArrayList<CountryBean>()
|
||||
|
||||
companion object {
|
||||
const val COUNTRY_NUMBER = "country_number"
|
||||
|
||||
@JvmStatic
|
||||
fun startForResult(context: Activity, requestCode: Int) {
|
||||
val intent = Intent(context, AreaCodeActivity::class.java)
|
||||
context.startActivityForResult(
|
||||
intent,
|
||||
requestCode
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
initTitleBar(getString(R.string.select_area_code))
|
||||
initCountryData()
|
||||
initListView()
|
||||
}
|
||||
|
||||
private fun initCountryData() {
|
||||
val countryList = resources.getStringArray(R.array.country_code_list_ch)
|
||||
for (s in countryList) {
|
||||
val country = s.split("*").toTypedArray()
|
||||
val countryName = country[0]
|
||||
val countryNumber = country[1]
|
||||
val c = CountryBean(countryName, countryNumber)
|
||||
mCountries.add(c)
|
||||
}
|
||||
}
|
||||
|
||||
private fun initListView() {
|
||||
val mAdapter = object :
|
||||
BaseQuickAdapter<CountryBean, BaseViewHolder>(R.layout.item_country, mCountries) {
|
||||
override fun convert(helper: BaseViewHolder, item: CountryBean) {
|
||||
helper.setText(R.id.tv_name, item.name)
|
||||
helper.setText(R.id.tv_country_code, item.code)
|
||||
}
|
||||
}
|
||||
binding.mRecyclerView.adapter = mAdapter
|
||||
//返回国家
|
||||
mAdapter.setOnItemClickListener { adapter: BaseQuickAdapter<*, *>?, view: View?, position: Int ->
|
||||
val country = mCountries[position]
|
||||
val intent = Intent()
|
||||
intent.putExtra(COUNTRY_NUMBER, country.code)
|
||||
setResult(RESULT_OK, intent)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun needSteepStateBar() = true
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,70 @@
|
||||
package com.yizhuan.erban.ui.login
|
||||
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.MotionEvent
|
||||
import android.view.WindowManager
|
||||
import android.widget.EditText
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityAuthorizationCodeBinding
|
||||
|
||||
/**
|
||||
* 授权码页面
|
||||
* Created by wushaocheng
|
||||
* Date: 2022/11/28
|
||||
*/
|
||||
class AuthorizationCodeActivity : BaseViewBindingActivity<ActivityAuthorizationCodeBinding>() {
|
||||
|
||||
override fun init() {
|
||||
initData()
|
||||
initListener()
|
||||
}
|
||||
|
||||
private fun initData() {
|
||||
this.window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
binding.etCode.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(p0: Editable?) {
|
||||
binding.btnNext.isEnabled = p0?.isEmpty() != true
|
||||
}
|
||||
|
||||
})
|
||||
binding.btnNext.setOnClickListener {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTouchEvent(event: MotionEvent): Boolean {
|
||||
val view = currentFocus
|
||||
var isPressEdit = false
|
||||
if (view is EditText) {
|
||||
if (event.rawX >= view.getX() && event.rawX <= view.getX() + view.getWidth() && event.rawY >= view.getY() && event.rawY <= view.getY() + view.getHeight()) {
|
||||
isPressEdit = true
|
||||
}
|
||||
}
|
||||
if (!isPressEdit) {
|
||||
hideIME()
|
||||
}
|
||||
return super.onTouchEvent(event)
|
||||
}
|
||||
|
||||
override fun needSteepStateBar() = true
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
|
||||
}
|
@@ -81,9 +81,9 @@ public class BindCodeActivity extends BaseActivity {
|
||||
|
||||
private void onFindViews() {
|
||||
codeEt = findViewById(R.id.et_code);
|
||||
tvGetCode = findViewById(R.id.tv_get_code);
|
||||
// tvGetCode = findViewById(R.id.tv_get_code);
|
||||
tvDesc = findViewById(R.id.tv_desc);
|
||||
tvSecond = findViewById(R.id.tv_second);
|
||||
// tvSecond = findViewById(R.id.tv_second);
|
||||
}
|
||||
|
||||
private void onSetListener() {
|
||||
@@ -179,7 +179,7 @@ public class BindCodeActivity extends BaseActivity {
|
||||
|
||||
private void bindPhone() {
|
||||
getDialogManager().showProgressDialog(BindCodeActivity.this, ResUtil.getString(R.string.ui_login_bindcodeactivity_02));
|
||||
AuthModel.get().bindPhone(mPhone, codeEt.getText().toString())
|
||||
AuthModel.get().bindPhone(mPhone, codeEt.getText().toString(),"")
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.doOnSuccess(s -> {
|
||||
toast(ResUtil.getString(R.string.ui_login_bindcodeactivity_03));
|
||||
|
@@ -1,161 +0,0 @@
|
||||
package com.yizhuan.erban.ui.login;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
|
||||
import com.yizhuan.xchat_android_library.utils.NetworkUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||
|
||||
/**
|
||||
* 由于所有用户都需要强制绑定手机,所以理论上这里只有MainActivity会调用到这个界面
|
||||
* 但是为了以防万一,其它调用绑定手机的地方也改为调用这个页面了
|
||||
*/
|
||||
public class BindPhoneActivity extends BaseActivity implements View.OnClickListener {
|
||||
|
||||
private static final String TAG = "BindPhoneActivity";
|
||||
|
||||
private EditText accountEt;
|
||||
private Button btnNext;
|
||||
private ImageView ivBack;
|
||||
public static final String KEY_BACK_LOGIN = "key_back_login";
|
||||
private int REQUEST_CODE = 100;
|
||||
|
||||
private AccountValidator accountValidator = new AccountValidator();
|
||||
private TextWatcher textWatcher = new TextWatcherWrapper() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
checkInput();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public static void start(Context context) {
|
||||
Intent intent = new Intent(context, BindPhoneActivity.class);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_bind_phone);
|
||||
onFindViews();
|
||||
onSetListener();
|
||||
|
||||
accountEt.setFocusable(true);
|
||||
accountEt.setFocusableInTouchMode(true);
|
||||
accountEt.requestFocus();
|
||||
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
}
|
||||
|
||||
private void onFindViews() {
|
||||
accountEt = findViewById(R.id.et_account);
|
||||
btnNext = findViewById(R.id.btn_next);
|
||||
ivBack = findViewById(R.id.iv_back);
|
||||
}
|
||||
|
||||
private void onSetListener() {
|
||||
btnNext.setOnClickListener(this);
|
||||
btnNext.setEnabled(false);
|
||||
accountEt.addTextChangedListener(textWatcher);
|
||||
ivBack.setOnClickListener(this);
|
||||
}
|
||||
|
||||
private void checkInput() {
|
||||
if (!TextUtils.isEmpty(accountEt.getText().toString()) && accountEt.getText().toString().length() >= 7) {
|
||||
btnNext.setEnabled(true);
|
||||
} else {
|
||||
btnNext.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_next:
|
||||
if (!NetworkUtils.isNetworkStrictlyAvailable(this)) {
|
||||
checkNetToast();
|
||||
return;
|
||||
}
|
||||
if (!accountValidator.isValid(accountEt.getText().toString())) {
|
||||
toast(accountValidator.getErrorMessage());
|
||||
return;
|
||||
}
|
||||
BindCodeActivity.startForResult(BindPhoneActivity.this, accountEt.getText().toString(), REQUEST_CODE);
|
||||
break;
|
||||
|
||||
case R.id.iv_back:
|
||||
handleFinish();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
accountEt = null;
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
View view = getCurrentFocus();
|
||||
boolean isPressEdit = false;
|
||||
if (view instanceof EditText) {
|
||||
if (event.getRawX() >= view.getX() && event.getRawX() <= view.getX() + view.getWidth() && event.getRawY() >= view.getY() && event.getRawY() <= view.getY() + view.getHeight()) {
|
||||
isPressEdit = true;
|
||||
}
|
||||
}
|
||||
if (!isPressEdit) {
|
||||
hideIME();
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
handleFinish();
|
||||
}
|
||||
|
||||
private void handleFinish() {
|
||||
LogoutHelper.logout();
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,218 @@
|
||||
package com.yizhuan.erban.ui.login
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.CountDownTimer
|
||||
import android.text.Editable
|
||||
import android.text.TextUtils
|
||||
import android.text.TextWatcher
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.widget.EditText
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.coorchice.library.utils.LogUtils
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityBindPhoneBinding
|
||||
import com.yizhuan.erban.ui.login.BindPhoneActivity
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_core.code.CodeType
|
||||
import com.yizhuan.xchat_android_core.user.UserModel
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
||||
import com.yizhuan.xchat_android_library.utils.NetworkUtils
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import io.reactivex.SingleObserver
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
/**
|
||||
* 由于所有用户都需要强制绑定手机,所以理论上这里只有MainActivity会调用到这个界面
|
||||
* 但是为了以防万一,其它调用绑定手机的地方也改为调用这个页面了
|
||||
*/
|
||||
class BindPhoneActivity : BaseViewBindingActivity<ActivityBindPhoneBinding>(),
|
||||
View.OnClickListener, TextWatcher {
|
||||
|
||||
private var cdt: CountDownTimer? = null
|
||||
|
||||
companion object {
|
||||
private const val TAG = "BindPhoneActivity"
|
||||
const val REQUEST_AREA_CODE = 100
|
||||
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val intent = Intent(context, BindPhoneActivity::class.java)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
initTitleBar(getString(R.string.text_bind_phone))
|
||||
initListener()
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
binding.tvAreaCode.setOnClickListener(this)
|
||||
binding.tvGetCode.setOnClickListener(this)
|
||||
binding.btnNext.setOnClickListener(this)
|
||||
binding.etAccount.addTextChangedListener(this)
|
||||
binding.etCode.addTextChangedListener(this)
|
||||
}
|
||||
|
||||
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(p0: Editable?) {
|
||||
binding.btnNext.isEnabled = !TextUtils.isEmpty(binding.etAccount.text.toString()) &&
|
||||
!TextUtils.isEmpty(binding.etCode.text.toString())
|
||||
}
|
||||
|
||||
override fun onClick(v: View) {
|
||||
when (v.id) {
|
||||
R.id.tv_area_code -> {
|
||||
AreaCodeActivity.startForResult(this, REQUEST_AREA_CODE)
|
||||
}
|
||||
R.id.tv_get_code -> {
|
||||
dialogManager.showProgressDialog(this)
|
||||
AuthModel.get()
|
||||
.getSmsCode(
|
||||
binding.tvAreaCode.text.toString().substring(1),
|
||||
binding.tvAreaCode.text.toString()
|
||||
.substring(1) + binding.etAccount.text.toString(),
|
||||
CodeType.BIND_PHONE
|
||||
)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribe(object : SingleObserver<String?> {
|
||||
override fun onSubscribe(d: Disposable) {}
|
||||
override fun onSuccess(tip: String) {
|
||||
dialogManager.dismissDialog()
|
||||
startCounter()
|
||||
toast(tip)
|
||||
}
|
||||
|
||||
override fun onError(e: Throwable) {
|
||||
dialogManager.dismissDialog()
|
||||
toast(e.message)
|
||||
LogUtils.e(ResUtil.getString(R.string.ui_login_bindcodeactivity_01))
|
||||
}
|
||||
})
|
||||
}
|
||||
R.id.btn_next -> {
|
||||
if (!NetworkUtils.isNetworkStrictlyAvailable(this)) {
|
||||
checkNetToast()
|
||||
return
|
||||
}
|
||||
dialogManager.showProgressDialog(
|
||||
this,
|
||||
ResUtil.getString(R.string.ui_login_bindcodeactivity_02)
|
||||
)
|
||||
AuthModel.get().bindPhone(
|
||||
binding.tvAreaCode.text.toString().substring(1),
|
||||
binding.tvAreaCode.text.toString()
|
||||
.substring(1) + binding.etAccount.text.toString(),
|
||||
binding.etCode.text.toString()
|
||||
)
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.doOnSuccess { s: String? ->
|
||||
toast(ResUtil.getString(R.string.ui_login_bindcodeactivity_03))
|
||||
setResult(RESULT_OK)
|
||||
}
|
||||
.doOnError { throwable: Throwable ->
|
||||
toast(
|
||||
throwable.message
|
||||
)
|
||||
}
|
||||
.flatMap { s: String? ->
|
||||
UserModel.get().updateCurrentUserInfo()
|
||||
}
|
||||
.doOnSuccess { s: UserInfo? ->
|
||||
setResult(RESULT_OK)
|
||||
finish()
|
||||
}
|
||||
.doFinally { dialogManager.dismissDialog() }
|
||||
.subscribe()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun startCounter() {
|
||||
stopCounter()
|
||||
//开始倒计时 60s 间隔1s
|
||||
binding.tvGetCode.isEnabled = false
|
||||
binding.tvGetCode.setTextColor(ContextCompat.getColor(this, R.color.color_9168FA))
|
||||
cdt = object : CountDownTimer(60 * 1000, 100) {
|
||||
override fun onTick(text: Long) {
|
||||
showTextDown(text)
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
resetBtn()
|
||||
}
|
||||
}
|
||||
cdt?.start()
|
||||
}
|
||||
|
||||
private fun showTextDown(text: Long) {
|
||||
val time = (text / 1000).toString() + "s"
|
||||
binding.tvGetCode.text = time
|
||||
}
|
||||
|
||||
private fun stopCounter() {
|
||||
cdt?.cancel()
|
||||
cdt = null
|
||||
}
|
||||
|
||||
|
||||
private fun resetBtn() {
|
||||
stopCounter()
|
||||
binding.tvGetCode.setTextColor(ContextCompat.getColor(this, R.color.text_title_color))
|
||||
binding.tvGetCode.isEnabled = true
|
||||
binding.tvGetCode.text = getString(R.string.text_request_code)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == REQUEST_AREA_CODE && resultCode == RESULT_OK) {
|
||||
val areaCode = data?.getStringExtra(AreaCodeActivity.COUNTRY_NUMBER)
|
||||
if (areaCode != null) {
|
||||
binding.tvAreaCode.text = areaCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTouchEvent(event: MotionEvent): Boolean {
|
||||
val view = currentFocus
|
||||
var isPressEdit = false
|
||||
if (view is EditText) {
|
||||
if (event.rawX >= view.getX() && event.rawX <= view.getX() + view.getWidth() && event.rawY >= view.getY() && event.rawY <= view.getY() + view.getHeight()) {
|
||||
isPressEdit = true
|
||||
}
|
||||
}
|
||||
if (!isPressEdit) {
|
||||
hideIME()
|
||||
}
|
||||
return super.onTouchEvent(event)
|
||||
}
|
||||
|
||||
override fun needSteepStateBar(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun setStatusBar() {
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
stopCounter()
|
||||
}
|
||||
|
||||
}
|
@@ -219,7 +219,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
|
||||
break;
|
||||
case R.id.tv_phone:
|
||||
|
||||
LoginPhoneActivity.start(this);
|
||||
break;
|
||||
case R.id.tv_others:
|
||||
LoginPasswordActivity.start(LoginActivity.this);
|
||||
|
@@ -1,230 +0,0 @@
|
||||
package com.yizhuan.erban.ui.login;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
|
||||
import com.yizhuan.erban.ui.login.ui.CodeEditText;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
||||
import com.yizhuan.xchat_android_core.code.CodeType;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import io.reactivex.SingleObserver;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/**
|
||||
* @author zhouxiangfeng
|
||||
* @date 17/2/26
|
||||
*/
|
||||
public class LoginCodeActivity extends BaseActivity {
|
||||
|
||||
private CodeEditText codeEt;
|
||||
private TextView tvGetCode, tvDesc, tvSecond;
|
||||
private String mPhone;
|
||||
private boolean isSuperAdmin = false;
|
||||
private CodeDownDescTimer timer;
|
||||
|
||||
public static void start(Context context, String phone) {
|
||||
Intent intent = new Intent(context, LoginCodeActivity.class);
|
||||
intent.putExtra("phone", phone);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void startForResult(Activity context, int requestCode) {
|
||||
Intent intent = new Intent(context, LoginCodeActivity.class);
|
||||
context.startActivityForResult(intent, requestCode); // startActivityForResult会导致singletop,singletask失效
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login_code);
|
||||
EventBus.getDefault().register(this);
|
||||
onFindViews();
|
||||
initData();
|
||||
onSetListener();
|
||||
getSmsCode();
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void initData() {
|
||||
mPhone = getIntent().getStringExtra("phone");
|
||||
|
||||
codeEt.setFocusable(true);
|
||||
codeEt.setFocusableInTouchMode(true);
|
||||
codeEt.requestFocus();
|
||||
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
}
|
||||
|
||||
private void onFindViews() {
|
||||
codeEt = findViewById(R.id.et_code);
|
||||
tvGetCode = findViewById(R.id.tv_get_code);
|
||||
tvDesc = findViewById(R.id.tv_desc);
|
||||
tvSecond = findViewById(R.id.tv_second);
|
||||
}
|
||||
|
||||
private void onSetListener() {
|
||||
|
||||
codeEt.setOnTextFinishListener((text, length) -> login());
|
||||
|
||||
tvGetCode.setOnClickListener(v -> getSmsCode());
|
||||
|
||||
findViewById(R.id.iv_back).setOnClickListener(v -> finish());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
codeEt = null;
|
||||
super.onDestroy();
|
||||
stopCountDownTimer();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
View view = getCurrentFocus();
|
||||
boolean isPressEdit = false;
|
||||
if (view instanceof EditText) {
|
||||
if (event.getRawX() >= view.getX() && event.getRawX() <= view.getX() + view.getWidth() && event.getRawY() >= view.getY() && event.getRawY() <= view.getY() + view.getHeight()) {
|
||||
isPressEdit = true;
|
||||
}
|
||||
}
|
||||
if (!isPressEdit) {
|
||||
hideIME();
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取验证码
|
||||
*/
|
||||
@SuppressLint("CheckResult")
|
||||
private void getSmsCode() {
|
||||
if (TextUtils.isEmpty(mPhone) || mPhone.length() != 11) {
|
||||
return;
|
||||
}
|
||||
AuthModel.get()
|
||||
.sendLoginCode(mPhone, CodeType.REGISTER)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribe(new SingleObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
tvDesc.setText(getString(R.string.str_send_code_success) + mPhone);
|
||||
startCountDownTimer();
|
||||
toast(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
toast(e.getMessage());
|
||||
// finish();
|
||||
LogUtils.e(ResUtil.getString(R.string.ui_login_logincodeactivity_01));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void login() {
|
||||
String smsCode = codeEt.getText().toString();
|
||||
getDialogManager().showProgressDialog(this, ResUtil.getString(R.string.ui_login_logincodeactivity_02));
|
||||
AuthModel.get().login(
|
||||
mPhone,
|
||||
"",
|
||||
smsCode,
|
||||
"",
|
||||
"")
|
||||
.subscribe(new SingleObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mCompositeDisposable.add(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
getDialogManager().dismissDialog();
|
||||
stopCountDownTimer();
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
getDialogManager().dismissDialog();
|
||||
dealWithLoginError(e);
|
||||
}
|
||||
});
|
||||
|
||||
StatisticManager.Instance().onEvent(this,
|
||||
StatisticsProtocol.EVENT_LOGIN_PHONE_CLICK, ResUtil.getString(R.string.ui_login_logincodeactivity_03), null);
|
||||
}
|
||||
|
||||
public void dealWithLoginError(Throwable e) {
|
||||
LogoutHelper.dealWithLoginError(this, e);
|
||||
}
|
||||
|
||||
private void startCountDownTimer() {
|
||||
stopCountDownTimer();
|
||||
timer = new CodeDownDescTimer(tvSecond, tvGetCode, 60000, 1000);
|
||||
timer.start();
|
||||
}
|
||||
|
||||
private void stopCountDownTimer() {
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
timer = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册成功后发送过来的事件
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLoginEvent(LoginEvent event) {
|
||||
getDialogManager().dismissDialog();
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,195 @@
|
||||
package com.yizhuan.erban.ui.login
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.MotionEvent
|
||||
import android.view.WindowManager
|
||||
import android.widget.EditText
|
||||
import com.coorchice.library.utils.LogUtils
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityLoginCodeBinding
|
||||
import com.yizhuan.erban.ui.login.helper.LogoutHelper
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent
|
||||
import com.yizhuan.xchat_android_core.code.CodeType
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import io.reactivex.SingleObserver
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
|
||||
/**
|
||||
* 验证码页面
|
||||
* Created by wushaocheng
|
||||
* Date: 2022/11/28
|
||||
*/
|
||||
class LoginCodeActivity : BaseViewBindingActivity<ActivityLoginCodeBinding>() {
|
||||
private var mPhone: String? = null
|
||||
|
||||
companion object {
|
||||
fun start(context: Context, phone: String?) {
|
||||
val intent = Intent(context, LoginCodeActivity::class.java)
|
||||
intent.putExtra("phone", phone)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
|
||||
fun startForResult(context: Activity, requestCode: Int) {
|
||||
val intent = Intent(context, LoginCodeActivity::class.java)
|
||||
context.startActivityForResult(
|
||||
intent,
|
||||
requestCode
|
||||
) // startActivityForResult会导致singletop,singletask失效
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
EventBus.getDefault().register(this)
|
||||
initData()
|
||||
initListener()
|
||||
getSmsCode()
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun initData() {
|
||||
mPhone = intent.getStringExtra("phone")
|
||||
this.window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
binding.etCode.addTextChangedListener(object : TextWatcher{
|
||||
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(p0: Editable?) {
|
||||
binding.btnNext.isEnabled = p0?.isEmpty() != true
|
||||
}
|
||||
|
||||
})
|
||||
binding.tvRegain.setOnClickListener { getSmsCode() }
|
||||
binding.btnNext.setOnClickListener {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTouchEvent(event: MotionEvent): Boolean {
|
||||
val view = currentFocus
|
||||
var isPressEdit = false
|
||||
if (view is EditText) {
|
||||
if (event.rawX >= view.getX() && event.rawX <= view.getX() + view.getWidth() && event.rawY >= view.getY() && event.rawY <= view.getY() + view.getHeight()) {
|
||||
isPressEdit = true
|
||||
}
|
||||
}
|
||||
if (!isPressEdit) {
|
||||
hideIME()
|
||||
}
|
||||
return super.onTouchEvent(event)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取验证码
|
||||
*/
|
||||
private fun getSmsCode(){
|
||||
AuthModel.get()
|
||||
.sendLoginCode(mPhone, CodeType.REGISTER)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribe(object : SingleObserver<String?> {
|
||||
override fun onSubscribe(d: Disposable) {}
|
||||
|
||||
override fun onSuccess(tip: String) {
|
||||
// startCountDownTimer()
|
||||
toast(tip)
|
||||
}
|
||||
|
||||
override fun onError(e: Throwable) {
|
||||
toast(e.message)
|
||||
//finish();
|
||||
LogUtils.e(ResUtil.getString(R.string.ui_login_logincodeactivity_01))
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
private fun login() {
|
||||
val smsCode = binding.etCode.text.toString()
|
||||
dialogManager.showProgressDialog(
|
||||
this,
|
||||
ResUtil.getString(R.string.ui_login_logincodeactivity_02)
|
||||
)
|
||||
AuthModel.get().login(
|
||||
mPhone,
|
||||
"",
|
||||
smsCode,
|
||||
"",
|
||||
""
|
||||
)
|
||||
.subscribe(object : SingleObserver<String?> {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
mCompositeDisposable.add(d)
|
||||
}
|
||||
|
||||
override fun onSuccess(t: String) {
|
||||
dialogManager.dismissDialog()
|
||||
// stopCountDownTimer()
|
||||
setResult(RESULT_OK)
|
||||
finish()
|
||||
}
|
||||
|
||||
override fun onError(e: Throwable) {
|
||||
dialogManager.dismissDialog()
|
||||
dealWithLoginError(e)
|
||||
}
|
||||
})
|
||||
StatisticManager.Instance().onEvent(
|
||||
this,
|
||||
StatisticsProtocol.EVENT_LOGIN_PHONE_CLICK,
|
||||
ResUtil.getString(R.string.ui_login_logincodeactivity_03),
|
||||
null
|
||||
)
|
||||
}
|
||||
|
||||
fun dealWithLoginError(e: Throwable?) {
|
||||
LogoutHelper.dealWithLoginError(this, e)
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册成功后发送过来的事件
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onLoginEvent(event: LoginEvent?) {
|
||||
dialogManager.dismissDialog()
|
||||
setResult(RESULT_OK)
|
||||
finish()
|
||||
}
|
||||
|
||||
override fun needSteepStateBar(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun setStatusBar() {
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
|
||||
}
|
@@ -15,6 +15,7 @@ import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.application.ReportManager;
|
||||
import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
|
||||
import com.yizhuan.erban.ui.setting.ResetPasswordActivity;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||
@@ -69,9 +70,10 @@ public class LoginPasswordActivity extends BaseActivity {
|
||||
edtPassword.addTextChangedListener(textWatcher);
|
||||
btnNext.setOnClickListener(v -> login());
|
||||
findViewById(R.id.tv_forget_password).setOnClickListener(v ->
|
||||
getDialogManager().showOkCancelWithTitleDialog(getString(R.string.login_contact_service), "LINE:pekoyuyin", getString(R.string.button_ok), "", true, () -> {
|
||||
|
||||
})
|
||||
ResetPasswordActivity.start(context, ResetPasswordActivity.FROM_NOT_LOGIN)
|
||||
// getDialogManager().showOkCancelWithTitleDialog(getString(R.string.login_contact_service), "LINE:pekoyuyin", getString(R.string.button_ok), "", true, () -> {
|
||||
//
|
||||
// })
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,91 @@
|
||||
package com.yizhuan.erban.ui.login
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.widget.EditText
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityLoginPhoneBinding
|
||||
|
||||
/**
|
||||
* 手机号登录页面
|
||||
* Created by wushaocheng
|
||||
* Date: 2022/11/28
|
||||
*/
|
||||
class LoginPhoneActivity : BaseViewBindingActivity<ActivityLoginPhoneBinding>(),
|
||||
View.OnClickListener {
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, LoginPhoneActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
this.window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||
initListener()
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
binding.tvCode.setOnClickListener(this)
|
||||
binding.btnNext.setOnClickListener(this)
|
||||
binding.etPhone.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(p0: Editable?) {
|
||||
binding.btnNext.isEnabled = p0?.isEmpty() != true
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
override fun onClick(view: View?) {
|
||||
when (view?.id) {
|
||||
R.id.tvCode -> {
|
||||
|
||||
}
|
||||
R.id.btnNext -> {
|
||||
hideIME()
|
||||
LoginCodeActivity.start(this, binding.etPhone.text.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTouchEvent(event: MotionEvent): Boolean {
|
||||
val view = currentFocus
|
||||
var isPressEdit = false
|
||||
if (view is EditText) {
|
||||
if (event.rawX >= view.getX() && event.rawX <= view.getX() + view.getWidth() && event.rawY >= view.getY() && event.rawY <= view.getY() + view.getHeight()) {
|
||||
isPressEdit = true
|
||||
}
|
||||
}
|
||||
if (!isPressEdit) {
|
||||
hideIME()
|
||||
}
|
||||
return super.onTouchEvent(event)
|
||||
}
|
||||
|
||||
override fun needSteepStateBar() = true
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
|
||||
}
|
@@ -1,52 +1,58 @@
|
||||
package com.yizhuan.erban.ui.login;
|
||||
package com.yizhuan.erban.ui.login
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.TextView;
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import android.widget.TextView
|
||||
import com.yizhuan.xchat_android_core.user.UserModel
|
||||
import com.yizhuan.erban.ui.setting.VerifyPhoneActivity
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import android.content.Intent
|
||||
import android.text.TextUtils
|
||||
import android.view.View
|
||||
import com.yizhuan.erban.base.BaseActivity
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityShowBindPhoneBinding
|
||||
import com.yizhuan.erban.ui.login.ShowBindPhoneActivity
|
||||
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.erban.ui.setting.VerifyPhoneActivity;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
/**
|
||||
* 已綁定手機號頁面
|
||||
* Created by wushaocheng
|
||||
* Date: 2022/11/28
|
||||
*/
|
||||
class ShowBindPhoneActivity : BaseViewBindingActivity<ActivityShowBindPhoneBinding>() {
|
||||
|
||||
public class ShowBindPhoneActivity extends BaseActivity {
|
||||
|
||||
public static void start(Context context) {
|
||||
Intent intent = new Intent(context, ShowBindPhoneActivity.class);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_show_bind_phone);
|
||||
initWhiteTitleBar(ResUtil.getString(R.string.ui_login_showbindphoneactivity_01));
|
||||
TextView tv_phone = findViewById(R.id.tv_phone);
|
||||
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
|
||||
if (userInfo != null && !TextUtils.isEmpty(userInfo.getPhone())) {
|
||||
tv_phone.setText(userInfo.getPhone());
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val intent = Intent(context, ShowBindPhoneActivity::class.java)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
findViewById(R.id.tv_change_phone).setOnClickListener(v -> {
|
||||
VerifyPhoneActivity.start(ShowBindPhoneActivity.this, false);
|
||||
finish();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun init() {
|
||||
initWhiteTitleBar(getString(R.string.text_bind_phone))
|
||||
val userInfo = UserModel.get().cacheLoginUserInfo
|
||||
if (userInfo != null && !TextUtils.isEmpty(userInfo.phone)) {
|
||||
binding.tvPhone.text = "+${userInfo.phoneAreaCode} ${userInfo.phone}"
|
||||
}
|
||||
binding.tvChangePhone.setOnClickListener { v: View? ->
|
||||
VerifyPhoneActivity.start(this@ShowBindPhoneActivity, false)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
super.setStatusBar();
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
override fun needSteepStateBar(): Boolean {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package com.yizhuan.erban.ui.login.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CountryBean {
|
||||
public String name;
|
||||
public String code;
|
||||
|
||||
public CountryBean(String name, String code) {
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
}
|
@@ -179,9 +179,14 @@ public class ModifyPwdActivity extends BaseBindingActivity<ActivityModifyPwdBind
|
||||
commit();
|
||||
break;
|
||||
case R.id.btn_forget:
|
||||
getDialogManager().showOkCancelWithTitleDialog(getString(R.string.login_contact_service), "LINE:pekoyuyin", getString(R.string.button_ok), "", true, () -> {
|
||||
|
||||
});
|
||||
if (type == PAY_PWD) {
|
||||
VerifyPhoneActivity.startForResult(this, true);
|
||||
} else {
|
||||
ResetPasswordActivity.start(context, ResetPasswordActivity.FROM_LOGIN);
|
||||
}
|
||||
// getDialogManager().showOkCancelWithTitleDialog(getString(R.string.login_contact_service), "LINE:pekoyuyin", getString(R.string.button_ok), "", true, () -> {
|
||||
//
|
||||
// });
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -1,189 +1,213 @@
|
||||
package com.yizhuan.erban.ui.setting;
|
||||
package com.yizhuan.erban.ui.setting
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.CountDownTimer
|
||||
import android.text.Editable
|
||||
import android.text.TextUtils
|
||||
import android.text.TextWatcher
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.coorchice.library.utils.LogUtils
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityResetLoginPwdBinding
|
||||
import com.yizhuan.erban.ui.login.AreaCodeActivity
|
||||
import com.yizhuan.erban.ui.login.BindPhoneActivity
|
||||
import com.yizhuan.erban.ui.login.CodeDownTimer
|
||||
import com.yizhuan.erban.ui.login.helper.LogoutHelper
|
||||
import com.yizhuan.erban.ui.setting.ResetPasswordActivity
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_core.code.CodeType
|
||||
import com.yizhuan.xchat_android_core.user.UserModel
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper
|
||||
import io.reactivex.SingleObserver
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseBindingActivity;
|
||||
import com.yizhuan.erban.databinding.ActivityResetLoginPwdBinding;
|
||||
import com.yizhuan.erban.ui.login.CodeDownTimer;
|
||||
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.code.CodeType;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||
|
||||
import io.reactivex.SingleObserver;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
@ActLayoutRes(R.layout.activity_reset_login_pwd)
|
||||
public class ResetPasswordActivity extends BaseBindingActivity<ActivityResetLoginPwdBinding> {
|
||||
public static final int FROM_NOT_LOGIN = 1;
|
||||
public static final int FROM_LOGIN = 2;
|
||||
|
||||
|
||||
private int from;
|
||||
|
||||
private CodeDownTimer timer;
|
||||
|
||||
private final TextWatcher textWatcher = new TextWatcherWrapper() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
checkInput();
|
||||
class ResetPasswordActivity : BaseViewBindingActivity<ActivityResetLoginPwdBinding>(),
|
||||
View.OnClickListener {
|
||||
private var from = 0
|
||||
private var cdt: CountDownTimer? = null
|
||||
private val textWatcher: TextWatcher = object : TextWatcherWrapper() {
|
||||
override fun afterTextChanged(s: Editable) {
|
||||
checkInput()
|
||||
}
|
||||
};
|
||||
|
||||
public static void start(Context context, int type) {
|
||||
Intent intent = new Intent(context, ResetPasswordActivity.class);
|
||||
intent.putExtra("from", type);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
from = getIntent().getIntExtra("from", FROM_LOGIN);
|
||||
mBinding.setClick(this);
|
||||
initWhiteTitleBar(ResUtil.getString(R.string.ui_setting_resetpasswordactivity_01));
|
||||
companion object {
|
||||
const val FROM_NOT_LOGIN = 1
|
||||
const val FROM_LOGIN = 2
|
||||
|
||||
if (from == FROM_LOGIN) {
|
||||
if (UserModel.get().getCacheLoginUserInfo() != null) {
|
||||
mBinding.etPhone.setText(UserModel.get().getCacheLoginUserInfo().getPhone());
|
||||
@JvmStatic
|
||||
fun start(context: Context, type: Int) {
|
||||
val intent = Intent(context, ResetPasswordActivity::class.java)
|
||||
intent.putExtra("from", type)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
from = intent.getIntExtra("from", FROM_LOGIN)
|
||||
initWhiteTitleBar(ResUtil.getString(R.string.ui_setting_resetpasswordactivity_01))
|
||||
// if (from == FROM_LOGIN) {
|
||||
// if (UserModel.get().cacheLoginUserInfo != null) {
|
||||
// binding.etAccount.setText(UserModel.get().cacheLoginUserInfo!!.phone)
|
||||
// }
|
||||
// binding.etAccount.isEnabled = false
|
||||
// }
|
||||
initListener()
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
binding.tvAreaCode.setOnClickListener(this)
|
||||
binding.tvGetCode.setOnClickListener(this)
|
||||
binding.btnCommit.setOnClickListener(this)
|
||||
|
||||
binding.etAccount.addTextChangedListener(textWatcher)
|
||||
binding.etPassword.editText.addTextChangedListener(textWatcher)
|
||||
binding.etCode.addTextChangedListener(textWatcher)
|
||||
}
|
||||
|
||||
private fun checkInput() {
|
||||
val enabled =
|
||||
!TextUtils.isEmpty(binding.etAccount.text) && binding.etAccount.text.toString()
|
||||
.trim { it <= ' ' }.length >= 7 && !TextUtils.isEmpty(binding.etPassword.text) && binding.etPassword.text.trim { it <= ' ' }.length >= 6 && !TextUtils.isEmpty(
|
||||
binding.etCode.text
|
||||
) && binding.etCode.text.toString().trim { it <= ' ' }.length >= 5
|
||||
binding.btnCommit.isEnabled = enabled
|
||||
}
|
||||
|
||||
override fun onClick(v: View) {
|
||||
when (v.id) {
|
||||
R.id.tv_area_code -> {
|
||||
AreaCodeActivity.startForResult(this, BindPhoneActivity.REQUEST_AREA_CODE)
|
||||
}
|
||||
mBinding.etPhone.setEnabled(false);
|
||||
}
|
||||
mBinding.etPhone.addTextChangedListener(textWatcher);
|
||||
mBinding.edPassword.getEditText().addTextChangedListener(textWatcher);
|
||||
mBinding.etCode.addTextChangedListener(textWatcher);
|
||||
}
|
||||
|
||||
private void checkInput() {
|
||||
boolean enabled = !TextUtils.isEmpty(mBinding.etPhone.getText()) && mBinding.etPhone.getText().toString().trim().length() >= 7
|
||||
&& !TextUtils.isEmpty(mBinding.edPassword.getText()) && mBinding.edPassword.getText().trim().length() >= 6
|
||||
&& !TextUtils.isEmpty(mBinding.etCode.getText()) && mBinding.etCode.getText().toString().trim().length() >= 5;
|
||||
mBinding.btnCommit.setEnabled(enabled);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
super.onClick(v);
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_commit:
|
||||
commit();
|
||||
break;
|
||||
case R.id.btn_get_code:
|
||||
if (TextUtils.isEmpty(mBinding.etPhone.getText())) {
|
||||
toast(ResUtil.getString(R.string.ui_setting_resetpasswordactivity_02));
|
||||
return;
|
||||
}
|
||||
mBinding.btnGetCode.setClickable(false);
|
||||
R.id.tv_get_code -> {
|
||||
dialogManager.showProgressDialog(this)
|
||||
AuthModel.get()
|
||||
.sendLoginCode(mBinding.etPhone.getText().toString().trim(), from == FROM_LOGIN ?
|
||||
CodeType.RESET_PSW_LOGIN : CodeType.RESET_PSW_NOT_LOGIN)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribe(new SingleObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
.getSmsCode(
|
||||
binding.tvAreaCode.text.toString().substring(1),
|
||||
binding.tvAreaCode.text.toString()
|
||||
.substring(1) + binding.etAccount.text.toString(),
|
||||
if (from == FROM_LOGIN) CodeType.RESET_PSW_LOGIN else CodeType.RESET_PSW_NOT_LOGIN
|
||||
)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribe(object : SingleObserver<String?> {
|
||||
override fun onSubscribe(d: Disposable) {}
|
||||
override fun onSuccess(t: String) {
|
||||
dialogManager.dismissDialog()
|
||||
startCounter()
|
||||
}
|
||||
|
||||
}
|
||||
override fun onError(e: Throwable) {
|
||||
dialogManager.dismissDialog()
|
||||
toast(e.message)
|
||||
LogUtils.e(ResUtil.getString(R.string.ui_setting_resetpasswordactivity_03))
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
startCountDownTimer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
mBinding.btnGetCode.setClickable(true);
|
||||
LogUtils.e(ResUtil.getString(R.string.ui_setting_resetpasswordactivity_03));
|
||||
}
|
||||
});
|
||||
break;
|
||||
})
|
||||
}
|
||||
R.id.btn_commit -> commit()
|
||||
}
|
||||
}
|
||||
|
||||
private void startCountDownTimer() {
|
||||
stopCountDownTimer();
|
||||
timer = new CodeDownTimer(mBinding.btnGetCode, 60000, 1000);
|
||||
timer.start();
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == BindPhoneActivity.REQUEST_AREA_CODE && resultCode == RESULT_OK) {
|
||||
val areaCode = data?.getStringExtra(AreaCodeActivity.COUNTRY_NUMBER)
|
||||
if (areaCode != null) {
|
||||
binding.tvAreaCode.text = areaCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void stopCountDownTimer() {
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
timer = null;
|
||||
private fun startCounter() {
|
||||
stopCounter()
|
||||
//开始倒计时 60s 间隔1s
|
||||
binding.tvGetCode.isEnabled = false
|
||||
binding.tvGetCode.setTextColor(ContextCompat.getColor(this, R.color.color_9168FA))
|
||||
cdt = object : CountDownTimer(60 * 1000, 100) {
|
||||
override fun onTick(text: Long) {
|
||||
showTextDown(text)
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
resetBtn()
|
||||
}
|
||||
}
|
||||
cdt?.start()
|
||||
}
|
||||
|
||||
private fun showTextDown(text: Long) {
|
||||
val time = (text / 1000).toString() + "s"
|
||||
binding.tvGetCode.text = time
|
||||
}
|
||||
|
||||
private fun stopCounter() {
|
||||
cdt?.cancel()
|
||||
cdt = null
|
||||
}
|
||||
|
||||
private fun resetBtn() {
|
||||
stopCounter()
|
||||
binding.tvGetCode.setTextColor(ContextCompat.getColor(this, R.color.text_title_color))
|
||||
binding.tvGetCode.isEnabled = true
|
||||
binding.tvGetCode.text = getString(R.string.text_request_code)
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void commit() {
|
||||
if (TextUtils.isEmpty(mBinding.etPhone.getText())) {
|
||||
toast(ResUtil.getString(R.string.ui_setting_resetpasswordactivity_04));
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(mBinding.edPassword.getText())) {
|
||||
toast(ResUtil.getString(R.string.ui_setting_resetpasswordactivity_05));
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(mBinding.etCode.getText())) {
|
||||
toast(ResUtil.getString(R.string.ui_setting_resetpasswordactivity_06));
|
||||
return;
|
||||
}
|
||||
|
||||
getDialogManager().showProgressDialog(ResetPasswordActivity.this, ResUtil.getString(R.string.ui_setting_resetpasswordactivity_07));
|
||||
private fun commit() {
|
||||
dialogManager.showProgressDialog(
|
||||
this@ResetPasswordActivity,
|
||||
ResUtil.getString(R.string.ui_setting_resetpasswordactivity_07)
|
||||
)
|
||||
AuthModel.get().requestResetPsw(
|
||||
mBinding.etPhone.getText().toString().trim(),
|
||||
mBinding.etCode.getText().toString().trim(),
|
||||
mBinding.edPassword.getText().trim())
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(new SingleObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
binding.tvAreaCode.text.toString().substring(1) + binding.etAccount.text.toString()
|
||||
.trim { it <= ' ' },
|
||||
binding.etCode.text.toString().trim { it <= ' ' },
|
||||
binding.etPassword.text.trim { it <= ' ' })
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(object : SingleObserver<String?> {
|
||||
override fun onSubscribe(d: Disposable) {}
|
||||
|
||||
override fun onSuccess(t: String) {
|
||||
dialogManager.dismissDialog()
|
||||
UserModel.get().updateCurrentUserInfo().subscribe()
|
||||
toast(ResUtil.getString(R.string.ui_setting_resetpasswordactivity_08))
|
||||
if (from == FROM_LOGIN) {
|
||||
LogoutHelper.logout()
|
||||
}
|
||||
finish()
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
getDialogManager().dismissDialog();
|
||||
UserModel.get().updateCurrentUserInfo().subscribe();
|
||||
toast(ResUtil.getString(R.string.ui_setting_resetpasswordactivity_08));
|
||||
if (from == FROM_LOGIN) {
|
||||
LogoutHelper.logout();
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
getDialogManager().dismissDialog();
|
||||
toast(e.getMessage());
|
||||
}
|
||||
});
|
||||
override fun onError(e: Throwable) {
|
||||
dialogManager.dismissDialog()
|
||||
toast(e.message)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
override fun needSteepStateBar(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
super.setStatusBar();
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
dialogManager.dismissDialog()
|
||||
stopCounter()
|
||||
}
|
||||
|
||||
}
|
@@ -17,6 +17,8 @@ import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||
import com.yizhuan.erban.databinding.ActivitySettingBinding;
|
||||
import com.yizhuan.erban.ui.im.avtivity.BlackListManageActivity;
|
||||
import com.yizhuan.erban.ui.login.BindPhoneActivity;
|
||||
import com.yizhuan.erban.ui.login.ShowBindPhoneActivity;
|
||||
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
|
||||
import com.yizhuan.erban.ui.user.AboutActivity;
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
|
||||
@@ -36,6 +38,8 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import lombok.val;
|
||||
|
||||
/**
|
||||
* Created by zhouxiangfeng on 2017/4/16.
|
||||
*/
|
||||
@@ -79,6 +83,14 @@ public class SettingActivity extends BaseActivity implements View.OnClickListene
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.rly_bind_phone:
|
||||
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
|
||||
if(userInfo != null && userInfo.isBindPhone()){
|
||||
ShowBindPhoneActivity.start(context);
|
||||
}else {
|
||||
BindPhoneActivity.start(this);
|
||||
}
|
||||
break;
|
||||
case R.id.rly_contact_us:
|
||||
UIHelper.openContactUs(this);
|
||||
break;
|
||||
|
@@ -1,273 +1,262 @@
|
||||
package com.yizhuan.erban.ui.setting;
|
||||
package com.yizhuan.erban.ui.setting
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.CountDownTimer
|
||||
import android.text.Editable
|
||||
import android.text.TextUtils
|
||||
import android.text.TextWatcher
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityVerifyPhoneBinding
|
||||
import com.yizhuan.erban.ui.login.AreaCodeActivity
|
||||
import com.yizhuan.erban.ui.login.BindPhoneActivity
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_core.code.CodeType
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel
|
||||
import com.yizhuan.xchat_android_core.user.UserModel
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
||||
import com.yizhuan.xchat_android_core.utils.net.BeanObserver
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseBindingActivity;
|
||||
import com.yizhuan.erban.databinding.ActivityVerifyPhoneBinding;
|
||||
import com.yizhuan.erban.ui.login.BindSuccessDialog;
|
||||
import com.yizhuan.erban.ui.login.CodeDownTimer;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.code.CodeType;
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
class VerifyPhoneActivity : BaseViewBindingActivity<ActivityVerifyPhoneBinding>(),
|
||||
View.OnClickListener, TextWatcher {
|
||||
private var resetPwd = false
|
||||
private var isForgetPwd = false
|
||||
private var cdt: CountDownTimer? = null
|
||||
private var type = CodeType.UNBIND_PHONE
|
||||
|
||||
import io.reactivex.Single;
|
||||
import io.reactivex.SingleObserver;
|
||||
import io.reactivex.SingleSource;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.functions.Action;
|
||||
import io.reactivex.functions.Consumer;
|
||||
import io.reactivex.functions.Function;
|
||||
private var isVerify = false
|
||||
|
||||
companion object {
|
||||
const val REQUEST_CHECK_VALID_PHONE = 1001
|
||||
|
||||
@ActLayoutRes(R.layout.activity_verify_phone)
|
||||
public class VerifyPhoneActivity extends BaseBindingActivity<ActivityVerifyPhoneBinding> implements View.OnClickListener,
|
||||
BindSuccessDialog.BindSuccessDialogListener {
|
||||
|
||||
public static final int REQUEST_CHECK_VALID_PHONE = 1001;
|
||||
|
||||
private boolean isVerify;
|
||||
private boolean resetPwd;
|
||||
private boolean isForgetPwd;
|
||||
private CodeDownTimer timer;
|
||||
private int type = CodeType.UNBIND_PHONE;
|
||||
|
||||
public static void start(Context context, boolean resetPwd) {
|
||||
Intent intent = new Intent(context, VerifyPhoneActivity.class);
|
||||
intent.putExtra("resetPwd", resetPwd);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void startForResult(Activity context, boolean isForgetPwd) {
|
||||
Intent intent = new Intent(context, VerifyPhoneActivity.class);
|
||||
intent.putExtra("isForgetPwd", isForgetPwd);
|
||||
context.startActivityForResult(intent, REQUEST_CHECK_VALID_PHONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
initWhiteTitleBar(ResUtil.getString(R.string.ui_setting_verifyphoneactivity_01));
|
||||
isForgetPwd = getIntent().getBooleanExtra("isForgetPwd", false);
|
||||
resetPwd = getIntent().getBooleanExtra("resetPwd", false);
|
||||
if (UserModel.get().getCacheLoginUserInfo() != null
|
||||
&& !TextUtils.isEmpty(UserModel.get().getCacheLoginUserInfo().getPhone())) {
|
||||
mBinding.etPhone.setText(UserModel.get().getCacheLoginUserInfo().getPhone());
|
||||
mBinding.etPhone.setEnabled(false);
|
||||
@JvmStatic
|
||||
fun start(context: Context, resetPwd: Boolean) {
|
||||
val intent = Intent(context, VerifyPhoneActivity::class.java)
|
||||
intent.putExtra("resetPwd", resetPwd)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
|
||||
mBinding.btnGetCode.setOnClickListener(this);
|
||||
mBinding.btnRegist.setOnClickListener(this);
|
||||
mBinding.ivCodeDelete.setOnClickListener(this);
|
||||
@JvmStatic
|
||||
fun startForResult(context: Activity, isForgetPwd: Boolean) {
|
||||
val intent = Intent(context, VerifyPhoneActivity::class.java)
|
||||
intent.putExtra("isForgetPwd", isForgetPwd)
|
||||
context.startActivityForResult(intent, REQUEST_CHECK_VALID_PHONE)
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
initWhiteTitleBar(ResUtil.getString(R.string.ui_setting_verifyphoneactivity_01))
|
||||
isForgetPwd = intent.getBooleanExtra("isForgetPwd", false)
|
||||
resetPwd = intent.getBooleanExtra("resetPwd", false)
|
||||
|
||||
initListener()
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
binding.tvAreaCode.setOnClickListener(this)
|
||||
binding.tvGetCode.setOnClickListener(this)
|
||||
binding.btnNext.setOnClickListener(this)
|
||||
binding.etAccount.addTextChangedListener(this)
|
||||
binding.etCode.addTextChangedListener(this)
|
||||
}
|
||||
|
||||
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(p0: Editable?) {
|
||||
binding.btnNext.isEnabled = !TextUtils.isEmpty(binding.etAccount.text.toString()) &&
|
||||
!TextUtils.isEmpty(binding.etCode.text.toString())
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void getCode() {
|
||||
if (isForgetPwd) {
|
||||
type = CodeType.RESET_PAY_PSW;
|
||||
override fun onClick(v: View) {
|
||||
when (v.id) {
|
||||
R.id.tv_area_code -> {
|
||||
AreaCodeActivity.startForResult(this, BindPhoneActivity.REQUEST_AREA_CODE)
|
||||
}
|
||||
R.id.tv_get_code -> {
|
||||
if (isForgetPwd) {
|
||||
type = CodeType.RESET_PAY_PSW
|
||||
}
|
||||
AuthModel.get()
|
||||
.getSmsCode(
|
||||
binding.tvAreaCode.text.toString().substring(1),
|
||||
binding.tvAreaCode.text.toString()
|
||||
.substring(1) + binding.etAccount.text.toString(),
|
||||
type
|
||||
)
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError { throwable -> toast(throwable.message) }
|
||||
.doOnSubscribe {
|
||||
dialogManager.showProgressDialog(
|
||||
this@VerifyPhoneActivity,
|
||||
ResUtil.getString(R.string.ui_setting_verifyphoneactivity_02)
|
||||
)
|
||||
}
|
||||
.doAfterTerminate { dialogManager.dismissDialog() }
|
||||
.subscribe { s: String?, throwable: Throwable? ->
|
||||
if (throwable != null) {
|
||||
return@subscribe
|
||||
}
|
||||
toast(ResUtil.getString(R.string.ui_setting_verifyphoneactivity_03))
|
||||
startCounter()
|
||||
}
|
||||
}
|
||||
R.id.btn_next -> {
|
||||
clickNextButton()
|
||||
}
|
||||
}
|
||||
AuthModel.get()
|
||||
.sendLoginCode(mBinding.etPhone.getText().toString(), type)
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError(new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
toast(throwable.getMessage());
|
||||
}
|
||||
})
|
||||
.doOnSubscribe(new Consumer<Disposable>() {
|
||||
@Override
|
||||
public void accept(Disposable disposable) throws Exception {
|
||||
getDialogManager().showProgressDialog(VerifyPhoneActivity.this, ResUtil.getString(R.string.ui_setting_verifyphoneactivity_02));
|
||||
}
|
||||
})
|
||||
.doAfterTerminate(new Action() {
|
||||
@Override
|
||||
public void run() throws Exception {
|
||||
getDialogManager().dismissDialog();
|
||||
}
|
||||
})
|
||||
.subscribe((s, throwable) -> {
|
||||
if (throwable != null) {
|
||||
return;
|
||||
}
|
||||
toast(ResUtil.getString(R.string.ui_setting_verifyphoneactivity_03));
|
||||
startCountDownTimer();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void clickRegistButton() {
|
||||
if (TextUtils.isEmpty(mBinding.etPhone.getText().toString())) {
|
||||
toast(ResUtil.getString(R.string.ui_setting_verifyphoneactivity_04));
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(mBinding.etCode.getText().toString())) {
|
||||
toast(ResUtil.getString(R.string.ui_setting_verifyphoneactivity_05));
|
||||
return;
|
||||
}
|
||||
private fun clickNextButton() {
|
||||
if (isVerify) {
|
||||
getDialogManager().showProgressDialog(this, ResUtil.getString(R.string.ui_setting_verifyphoneactivity_06));
|
||||
PayModel.get().bindPhone(
|
||||
AuthModel.get().getCurrentUid() + "",
|
||||
mBinding.etPhone.getText().toString(),
|
||||
mBinding.etCode.getText().toString(),
|
||||
AuthModel.get().getTicket()
|
||||
dialogManager.showProgressDialog(
|
||||
this,
|
||||
ResUtil.getString(R.string.ui_login_bindcodeactivity_02)
|
||||
)
|
||||
.compose(bindToLifecycle())
|
||||
.flatMap(new Function<ServiceResult<String>, SingleSource<String>>() {
|
||||
@Override
|
||||
public SingleSource<String> apply(ServiceResult<String> stringServiceResult) throws Exception {
|
||||
if (stringServiceResult.isSuccess()) {
|
||||
return Single.just(ResUtil.getString(R.string.ui_setting_verifyphoneactivity_07));
|
||||
} else {
|
||||
return Single.error(new Throwable(stringServiceResult.getMessage()));
|
||||
}
|
||||
}
|
||||
})
|
||||
.subscribe(new SingleObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
getDialogManager().dismissDialog();
|
||||
bindSuccessDialog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
getDialogManager().dismissDialog();
|
||||
toast(e.getMessage());
|
||||
}
|
||||
});
|
||||
AuthModel.get().bindPhone(
|
||||
binding.tvAreaCode.text.toString().substring(1),
|
||||
binding.tvAreaCode.text.toString()
|
||||
.substring(1) + binding.etAccount.text.toString(),
|
||||
binding.etCode.text.toString()
|
||||
)
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.doOnSuccess { s: String? ->
|
||||
toast(ResUtil.getString(R.string.ui_login_bindcodeactivity_03))
|
||||
setResult(RESULT_OK)
|
||||
}
|
||||
.doOnError { throwable: Throwable ->
|
||||
toast(
|
||||
throwable.message
|
||||
)
|
||||
}
|
||||
.flatMap { s: String? ->
|
||||
UserModel.get().updateCurrentUserInfo()
|
||||
}
|
||||
.doOnSuccess { s: UserInfo? ->
|
||||
setResult(RESULT_OK)
|
||||
finish()
|
||||
}
|
||||
.doFinally { dialogManager.dismissDialog() }
|
||||
.subscribe()
|
||||
} else {
|
||||
getDialogManager().showProgressDialog(this, ResUtil.getString(R.string.ui_setting_verifyphoneactivity_08));
|
||||
PayModel.get().verifyCode(
|
||||
mBinding.etPhone.getText().toString(),
|
||||
mBinding.etCode.getText().toString()
|
||||
dialogManager.showProgressDialog(
|
||||
this,
|
||||
ResUtil.getString(R.string.ui_setting_verifyphoneactivity_08)
|
||||
)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(new BeanObserver<String>() {
|
||||
@Override
|
||||
public void onErrorMsg(String error) {
|
||||
getDialogManager().dismissDialog();
|
||||
toast(error);
|
||||
PayModel.get().verifyCode(
|
||||
binding.tvAreaCode.text.toString().substring(1),
|
||||
binding.tvAreaCode.text.toString()
|
||||
.substring(1) + binding.etAccount.text.toString(),
|
||||
binding.etCode.text.toString(),
|
||||
)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(object : BeanObserver<String?>() {
|
||||
override fun onErrorMsg(error: String) {
|
||||
dialogManager.dismissDialog()
|
||||
toast(error)
|
||||
}
|
||||
|
||||
override fun onSuccess(s: String) {
|
||||
dialogManager.dismissDialog()
|
||||
type = CodeType.BIND_PHONE
|
||||
if (resetPwd) {
|
||||
ModifyPwdActivity.start(
|
||||
this@VerifyPhoneActivity,
|
||||
ModifyPwdActivity.RESET_PAY_PWD
|
||||
)
|
||||
finish()
|
||||
} else if (isForgetPwd) {
|
||||
setResult(RESULT_OK)
|
||||
finish()
|
||||
} else {
|
||||
showModifyView()
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
getDialogManager().dismissDialog();
|
||||
type = CodeType.BIND_PHONE;
|
||||
if (resetPwd) {
|
||||
ModifyPwdActivity.start(VerifyPhoneActivity.this, ModifyPwdActivity.RESET_PAY_PWD);
|
||||
finish();
|
||||
} else if (isForgetPwd) {
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
} else {
|
||||
showModifyView();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void showModifyView() {
|
||||
isVerify = true;
|
||||
initWhiteTitleBar(ResUtil.getString(R.string.ui_setting_verifyphoneactivity_09));
|
||||
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
}
|
||||
|
||||
mBinding.text.setVisibility(View.GONE);
|
||||
|
||||
mBinding.btnGetCode.setText(ResUtil.getString(R.string.ui_setting_verifyphoneactivity_010));
|
||||
mBinding.btnGetCode.setClickable(true);//重新获得点击
|
||||
|
||||
mBinding.btnRegist.setText(ResUtil.getString(R.string.ui_setting_verifyphoneactivity_011));
|
||||
mBinding.etPhone.setText("");
|
||||
mBinding.etPhone.setEnabled(true);
|
||||
mBinding.etPhone.requestFocus();
|
||||
mBinding.etCode.setText("");
|
||||
|
||||
mBinding.vsPhoneCountry.getViewStub().inflate();
|
||||
mBinding.vDividerOne.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
|
||||
private void bindSuccessDialog() {
|
||||
BindSuccessDialog dialog = new BindSuccessDialog();
|
||||
dialog.setmListener(this);
|
||||
dialog.show(getSupportFragmentManager(), "bindSuccess");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
super.onClick(v);
|
||||
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_code_delete:
|
||||
mBinding.etCode.setText("");
|
||||
break;
|
||||
|
||||
case R.id.btn_regist:
|
||||
clickRegistButton();
|
||||
break;
|
||||
|
||||
case R.id.btn_get_code:
|
||||
getCode();
|
||||
break;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
stopCountDownTimer();
|
||||
private fun showModifyView() {
|
||||
isVerify = true
|
||||
initWhiteTitleBar(ResUtil.getString(R.string.text_bind_phone))
|
||||
binding.etAccount.setText("")
|
||||
binding.etCode.setText("")
|
||||
resetBtn()
|
||||
binding.btnNext.text = ResUtil.getString(R.string.ui_setting_verifyphoneactivity_011)
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
finish();
|
||||
}
|
||||
|
||||
private void startCountDownTimer() {
|
||||
stopCountDownTimer();
|
||||
timer = new CodeDownTimer(mBinding.btnGetCode, 60000, 1000);
|
||||
timer.start();
|
||||
}
|
||||
|
||||
private void stopCountDownTimer() {
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
timer = null;
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == BindPhoneActivity.REQUEST_AREA_CODE && resultCode == RESULT_OK) {
|
||||
val areaCode = data?.getStringExtra(AreaCodeActivity.COUNTRY_NUMBER)
|
||||
if (areaCode != null) {
|
||||
binding.tvAreaCode.text = areaCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
private fun startCounter() {
|
||||
stopCounter()
|
||||
//开始倒计时 60s 间隔1s
|
||||
binding.tvGetCode.isEnabled = false
|
||||
binding.tvGetCode.setTextColor(ContextCompat.getColor(this, R.color.color_9168FA))
|
||||
cdt = object : CountDownTimer(60 * 1000, 100) {
|
||||
override fun onTick(text: Long) {
|
||||
showTextDown(text)
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
resetBtn()
|
||||
}
|
||||
}
|
||||
cdt?.start()
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
super.setStatusBar();
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
private fun showTextDown(text: Long) {
|
||||
val time = (text / 1000).toString() + "s"
|
||||
binding.tvGetCode.text = time
|
||||
}
|
||||
}
|
||||
|
||||
private fun stopCounter() {
|
||||
cdt?.cancel()
|
||||
cdt = null
|
||||
}
|
||||
|
||||
private fun resetBtn() {
|
||||
stopCounter()
|
||||
binding.tvGetCode.setTextColor(ContextCompat.getColor(this, R.color.text_title_color))
|
||||
binding.tvGetCode.isEnabled = true
|
||||
binding.tvGetCode.text = getString(R.string.text_request_code)
|
||||
}
|
||||
|
||||
override fun needSteepStateBar(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
dialogManager.dismissDialog()
|
||||
stopCounter()
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 13 KiB |
30
app/src/main/res/layout/activity_area_code.xml
Normal file
30
app/src/main/res/layout/activity_area_code.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_white"
|
||||
tools:context=".ui.login.AreaCodeActivity">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_44"
|
||||
android:background="@color/color_white"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_bar" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
85
app/src/main/res/layout/activity_authorization_code.xml
Normal file
85
app/src/main/res/layout/activity_authorization_code.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@color/color_white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_login"
|
||||
app:layout_constraintDimensionRatio="750:666"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_slogan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/text_authorization_code"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/view_bg_bottom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_white_top_25dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="-20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_bg_top"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:layout_marginEnd="34dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etCode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:inputType="number"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnNext"
|
||||
android:layout_width="165dp"
|
||||
android:layout_height="63dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/ic_login_next"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -4,81 +4,117 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_normal_1c1b22">
|
||||
android:background="@color/color_white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:padding="@dimen/dp_17"
|
||||
android:src="@drawable/arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="140dp"
|
||||
android:text="@string/layout_activity_bind_phone_01"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/text_size_18"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_44"
|
||||
android:background="@color/color_white"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_account"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:background="@drawable/bg_common_disable"
|
||||
android:baselineAligned="true"
|
||||
android:id="@+id/ll_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_f0f5f6_r25"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title">
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_account">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="@dimen/dp_15"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:hint="@string/login_input_code"
|
||||
android:textColorHint="@color/color_B3B3C3"
|
||||
android:background="@null"
|
||||
android:digits="0123456789"
|
||||
android:focusable="true"
|
||||
android:singleLine="true"
|
||||
android:gravity="center_vertical"
|
||||
android:inputType="number"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_get_code"
|
||||
android:text="@string/text_request_code"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_f0f5f6_r25"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_bar">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:text="+86"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:text="+852"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:drawableEndCompat="@drawable/ic_down_arrow" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
<EditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="33dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:digits="0123456789"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="123456" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginTop="124dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:text="@string/layout_activity_bind_phone_02"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/ui_setting_verifyphoneactivity_011"
|
||||
android:textColor="@color/color_selector_white_false_b3b3c3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_account" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_code" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -2,98 +2,93 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@color/color_white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_normal_1c1b22">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:padding="@dimen/dp_17"
|
||||
android:src="@drawable/arrow_left"
|
||||
<View
|
||||
android:id="@+id/view_bg_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_login"
|
||||
app:layout_constraintDimensionRatio="750:666"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:id="@+id/tv_slogan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="170dp"
|
||||
android:text="@string/layout_activity_login_code_01"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/text_login_code"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/text_size_18"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:text="@string/layout_activity_login_code_02"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<com.yizhuan.erban.ui.login.ui.CodeEditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:focusable="true"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_18"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_desc"
|
||||
app:strokeBackground="@drawable/bg_secondary_radius_10"
|
||||
app:strokeHeight="@dimen/dp_45"
|
||||
app:strokeLength="5"
|
||||
app:strokePadding="@dimen/dp_10"
|
||||
app:strokeWidth="@dimen/dp_45" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/view_bg_bottom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_white_top_25dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="-20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_bg_top"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_code">
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_second"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:text="60s"
|
||||
android:typeface="monospace"
|
||||
android:textColor="@color/app_248cfe"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
<LinearLayout
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:layout_marginEnd="34dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_get_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="@dimen/sp_11"
|
||||
tools:text="@string/layout_activity_login_code_03"
|
||||
<EditText
|
||||
android:id="@+id/etCode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:inputType="number"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRegain"
|
||||
android:text="@string/text_login_code_regain"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnNext"
|
||||
android:layout_width="165dp"
|
||||
android:layout_height="63dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/ic_login_next"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -25,7 +25,8 @@
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/layout_activity_login_password_01"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="30sp"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -57,9 +58,7 @@
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:baselineAligned="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
android:baselineAligned="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -94,10 +93,7 @@
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:baselineAligned="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_account">
|
||||
android:baselineAligned="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -143,10 +139,7 @@
|
||||
android:background="@drawable/ic_login_next"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_forget_password" />
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
95
app/src/main/res/layout/activity_login_phone.xml
Normal file
95
app/src/main/res/layout/activity_login_phone.xml
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@color/color_white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_login"
|
||||
app:layout_constraintDimensionRatio="750:666"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_slogan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/text_login"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/view_bg_bottom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_white_top_25dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="-20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_bg_top"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:layout_marginEnd="34dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCode"
|
||||
android:text="+852"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:layout_marginStart="@dimen/dp_22"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:drawableEndCompat="@drawable/ic_down_arrow" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etPhone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:inputType="number"
|
||||
android:digits="0123456789"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnNext"
|
||||
android:layout_width="165dp"
|
||||
android:layout_height="63dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/ic_login_next"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,119 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="android.view.View.OnClickListener" />
|
||||
</data>
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_normal_1c1b22"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_f0f5f6_r25">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
<TextView
|
||||
android:id="@+id/tv_area_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:text="+852"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:drawableEndCompat="@drawable/ic_down_arrow" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30" />
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:digits="0123456789"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:inputType="number"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="123456" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/bg_secondary_2a2a39">
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="23dp"
|
||||
android:layout_marginEnd="23dp"
|
||||
android:background="@null"
|
||||
android:focusable="true"
|
||||
android:gravity="center|start"
|
||||
android:hint="@string/layout_activity_reset_login_pwd_01"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:text=""
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textColorHint="@color/text_hint_555574"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage" />
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_f0f5f6_r25">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line_353548" />
|
||||
<EditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:digits="0123456789"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/login_input_code"
|
||||
android:inputType="number"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textColorHint="@color/color_B3B3C3"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
<TextView
|
||||
android:id="@+id/tv_get_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/text_request_code"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start|center"
|
||||
android:layout_marginStart="@dimen/dp_23"
|
||||
android:background="@null"
|
||||
android:gravity="center|start"
|
||||
android:hint="@string/hint_require_code"
|
||||
android:inputType="number"
|
||||
android:maxLength="16"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textColorHint="@color/text_hint_555574"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_get_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="@dimen/dp_23"
|
||||
android:background="@color/transparent"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="@string/text_request_code"
|
||||
android:textColor="@color/appColor"
|
||||
android:textSize="@dimen/dp_14"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line_353548" />
|
||||
|
||||
<com.yizhuan.erban.ui.widget.SuperEditText
|
||||
android:id="@+id/ed_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="23dp"
|
||||
android:layout_marginEnd="23dp"
|
||||
android:maxLength="16"
|
||||
app:hint="@string/layout_activity_reset_login_pwd_02"
|
||||
app:hint_color="@color/text_hint_555574"
|
||||
app:text_color="@color/text_normal_c6c6e9"
|
||||
app:title_hint="@string/layout_activity_reset_login_pwd_03" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line_353548" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<com.yizhuan.erban.ui.widget.SuperEditText
|
||||
android:id="@+id/et_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:background="@drawable/bg_f0f5f6_r25"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
app:hint="@string/ui_setting_modifypwdactivity_08"
|
||||
app:hint_color="@color/color_B3B3C3"
|
||||
app:text_color="@color/text_title_color"
|
||||
app:title_hint="@string/layout_activity_modify_pwd_04" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_commit"
|
||||
@@ -124,12 +118,10 @@
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:clickable="true"
|
||||
android:enabled="true"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:text="@string/layout_activity_reset_login_pwd_04"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -30,6 +30,43 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rly_bind_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{click}">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bind_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:text="@string/text_bind_phone"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bind_phone_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:src="@drawable/setting_right" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bind_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@color/line_353548" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rly_login_pwd"
|
||||
android:layout_width="match_parent"
|
||||
|
@@ -11,14 +11,14 @@
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_44"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/phone_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:src="@drawable/icon_show_bind_phone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -28,10 +28,11 @@
|
||||
android:id="@+id/phone_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="38dp"
|
||||
android:layout_marginTop="42dp"
|
||||
android:text="@string/layout_activity_show_bind_phone_01"
|
||||
android:textColor="@color/text_secondary_4f516a"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/phone_icon" />
|
||||
@@ -40,8 +41,9 @@
|
||||
android:id="@+id/tv_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/app_248cfe"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textColor="@color/color_9168FA"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/phone_tips"
|
||||
@@ -50,15 +52,15 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_change_phone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
android:layout_marginEnd="@dimen/dp_32"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="48dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:gravity="center"
|
||||
android:text="@string/layout_activity_show_bind_phone_02"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_phone" />
|
||||
|
@@ -1,162 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_white">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="android.view.View.OnClickListener" />
|
||||
</data>
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_44"
|
||||
android:background="@color/color_white"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_normal_1c1b22"
|
||||
android:orientation="vertical"
|
||||
tools:context="com.yizhuan.erban.ui.setting.VerifyPhoneActivity">
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_f0f5f6_r25"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_bar">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
<TextView
|
||||
android:id="@+id/tv_area_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:text="+852"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:drawableEndCompat="@drawable/ic_down_arrow" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:digits="0123456789"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:inputType="number"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="123456" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="32dp"
|
||||
android:paddingBottom="32dp">
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/vs_phone_country"
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout="@layout/layout_phone_country_choose" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_divider_one"
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/color_F5F5F5"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="48dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_country"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="+86"
|
||||
android:textColor="@color/text_secondary_4f516a"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginEnd="65dp"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:inputType="phone"
|
||||
android:maxLength="11"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textColorHint="@color/text_hint_555574"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_get_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="29dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@color/transparent"
|
||||
android:clickable="true"
|
||||
android:text="@string/layout_activity_verify_phone_01"
|
||||
android:textColor="@color/app_248cfe"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line_353548" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="48dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/layout_activity_verify_phone_02"
|
||||
android:textColor="@color/text_secondary_4f516a"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_toStartOf="@+id/iv_code_delete"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/layout_activity_verify_phone_03"
|
||||
android:inputType="number"
|
||||
android:maxLength="5"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textColorHint="@color/text_hint_555574"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_code_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_nick_delete" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line_353548" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_regist"
|
||||
style="@style/largerText_primary"
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="56dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:clickable="true"
|
||||
android:text="@string/layout_activity_verify_phone_04"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/layout_activity_verify_phone_05"
|
||||
android:textColor="@color/text_secondary_4f516a"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_f0f5f6_r25"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_account">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="@dimen/dp_15"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:hint="@string/login_input_code"
|
||||
android:textColorHint="@color/color_B3B3C3"
|
||||
android:background="@null"
|
||||
android:digits="0123456789"
|
||||
android:focusable="true"
|
||||
android:singleLine="true"
|
||||
android:gravity="center_vertical"
|
||||
android:inputType="number"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_get_code"
|
||||
android:text="@string/text_request_code"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginTop="124dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:text="@string/layout_activity_login_phone_04"
|
||||
android:textColor="@color/color_selector_white_false_b3b3c3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_code" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
25
app/src/main/res/layout/item_country.xml
Normal file
25
app/src/main/res/layout/item_country.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_country_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:text=""
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="14sp" />
|
||||
</RelativeLayout>
|
@@ -68,4 +68,249 @@
|
||||
<item>永恒爱情城堡CP位\n+永恒CP头饰\n+永恒CP铭牌</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="country_code_list_ch" translatable="false">
|
||||
<item>Taiwan(TW)*+886</item>
|
||||
<item>Hongkong(HK)*+852</item>
|
||||
<item>Macao(MO)*+853</item>
|
||||
<item>中国大陆(CN)*+86</item>
|
||||
<item>Malaysia(MY)*+60</item>
|
||||
<item>Singapore(SG) *+65</item>
|
||||
<item>India(IN)*+91</item>
|
||||
<item>Indonesia(ID)*+62</item>
|
||||
<item>ไทย(TH)*+66</item>
|
||||
<item>Việt,Nam(VN) *+84</item>
|
||||
<item>日本(JP)*+81</item>
|
||||
<item>United,States(US)*+1</item>
|
||||
<item>New,Zealand(NZ)*+64</item>
|
||||
<item>American,Samoa(AS)*+1</item>
|
||||
<item>Andorra(AD)*+376</item>
|
||||
<item>Angola(AO)*+244</item>
|
||||
<item>Anguilla(AI)*+1</item>
|
||||
<item>Antigua,and,Barbuda(AG)*+1</item>
|
||||
<item>Argentina(AR)*+54</item>
|
||||
<item>Aruba(AW)*+297</item>
|
||||
<item>Ascension,Island(AC)*+247</item>
|
||||
<item>Australia(AU)*+61</item>
|
||||
<item>Azərbaycan(AZ)*+994</item>
|
||||
<item>Åland(AX)*+358</item>
|
||||
<item>Bahamas(BS)*+1</item>
|
||||
<item>Barbados(BB)*+1</item>
|
||||
<item>België(BE)*+32</item>
|
||||
<item>Belize(BZ)*+501</item>
|
||||
<item>Bermuda(BM)*+1</item>
|
||||
<item>Bénin(BJ)*+229</item>
|
||||
<item>Bolivia(BO)*+591</item>
|
||||
<item>Bosna,i,Hercegovina(BA)*+387</item>
|
||||
<item>Botswana(BW)*+267</item>
|
||||
<item>Brasil(BR)*+55</item>
|
||||
<item>British,Indian,Ocean,Territory(IO)*+246</item>
|
||||
<item>British,Virgin,Islands(VG)*+1</item>
|
||||
<item>Brunei(BN)*+673</item>
|
||||
<item>Burkina,Faso(BF)*+226</item>
|
||||
<item>Burundi(BI)*+257</item>
|
||||
<item>Cameroon(CM)*+237</item>
|
||||
<item>Canada(CA)*+1</item>
|
||||
<item>Caribisch,Nederland(BQ)*+599</item>
|
||||
<item>Cayman,Islands(KY)*+1</item>
|
||||
<item>Chile(CL)*+56</item>
|
||||
<item>Christmas,Island(CX)*+61</item>
|
||||
<item>Città,del,Vaticano(VA)*+379</item>
|
||||
<item>Colombia(CO)*+57</item>
|
||||
<item>Congo-Brazzaville(CG)*+242</item>
|
||||
<item>Congo-Kinshasa(CD)*+243</item>
|
||||
<item>Cook,Islands(CK)*+682</item>
|
||||
<item>Costa,Rica(CR)*+506</item>
|
||||
<item>Côte,d’Ivoire(CI)*+225</item>
|
||||
<item>Cuba(CU)*+53</item>
|
||||
<item>Curaçao(CW)*+599</item>
|
||||
<item>Česká,republika(CZ)*+420</item>
|
||||
<item>Danmark(DK)*+45</item>
|
||||
<item>Deutschland(DE)*+49</item>
|
||||
<item>Djibouti(DJ)*+253</item>
|
||||
<item>Dominica(DM)*+1</item>
|
||||
<item>Ecuador(EC)*+593</item>
|
||||
<item>Eesti(EE)*+372</item>
|
||||
<item>El,Salvador(SV)*+503</item>
|
||||
<item>Eretria(ER)*+291</item>
|
||||
<item>España(ES)*+34</item>
|
||||
<item>Falkland,Islands(FK)*+500</item>
|
||||
<item>Fiji(FJ)*+679</item>
|
||||
<item>France(FR)*+33</item>
|
||||
<item>Føroyar(FO)*+298</item>
|
||||
<item>Gabon(GA)*+241</item>
|
||||
<item>Gambia(GM)*+220</item>
|
||||
<item>Ghana(GH)*+233</item>
|
||||
<item>Gibraltar(GI)*+350</item>
|
||||
<item>Grenada(GD)*+1</item>
|
||||
<item>Guadeloupe(GP)*+590</item>
|
||||
<item>Guam(GU)*+1</item>
|
||||
<item>Guatemala(GT)*+502</item>
|
||||
<item>Guernsey(GG)*+44</item>
|
||||
<item>Guinea,Ecuatorial(GQ)*+240</item>
|
||||
<item>Guiné,Bissau(GW)*+245</item>
|
||||
<item>Guinée(GN)*+224</item>
|
||||
<item>Guyana(GY)*+592</item>
|
||||
<item>Guyane,française(GF)*+594</item>
|
||||
<item>Haïti(HT)*+509</item>
|
||||
<item>Honduras(HN)*+504</item>
|
||||
<item>Hrvatska(HR)*+385</item>
|
||||
<item>India(IN)*+91</item>
|
||||
<item>Ireland(IE)*+353</item>
|
||||
<item>Isle,of,Man(IM)*+44</item>
|
||||
<item>Italia(IT)*+39</item>
|
||||
<item>Ísland(IS)*+354</item>
|
||||
<item>Jamaica(JM)*+1</item>
|
||||
<item>Jersey(JE)*+44</item>
|
||||
<item>Kalaallit,Nunaat(GL)*+299</item>
|
||||
<item>Kenya(KE)*+254</item>
|
||||
<item>Kepulauan,Cocos,(Keeling)(CC)*+61</item>
|
||||
<item>Kiribati(KI)*+686</item>
|
||||
<item>La,Réunion(RE)*+262</item>
|
||||
<item>Latvija(LV)*+371</item>
|
||||
<item>Lesotho(LS)*+266</item>
|
||||
<item>Liberia(LR)*+231</item>
|
||||
<item>Liechtenstein(LI)*+423</item>
|
||||
<item>Lietuva(LT)*+370</item>
|
||||
<item>Luxemburg(LU)*+352</item>
|
||||
<item>Madagascar(MG)*+261</item>
|
||||
<item>Magyarország(HU)*+36</item>
|
||||
<item>Malawi(MW)*+265</item>
|
||||
<item>Maldives(MV)*+960</item>
|
||||
<item>Mali(ML)*+223</item>
|
||||
<item>Malta(MT)*+356</item>
|
||||
<item>Marshall,Islands(MH)*+692</item>
|
||||
<item>Martinique(MQ)*+596</item>
|
||||
<item>Mauritius(MU)*+230</item>
|
||||
<item>Mayotte(YT)*+262</item>
|
||||
<item>México(MX)*+52</item>
|
||||
<item>Micronesia(FM)*+691</item>
|
||||
<item>Moçambique(MZ)*+258</item>
|
||||
<item>Monaco(MC)*+377</item>
|
||||
<item>Montserrat(MS)*+1</item>
|
||||
<item>Namibia(NA)*+264</item>
|
||||
<item>Nauru(NR)*+674</item>
|
||||
<item>Nederland(NL)*+31</item>
|
||||
<item>Nicaragua(NI)*+505</item>
|
||||
<item>Niger(NE)*+227</item>
|
||||
<item>Nigeria(NG)*+234</item>
|
||||
<item>Niue(NU)*+683</item>
|
||||
<item>Norfolk,Island(NF)*+672</item>
|
||||
<item>Norge(NO)*+47</item>
|
||||
<item>Northern,Mariana,Islands(MP)*+1</item>
|
||||
<item>Nouvelle-Calédonie(NC)*+687</item>
|
||||
<item>Oʻzbekiston(UZ)*+998</item>
|
||||
<item>Österreich(AT)*+43</item>
|
||||
<item>Palau(PW)*+680</item>
|
||||
<item>Panamá(PA)*+507</item>
|
||||
<item>Papua,New,Guinea(PG)*+675</item>
|
||||
<item>Paraguay(PY)*+595</item>
|
||||
<item>Perú(PE)*+51</item>
|
||||
<item>Philippines(PH)*+63</item>
|
||||
<item>Polska(PL)*+48</item>
|
||||
<item>Polynésie,française(PF)*+689</item>
|
||||
<item>Portugal(PT)*+351</item>
|
||||
<item>Puerto,Rico(PR)*+1</item>
|
||||
<item>Republica,Moldova(MD)*+373</item>
|
||||
<item>República,Dominicana(DO)*+1</item>
|
||||
<item>République,centrafricaine(CF)*+236</item>
|
||||
<item>România(RO)*+40</item>
|
||||
<item>Rwanda(RW)*+250</item>
|
||||
<item>Saint,Helena(SH)*+290</item>
|
||||
<item>Saint,Kitts,and,Nevis(KN)*+1</item>
|
||||
<item>Saint,Lucia(LC)*+1</item>
|
||||
<item>Saint-Barthélemy(BL)*+590</item>
|
||||
<item>Saint-Martin,(partie,française)(MF) *+590</item>
|
||||
<item>Saint-Pierre-et-Miquelon(PM)*+508</item>
|
||||
<item>Samoa(WS)*+685</item>
|
||||
<item>San,Marino(SM)*+378</item>
|
||||
<item>São,Tomé,e,Príncipe(ST)*+239</item>
|
||||
<item>Schweiz(CH) *+41</item>
|
||||
<item>Seychelles(SC) *+248</item>
|
||||
<item>Sénégal(SN) *+221</item>
|
||||
<item>Shqipëri(AL) *+355</item>
|
||||
<item>Sierra,Leone(SL) *+232</item>
|
||||
<item>Sint-Maarten(SX) *+1</item>
|
||||
<item>Slovenija(SI) *+386</item>
|
||||
<item>Slovensko(SK) *+421</item>
|
||||
<item>Solomon,Islands(SB) *+477</item>
|
||||
<item>Soomaaliya(SO) *+252</item>
|
||||
<item>South,Sudan(SS) *+211</item>
|
||||
<item>St.,Vincent,Grenadines(VC) *+1</item>
|
||||
<item>Suomi(FI) *+358</item>
|
||||
<item>Suriname(SR) *+597</item>
|
||||
<item>Sverige(SE)*+46</item>
|
||||
<item>Swaziland(SZ) *+568</item>
|
||||
<item>Tanzania(TZ) *+255</item>
|
||||
<item>Tchad(TD) *+235</item>
|
||||
<item>Timor-Leste(TL) *+670</item>
|
||||
<item>Togo(TG) *+228</item>
|
||||
<item>Tokelau(TK) *+690</item>
|
||||
<item>Tonga(TO) *+676</item>
|
||||
<item>Trinidad,and,Tobago(TT) *+1</item>
|
||||
<item>Turks,and,Caicos,Islands(TC) *+1</item>
|
||||
<item>Tuvalu(TV) *+688</item>
|
||||
<item>Türkiye(TR) *+90</item>
|
||||
<item>U.S.,Virgin,Islands(VI) *+1</item>
|
||||
<item>Uganda(UG) *+256</item>
|
||||
<item>United,Kingdom(GB)*+44</item>
|
||||
<item>Uruguay(UY) *+598</item>
|
||||
<item>Vanuatu(VU) *+678</item>
|
||||
<item>Venezuela(VE) *+58</item>
|
||||
<item>Wallis-et-Futuna(WF) *+681</item>
|
||||
<item>Zambia(ZM) *+260</item>
|
||||
<item>Zimbabwe(ZW) *+263</item>
|
||||
<item>i-South,Africa(ZA)*+27</item>
|
||||
<item>Ελλάδα(GR)*+30</item>
|
||||
<item>Κύπρος(CY) *+357</item>
|
||||
<item>Беларусь(BY) *+375</item>
|
||||
<item>България(BG) *+359</item>
|
||||
<item>Кыргызстан(KG) *+996</item>
|
||||
<item>Македонија(MK) *+389</item>
|
||||
<item>Монгол(MN) *+976</item>
|
||||
<item>Россия(RU) *+7</item>
|
||||
<item>Србија(RS) *+381</item>
|
||||
<item>Тоҷикистон(TJ) *+992</item>
|
||||
<item>Туркменистан(TM) *+993</item>
|
||||
<item>Україна(UA) *+380</item>
|
||||
<item>Црна,Гора(ME) *+382</item>
|
||||
<item>Шпицберген,и,Ян-Майен(SJ)*+47</item>
|
||||
<item>Қазақстан(KZ)*+7</item>
|
||||
<item>Հայաստան(AM) *+374</item>
|
||||
<item>ישראל(IL) *+972</item>
|
||||
<item>افغانستان(AF) *+93</item>
|
||||
<item>الأراضي,الفلسطينية(PS) *+970</item>
|
||||
<item>الأردن(JO) *+962</item>
|
||||
<item>الإمارات,العربية,المتحدة(AE) *+971</item>
|
||||
<item>البحرين(BH) *+973</item>
|
||||
<item>الجزائر(DZ) *+213</item>
|
||||
<item>السودان(SD) *+249</item>
|
||||
<item>العراق(IQ) *+964</item>
|
||||
<item>الكويت(KW) *+965</item>
|
||||
<item>المغرب(MA) *+212</item>
|
||||
<item>المملكة,العربية,السعودية(SA) *+966</item>
|
||||
<item>اليمن(YE) *+967</item>
|
||||
<item>ایران(IR) *+98</item>
|
||||
<item>تونس(TN) *+216</item>
|
||||
<item>جزر,القمر(KM) *+269</item>
|
||||
<item>سوريا(SY) *+963</item>
|
||||
<item>عُمان(OM) *+968</item>
|
||||
<item>قطر(QA) *+974</item>
|
||||
<item>لبنان(LB) *+961</item>
|
||||
<item>ليبيا(LY) *+218</item>
|
||||
<item>مصر(EG) *+20</item>
|
||||
<item>موريتانيا(MR) *+222</item>
|
||||
<item>پاکستان(PK) *+92</item>
|
||||
<item>नेपाल(NP) *+977</item>
|
||||
<item>বাংলাদেশ(BD) *+880</item>
|
||||
<item>ශ්රී,ලංකාව(LK) *+94</item>
|
||||
<item>ລາວ(LA)*+856</item>
|
||||
<item>འབྲུག(BT)*+975</item>
|
||||
<item>Myanmar(MM)*+95</item>
|
||||
<item>საქართველო(GE)*+995</item>
|
||||
<item>대한민국(KR)*+82</item>
|
||||
<item>조선,민주주의,인민,공화국(KP)*+850</item>
|
||||
<item>Ethiopia(ET)*+251</item>
|
||||
<item>កម្ពុជា(KH)*+855</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
@@ -571,6 +571,9 @@
|
||||
<string name="text_qq_login_erban_member">我是兔兔老用戶</string>
|
||||
<string name="text_qq_login_tutu_member">我是Peko新用戶</string>
|
||||
<string name="text_login">登錄</string>
|
||||
<string name="text_login_code">驗證碼</string>
|
||||
<string name="text_authorization_code">授權碼</string>
|
||||
<string name="text_login_code_regain">重新獲取</string>
|
||||
<string name="input_text_qq_id">請輸入您耳伴綁定 QQ 的 ID</string>
|
||||
<string name="input_text_hint_password">請輸入您的密碼</string>
|
||||
<string name="text_tips_set_password">未設置密碼的用戶記得前往耳伴設置密碼後登錄哦</string>
|
||||
@@ -3037,7 +3040,7 @@
|
||||
<string name="layout_activity_send_gold_02">(不含貴族鉆石)</string>
|
||||
<string name="layout_activity_setting_01">未綁定</string>
|
||||
<string name="layout_activity_show_bind_phone_01">您當前綁定的手機號為</string>
|
||||
<string name="layout_activity_show_bind_phone_02">更改手機號碼</string>
|
||||
<string name="layout_activity_show_bind_phone_02">更換手機號</string>
|
||||
<string name="layout_activity_sign_in_01">活動規則</string>
|
||||
<string name="layout_activity_sign_in_02">分享好友</string>
|
||||
<string name="layout_activity_sign_in_03">獲得蘿蔔x30</string>
|
||||
@@ -4995,5 +4998,7 @@
|
||||
<string name="all">全部</string>
|
||||
<string name="time">次</string>
|
||||
<string name="empty_data">暫無數據</string>
|
||||
<string name="select_area_code">選擇區号</string>
|
||||
<string name="login_input_code">輸入驗證碼</string>
|
||||
|
||||
</resources>
|
@@ -1,7 +1,9 @@
|
||||
package com.yizhuan.xchat_android_core.earn.bean
|
||||
|
||||
import lombok.Data
|
||||
import java.math.BigDecimal
|
||||
|
||||
@Data
|
||||
data class ClanHallMemberIncomeTotalInfo(
|
||||
val total: BigDecimal,
|
||||
val hallVoList: List<HallVo>,
|
||||
|
@@ -1,8 +1,10 @@
|
||||
package com.yizhuan.xchat_android_core.earn.bean
|
||||
|
||||
import lombok.Data
|
||||
import java.io.Serializable
|
||||
import java.math.BigDecimal
|
||||
|
||||
@Data
|
||||
data class ConfigWithdrawInfo(
|
||||
val account: WithdrawAccount? = null,
|
||||
val golds: BigDecimal,//钱包当前金币数
|
||||
|
@@ -1,7 +1,9 @@
|
||||
package com.yizhuan.xchat_android_core.earn.bean
|
||||
|
||||
import lombok.Data
|
||||
import java.math.BigDecimal
|
||||
|
||||
@Data
|
||||
data class EarnRecordInfo(
|
||||
val uid: Long,
|
||||
val diamonds: BigDecimal,
|
||||
|
@@ -1,8 +1,10 @@
|
||||
package com.yizhuan.xchat_android_core.earn.bean
|
||||
|
||||
import lombok.Data
|
||||
import java.io.Serializable
|
||||
import java.math.BigDecimal
|
||||
|
||||
@Data
|
||||
data class GoldToDiamondInfo(
|
||||
val diamonds: BigDecimal,
|
||||
val golds: BigDecimal,
|
||||
|
@@ -1,5 +1,8 @@
|
||||
package com.yizhuan.xchat_android_core.earn.bean
|
||||
|
||||
import lombok.Data
|
||||
|
||||
@Data
|
||||
data class HallVo(
|
||||
val hallId: Long,
|
||||
val hallName: String,
|
||||
|
@@ -1,7 +1,9 @@
|
||||
package com.yizhuan.xchat_android_core.earn.bean
|
||||
|
||||
import lombok.Data
|
||||
import java.math.BigDecimal
|
||||
|
||||
@Data
|
||||
data class MemberSettlement(
|
||||
val uid: Long,
|
||||
val nick: String,//昵称
|
||||
|
@@ -1,7 +1,9 @@
|
||||
package com.yizhuan.xchat_android_core.earn.bean
|
||||
|
||||
import lombok.Data
|
||||
import java.io.Serializable
|
||||
|
||||
@Data
|
||||
data class WithdrawAccount(
|
||||
val uid: Long,
|
||||
val swift: String,
|
||||
|
@@ -18,8 +18,8 @@ import com.netease.nimlib.sdk.auth.LoginInfo;
|
||||
import com.netease.nimlib.sdk.mixpush.MixPushService;
|
||||
import com.netease.nimlib.sdk.msg.MsgService;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.yizhuan.xchat_android_core.R;
|
||||
import com.yizhuan.xchat_android_core.DemoCache;
|
||||
import com.yizhuan.xchat_android_core.R;
|
||||
import com.yizhuan.xchat_android_core.auth.entity.AccountInfo;
|
||||
import com.yizhuan.xchat_android_core.auth.entity.ThirdUserInfo;
|
||||
import com.yizhuan.xchat_android_core.auth.entity.TicketInfo;
|
||||
@@ -202,9 +202,10 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
|
||||
/**
|
||||
* 判断是否已登录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Override
|
||||
public boolean isLogin() {
|
||||
return currentAccountInfo != null && !TextUtils.isEmpty(currentAccountInfo.getAccess_token());
|
||||
}
|
||||
@@ -369,7 +370,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
|
||||
@Override
|
||||
public void onError(Platform platform, int i, Throwable throwable) {
|
||||
e.onError(new Throwable(ResUtil.getString(R.string.xchat_android_core_auth_authmodel_04)+ i));
|
||||
e.onError(new Throwable(ResUtil.getString(R.string.xchat_android_core_auth_authmodel_04) + i));
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -546,6 +547,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
.compose(RxHelper.handleException())
|
||||
.doOnSuccess(s -> EventBus.getDefault().post(new LoginEvent()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 第三方信息登录
|
||||
*
|
||||
@@ -718,15 +720,14 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Single<String> bindPhone(String phone, String code) {
|
||||
public Single<String> bindPhone(String phoneAreaCode, String phone, String code) {
|
||||
if (currentAccountInfo == null || currentAccountInfo.getUid() == 0) {
|
||||
return Single.error(new Throwable(ResUtil.getString(R.string.xchat_android_core_auth_authmodel_016)));
|
||||
}
|
||||
return api.bindPhone(
|
||||
String.valueOf(currentAccountInfo.getUid()),
|
||||
phoneAreaCode,
|
||||
DESUtils.DESAndBase64(phone),
|
||||
code,
|
||||
getTicket()
|
||||
code
|
||||
)
|
||||
.flatMap(serviceResult -> {
|
||||
if (!serviceResult.isSuccess()) {
|
||||
@@ -1015,6 +1016,25 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
// NIMClient.updateStatusBarNotificationConfig(statusBarNotificationConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送验证码
|
||||
*
|
||||
* @param areaCode 地区码
|
||||
* @param phone 手机
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
public Single<String> getSmsCode(String areaCode, String phone, int type) {
|
||||
return api.getCode(areaCode, DESUtils.DESAndBase64(phone), String.valueOf(type))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.map(objectServiceResult -> {
|
||||
if (!objectServiceResult.isSuccess()) {
|
||||
throw new RuntimeException(objectServiceResult.getMessage());
|
||||
}
|
||||
return objectServiceResult.getMessage();
|
||||
}).observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
/**
|
||||
* 在账号被禁止的情况下发送验证码
|
||||
*
|
||||
@@ -1039,8 +1059,8 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public Single<String> checkLoginCode(String account, String code) {
|
||||
return api.check(account, code)
|
||||
public Single<String> checkLoginCode(String phoneAreaCode, String account, String code) {
|
||||
return api.check(phoneAreaCode, account, code)
|
||||
.map(new Function<ServiceResult<Object>, String>() {
|
||||
|
||||
@Override
|
||||
@@ -1196,30 +1216,17 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
/**
|
||||
* 绑定手机
|
||||
*
|
||||
* @param uid
|
||||
* @param phone
|
||||
* @param code
|
||||
* @param ticket
|
||||
* @param phoneAreaCode
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/withDraw/phone")
|
||||
Single<ServiceResult> bindPhone(@Field("uid") String uid,
|
||||
@POST("/user/boundPhone")
|
||||
Single<ServiceResult> bindPhone(@Field("phoneAreaCode") String phoneAreaCode,
|
||||
@Field("phone") String phone,
|
||||
@Field("code") String code,
|
||||
@Field("ticket") String ticket);
|
||||
@Field("code") String code);
|
||||
|
||||
/**
|
||||
* 获取绑定手机验证码
|
||||
*
|
||||
* @param params
|
||||
* @param sign
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/withDraw/phoneCode")
|
||||
Single<ServiceResult> getSMSCode(@Field("params") String params,
|
||||
@Field("sign") String sign);
|
||||
|
||||
/**
|
||||
* 注册接口
|
||||
@@ -1286,6 +1293,17 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
@Field("ticket") String ticket);
|
||||
|
||||
|
||||
/**
|
||||
* 发送验证码
|
||||
*
|
||||
* @param phone
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("sms/getCode")
|
||||
Single<ServiceResult<String>> getCode(@Field("phoneAreaCode") String phoneAreaCode, @Field("mobile") String phone, @Field("type") String type);
|
||||
|
||||
/**
|
||||
* 发送验证码
|
||||
*
|
||||
@@ -1306,7 +1324,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("sms/login/verify")
|
||||
Single<ServiceResult<Object>> check(@Field("phone") String phone, @Field("code") String code);
|
||||
Single<ServiceResult<Object>> check(@Field("phoneAreaCode") String phoneAreaCode, @Field("phone") String phone, @Field("code") String code);
|
||||
|
||||
/**
|
||||
* @param token 易盾一键登录token
|
||||
|
@@ -5,7 +5,7 @@ import com.yizhuan.xchat_android_core.base.IModel;
|
||||
|
||||
import io.reactivex.Single;
|
||||
|
||||
public interface IAuthModel extends IModel{
|
||||
public interface IAuthModel extends IModel {
|
||||
|
||||
ThirdUserInfo getThirdUserInfo();
|
||||
|
||||
@@ -14,12 +14,14 @@ public interface IAuthModel extends IModel{
|
||||
|
||||
/**
|
||||
* 获取当前登录的uid,登录成功后就有值了
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
long getCurrentUid();
|
||||
|
||||
/**
|
||||
* 获取ticket,登录成功后就有真实值
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getTicket();
|
||||
@@ -31,12 +33,14 @@ public interface IAuthModel extends IModel{
|
||||
|
||||
/**
|
||||
* 自动登录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Single<String> autoLogin();
|
||||
|
||||
/**
|
||||
* 账号密码登录
|
||||
*
|
||||
* @param account
|
||||
* @param password
|
||||
* @return
|
||||
@@ -45,9 +49,10 @@ public interface IAuthModel extends IModel{
|
||||
|
||||
/**
|
||||
* 带验证码的账号密码登录
|
||||
*
|
||||
* @param account
|
||||
* @param password
|
||||
* @param code 验证码
|
||||
* @param code 验证码
|
||||
* @return
|
||||
*/
|
||||
Single<String> login(String account, String password, String code, String yiDunToken, String shuMeiDeviceId);
|
||||
@@ -65,6 +70,7 @@ public interface IAuthModel extends IModel{
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*
|
||||
* @param phone
|
||||
* @param sms_code
|
||||
* @param newPsw
|
||||
@@ -74,24 +80,27 @@ public interface IAuthModel extends IModel{
|
||||
|
||||
/**
|
||||
* 当前用户是否绑定手机
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Single<String> isBindPhone();
|
||||
|
||||
/**
|
||||
* 绑定手机
|
||||
*
|
||||
* @param phone
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
Single<String> bindPhone(String phone, String code);
|
||||
Single<String> bindPhone(String phoneAreaCode, String phone, String code);
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*
|
||||
* @param phone
|
||||
* @param sms_code
|
||||
* @param password
|
||||
* @param yiDunToken 易盾的 token
|
||||
* @param yiDunToken 易盾的 token
|
||||
* @param shuMeiDeviceId 数美天网的 deviceId
|
||||
* @return
|
||||
*/
|
||||
@@ -102,6 +111,7 @@ public interface IAuthModel extends IModel{
|
||||
|
||||
/**
|
||||
* 修改登录密码
|
||||
*
|
||||
* @param phone
|
||||
* @param oldPwd
|
||||
* @param newPwd
|
||||
@@ -113,6 +123,7 @@ public interface IAuthModel extends IModel{
|
||||
|
||||
/**
|
||||
* 设置登录密码,在第三方登录的情况下是没有登录密码的,这里接口可以设置登录密码,账号为耳伴号
|
||||
*
|
||||
* @param phone
|
||||
* @param newPwd
|
||||
* @return
|
||||
@@ -122,6 +133,7 @@ public interface IAuthModel extends IModel{
|
||||
|
||||
/**
|
||||
* 判断IM 登录状态
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isImLogin();
|
||||
|
@@ -16,7 +16,8 @@ import java.util.List;
|
||||
|
||||
import io.reactivex.Single;
|
||||
|
||||
/**访问网络 的方法
|
||||
/**
|
||||
* 访问网络 的方法
|
||||
* Created by zhouxiangfeng on 2017/6/19.
|
||||
*/
|
||||
|
||||
@@ -28,9 +29,12 @@ public interface IPayModel extends IModel {
|
||||
void setCurrentWalletInfo(WalletInfo walletInfo);
|
||||
|
||||
void requestChargeOrOrderInfo();
|
||||
// 查询钱包的方法,需要加权限ticket
|
||||
|
||||
// 查询钱包的方法,需要加权限ticket
|
||||
Single<WalletInfo> getWalletInfo(long uid, String cache);
|
||||
|
||||
Single<WalletInfo> getWalletInfo(long uid);
|
||||
|
||||
Single<WalletInfo> getWalletInfo();
|
||||
/*
|
||||
获取充值产品列表
|
||||
@@ -39,7 +43,7 @@ public interface IPayModel extends IModel {
|
||||
3,苹果充值
|
||||
*/
|
||||
|
||||
Single<ChargeListResult> getChargeList(int channelType,long uid);
|
||||
Single<ChargeListResult> getChargeList(int channelType, long uid);
|
||||
|
||||
//发起充值u
|
||||
Single<JsonObject> requestCharge(Context context, String chargeProdId, String payChannel);
|
||||
@@ -50,6 +54,7 @@ public interface IPayModel extends IModel {
|
||||
|
||||
/**
|
||||
* 修改支付密码时候,绑定手机时候获取手机验证码
|
||||
*
|
||||
* @param mobile
|
||||
* @param checkExists
|
||||
* @param uid
|
||||
@@ -65,14 +70,16 @@ public interface IPayModel extends IModel {
|
||||
|
||||
/**
|
||||
* 修改支付密码时候,发送到后台验证手机号与手机验证码是否匹配
|
||||
*
|
||||
* @param mobile
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
Single<String> verifyCode(String mobile, String code);
|
||||
Single<String> verifyCode(String phoneAreaCode, String mobile, String code);
|
||||
|
||||
/**
|
||||
* 修改支付密码时候,绑定手机
|
||||
*
|
||||
* @param uid
|
||||
* @param phone
|
||||
* @param code
|
||||
@@ -97,7 +104,7 @@ public interface IPayModel extends IModel {
|
||||
|
||||
void setFirstChargeSuccess(boolean firstChargeSuccess);
|
||||
|
||||
Single<String> giveGold(long toUid, String goldNum,String password);
|
||||
Single<String> giveGold(long toUid, String goldNum, String password);
|
||||
|
||||
Single<List<FirstChargeGoods>> getFirstChargeList();
|
||||
|
||||
|
@@ -149,10 +149,10 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
@Override
|
||||
public Single<WalletInfo> getWalletInfo(long uid, String cache) {
|
||||
return api.getMyWallet(
|
||||
uid,
|
||||
AuthModel.get().getTicket(),
|
||||
cache
|
||||
)
|
||||
uid,
|
||||
AuthModel.get().getTicket(),
|
||||
cache
|
||||
)
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.doOnSuccess(info -> {
|
||||
@@ -181,10 +181,10 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<ChargeListResult> getChargeList(int channelType,long uid) {
|
||||
public Single<ChargeListResult> getChargeList(int channelType, long uid) {
|
||||
return api.getChargeList(
|
||||
String.valueOf(channelType),uid
|
||||
)
|
||||
String.valueOf(channelType), uid
|
||||
)
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
@@ -193,12 +193,12 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
@Override
|
||||
public Single<JsonObject> requestCharge(Context context, String chargeProdId, String payChannel) {
|
||||
return api.requestCharge(
|
||||
String.valueOf(AuthModel.get().getCurrentUid()),
|
||||
chargeProdId,
|
||||
String.valueOf(payChannel),
|
||||
NetworkUtils.getIPAddress(context),
|
||||
AuthModel.get().getTicket()
|
||||
)
|
||||
String.valueOf(AuthModel.get().getCurrentUid()),
|
||||
chargeProdId,
|
||||
String.valueOf(payChannel),
|
||||
NetworkUtils.getIPAddress(context),
|
||||
AuthModel.get().getTicket()
|
||||
)
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
|
||||
@@ -208,10 +208,10 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
public Single<Integer> requestCDKeyCharge(String code) {
|
||||
|
||||
return api.requestCDKeyCharge(
|
||||
String.valueOf(AuthModel.get().getCurrentUid()),
|
||||
code,
|
||||
AuthModel.get().getTicket()
|
||||
)
|
||||
String.valueOf(AuthModel.get().getCurrentUid()),
|
||||
code,
|
||||
AuthModel.get().getTicket()
|
||||
)
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.flatMap(info -> {
|
||||
@@ -231,12 +231,12 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
@Override
|
||||
public Single<WalletInfo> exchangeGold(int diamondNum, int hammerNum, String pwd) {
|
||||
return api.changeGold(
|
||||
String.valueOf(AuthModel.get().getCurrentUid()),
|
||||
String.valueOf(diamondNum),
|
||||
String.valueOf(hammerNum),
|
||||
pwd,
|
||||
AuthModel.get().getTicket()
|
||||
)
|
||||
String.valueOf(AuthModel.get().getCurrentUid()),
|
||||
String.valueOf(diamondNum),
|
||||
String.valueOf(hammerNum),
|
||||
pwd,
|
||||
AuthModel.get().getTicket()
|
||||
)
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.doOnSuccess(info -> {
|
||||
@@ -276,9 +276,9 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Single<String> verifyCode(String mobile,
|
||||
public Single<String> verifyCode(String phoneAreaCode, String mobile,
|
||||
String code) {
|
||||
return api.verifyCode(DESUtils.DESAndBase64(mobile), code)
|
||||
return api.verifyCode(phoneAreaCode, DESUtils.DESAndBase64(mobile), code)
|
||||
.flatMap(new Function<ServiceResult<String>, SingleSource<String>>() {
|
||||
@Override
|
||||
public SingleSource<String> apply(ServiceResult<String> stringServiceResult) throws Exception {
|
||||
@@ -422,8 +422,8 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<String> giveGold(long toUid, String goldNum,String password) {
|
||||
return api.giveGold(toUid, goldNum,password)
|
||||
public Single<String> giveGold(long toUid, String goldNum, String password) {
|
||||
return api.giveGold(toUid, goldNum, password)
|
||||
.compose(RxHelper.handleStringData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
@@ -434,7 +434,7 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Single<List<FirstChargeGoods>> getFirstChargeList(){
|
||||
public Single<List<FirstChargeGoods>> getFirstChargeList() {
|
||||
return api.getFirstChargeList()
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchAndExce());
|
||||
@@ -446,7 +446,7 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Single<NewUserChargeInfo> getNewUserChargeInfo(){
|
||||
public Single<NewUserChargeInfo> getNewUserChargeInfo() {
|
||||
return api.getNewUserChargeInfo()
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchAndExce());
|
||||
@@ -497,6 +497,7 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
|
||||
/**
|
||||
* 获取钱包
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("/purse/query")
|
||||
@@ -509,7 +510,7 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
* @return
|
||||
*/
|
||||
@GET("/chargeprod/listV2")
|
||||
Single<ServiceResult<ChargeListResult>> getChargeList(@Query("channelType") String channelType ,
|
||||
Single<ServiceResult<ChargeListResult>> getChargeList(@Query("channelType") String channelType,
|
||||
@Query("pub_uid") long pub_uid);
|
||||
|
||||
|
||||
@@ -580,7 +581,8 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
* @return
|
||||
*/
|
||||
@GET("sms/verify")
|
||||
Single<ServiceResult<String>> verifyCode(@Query("mobile") String mobile,
|
||||
Single<ServiceResult<String>> verifyCode(@Query("phoneAreaCode") String phoneAreaCode,
|
||||
@Query("mobile") String mobile,
|
||||
@Query("code") String code);
|
||||
|
||||
/**
|
||||
|
@@ -154,9 +154,13 @@ public class UserInfo implements Serializable {
|
||||
* 头饰信息
|
||||
*/
|
||||
private HeadWearInfo userHeadwear;
|
||||
@Getter
|
||||
@Setter
|
||||
//区号
|
||||
private String phoneAreaCode;
|
||||
//手机号
|
||||
private String phone;
|
||||
//手机号
|
||||
//是否绑定手机号
|
||||
private boolean isBindPhone;
|
||||
//是否设置密码
|
||||
private boolean isBindPasswd;
|
||||
|
Reference in New Issue
Block a user