浏览代码

pay password

hanjing 6 年之前
父节点
当前提交
8fb0f9fb84
共有 35 个文件被更改,包括 904 次插入24 次删除
  1. 5 0
      app/src/main/AndroidManifest.xml
  2. 6 0
      app/src/main/java/com/sheep/gamegroup/absBase/BaseContainerActivity.java
  3. 6 0
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  4. 13 0
      app/src/main/java/com/sheep/gamegroup/model/entity/UserEntity.java
  5. 91 15
      app/src/main/java/com/sheep/gamegroup/module/pay/activity/ActPayPassword.java
  6. 71 0
      app/src/main/java/com/sheep/gamegroup/module/pay/fragment/AbsConfirmFragment.java
  7. 113 0
      app/src/main/java/com/sheep/gamegroup/module/pay/fragment/CheckCaptchaFragment.java
  8. 38 0
      app/src/main/java/com/sheep/gamegroup/module/pay/fragment/CompletionInfoFragment.java
  9. 33 0
      app/src/main/java/com/sheep/gamegroup/module/pay/fragment/ConfirmUpdateFragment.java
  10. 72 0
      app/src/main/java/com/sheep/gamegroup/module/pay/fragment/SetPasswordFragment.java
  11. 89 0
      app/src/main/java/com/sheep/gamegroup/module/pay/fragment/VerifyPayPwdFragment.java
  12. 5 0
      app/src/main/java/com/sheep/gamegroup/module/webview/fragment/FgtWeb.java
  13. 6 0
      app/src/main/java/com/sheep/gamegroup/module/webview/fragment/FgtWebX5.java
  14. 2 2
      app/src/main/java/com/sheep/gamegroup/util/TestUtil.java
  15. 6 0
      app/src/main/java/com/sheep/gamegroup/util/js/KFZSJs.java
  16. 5 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActSetting.java
  17. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java
  18. 0 1
      app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java
  19. 10 1
      app/src/main/java/com/sheep/gamegroup/view/activity/WithdrawalAct.java
  20. 12 2
      app/src/main/java/com/sheep/gamegroup/view/customview/VerificationCodeEditText.java
  21. 8 0
      app/src/main/res/drawable/shape_gray_solid_rectangle_10_radius.xml
  22. 73 0
      app/src/main/res/layout/abs_confirm_fgt.xml
  23. 14 0
      app/src/main/res/layout/act_setting.xml
  24. 53 0
      app/src/main/res/layout/pay_pwd_check_captcha.xml
  25. 12 0
      app/src/main/res/layout/pay_pwd_completion_fgt.xml
  26. 12 0
      app/src/main/res/layout/pay_pwd_confir_update_fgt.xml
  27. 78 0
      app/src/main/res/layout/pay_pwd_set_pwd_fgt.xml
  28. 34 0
      app/src/main/res/layout/pay_pwd_verify_pwd_fgt.xml
  29. 7 0
      app/src/main/res/values-v19/style_theme.xml
  30. 7 0
      app/src/main/res/values-v23/style_theme.xml
  31. 7 0
      app/src/main/res/values-v26/style_theme.xml
  32. 7 0
      app/src/main/res/values-v27/style_theme.xml
  33. 1 0
      app/src/main/res/values/colors.xml
  34. 1 0
      app/src/main/res/values/str_public_strings.xml
  35. 6 1
      app/src/main/res/values/style_theme.xml

+ 5 - 0
app/src/main/AndroidManifest.xml

@@ -309,6 +309,11 @@
             android:screenOrientation="portrait"
             android:theme="@style/AppActionTheme" />
         <activity
+            android:name="com.sheep.gamegroup.module.pay.activity.ActPayPassword"
+            android:launchMode="singleTask"
+            android:screenOrientation="portrait"
+            android:theme="@style/AppThemeTransparent" />
+        <activity
             android:name="com.sheep.gamegroup.view.activity.ActBindMobileRegister"
             android:launchMode="singleTask"
             android:screenOrientation="portrait"

+ 6 - 0
app/src/main/java/com/sheep/gamegroup/absBase/BaseContainerActivity.java

@@ -34,5 +34,11 @@ public abstract class BaseContainerActivity extends BaseActivity {
 
     }
 
+    protected void replaceFragment(Fragment fragment){
+        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+        transaction.replace(R.id.frame_container, fragment);
+        transaction.commitAllowingStateLoss();
+    }
+
     protected abstract Fragment initFragment();
 }

+ 6 - 0
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -1935,4 +1935,10 @@ public interface ApiService {
     @POST("app/user/set_pay_pwd")
     Observable<BaseMessage> setPayPwd(@Body JSONObject jsonObject);
 
+    @POST("app/user/send_sms_captcha")
+    Observable<BaseMessage> sendSmsCaptcha();
+
+    @POST("app/user/check_sms_captcha")
+    Observable<BaseMessage> checkSmsCaptcha(@Body JSONObject jsonObject);
+
 }

+ 13 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/UserEntity.java

