Commit 6e039dc5 by YKai

feat:强绑手机号页面提交

parent dddecd84
...@@ -35,7 +35,6 @@ import com.ydl.confide.home.ConfideHomeActivity ...@@ -35,7 +35,6 @@ import com.ydl.confide.home.ConfideHomeActivity
import com.ydl.ydlcommon.router.YdlCommonRouterManager import com.ydl.ydlcommon.router.YdlCommonRouterManager
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.consultant.api.IConsultantService import com.yidianling.consultant.api.IConsultantService
import com.yidianling.user.LoginUtils
import com.yidianling.user.StatusUtils import com.yidianling.user.StatusUtils
import com.yidianling.user.ui.login.OneKeyLoginHelp import com.yidianling.user.ui.login.OneKeyLoginHelp
......
...@@ -136,7 +136,7 @@ ext { ...@@ -136,7 +136,7 @@ ext {
"cardview-v7" : "com.android.support:cardview-v7:${version["androidSupportSdkVersion"]}", "cardview-v7" : "com.android.support:cardview-v7:${version["androidSupportSdkVersion"]}",
"annotations" : "com.android.support:support-annotations:${version["androidSupportSdkVersion"]}", "annotations" : "com.android.support:support-annotations:${version["androidSupportSdkVersion"]}",
"recyclerview-v7" : "com.android.support:recyclerview-v7:${version["androidSupportSdkVersion"]}", "recyclerview-v7" : "com.android.support:recyclerview-v7:${version["androidSupportSdkVersion"]}",
"constraint-layout" : "com.android.support.constraint:constraint-layout:1.1.3", "constraint-layout" : "com.android.support.constraint:constraint-layout:2.0.4",
//network //network
"retrofit" : "com.squareup.retrofit2:retrofit:${version["retrofitSdkVersion"]}", "retrofit" : "com.squareup.retrofit2:retrofit:${version["retrofitSdkVersion"]}",
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
package="com.yidianling.user"> package="com.yidianling.user">
<application> <application>
<activity android:name=".ui.login.BindPhoneActivity"></activity>
<activity <activity
android:name=".ui.LoginActivity" android:name=".ui.LoginActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
...@@ -52,7 +53,6 @@ ...@@ -52,7 +53,6 @@
android:name=".safePrivate.SetHandUnLockActivity" android:name=".safePrivate.SetHandUnLockActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name=".ui.login.RegisterAndLoginActivity" android:name=".ui.login.RegisterAndLoginActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
...@@ -73,96 +73,93 @@ ...@@ -73,96 +73,93 @@
android:name=".wxapi.WXEntryActivity" android:name=".wxapi.WXEntryActivity"
android:exported="true" android:exported="true"
android:launchMode="singleTop" /> android:launchMode="singleTop" />
<activity <activity
android:name=".ui.login.SecretActivity" android:name=".ui.login.SecretActivity"
android:exported="true" android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.AboutUsActivity" android:name=".mine.AboutUsActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.AccountHistoryActivity" android:name=".mine.AccountHistoryActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.AccountSettingActivity" android:name=".mine.AccountSettingActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.ContactCustomerServiceActivity" android:name=".mine.ContactCustomerServiceActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.FeedBackActivity" android:name=".mine.FeedBackActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateUnspecified" /> android:windowSoftInputMode="adjustPan|stateUnspecified" />
<activity <activity
android:name="com.yidianling.user.mine.MyFeedBackActivity" android:name=".mine.MyFeedBackActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.FeedBackSuccessActivity" android:name=".mine.FeedBackSuccessActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.HelpActivity" android:name=".mine.HelpActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.NotificationsSettingActivity" android:name=".mine.NotificationsSettingActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.PersonalDesActivity" android:name=".mine.PersonalDesActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.PersonalInfoActivity" android:name=".mine.PersonalInfoActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.RechargeActivity" android:name=".mine.RechargeActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.SetInfoActivity" android:name=".mine.SetInfoActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.WithDrawActivity" android:name=".mine.WithDrawActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.WithDrawSuccessActivity" android:name=".mine.WithDrawSuccessActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.ChooseAccountActivity" android:name=".mine.ChooseAccountActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.EditAccountActivity" android:name=".mine.EditAccountActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.AddAccountActivity" android:name=".mine.AddAccountActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.RechargeResultActivity" android:name=".mine.RechargeResultActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.PwdCheckActivity" android:name=".mine.PwdCheckActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.PhoneChangeActivity" android:name=".mine.PhoneChangeActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
...@@ -170,7 +167,6 @@ ...@@ -170,7 +167,6 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="adjustResize" /> android:windowSoftInputMode="adjustResize" />
<activity <activity
android:name=".mine.ReceiveRedPacketActivity" android:name=".mine.ReceiveRedPacketActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
...@@ -180,35 +176,27 @@ ...@@ -180,35 +176,27 @@
android:name=".ui.collect.CollectSexAndBirthActivity" android:name=".ui.collect.CollectSexAndBirthActivity"
android:exported="true" android:exported="true"
android:launchMode="singleTop" /> android:launchMode="singleTop" />
<activity <activity
android:name=".ui.collect.CollectFocusActivity" android:name=".ui.collect.CollectFocusActivity"
android:exported="true" android:exported="true"
android:launchMode="singleTop" /> android:launchMode="singleTop" /> <!-- 联通电信授权页 -->
<!--联通电信授权页-->
<activity <activity
android:name="com.mobile.auth.gatewayauth.LoginAuthActivity" android:name="com.mobile.auth.gatewayauth.LoginAuthActivity"
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="false" android:exported="false"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/authsdk_activity_dialog" /> android:theme="@style/authsdk_activity_dialog" /> <!-- 协议页面webview -->
<!--协议页面webview-->
<activity <activity
android:name="com.mobile.auth.gatewayauth.activity.AuthWebVeiwActivity" android:name="com.mobile.auth.gatewayauth.activity.AuthWebVeiwActivity"
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="false" android:exported="false"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="behind" /> android:screenOrientation="behind" /> <!-- 移动授权页 -->
<!--移动授权页-->
<activity <activity
android:name="com.cmic.sso.sdk.activity.LoginAuthActivity" android:name="com.cmic.sso.sdk.activity.LoginAuthActivity"
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="false" android:exported="false"
android:launchMode="singleTop" /> android:launchMode="singleTop" />
</application> </application>
</manifest> </manifest>
\ No newline at end of file
...@@ -106,7 +106,7 @@ class LoginApiRequestUtil { ...@@ -106,7 +106,7 @@ class LoginApiRequestUtil {
/** /**
* 一键登录 * 绑定手机号
*/ */
fun bindPhone(param: BindPhoneJavaParam): Observable<BaseResponse<Any>> { fun bindPhone(param: BindPhoneJavaParam): Observable<BaseResponse<Any>> {
var str = Gson().toJson(param) var str = Gson().toJson(param)
......
## 新的登录注册
\ No newline at end of file
...@@ -538,22 +538,23 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -538,22 +538,23 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
*三方登录成功 *三方登录成功
*/ */
override fun thirdLoginSuccess(userInfo: UserResponseBean.UserInfo) { override fun thirdLoginSuccess(userInfo: UserResponseBean.UserInfo) {
var bindPhone = userInfo.bind_phone if (userInfo.bind_phone != 1) {
if (bindPhone != 1) { // countryCode = userInfo.country_code
countryCode = userInfo.country_code // isBindPhone = true
isBindPhone = true // skip_bind.visibility = View.VISIBLE
skip_bind.visibility = View.VISIBLE //// tv_des.text = "首次绑定即送大礼包"
// tv_des.text = "首次绑定即送大礼包" //// tv_des.visibility = View.GONE
// tv_des.visibility = View.GONE // iv_select_protocol.visibility = View.GONE
iv_select_protocol.visibility = View.GONE //// tv_des_first.visibility = View.VISIBLE
// tv_des_first.visibility = View.VISIBLE // bind_phone_hint.visibility = View.VISIBLE
bind_phone_hint.visibility = View.VISIBLE // login_wechat.visibility = View.GONE
login_wechat.visibility = View.GONE // login_qq.visibility = View.GONE
login_qq.visibility = View.GONE // tv_login_title.text = "绑定手机号"
tv_login_title.text = "绑定手机号" // tv_protocol.visibility = View.GONE
tv_protocol.visibility = View.GONE // other_login_style.visibility = View.GONE
other_login_style.visibility = View.GONE // country_code.text = "+86"
country_code.text = "+86" BindPhoneActivity.startActivity(this)
finish()
} else { } else {
when { when {
isFromGuide -> { isFromGuide -> {
......
...@@ -190,20 +190,15 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra ...@@ -190,20 +190,15 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
ToastUtil.toastShort(it.msg) ToastUtil.toastShort(it.msg)
return@subscribe return@subscribe
} }
if (media == SHARE_MEDIA.QQ) { if (it.data.firstLogin==1){ // 第一次登录:是注册
if (it.data.firstLogin == 1) {//第一次登录:是注册 StatusUtils.isFirstLogin = true
StatusUtils.isFirstLogin = true if (media==SHARE_MEDIA.QQ){
mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_QQ_REGISTER_CLICK) mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_QQ_REGISTER_CLICK)
} else { }else{
ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, it.data.uid!!,sign1)
}
} else {
if (it.data.firstLogin == 1) {//第一次登录:是注册
StatusUtils.isFirstLogin = true
mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_WX_REGISTER_CLICK) mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_WX_REGISTER_CLICK)
} else {
ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, it.data.uid!!,sign1)
} }
}else{
ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, it.data.uid!!,sign1)
} }
LoginUtils.onLogin(it.data) LoginUtils.onLogin(it.data)
mView.thirdLoginSuccess(it.data.userInfo!!) mView.thirdLoginSuccess(it.data.userInfo!!)
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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"
tools:context=".ui.login.BindPhoneActivity"
tools:ignore="ResourceName">
<ImageView
android:id="@+id/iv_back"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginTop="44dp"
android:padding="@dimen/platform_dp_10"
android:src="@drawable/user_ic_back_black"
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_marginStart="@dimen/platform_dp_40"
android:layout_marginTop="@dimen/platform_dp_32"
android:text="绑定手机号"
android:textColor="@color/pay_color_242424"
android:textSize="22sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_back" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请输入您的常用手机号码"
app:layout_constraintLeft_toLeftOf="@id/tv_title"
app:layout_constraintTop_toBottomOf="@id/tv_title" />
<TextView
android:id="@+id/tv_country_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="70dp"
android:drawableEnd="@drawable/user_triangle_down"
android:drawablePadding="@dimen/platform_dp_4"
android:text="+86"
android:textColor="@color/pay_color_666666"
android:textSize="17sp"
app:layout_constraintStart_toStartOf="@id/tv_title"
app:layout_constraintTop_toBottomOf="@id/tv_title" />
<com.ydl.ydlcommon.view.PhoneEditText
android:id="@+id/et_phone_number"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="@dimen/platform_dp_16"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical|left"
android:hint="输入手机号"
android:inputType="number"
android:lines="1"
android:maxLength="13"
android:textColor="@color/platform_color_242424"
android:textColorHint="@color/platform_color_BFBFBF"
android:textCursorDrawable="@null"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="@id/tv_country_code"
app:layout_constraintEnd_toStartOf="@id/iv_del"
app:layout_constraintStart_toEndOf="@id/tv_country_code"
app:layout_constraintTop_toTopOf="@id/tv_country_code" />
<View
android:id="@+id/view_lin"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginStart="@dimen/platform_dp_40"
android:layout_marginTop="@dimen/platform_dp_10"
android:layout_marginEnd="@dimen/platform_dp_40"
android:background="@color/platform_color_EBEBEB"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_country_code" />
<ImageView
android:id="@+id/iv_del"
android:layout_width="23dp"
android:layout_height="23dp"
android:layout_gravity="center_vertical"
android:paddingStart="@dimen/platform_dp_5"
android:paddingTop="@dimen/platform_dp_5"
android:paddingBottom="@dimen/platform_dp_5"
android:src="@drawable/user_ic_del_new"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/et_phone_number"
app:layout_constraintEnd_toEndOf="@id/view_lin"
app:layout_constraintTop_toTopOf="@id/et_phone_number" />
<EditText
android:id="@+id/et_code"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_36"
android:layout_marginEnd="@dimen/platform_dp_16"
android:background="@null"
android:hint="输入验证码"
android:inputType="number"
android:textColor="@color/platform_color_242424"
android:textColorHint="@color/platform_color_BFBFBF"
android:textSize="20sp"
app:layout_constraintEnd_toStartOf="@id/tv_get_code"
app:layout_constraintStart_toStartOf="@id/tv_country_code"
app:layout_constraintTop_toBottomOf="@id/view_lin" />
<TextView
android:id="@+id/tv_get_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_40"
android:alpha="0.6"
android:text="获取验证码"
android:textColor="@color/platform_color_1DA1F2"
app:layout_constraintEnd_toEndOf="@id/view_lin"
app:layout_constraintTop_toBottomOf="@id/view_lin" />
<View
android:id="@+id/v_line"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginStart="@dimen/platform_dp_40"
android:layout_marginTop="@dimen/platform_dp_10"
android:layout_marginEnd="@dimen/platform_dp_40"
android:background="@color/platform_color_EBEBEB"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/et_code" />
<TextView
android:id="@+id/tv_no_get_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_15"
android:text="收不到验证码?"
android:textColor="@color/platform_color_666666"
app:layout_constraintEnd_toEndOf="@id/v_line"
app:layout_constraintTop_toBottomOf="@id/v_line" />
<TextView
android:id="@+id/tv_bind"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/platform_dp_38"
android:layout_marginTop="@dimen/platform_dp_38"
android:layout_marginEnd="@dimen/platform_dp_38"
android:background="@drawable/login_password_unable_bg_24dp"
android:gravity="center"
android:paddingTop="@dimen/platform_dp_13"
android:paddingBottom="@dimen/platform_dp_13"
android:text="绑定"
android:textColor="@color/white"
android:textSize="17sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_no_get_code" />
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName"> <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName">
<!--网络提示模块--> <!--网络提示模块-->
<!--动态模块--> <!--动态模块-->
<string name="user_edittext_hint"></string> <string name="user_edittext_hint"></string>
<string name="redpacket_tips_title">红包说明</string> <string name="redpacket_tips_title">红包说明</string>
<string name="redpacket_tips_content1" >1.红包仅限于感谢使用,不能用于支付咨询费,无咨询售后保障</string> <string name="redpacket_tips_content1">1.红包仅限于感谢使用,不能用于支付咨询费,无咨询售后保障</string>
<string name="redpacket_tips_content2">2.红包一经发送且咨询师已收取,不支持退款</string> <string name="redpacket_tips_content2">2.红包一经发送且咨询师已收取,不支持退款</string>
<string name="redpacket_tips_content3">3.咨询师未确认收取红包会在24小时退回账户</string> <string name="redpacket_tips_content3">3.咨询师未确认收取红包会在24小时退回账户</string>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment