Commit 9a54da45 by 严久程

Merge branch 'dev' into 导医增加广告入口

# Conflicts:
#	config.gradle
parents 7781a8ff 8f259791
......@@ -6,6 +6,8 @@ import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import com.ydl.ydl_image.module.GlideApp
import com.yidianling.home.R
import com.yidianling.home.constract.HomeViewConfig
import com.yidianling.home.event.HomeImpl
......@@ -281,5 +283,12 @@ class YdlHomeAdapter(private val mContext: Context,
/**
* 底部提示语模块 ViewHolder
*/
inner class FooterViewViewHolder(val footerView: View,val viewType:Int) : RecyclerView.ViewHolder(footerView)
inner class FooterViewViewHolder(val footerView: View,val viewType:Int) : RecyclerView.ViewHolder(footerView){
var imageLogoView:ImageView?=null
init {
imageLogoView=footerView.findViewById(R.id.iv_logo_view);
GlideApp.with(mContext).load("https://static.yidianling.com/banner/bottombanner@2x.png").into(imageLogoView);
}
}
}
\ No newline at end of file
......@@ -6,9 +6,9 @@
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_logo_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/baby_blue"
android:scaleType="centerCrop"
android:src="@drawable/home_ydl_logo" />
/>
</LinearLayout>
\ No newline at end of file
......@@ -84,6 +84,7 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
private TextView mDurationTv;
private TextView mFansNumTv;
private View mNewCoupon;
private ImageView mLogoView;
private TextView mTestRecordNumTv;
//debug包下切换环境的按钮
private Button mChangeBtn;
......@@ -133,6 +134,7 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
jtv_test = getRootView().findViewById(R.id.jtv_test);
tishi = getRootView().findViewById(R.id.tishi);
mNewCoupon = getRootView().findViewById(R.id.view_new_coupon);
mLogoView = getRootView().findViewById(R.id.iv_mine_logo);
img_head.setOnClickListener(this);
mChangeBtn.setOnClickListener(this);
jtv_account_setting.setOnClickListener(this);
......@@ -160,6 +162,8 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
init();
GlideApp.with(this).load("https://static.yidianling.com/banner/bottombanner@2x.png").into(mLogoView);
// jtv_test.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
refreshCouponData();
......
......@@ -26,11 +26,9 @@ import com.tbruyelle.rxpermissions2.RxPermissions
import com.umeng.socialize.UMShareAPI
import com.umeng.socialize.UMShareConfig
import com.umeng.socialize.bean.SHARE_MEDIA
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
......@@ -45,7 +43,6 @@ import com.yidianling.user.UserHelper
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.AliAuthBean
import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.http.UserHttpImpl
import com.yidianling.user.http.request.BindPhoneJavaParam
import com.yidianling.user.http.request.PhoneLoginAutoParam
import com.yidianling.user.http.response.ChcekPhoneResponeBean
......@@ -56,8 +53,6 @@ import com.yidianling.user.safePrivate.HandUnlockCheckActivity
import com.yidianling.user.ui.CountryListActivity
import com.yidianling.user.ui.login.contract.ILoginContract
import com.yidianling.user.ui.login.presenter.LoginPresenterImpl
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.user_activity_register_and_login.*
/**
......@@ -86,7 +81,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
private var countryCode: String? = "0086"//国家或地区手机区号
private var handler: Handler? = null
private var isFromGuide = false//是否来自启动页
private var isAgreeProtocol =false
companion object {
private var BIND_PHONE = "bind_phone"//用于判断时候是绑定手机号
private var IS_FROM_GUIDE = "isFromGuide"//是否来自启动页
......@@ -140,6 +135,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
StatusBarUtils.Companion.setWindowStatusBarColor(this, R.color.platform_color_075b66)
}
@SuppressLint("CheckResult")
private fun requestPermission() {
val rxPermissions = RxPermissions(this)
rxPermissions.requestEach(Manifest.permission.READ_PHONE_STATE)
......@@ -303,7 +299,10 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
if (isUmengLoginState) {
tv_skip.visibility = View.VISIBLE
tv_des.text = "首次绑定即送大礼包"
// tv_des.text = "首次绑定即送大礼包"
tv_des.visibility=View.GONE
iv_select_protocol.visibility=View.GONE
tv_des_first.visibility=View.VISIBLE
iv_weixin.visibility = View.GONE
iv_qq.visibility = View.GONE
tv_reg_title.text = "手机号绑定"
......@@ -369,6 +368,16 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
RxKeyboardTool.hideSoftInput(this)
onBackPressed()
}
view_click.setOnClickListener {
if(iv_select_protocol.visibility==View.VISIBLE){
isAgreeProtocol=!isAgreeProtocol
if(isAgreeProtocol){
iv_select_protocol.setImageResource(R.drawable.user_login_protocol_selected)
}else{
iv_select_protocol.setImageResource(R.drawable.user_login_protocol_unselected)
}
}
}
//微信登录
iv_weixin.setOnClickListener {
......@@ -390,7 +399,10 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
}
//下一步
iv_next.setOnClickListener {
if(iv_select_protocol.visibility==View.VISIBLE&&!isAgreeProtocol){
ToastUtil.toastShort("请您先同意壹点灵《用户使用协议》、《隐私保护政策》,才能登录使用")
return@setOnClickListener
}
if (checkPhone()) {
mPresenter.checkPhoneStatus(userPhoneNumber!!, countryCode!!, isUmengLoginState)
}
......@@ -464,7 +476,10 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
countryCode = userInfo.country_code
isUmengLoginState = true
tv_skip.visibility = View.VISIBLE
tv_des.text = "首次绑定即送大礼包"
// tv_des.text = "首次绑定即送大礼包"
tv_des.visibility=View.GONE
iv_select_protocol.visibility=View.GONE
tv_des_first.visibility=View.VISIBLE
iv_weixin.visibility = View.GONE
iv_qq.visibility = View.GONE
tv_reg_title.text = "手机号绑定"
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rl_login_conten"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/bg_login"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/user_bg_login" />
<ImageView
android:id="@+id/img_reg_back"
android:layout_width="31dp"
android:layout_height="31dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:scaleType="fitXY"
android:src="@drawable/user_ic_back_grey" />
<TextView
android:id="@+id/tv_skip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="15dp"
android:layout_marginRight="23dp"
android:padding="5dp"
android:text="跳过"
android:textColor="#2EB0FF"
android:textSize="11dp"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/tv_reg_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/img_reg_back"
android:layout_marginLeft="28dp"
android:layout_marginTop="15dp"
android:text="登录/注册"
android:textColor="#fdfdfe"
android:textSize="28dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_des"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_reg_title"
android:layout_marginLeft="28dp"
android:layout_marginTop="6.5dp"
android:fontFamily="sans-serif-light"
android:text="继续即代表您同意"
android:textColor="#fdfdfe"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_protocol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/tv_des"
android:layout_toRightOf="@+id/tv_des"
android:text="《壹点灵用户使用协议》"
android:textColor="#fdfdfe"
android:textSize="13sp" />
<RelativeLayout
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="213dp"
android:layout_below="@+id/tv_des"
android:layout_centerInParent="true"
android:layout_marginLeft="28dp"
android:layout_marginTop="30dp"
android:layout_marginRight="28dp"
android:background="@drawable/user_card_login"
android:orientation="vertical">
<LinearLayout
android:id="@+id/input_ll_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="15dp"
android:paddingRight="15dp"
tools:background="@color/blue">
<LinearLayout
android:id="@+id/ll_country"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/user_bg__choose_country_radius"
android:gravity="center_vertical"
android:paddingLeft="7dp"
android:paddingTop="4dp"
android:paddingRight="7dp"
android:paddingBottom="4dp">
<ImageView
android:id="@+id/iv_country_icon"
android:layout_width="23dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:scaleType="centerCrop"
android:src="@drawable/user_ic_china" />
<TextView
android:id="@+id/tv_country_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:maxLines="1"
android:text="+86"
android:textColor="#666666"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<com.ydl.ydlcommon.view.PhoneEditText
android:id="@+id/et_phone_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical|left"
android:inputType="phone"
android:lines="1"
android:maxLength="13"
android:textColorHint="@color/platform_color_c6c3c3"
android:textSize="24sp" />
<ImageView
android:id="@+id/iv_del"
android:layout_width="23dp"
android:layout_height="23dp"
android:layout_gravity="center_vertical"
android:padding="5dp"
android:scaleType="fitXY"
android:src="@drawable/user_ic_del"
android:visibility="invisible" />
</LinearLayout>
<View
android:id="@+id/view_lin"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/input_ll_bar"
android:layout_marginLeft="15dp"
android:layout_marginTop="20dp"
android:layout_marginRight="15dp"
android:background="#e8e8e8" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_marginBottom="13dp"
android:src="@drawable/user_next_border" />
<RelativeLayout
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_marginBottom="13dp"
android:background="@drawable/user_bg_radius_bule"
android:elevation="10dp"
android:gravity="center">
<ImageView
android:id="@+id/iv_next"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:padding="18sp"
android:scaleType="centerCrop"
android:src="@drawable/user_ic_next" />
<ProgressBar
android:id="@+id/pb_Normal"
android:layout_width="62dp"
android:layout_height="62dp"
android:indeterminateTint="#ffffff"
android:padding="10dp"
android:visibility="gone" />
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="70dp"
android:gravity="center">
<ImageView
android:id="@+id/iv_weixin"
android:layout_width="45dp"
android:layout_height="45dp"
android:contentDescription="@null"
android:scaleType="centerCrop"
android:src="@drawable/user_login_weixin" />
<ImageView
android:id="@+id/iv_qq"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginLeft="30dp"
android:contentDescription="@null"
android:scaleType="centerCrop"
android:src="@drawable/user_login_qq"
android:visibility="visible" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_success"
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="#fff"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/user_ic_log_succee" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:text="登录成功!"
android:textColor="#32D296"
android:textSize="13dp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="35dp"
android:text="您已通过阿里云号码认证服务,一键登录更安全。"
android:textColor="#666666"
android:textSize="13dp" />
</LinearLayout>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rl_login_conten"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/bg_login"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/user_bg_login" />
<ImageView
android:id="@+id/img_reg_back"
android:layout_width="31dp"
android:layout_height="31dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:scaleType="fitXY"
android:src="@drawable/user_ic_back_grey" />
<TextView
android:id="@+id/tv_skip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="15dp"
android:layout_marginRight="23dp"
android:padding="5dp"
android:text="跳过"
android:textColor="#2EB0FF"
android:textSize="11dp"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/tv_reg_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/img_reg_back"
android:layout_marginLeft="28dp"
android:layout_marginTop="15dp"
android:text="登录/注册"
android:textColor="#fdfdfe"
android:textSize="28dp"
android:textStyle="bold" />
<View
android:id="@+id/view_click"
android:layout_width="30dp"
android:layout_below="@+id/tv_reg_title"
android:layout_marginLeft="20dp"
android:layout_height="30dp"/>
<ImageView
android:id="@+id/iv_select_protocol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_reg_title"
android:layout_marginTop="6.5dp"
android:layout_alignBottom="@+id/tv_des"
android:layout_marginLeft="28dp"
android:src="@drawable/user_login_protocol_unselected"
/>
<TextView
android:id="@+id/tv_des"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_reg_title"
android:layout_toRightOf="@+id/iv_select_protocol"
android:layout_marginTop="6.5dp"
android:layout_marginStart="10dp"
android:fontFamily="sans-serif-light"
android:text="同意"
android:textColor="#fdfdfe"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_des_first"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_reg_title"
android:layout_marginTop="6.5dp"
android:layout_marginLeft="28dp"
android:fontFamily="sans-serif-light"
android:text="首次绑定即送大礼包"
android:visibility="gone"
android:textColor="#fdfdfe"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_protocol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/tv_des"
android:layout_toRightOf="@+id/tv_des"
android:text="《壹点灵用户使用协议》"
android:textColor="#fdfdfe"
android:textSize="13sp" />
<RelativeLayout
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="213dp"
android:layout_below="@+id/tv_des"
android:layout_centerInParent="true"
android:layout_marginLeft="28dp"
android:layout_marginTop="30dp"
android:layout_marginRight="28dp"
android:background="@drawable/user_card_login"
android:orientation="vertical">
<LinearLayout
android:id="@+id/input_ll_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="15dp"
android:paddingRight="15dp"
tools:background="@color/blue">
<LinearLayout
android:id="@+id/ll_country"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/user_bg__choose_country_radius"
android:gravity="center_vertical"
android:paddingLeft="7dp"
android:paddingTop="4dp"
android:paddingRight="7dp"
android:paddingBottom="4dp">
<ImageView
android:id="@+id/iv_country_icon"
android:layout_width="23dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:scaleType="centerCrop"
android:src="@drawable/user_ic_china" />
<TextView
android:id="@+id/tv_country_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:maxLines="1"
android:text="+86"
android:textColor="#666666"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<com.ydl.ydlcommon.view.PhoneEditText
android:id="@+id/et_phone_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical|left"
android:inputType="phone"
android:lines="1"
android:maxLength="13"
android:textColorHint="@color/platform_color_c6c3c3"
android:textSize="24sp" />
<ImageView
android:id="@+id/iv_del"
android:layout_width="23dp"
android:layout_height="23dp"
android:layout_gravity="center_vertical"
android:padding="5dp"
android:scaleType="fitXY"
android:src="@drawable/user_ic_del"
android:visibility="invisible" />
</LinearLayout>
<View
android:id="@+id/view_lin"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/input_ll_bar"
android:layout_marginLeft="15dp"
android:layout_marginTop="20dp"
android:layout_marginRight="15dp"
android:background="#e8e8e8" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_marginBottom="13dp"
android:src="@drawable/user_next_border" />
<RelativeLayout
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_marginBottom="13dp"
android:background="@drawable/user_bg_radius_bule"
android:elevation="10dp"
android:gravity="center">
<ImageView
android:id="@+id/iv_next"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:padding="18sp"
android:scaleType="centerCrop"
android:src="@drawable/user_ic_next" />
<ProgressBar
android:id="@+id/pb_Normal"
android:layout_width="62dp"
android:layout_height="62dp"
android:indeterminateTint="#ffffff"
android:padding="10dp"
android:visibility="gone" />
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="70dp"
android:gravity="center">
<ImageView
android:id="@+id/iv_weixin"
android:layout_width="45dp"
android:layout_height="45dp"
android:contentDescription="@null"
android:scaleType="centerCrop"
android:src="@drawable/user_login_weixin" />
<ImageView
android:id="@+id/iv_qq"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginLeft="30dp"
android:contentDescription="@null"
android:scaleType="centerCrop"
android:src="@drawable/user_login_qq"
android:visibility="visible" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_success"
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="#fff"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/user_ic_log_succee" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:text="登录成功!"
android:textColor="#32D296"
android:textSize="13dp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="35dp"
android:text="您已通过阿里云号码认证服务,一键登录更安全。"
android:textColor="#666666"
android:textSize="13dp" />
</LinearLayout>
</RelativeLayout>
......@@ -606,9 +606,10 @@
<ImageView
android:src="@drawable/user_mine_ydl_logo"
android:id="@+id/iv_mine_logo"
android:layout_marginTop="20dp"
tools:src="@drawable/user_mine_ydl_logo"
android:layout_width="match_parent"
android:scaleType="centerCrop"
android:background="@color/baby_blue"
android:layout_height="wrap_content"/>
......
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