@@ -24,6 +24,7 @@ public class UserEntity implements Serializable {
     private String nickname;//test332211,
     private String user_name;//test332211,
     private int set_password = 0;//test332211,
+    private int has_pay_pwd = 0;
     private String balance;//0,
     private String invitation_code;//032033476,
     private String parent_code;//,
@@ -437,6 +438,18 @@ public class UserEntity implements Serializable {
         return new SpannableSb().append("VIP").append(info, R.dimen.text_size_9).getSsb();
     }
 
+    public boolean hasPayPwd() {
+        return has_pay_pwd == 1;
+    }
+
+    public int getHas_pay_pwd() {
+        return has_pay_pwd;
+    }
+
+    public void setHas_pay_pwd(int has_pay_pwd) {
+        this.has_pay_pwd = has_pay_pwd;
+    }
+
     //用户类型: 1普通用户 2游戏用户
     public static final int USRE_TYPE_NOR = 1;
     public static final int USRE_TYPE_GAME = 2;

+ 91 - 15
app/src/main/java/com/sheep/gamegroup/module/pay/activity/ActPayPassword.java

@@ -1,46 +1,122 @@
 package com.sheep.gamegroup.module.pay.activity;
 
+import android.app.Activity;
 import android.content.Context;
+import android.content.Intent;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.os.Bundle;
 import android.support.v4.app.Fragment;
+import android.text.TextUtils;
+import android.view.View;
 
 import com.sheep.gamegroup.absBase.BaseContainerActivity;
 import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.pay.fragment.CheckCaptchaFragment;
+import com.sheep.gamegroup.module.pay.fragment.CompletionInfoFragment;
+import com.sheep.gamegroup.module.pay.fragment.ConfirmUpdateFragment;
+import com.sheep.gamegroup.module.pay.fragment.SetPasswordFragment;
+import com.sheep.gamegroup.module.pay.fragment.VerifyPayPwdFragment;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.SpUtils;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
+import org.greenrobot.eventbus.Subscribe;
+
+import butterknife.BindView;
+import butterknife.OnClick;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.schedulers.Schedulers;
+import rx.functions.Action1;
 
 public class ActPayPassword extends BaseContainerActivity {
 
+    public final static int ACTION_COMPLETION = 1;
+    public final static int ACTION_SET_PWD = 2;
+    public final static int ACTION_SEND_CAPTCHA = 3;
+    public final static int ACTION_CONFIRM_UPDATE = 4;
+    public final static int ACTION_VERIFY_PAY_PWD = 5;
+
+    @BindView(R.id.frame_container)
+    View container;
+
+    protected boolean needRegisterEventBus() {
+        return true;
+    }
+
+    @Override
+    public void initView() {
+        super.initView();
+        container.setBackgroundResource(R.color.mask_black);
+        TitleBarUtils.getInstance().setShowOrHide(this, false);
+    }
 
     @Override
     protected Fragment initFragment() {
-        return null;
+        int action = getIntent().getIntExtra("action", -1);
+        return getFragment(action);
     }
 
+    private Fragment getFragment(int action) {
+        if (action == ACTION_COMPLETION) {
+            return new CompletionInfoFragment();
+        } else if (action == ACTION_SEND_CAPTCHA) {
+            return new CheckCaptchaFragment();
+        } else if (action == ACTION_CONFIRM_UPDATE) {
+            return new ConfirmUpdateFragment();
+        } else if (action == ACTION_SET_PWD) {
+            return new SetPasswordFragment();
+        } else if (action == ACTION_VERIFY_PAY_PWD) {
+            return VerifyPayPwdFragment.newInstance(getIntent().getStringExtra("ext"));
+        } else {
+            return null;
+        }
+    }
 
-    public static void setPwd(Context context, int want) {
+    @Subscribe
+    public void whenActionComming(PayPasswordEvent ev) {
+        replaceFragment(getFragment(ev.action));
+    }
 
+    public static void setPwd(Context context) {
+        CommonUtil.getInstance().getUserInfo(SpUtils.getToken(context), (user)->{
+            Intent in = new Intent(context, ActPayPassword.class);
+            if (TextUtils.isEmpty(user.getMobile()) || user.getCertification_count() <= 0) {
+                in.putExtra("action", ACTION_COMPLETION);
+            } else if (user.hasPayPwd()) {
+                in.putExtra("action", ACTION_CONFIRM_UPDATE);
+            } else {
+                in.putExtra("action", ACTION_SEND_CAPTCHA);
+            }
+            context.startActivity(in);
+        });
     }
 
-    public static void verifyPwd(Context context) {
-        SheepApp.getInstance().getNetComponent().getApiService().needPayPwd()
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        G.showToast("支付失败:" + baseMessage.getErrorMsg());
-                    }
+    public static boolean verifyPwd(Activity activity, String ext) {
+        UserEntity user = DataUtil.getInstance().getUserEntity();
+        if(user.hasPayPwd()) {
+            Intent in = new Intent(activity, ActPayPassword.class);
+            in.putExtra("action", ACTION_VERIFY_PAY_PWD);
+            in.putExtra("ext", ext);
+            activity.startActivityForResult(in, 3);
+            return true;
+        } else{
+            return false;
+        }
+    }
 
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
+    public static class PayPasswordEvent {
+        public int action;
 
-                    }
-                });
+        public PayPasswordEvent(int action) {
+            this.action = action;
+        }
     }
 
 }

