@@ -61,7 +61,8 @@ public class MyRetrofit { | |||
public static void newInstance(String code, Object bean, ReturnResult result) { | |||
RequestParameters parameters = new RequestParameters(code, new Gson().toJson(bean)); | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters) | |||
new MyRetrofit().getRetrofit().create(Api.class) | |||
.message2(parameters) | |||
.enqueue(new Converter<Result>(null, "加载中...") { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { |
@@ -41,7 +41,6 @@ public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
@Override | |||
protected View getLayoutView(LayoutInflater inflater, ViewGroup container) { | |||
binding = FragmentHomeFiveBinding.inflate(inflater, container, false); | |||
// binding = FragmentHomeFiveBinding.inflate(getLayoutInflater()); | |||
return binding.getRoot(); | |||
} | |||
@@ -106,8 +106,6 @@ public final class LoginActivity extends AppActivity | |||
private LinearLayout mLayoutCode; | |||
private View mOtherView; | |||
private View mQQView; | |||
private View mWeChatView; | |||
private Boolean loginStart = true; //true 账号密码 false 手机号 | |||
@@ -134,15 +132,13 @@ public final class LoginActivity extends AppActivity | |||
mForgetView = findViewById(R.id.tv_login_forget); | |||
mCommitView = findViewById(R.id.btn_login_commit); | |||
mOtherView = findViewById(R.id.ll_login_other); | |||
mQQView = findViewById(R.id.iv_login_qq); | |||
mWeChatView = findViewById(R.id.iv_login_wechat); | |||
//发送验证码 | |||
mCountdownView = findViewById(R.id.cv_phone_reset_countdown); | |||
mCodeView = findViewById(R.id.et_phone_reset_code); | |||
mTvLoginCode = findViewById(R.id.tv_login_code); | |||
mLayoutCode = findViewById(R.id.layout_code); | |||
setOnClickListener(mForgetView, mCountdownView, mTvLoginCode, mCodeView, mCommitView, mQQView, mWeChatView); | |||
setOnClickListener(mForgetView, mCountdownView, mTvLoginCode, mCodeView, mCommitView); | |||
mPasswordView.setOnEditorActionListener(this); | |||
} | |||
@@ -153,22 +149,6 @@ public final class LoginActivity extends AppActivity | |||
KeyboardWatcher.with(LoginActivity.this) | |||
.setListener(LoginActivity.this); | |||
}, 500); | |||
// 判断用户当前有没有安装 QQ | |||
if (!UmengClient.isAppInstalled(this, Platform.QQ)) { | |||
mQQView.setVisibility(View.GONE); | |||
} | |||
// 判断用户当前有没有安装微信 | |||
if (!UmengClient.isAppInstalled(this, Platform.WECHAT)) { | |||
mWeChatView.setVisibility(View.GONE); | |||
} | |||
// 如果这两个都没有安装就隐藏提示 | |||
if (mQQView.getVisibility() == View.GONE && mWeChatView.getVisibility() == View.GONE) { | |||
mOtherView.setVisibility(View.GONE); | |||
} | |||
// 自动填充手机号和密码 | |||
// mPhoneView.setText(getString(INTENT_KEY_IN_PHONE)); | |||
// mPasswordView.setText(getString(INTENT_KEY_IN_PASSWORD)); | |||
@@ -253,7 +233,7 @@ public final class LoginActivity extends AppActivity | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("mobile", mPhoneView.getText() + ""); | |||
params.put("password", value); | |||
params.put("appId", "52030131"); | |||
params.put("appId", "52030131"); //综合业务支撑平台使用:52030131 | |||
MyRetrofit.newInstance(IFCode.IFCODE4, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
@@ -290,10 +270,6 @@ public final class LoginActivity extends AppActivity | |||
UmengClient.onActivityResult(this, requestCode, resultCode, data); | |||
} | |||
/** | |||
* {@link KeyboardWatcher.SoftKeyboardStateListener} | |||
*/ | |||
@Override | |||
public void onSoftKeyboardOpened(int keyboardHeight) { | |||
// 执行位移动画 |
@@ -25,7 +25,6 @@ import com.hjq.widget.view.SlantedTextView; | |||
public final class SplashActivity extends AppActivity { | |||
private LottieAnimationView mLottieView; | |||
private SlantedTextView mDebugView; | |||
private ImageView imageView; | |||
@Override | |||
@@ -36,7 +35,6 @@ public final class SplashActivity extends AppActivity { | |||
@Override | |||
protected void initView() { | |||
mLottieView = findViewById(R.id.lav_splash_lottie); | |||
mDebugView = findViewById(R.id.iv_splash_debug); | |||
imageView = findViewById(R.id.image); | |||
// 设置动画监听 | |||
mLottieView.addAnimatorListener(new AnimatorListenerAdapter() { | |||
@@ -44,10 +42,7 @@ public final class SplashActivity extends AppActivity { | |||
@Override | |||
public void onAnimationEnd(Animator animation) { | |||
mLottieView.removeAnimatorListener(this); | |||
// MainActivity.start(getContext()); | |||
startActivity(LoginActivity.class); | |||
// HomeActivity.start(getContext()); | |||
finish(); | |||
} | |||
}); |
@@ -0,0 +1,9 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<solid android:color="#ffffffff" /> | |||
<corners | |||
android:bottomLeftRadius="20dp" | |||
android:bottomRightRadius="20dp" | |||
android:topLeftRadius="20dp" | |||
android:topRightRadius="20dp" /> | |||
</shape> |
@@ -217,7 +217,8 @@ | |||
android:animateLayoutChanges="true" | |||
android:animationCache="true" | |||
android:orientation="vertical" | |||
android:padding="@dimen/dp_15"> | |||
android:paddingHorizontal="@dimen/dp_15" | |||
android:paddingBottom="@dimen/dp_15"> | |||
<com.huntersun.vkyes.etcopencard.project.view.CustomViewPager | |||
android:id="@+id/vp_home_pager" | |||
@@ -225,7 +226,6 @@ | |||
android:layout_height="match_parent" | |||
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> | |||
</LinearLayout> | |||
</LinearLayout> |
@@ -192,7 +192,8 @@ | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:padding="@dimen/dp_10"> | |||
android:padding="@dimen/dp_10" | |||
android:visibility="gone"> | |||
<Button | |||
android:layout_width="@dimen/dp_70" |
@@ -635,8 +635,8 @@ | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:minHeight="@dimen/dp_45" | |||
android:background="#FFFFFF"> | |||
android:background="#FFFFFF" | |||
android:minHeight="@dimen/dp_45"> | |||
<TextView | |||
android:layout_width="@dimen/dp_110" | |||
@@ -924,12 +924,12 @@ | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_12" | |||
android:background="@drawable/home_unm_bg2" | |||
android:paddingHorizontal="@dimen/dp_15" | |||
android:orientation="vertical" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
android:paddingHorizontal="@dimen/dp_15"> | |||
<LinearLayout | |||
@@ -1021,12 +1021,11 @@ | |||
<TextView | |||
android:id="@+id/text8" | |||
style="@style/EditTextStyle" | |||
android:layout_width="0dp" | |||
android:layout_weight="1" | |||
android:gravity="center_vertical" | |||
android:layout_height="match_parent" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:background="@color/white" | |||
android:drawablePadding="@dimen/dp_15" | |||
android:gravity="center_vertical" | |||
android:hint="请选择证件有效日期" | |||
android:minHeight="@dimen/dp_45" | |||
android:paddingHorizontal="@dimen/dp_20" /> | |||
@@ -1042,10 +1041,10 @@ | |||
</LinearLayout> | |||
<LinearLayout | |||
android:gravity="center_vertical" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_12" | |||
android:gravity="center_vertical" | |||
android:orientation="horizontal" | |||
android:paddingHorizontal="@dimen/dp_5" | |||
tools:ignore="UseCompoundDrawables"> |
@@ -4,7 +4,7 @@ | |||
xmlns:tools="http://schemas.android.com/tools" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/white" | |||
android:background="@mipmap/login_bg" | |||
android:gravity="center_horizontal" | |||
android:layoutAnimation="@anim/layout_from_bottom" | |||
android:orientation="vertical" | |||
@@ -21,12 +21,27 @@ | |||
app:rightTitleSize="@dimen/sp_14" | |||
app:title="" /> | |||
<androidx.appcompat.widget.AppCompatImageView | |||
android:id="@+id/iv_login_logo" | |||
android:layout_width="@dimen/dp_240" | |||
android:layout_height="@dimen/dp_120" | |||
android:layout_marginVertical="@dimen/dp_10" | |||
app:srcCompat="@mipmap/qtzl_logo" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:gravity="center" | |||
android:orientation="vertical" | |||
android:paddingVertical="@dimen/dp_40"> | |||
<androidx.appcompat.widget.AppCompatImageView | |||
android:id="@+id/iv_login_logo" | |||
android:layout_width="@dimen/dp_40" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_marginVertical="@dimen/dp_15" | |||
app:srcCompat="@mipmap/logos" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="欢迎使用业务员App" | |||
android:textColor="@color/white" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:id="@+id/ll_login_body" | |||
@@ -34,35 +49,63 @@ | |||
android:layout_height="wrap_content" | |||
android:orientation="vertical"> | |||
<com.hjq.widget.view.ClearEditText | |||
android:id="@+id/et_login_phone" | |||
style="@style/EditTextStyle" | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_marginHorizontal="@dimen/dp_40" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:hint="@string/common_phone_input_hint" | |||
android:inputType="textVisiblePassword" | |||
android:singleLine="true" | |||
android:text="15764350434" | |||
app:regexType="mobile" /> | |||
android:background="@drawable/edit_bg" | |||
android:gravity="center_vertical" | |||
android:orientation="horizontal" | |||
android:paddingHorizontal="@dimen/dp_15"> | |||
<View | |||
style="@style/HorizontalLineStyle" | |||
android:layout_marginHorizontal="@dimen/dp_40" /> | |||
<ImageView | |||
android:layout_width="13dp" | |||
android:layout_height="@dimen/dp_20" | |||
android:src="@mipmap/phone" /> | |||
<com.hjq.widget.view.ClearEditText | |||
android:id="@+id/et_login_phone" | |||
style="@style/EditTextStyle" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_40" | |||
android:background="@null" | |||
android:hint="@string/common_phone_input_hint" | |||
android:inputType="textVisiblePassword" | |||
android:text="15764350434" | |||
app:regexType="mobile" /> | |||
</LinearLayout> | |||
<com.hjq.widget.view.PasswordEditText | |||
android:id="@+id/et_login_password" | |||
style="@style/EditTextStyle" | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_marginHorizontal="@dimen/dp_40" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:hint="@string/common_password_input_error" | |||
android:imeOptions="actionDone" | |||
android:maxLength="20" | |||
android:singleLine="true" | |||
android:text="6517@Qwer" /> | |||
android:layout_marginTop="@dimen/dp_20" | |||
android:background="@drawable/edit_bg" | |||
android:gravity="center_vertical" | |||
android:orientation="horizontal" | |||
android:paddingHorizontal="@dimen/dp_15"> | |||
<ImageView | |||
android:layout_width="13dp" | |||
android:layout_height="@dimen/dp_20" | |||
android:src="@mipmap/password" /> | |||
<com.hjq.widget.view.PasswordEditText | |||
android:id="@+id/et_login_password" | |||
style="@style/EditTextStyle" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@null" | |||
android:hint="@string/common_password_input_error" | |||
android:imeOptions="actionDone" | |||
android:maxLength="20" | |||
android:singleLine="true" | |||
android:text="6517@Qwer" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:id="@+id/layout_code" | |||
@@ -72,7 +115,7 @@ | |||
android:background="@color/white" | |||
android:orientation="horizontal" | |||
android:visibility="gone" | |||
tools:visibility="visible"> | |||
tools:visibility="gone"> | |||
<androidx.appcompat.widget.AppCompatEditText | |||
android:id="@+id/et_phone_reset_code" | |||
@@ -96,9 +139,7 @@ | |||
</LinearLayout> | |||
<View | |||
style="@style/HorizontalLineStyle" | |||
android:layout_marginHorizontal="@dimen/dp_40" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
@@ -128,7 +169,6 @@ | |||
</LinearLayout> | |||
<com.hjq.widget.view.SubmitButton | |||
android:id="@+id/btn_login_commit" | |||
style="@style/ButtonStyle" | |||
@@ -172,31 +212,5 @@ | |||
android:layout_weight="1" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:orientation="horizontal" | |||
android:visibility="gone"> | |||
<com.hjq.widget.view.ScaleImageView | |||
android:id="@+id/iv_login_qq" | |||
android:layout_width="@dimen/dp_35" | |||
android:layout_height="@dimen/dp_35" | |||
android:layout_marginHorizontal="@dimen/dp_30" | |||
android:layout_marginVertical="@dimen/dp_20" | |||
android:layout_weight="1" | |||
app:scaleRatio="1.2" | |||
app:srcCompat="@drawable/login_qq_ic" /> | |||
<com.hjq.widget.view.ScaleImageView | |||
android:id="@+id/iv_login_wechat" | |||
android:layout_width="@dimen/dp_35" | |||
android:layout_height="@dimen/dp_35" | |||
android:layout_marginHorizontal="@dimen/dp_30" | |||
android:layout_marginVertical="@dimen/dp_20" | |||
android:layout_weight="1" | |||
app:scaleRatio="1.2" | |||
app:srcCompat="@drawable/login_wechat_ic" /> | |||
</LinearLayout> | |||
</LinearLayout> |
@@ -4,7 +4,6 @@ | |||
xmlns:tools="http://schemas.android.com/tools" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/white" | |||
android:orientation="vertical" | |||
tools:context=".src.ui.activity.SplashActivity"> | |||
@@ -39,16 +38,4 @@ | |||
android:visibility="gone" | |||
tools:text="DEBUG" /> | |||
<androidx.appcompat.widget.AppCompatTextView | |||
android:id="@+id/iv_splash_name" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_gravity="center_horizontal|bottom" | |||
android:layout_marginTop="@dimen/dp_50" | |||
android:layout_marginBottom="@dimen/dp_30" | |||
android:text="@string/app_name" | |||
android:textColor="@color/black60" | |||
android:textSize="@dimen/sp_18" | |||
android:textStyle="bold" /> | |||
</FrameLayout> |