From 7f0825f8195a522ed7e8bcdb6347f3a719e06c74 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 16 六月 2025 15:29:44 +0800 Subject: [PATCH] 新版穿山甲接入/拦截应用宝链接跳转至应用市场 --- BuWanVideo/src/com/weikou/beibeivideo/ui/login/ForgetPwdActivity.java | 57 +++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 39 insertions(+), 18 deletions(-) diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/login/ForgetPwdActivity.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/login/ForgetPwdActivity.java index 54ecfd4..85fccce 100644 --- a/BuWanVideo/src/com/weikou/beibeivideo/ui/login/ForgetPwdActivity.java +++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/login/ForgetPwdActivity.java @@ -9,6 +9,7 @@ import android.os.Handler; import android.os.Message; import android.view.View; +import android.widget.CheckBox; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; @@ -41,6 +42,7 @@ private TextView tv_obtain_verfication_code; private EditText et_pwd; private TextView tv_confirm; + private CheckBox cb_user_agreement; @Override protected void onCreate(Bundle arg0) { @@ -55,41 +57,59 @@ tv_obtain_verfication_code = (TextView) findViewById(R.id.tv_obtain_verfication_code); et_pwd = (EditText) findViewById(R.id.et_pwd); tv_confirm = (TextView) findViewById(R.id.tv_confirm); + cb_user_agreement = findViewById(R.id.cb_user_agreement); tv_obtain_verfication_code.setOnClickListener(this); tv_confirm.setOnClickListener(this); findViewById(R.id.tv_back).setOnClickListener(this); + findViewById(R.id.tv_user_agreement_click).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + cb_user_agreement.setChecked(!cb_user_agreement.isChecked()); + } + }); } @Override public void onClick(View v) { switch (v.getId()) { - case R.id.tv_obtain_verfication_code: + case R.id.tv_obtain_verfication_code: { String email = et_email.getText().toString(); if (StringUtils.isEmpty(email)) { SingleToast.showToast(ForgetPwdActivity.this, "璇峰厛杈撳叆閭鍙�"); return; - } else { - Matcher m = IsEmail.isEmailAddress().matcher(email); - if (m.matches()) { - getVerficationCode(email); - } else { - SingleToast.showToast(ForgetPwdActivity.this, "杈撳叆鐨勯偖绠辫处鍙锋湁璇紝璇锋煡璇侊紒"); - return; - } } - break; - case R.id.tv_confirm: + if (!cb_user_agreement.isChecked()) { + SingleToast.showToast(ForgetPwdActivity.this, "璇峰悓鎰忋�婄敤鎴蜂娇鐢ㄥ崗璁�嬩笌銆婇殣绉佹斂绛栥��"); + return; + } + Matcher m = IsEmail.isEmailAddress().matcher(email); + if (m.matches()) { + getVerficationCode(email); + } else { + SingleToast.showToast(ForgetPwdActivity.this, "杈撳叆鐨勯偖绠辫处鍙锋湁璇紝璇锋煡璇侊紒"); + return; + } + } + + break; + case R.id.tv_confirm: { String str = et_email.getText().toString(); if (StringUtils.isEmpty(str)) { SingleToast.showToast(ForgetPwdActivity.this, "璇峰厛杈撳叆閭鍙�"); return; - } else { - Matcher m = IsEmail.isEmailAddress().matcher(str); - if (!m.matches()) { - SingleToast.showToast(ForgetPwdActivity.this, "杈撳叆鐨勯偖绠辫处鍙锋湁璇紝璇锋煡璇侊紒"); - return; - } } + + if (!cb_user_agreement.isChecked()) { + SingleToast.showToast(ForgetPwdActivity.this, "璇峰悓鎰忋�婄敤鎴蜂娇鐢ㄥ崗璁�嬩笌銆婇殣绉佹斂绛栥��"); + return; + } + + Matcher m = IsEmail.isEmailAddress().matcher(str); + if (!m.matches()) { + SingleToast.showToast(ForgetPwdActivity.this, "杈撳叆鐨勯偖绠辫处鍙锋湁璇紝璇锋煡璇侊紒"); + return; + } + if (StringUtils.isEmpty(et_pwd.getText().toString())) { SingleToast.showToast(ForgetPwdActivity.this, "瀵嗙爜涓嶈兘涓虹┖锛�"); return; @@ -99,7 +119,8 @@ return; } revisePwd(); - break; + } + break; case R.id.tv_back: finish(); break; -- Gitblit v1.8.0