+ 71 - 0
app/src/main/java/com/sheep/gamegroup/module/pay/fragment/AbsConfirmFragment.java

@@ -0,0 +1,71 @@
+package com.sheep.gamegroup.module.pay.fragment;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.base.BaseFragment;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+
+public abstract class AbsConfirmFragment extends BaseFragment {
+
+    @BindView(R.id.title_view)
+    TextView titleView;
+    @BindView(R.id.confirm_btn)
+    TextView confirmBtn;
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.abs_confirm_fgt;
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+        View rootView = super.onCreateView(inflater, container, savedInstanceState);
+        RelativeLayout innerLayout = rootView.findViewById(R.id.inner_layout);
+        View innerView = inflater.inflate(getInnerLayoutId(), container, false);
+        innerLayout.addView(innerView);
+        return rootView;
+    }
+
+    @Override
+    public void onViewCreated() {
+
+    }
+
+    protected void setTitle(String title) {
+        if (titleView != null) {
+            titleView.setText(title);
+        }
+    }
+
+    protected void setConfirmText(String text) {
+        if (confirmBtn != null) {
+            confirmBtn.setText(text);
+        }
+    }
+
+    @OnClick(R.id.cancel_btn)
+    public void onTapCancel() {
+        onCancel();
+        getActivity().finish();
+    }
+
+    @OnClick(R.id.confirm_btn)
+    public void onTapConfirm() {
+        onConfirm();
+    }
+
+    public abstract int getInnerLayoutId();
+
+    public abstract void onCancel();
+
+    public abstract void onConfirm();
+
+}

+ 113 - 0
app/src/main/java/com/sheep/gamegroup/module/pay/fragment/CheckCaptchaFragment.java

@@ -0,0 +1,113 @@
+package com.sheep.gamegroup.module.pay.fragment;
+
+import android.support.design.widget.Snackbar;
+import android.text.TextUtils;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.UserEntity;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.pay.activity.ActPayPassword;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.view.customview.CountDownButton;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import org.greenrobot.eventbus.EventBus;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+
+public class CheckCaptchaFragment extends AbsConfirmFragment {
+
+    @BindView(R.id.send_captcha_btn)
+    CountDownButton countDownButton;
+    @BindView(R.id.mobile_view)
+    TextView mobileView;
+    @BindView(R.id.captcha_box)
+    EditText captchaBox;
+
+    private UserEntity user;
+
+    @Override
+    public int getInnerLayoutId() {
+        return R.layout.pay_pwd_check_captcha;
+    }
+
+    @Override
+    public void onViewCreated() {
+        super.onViewCreated();
+        setTitle("身份验证");
+        user = DataUtil.getInstance().getUserEntity();
+        String mobile = user.getMobile();
+        mobile = mobile.substring(0, 3) + "****" + mobile.substring(8);
+        mobileView.append(mobile);
+    }
+
+    @OnClick(R.id.send_captcha_btn)
+    public void sendCaptcha() {
+        SheepApp.getInstance().getNetComponent().getApiService().sendSmsCaptcha()
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        G.shortToast("验证码已发送");
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+                });
+    }
+
+    @Override
+    public void onCancel() {
+
+    }
+
+    @Override
+    public void onConfirm() {
+        String etCode = captchaBox.getText().toString().trim();
+        if (TextUtils.isEmpty(etCode)) {
+            G.shortToast(getString(R.string.input_your_captcha));
+            return;
+        }
+        if (etCode.length() != 6) {
+            G.shortToast(getString(R.string.toast_warning_phone_captcha_image_code_size));
+            return;
+        }
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("verify_code", etCode);
+        SheepApp.getInstance().getNetComponent().getApiService().checkSmsCaptcha(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        EventBus.getDefault().post(new ActPayPassword.PayPasswordEvent(ActPayPassword.ACTION_SET_PWD));
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+                });
+    }
+
+    @Override
+    public void onDestroy() {
+        if (countDownButton != null) {
+            countDownButton.onDestroy();
+        }
+        super.onDestroy();
+    }
+}

+ 38 - 0
app/src/main/java/com/sheep/gamegroup/module/pay/fragment/CompletionInfoFragment.java

@@ -0,0 +1,38 @@
+package com.sheep.gamegroup.module.pay.fragment;
+
+import android.support.v4.app.Fragment;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.model.entity.UserEntity;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.base.BaseFragment;
+
+import butterknife.BindView;
+
+public class CompletionInfoFragment extends AbsConfirmFragment {
+
+
+    @Override
+    public void onViewCreated() {
+        super.onViewCreated();
+        setTitle("温馨提示");
+        setConfirmText("绑定手机号");
+    }
+
+    @Override
+    public int getInnerLayoutId() {
+        return R.layout.pay_pwd_completion_fgt;
+    }
+
+    @Override
+    public void onCancel() {
+
+    }
+
+    @Override
+    public void onConfirm() {
+        Jump2View.getInstance().goPersionInfo(getContext(), null);
+        getActivity().finish();
+    }
+}

+ 33 - 0
app/src/main/java/com/sheep/gamegroup/module/pay/fragment/ConfirmUpdateFragment.java

@@ -0,0 +1,33 @@
+package com.sheep.gamegroup.module.pay.fragment;
+
+import com.sheep.gamegroup.module.pay.activity.ActPayPassword;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.jiuyan.samllsheep.R;
+
+import org.greenrobot.eventbus.EventBus;
+
+public class ConfirmUpdateFragment extends AbsConfirmFragment {
+
+
+    @Override
+    public void onViewCreated() {
+        super.onViewCreated();
+        setTitle("修改密码");
+        setConfirmText("确定");
+    }
+
+    @Override
+    public int getInnerLayoutId() {
+        return R.layout.pay_pwd_confir_update_fgt;
+    }
+
+    @Override
+    public void onCancel() {
+
+    }
+
+    @Override
+    public void onConfirm() {
+        EventBus.getDefault().post(new ActPayPassword.PayPasswordEvent(ActPayPassword.ACTION_SEND_CAPTCHA));
+    }
+}

+ 72 - 0
app/src/main/java/com/sheep/gamegroup/module/pay/fragment/SetPasswordFragment.java

@@ -0,0 +1,72 @@
+package com.sheep.gamegroup.module.pay.fragment;
+
+import android.text.TextUtils;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import butterknife.BindView;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+
+public class SetPasswordFragment extends AbsConfirmFragment {
+
+    @BindView(R.id.password_box)
+    TextView passwordBox;
+    @BindView(R.id.password_box2)
+    TextView passwordBox2;
+
+    @Override
+    public int getInnerLayoutId() {
+        return R.layout.pay_pwd_set_pwd_fgt;
+    }
+
+    @Override
+    public void onCancel() {
+
+    }
+
+    @Override
+    public void onViewCreated() {
+        super.onViewCreated();
+        setTitle("设置支付密码");
+        setConfirmText("提交");
+    }
+
+    @Override
+    public void onConfirm() {
+        if (TextUtils.isEmpty(passwordBox.getText().toString())) {
+            G.showToast("请输入密码");
+            return;
+        }
+        if (!passwordBox.getText().toString().equals(passwordBox2.getText().toString())) {
+            G.showToast("请再次输入相同密码");
+            return;
+        }
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("pay_pwd", passwordBox.getText().toString());
+        SheepApp.getInstance().getNetComponent().getApiService().setPayPwd(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        CommonUtil.getInstance().getUserInfo(getContext());
+                        G.showToast("设置成功");
+                        getActivity().finish();
+                    }
+                });
+    }
+}

+ 89 - 0
app/src/main/java/com/sheep/gamegroup/module/pay/fragment/VerifyPayPwdFragment.java

@@ -0,0 +1,89 @@
+package com.sheep.gamegroup.module.pay.fragment;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.view.View;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.view.customview.VerificationCodeEditText;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import butterknife.BindView;
+import butterknife.OnEditorAction;
+import butterknife.OnTextChanged;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+
+public class VerifyPayPwdFragment extends AbsConfirmFragment {
+
+    @BindView(R.id.pwd_box)
+    VerificationCodeEditText pwdBox;
+    @BindView(R.id.msg_view)
+    TextView msgView;
+
+    private String ext;
+
+    public static VerifyPayPwdFragment newInstance(String ext) {
+        VerifyPayPwdFragment fragment = new VerifyPayPwdFragment();
+        fragment.ext = ext;
+        return fragment;
+    }
+
+    @Override
+    public void onViewCreated() {
+        setTitle("输入支付密码");
+        pwdBox.setShowPassword();
+    }
+
+    @OnTextChanged(R.id.pwd_box)
+    public void onNicknameChanged(CharSequence sequence, int i, int j, int k) {
+        if (sequence != null && sequence.length() == 6) {
+
+        }
+    }
+
+
+    @Override
+    public int getInnerLayoutId() {
+        return R.layout.pay_pwd_verify_pwd_fgt;
+    }
+
+    @Override
+    public void onCancel() {
+
+    }
+
+    @Override
+    public void onConfirm() {
+        if (pwdBox.getText().toString().length() < 6) {
+            return;
+        }
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("pay_pwd", pwdBox.getText().toString());
+        SheepApp.getInstance().getNetComponent().getApiService().checkPayPwd(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        Intent out = new Intent();
+                        out.putExtra("ext", ext);
+                        getActivity().setResult(Activity.RESULT_OK, out);
+                        getActivity().finish();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        pwdBox.setText("");
+                        msgView.setVisibility(View.VISIBLE);
+                        msgView.setText(baseMessage.getMsg());
+                    }
+                });
+    }
+}

+ 5 - 0
app/src/main/java/com/sheep/gamegroup/module/webview/fragment/FgtWeb.java

@@ -242,6 +242,7 @@ public class FgtWeb extends BaseFgtWeb {
     private ValueCallback<Uri> mUploadMessage;
     private final static int FILECHOOSER_RESULTCODE = 2;
     private ValueCallback<Uri[]> mFilePathCallback;
+    private final static int VERIFY_PAY_PASSWORD_RESULTCODE = 3;
 
     private String mCameraPhotoPath;
 
@@ -545,6 +546,10 @@ public class FgtWeb extends BaseFgtWeb {
 
             mFilePathCallback.onReceiveValue(results);
             mFilePathCallback = null;
+        } else if (VERIFY_PAY_PASSWORD_RESULTCODE == requestCode) {
+            if (resultCode == RESULT_OK) {
+                loadJs("payNext(\"" + data.getStringExtra("ext") + "\")");
+            }
         } else if (Constant.INTENT_RECHARGE == requestCode) {
             mWebView.reload();
         } else {

+ 6 - 0
app/src/main/java/com/sheep/gamegroup/module/webview/fragment/FgtWebX5.java

@@ -1,6 +1,7 @@
 package com.sheep.gamegroup.module.webview.fragment;
 
 import android.annotation.SuppressLint;
+import android.app.Activity;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.graphics.Bitmap;
@@ -246,6 +247,7 @@ public class FgtWebX5 extends BaseFgtWebX5 {
     public static final int INPUT_FILE_REQUEST_CODE = 1;
     private ValueCallback<Uri> mUploadMessage;
     private final static int FILECHOOSER_RESULTCODE = 2;
+    private final static int VERIFY_PAY_PASSWORD_RESULTCODE = 3;
     private ValueCallback<Uri[]> mFilePathCallback;
 
     private String mCameraPhotoPath;
@@ -552,6 +554,10 @@ public class FgtWebX5 extends BaseFgtWebX5 {
 
             mFilePathCallback.onReceiveValue(results);
             mFilePathCallback = null;
+        } else if (VERIFY_PAY_PASSWORD_RESULTCODE == requestCode) {
+            if (resultCode == RESULT_OK) {
+                loadJs("payNext(\"" + data.getStringExtra("ext") + "\")");
+            }
         } else if (Constant.INTENT_RECHARGE == requestCode) {
             mWebView.reload();
         } else {

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/util/TestUtil.java

@@ -514,8 +514,8 @@ public class TestUtil {
                 break;
             case "测试内部h5": {
 //                Jump2View.getInstance().goWeb(activity, StringUtils.getCopyText().toString(), "小绵羊官网");
-                String url = "http://10.8.240.193:8082/#/home?authorization=64239%40342d72782208f5d7b3a16ae8d1b9542e&pf=android.sheep.app&device_id=e90a3bf5f9cfd223&invitation_code=73214122";
-                Jump2View.getInstance().goWeb(activity, url, "小绵羊官网");
+                String url = "http://10.8.240.193:8082/#/payment?authorization=64239%40e90a3bf5f9cfd223%40f2c7d20cc681423c74da740fc899f21e&order=6557891279164801024&ssnocache=1";
+                Jump2View.getInstance().goWeb(activity, url, "支付");
             }
                 break;
             case "测试外部h5":

+ 6 - 0
app/src/main/java/com/sheep/gamegroup/util/js/KFZSJs.java

@@ -21,6 +21,7 @@ import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.module.find.activity.ActFind;
+import com.sheep.gamegroup.module.pay.activity.ActPayPassword;
 import com.sheep.gamegroup.module.user.activity.ActVip;
 import com.sheep.gamegroup.module.user.model.BuyVipReq;
 import com.sheep.gamegroup.module.user.model.TempUserResp;
@@ -538,4 +539,9 @@ public class KFZSJs {
     public void postEvent(int action, String data, String callback) {
         EventBus.getDefault().post(new WebViewEvent(action, data, callback));
     }
+
+    @JavascriptInterface
+    public boolean checkPayPassword(String ext) {
+        return ActPayPassword.verifyPwd(activity, ext);
+    }
 }

+ 5 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/ActSetting.java

@@ -9,6 +9,7 @@ import com.kfzs.duanduan.utils.ApkUtils;
 import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.model.entity.DialogConfig;
+import com.sheep.gamegroup.module.pay.activity.ActPayPassword;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataKey;
 import com.sheep.gamegroup.util.DataUtil;
@@ -61,12 +62,15 @@ public class ActSetting extends BaseActivity {
         initCopyState();
     }
 
-    @OnClick({R.id.change_password_layout, R.id.abourt_us_layout, R.id.clear_layout, R.id.tv_submit, R.id.copy_text_layout, R.id.change_layout})
+    @OnClick({R.id.change_password_layout, R.id.pay_pwd_layout, R.id.abourt_us_layout, R.id.clear_layout, R.id.tv_submit, R.id.copy_text_layout, R.id.change_layout})
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.change_password_layout:
                 Jump2View.getInstance().goChangePassword(activity);
                 break;
+            case R.id.pay_pwd_layout:
+                ActPayPassword.setPwd(activity);
+                break;
             case R.id.abourt_us_layout://关于我们
                 Jump2View.getInstance().goNewAboutUs(activity);
                 break;

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java

@@ -115,7 +115,7 @@ public class ActWebX5 extends BaseContainerActivity {
     }
 
     @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
         fragment.onActivityResult(requestCode, resultCode, data);
     }

+ 0 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java

@@ -260,7 +260,6 @@ public class SplashAct extends BaseActivity {
     public void onViewClicked(View view) {
         switch (view.getId()) {
             case R.id.splash_skip:
-
                 sendHandlerMessages(10);
                 break;
             case R.id.splash_image_view:

+ 10 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/WithdrawalAct.java

@@ -19,6 +19,7 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GridViewEntity;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.entity.WithdrawalList;
+import com.sheep.gamegroup.module.pay.activity.ActPayPassword;
 import com.sheep.gamegroup.presenter.WithdrawalContract;
 import com.sheep.gamegroup.presenter.WithdrawalPresenter;
 import com.sheep.gamegroup.util.CommonUtil;
@@ -152,7 +153,9 @@ public class WithdrawalAct extends BaseActivity implements WithdrawalContract.Vi
     public void onViewClicked(View view) {
         switch (view.getId()) {
             case R.id.withdrawal_sure:
-                doWithdrawal();
+                if (!ActPayPassword.verifyPwd(this, "")) {
+                    doWithdrawal();
+                }
                 break;
         }
     }
@@ -177,6 +180,12 @@ public class WithdrawalAct extends BaseActivity implements WithdrawalContract.Vi
         }
     }
 
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
+        if (requestCode == 3 && resultCode == Activity.RESULT_OK) {
+            doWithdrawal();
+        }
+    }
 
     @Override
     public void failData(Object o) {

+ 12 - 2
app/src/main/java/com/sheep/gamegroup/view/customview/VerificationCodeEditText.java

@@ -55,6 +55,8 @@ public class VerificationCodeEditText extends android.support.v7.widget.AppCompa
     private TimerTask mCursorTimerTask;
     private Timer mCursorTimer;
 
+    private boolean isPassword = false;
+
     public VerificationCodeEditText(Context context) {
         this(context, null);
     }
@@ -73,6 +75,10 @@ public class VerificationCodeEditText extends android.support.v7.widget.AppCompa
         super.addTextChangedListener(this);
     }
 
+    public void setShowPassword() {
+        isPassword = true;
+    }
+
     /**
      * 初始化paint
      */
@@ -115,7 +121,7 @@ public class VerificationCodeEditText extends android.support.v7.widget.AppCompa
         mCursorColor = ta.getColor(R.styleable.VerCodeEditText_cursorColor, getColor(android.R.color.darker_gray));
         mCursorDuration = ta.getInteger(R.styleable.VerCodeEditText_cursorDuration, DEFAULT_CURSOR_DURATION);
         ta.recycle();
-        
+
         // force LTR because of bug: https://github.com/JustKiddingBaby/VercodeEditText/issues/4
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
             setLayoutDirection(LAYOUT_DIRECTION_LTR);
@@ -217,7 +223,11 @@ public class VerificationCodeEditText extends android.support.v7.widget.AppCompa
             Paint.FontMetrics fontMetrics = paint.getFontMetrics();
             float baseline = (height - fontMetrics.bottom + fontMetrics.top) / 2
                     - fontMetrics.top;
-            canvas.drawText(String.valueOf(value.charAt(i)), x, baseline, paint);
+            if (isPassword) {
+                canvas.drawText("●", x, baseline, paint);
+            } else {
+                canvas.drawText(String.valueOf(value.charAt(i)), x, baseline, paint);
+            }
             canvas.restore();
         }
         //绘制底线

+ 8 - 0
app/src/main/res/drawable/shape_gray_solid_rectangle_10_radius.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners
+        android:radius="10dp"/>
+    <solid
+        android:color="#f5f5f5" />
+</shape>

+ 73 - 0
app/src/main/res/layout/abs_confirm_fgt.xml

@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <android.support.v7.widget.CardView
+        android:layout_width="310dp"
+        android:layout_height="261dp"
+        android:layout_centerInParent="true"
+        app:cardCornerRadius="@dimen/radius_20">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@color/gray_CCCCCC"
+            android:orientation="vertical">
+
+            <TextView
+                android:id="@+id/title_view"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:background="@color/white"
+                android:gravity="center"
+                android:text="设置支付密码"
+                android:textColor="@color/black_333333"
+                android:textSize="16sp" />
+
+            <RelativeLayout
+                android:id="@+id/inner_layout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginTop="1dp"
+                android:layout_marginBottom="1dp"
+                android:layout_weight="1"
+                android:background="@color/white">
+                <!--<include layout="@layout/pay_pwd_verify_pwd_fgt"/>-->
+            </RelativeLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/cancel_btn"
+                    android:layout_width="match_parent"
+                    android:layout_height="40dp"
+                    android:layout_marginRight="0.5dp"
+                    android:layout_weight="1"
+                    android:background="@color/white"
+                    android:gravity="center"
+                    android:text="取消"
+                    android:textColor="@color/black_999999"
+                    android:textSize="16sp" />
+
+                <TextView
+                    android:id="@+id/confirm_btn"
+                    android:layout_width="match_parent"
+                    android:layout_height="40dp"
+                    android:layout_marginLeft="0.5dp"
+                    android:layout_weight="1"
+                    android:background="@color/white"
+                    android:gravity="center"
+                    android:text="确定"
+                    android:textColor="@color/btn_color_main_stroke"
+                    android:textSize="16sp" />
+            </LinearLayout>
+        </LinearLayout>
+
+    </android.support.v7.widget.CardView>
+
+</RelativeLayout>

+ 14 - 0
app/src/main/res/layout/act_setting.xml

@@ -31,6 +31,20 @@
         <View style="@style/style_item_line" />
 
         <LinearLayout
+            android:id="@+id/pay_pwd_layout"
+            style="@style/style_item_container">
+
+            <TextView
+                style="@style/style_item_label"
+                android:text="支付密码" />
+
+            <TextView style="@style/style_item_end_next" />
+
+        </LinearLayout>
+
+        <View style="@style/style_item_line" />
+
+        <LinearLayout
             android:id="@+id/abourt_us_layout"
             style="@style/style_item_container">
 

+ 53 - 0
app/src/main/res/layout/pay_pwd_check_captcha.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center"
+    android:orientation="vertical">
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="为了你的账号安全,需要验证你的身份信息。"
+        android:textColor="@color/black_666666"
+        android:textSize="13sp" />
+
+    <TextView
+        android:id="@+id/mobile_view"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="12dp"
+        android:text="你的手机号:"
+        android:textColor="@color/black_333333"
+        android:textSize="13sp" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="19dp"
+        android:layout_marginRight="16dp"
+        android:orientation="horizontal">
+
+        <EditText
+            android:id="@+id/captcha_box"
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:layout_marginRight="12dp"
+            android:layout_weight="1"
+            android:background="@drawable/shape_gray_solid_rectangle_10_radius"
+            android:paddingLeft="12dp"
+            android:hint="请输入验证码"
+            android:textColor="#c7c7cd"
+            android:textSize="12sp" />
+
+        <com.sheep.gamegroup.view.customview.CountDownButton
+            android:id="@+id/send_captcha_btn"
+            style="?android:attr/borderlessButtonStyle"
+            android:layout_width="wrap_content"
+            android:layout_height="40dp"
+            android:text="获取验证码"
+            android:textColor="@color/theme_app_main"
+            android:textSize="12sp" />
+    </LinearLayout>
+</LinearLayout>

+ 12 - 0
app/src/main/res/layout/pay_pwd_completion_fgt.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/content_view"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center_vertical"
+    android:padding="20dp"
+    android:text="检测到你的账号未实名认证或绑定手机,为了账号安全,设置支付密码请先绑定手机号和实名认证。"
+    android:textColor="@color/black_666666"
+    android:textSize="13sp">
+
+</TextView>

+ 12 - 0
app/src/main/res/layout/pay_pwd_confir_update_fgt.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/content_view"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center_vertical"
+    android:padding="20dp"
+    android:text="定期修改密码是良好行为习惯,是否修改?"
+    android:textColor="@color/black_666666"
+    android:textSize="13sp">
+
+</TextView>

+ 78 - 0
app/src/main/res/layout/pay_pwd_set_pwd_fgt.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center_vertical"
+    android:orientation="vertical"
+    android:padding="@dimen/content_padding_16">
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="请设置6位数字支付密码"
+        android:textColor="@color/black_999999"
+        android:textSize="13sp" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:layout_marginTop="@dimen/content_padding_16"
+        android:layout_marginBottom="@dimen/content_padding_16"
+        android:orientation="horizontal">
+
+        <TextView
+            android:layout_width="90dp"
+            android:layout_height="match_parent"
+            android:gravity="center_vertical"
+            android:text="输入密码"
+            android:textColor="@color/black_333333"
+            android:textSize="13sp" />
+
+        <EditText
+            android:id="@+id/password_box"
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:layout_marginRight="12dp"
+            android:layout_weight="1"
+            android:background="@drawable/shape_gray_solid_rectangle_10_radius"
+            android:digits="@string/digits_number"
+            android:hint="6位密码"
+            android:inputType="numberPassword"
+            android:lines="1"
+            android:maxLength="6"
+            android:paddingLeft="12dp"
+            android:textColor="#c7c7cd"
+            android:textSize="12sp" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:orientation="horizontal">
+
+        <TextView
+            android:layout_width="90dp"
+            android:layout_height="match_parent"
+            android:gravity="center_vertical"
+            android:text="再次输入密码"
+            android:textColor="@color/black_333333"
+            android:textSize="13sp" />
+
+        <EditText
+            android:id="@+id/password_box2"
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:layout_marginRight="12dp"
+            android:layout_weight="1"
+            android:background="@drawable/shape_gray_solid_rectangle_10_radius"
+            android:digits="@string/digits_number"
+            android:hint="6位密码"
+            android:inputType="numberPassword"
+            android:lines="1"
+            android:maxLength="6"
+            android:paddingLeft="12dp"
+            android:textColor="#c7c7cd"
+            android:textSize="12sp" />
+    </LinearLayout>
+
+</LinearLayout>

+ 34 - 0
app/src/main/res/layout/pay_pwd_verify_pwd_fgt.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center"
+    android:orientation="vertical"
+    android:padding="24dp">
+
+    <com.sheep.gamegroup.view.customview.VerificationCodeEditText
+        android:id="@+id/pwd_box"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:inputType="numberPassword"
+        android:textColor="@color/gray_4"
+        android:textSize="24sp"
+        app:bottomLineHeight="2dp"
+        app:bottomLineNormalColor="@color/G"
+        app:bottomLineSelectedColor="@color/blue_FF53BBF2"
+        app:figures="6"
+        app:selectedBackgroundColor="@android:color/transparent"
+        app:verCodeMargin="10dp" />
+
+    <TextView
+        android:id="@+id/msg_view"
+        android:layout_width="wrap_content"
+        android:layout_marginTop="30dp"
+        android:layout_height="wrap_content"
+        android:text="你还有5次机会,输错5次将自动锁定"
+        android:textColor="@color/black_666666"
+        android:visibility="invisible"
+        android:textSize="13sp" />
+
+</LinearLayout>

+ 7 - 0
app/src/main/res/values-v19/style_theme.xml

@@ -33,6 +33,13 @@
         <item name="android:windowTranslucentStatus">true</item>
     </style>
 
+    <style name="AppThemeTransparent" parent="AppTheme">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowAnimationStyle">@null</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:colorBackgroundCacheHint">@null</item>
+    </style>
+
     <style name="AppActionTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
         <item name="android:windowContentOverlay">@null</item>
         <item name="colorPrimary">@color/colorPrimary</item>

+ 7 - 0
app/src/main/res/values-v23/style_theme.xml

@@ -35,6 +35,13 @@
         <item name="android:statusBarColor">@android:color/transparent</item>
     </style>
 
+    <style name="AppThemeTransparent" parent="AppTheme">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowAnimationStyle">@null</item>
+        <item name="android:colorBackgroundCacheHint">@null</item>
+    </style>
+
     <style name="AppActionTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
         <item name="android:windowContentOverlay">@null</item>
         <item name="android:windowLightStatusBar">true</item>

+ 7 - 0
app/src/main/res/values-v26/style_theme.xml

@@ -36,6 +36,13 @@
         <item name="android:statusBarColor">@android:color/transparent</item>
     </style>
 
+    <style name="AppThemeTransparent" parent="AppTheme">
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowAnimationStyle">@null</item>
+        <item name="android:colorBackgroundCacheHint">@null</item>
+    </style>
+
     <style name="AppActionTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
         <item name="android:windowContentOverlay">@null</item>
         <item name="android:windowLightStatusBar">true</item>

+ 7 - 0
app/src/main/res/values-v27/style_theme.xml

@@ -36,6 +36,13 @@
         <item name="android:statusBarColor">@android:color/transparent</item>
     </style>
 
+    <style name="AppThemeTransparent" parent="AppTheme">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowAnimationStyle">@null</item>
+        <item name="android:colorBackgroundCacheHint">@null</item>
+        <item name="android:windowIsTranslucent">true</item>
+    </style>
+
     <style name="AppActionTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
         <item name="android:windowContentOverlay">@null</item>
         <item name="android:windowLightStatusBar">true</item>

+ 1 - 0
app/src/main/res/values/colors.xml

@@ -23,4 +23,5 @@
     <color name="tc_home_search_1">#8f8f8f</color>
     <color name="tc_home_search_2">#333333</color>
     <color name="color_tab_nor">#000000</color>
+    <color name="mask_black">#60000000</color>
 </resources>

+ 1 - 0
app/src/main/res/values/str_public_strings.xml

@@ -8,6 +8,7 @@
     <!--digits-->
     <string name="digits_username">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@_-.</string>
     <string name="digits_mobile">+0123456789</string>
+    <string name="digits_number">0123456789</string>
     <string name="digits_captcha">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</string>
     <string name="digits_password">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~@#$%^*()-!=_+.</string>
 

+ 6 - 1
app/src/main/res/values/style_theme.xml

@@ -29,9 +29,14 @@
         <item name="theme_bg_btn_corner">@drawable/theme_bg_btn_corner_main</item>
         <item name="sp_search_edt">@drawable/sp_search_edt_main</item>
         <item name="btn_color">@color/btn_color_main</item>
-
     </style>
 
+    <style name="AppThemeTransparent" parent="AppTheme">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowAnimationStyle">@null</item>
+        <item name="android:colorBackgroundCacheHint">@null</item>
+        <item name="android:windowIsTranslucent">true</item>
+    </style>
 
     <attr name="sp_search_edt" format="reference" />
     <attr name="theme_bg_btn_corner" format="reference" />