Pq před 2 měsíci
rodič
revize
d5f41363ef

+ 1 - 0
BaseLibrary/src/main/java/com/cooleshow/base/constanst/Constants.java

@@ -16,6 +16,7 @@ public class Constants {
     public static final String CONVERSATION_TYPE_KEY = "conversation";
     public static String HEADSET_PLUE_TAG = "";
     public static String COMMON_EXTRA_KEY = "memo";
+    public static String COMMON_TITLE_KEY = "title";
 
     public static final int PAY_SUCCESS =1;//支付成功
     public static final int PAY_ERROR_BY_NOT_INSTALL =2;//支付失败,未安装

+ 13 - 2
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/scan/AuthLoginResultActivity.java

@@ -9,6 +9,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
 import com.cooleshow.base.constanst.Constants;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseActivity;
+import com.cooleshow.base.utils.JumpUtils;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.usercenter.R;
 import com.cooleshow.usercenter.constants.QrCodeResultType;
@@ -21,7 +22,7 @@ import androidx.annotation.Nullable;
  */
 @Route(path = RouterPath.UserCenter.SCAN_QR_AUTH_RESULT_CODE)
 public class AuthLoginResultActivity extends BaseActivity<AcAuthLoginResultLayoutBinding> implements View.OnClickListener {
-
+    private boolean isSupportType =false;
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -30,7 +31,7 @@ public class AuthLoginResultActivity extends BaseActivity<AcAuthLoginResultLayou
 
     @Override
     protected void initView() {
-        String title = getIntent().getStringExtra(Constants.COMMON_EXTRA_KEY);
+        String title = getIntent().getStringExtra(Constants.COMMON_TITLE_KEY);
         if (TextUtils.isEmpty(title)) {
             title = "扫描结果";
         }
@@ -52,6 +53,10 @@ public class AuthLoginResultActivity extends BaseActivity<AcAuthLoginResultLayou
         } else {
             viewBinding.imLogo.setImageResource(R.drawable.icon_qrcode_expired_tip);
         }
+        isSupportType = resultType == QrCodeResultType.CODE_ERROR_NO_SUPPORT;
+        if(isSupportType){
+            viewBinding.tvConfirm.setText("我知道了");
+        }
 
         viewBinding.tvConfirm.setOnClickListener(this);
     }
@@ -66,6 +71,12 @@ public class AuthLoginResultActivity extends BaseActivity<AcAuthLoginResultLayou
     public void onClick(View v) {
         int id = v.getId();
         if (id == R.id.tv_confirm) {
+            if(isSupportType){
+                //返回首页
+                JumpUtils.jumpMain(0);
+                finish();
+                return;
+            }
             ARouter.getInstance().build(RouterPath.UserCenter.SCAN_QR_CODE)
                     .navigation();
             finish();

+ 1 - 1
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/scan/ConfirmScanLoginActivity.java

@@ -114,7 +114,7 @@ public class ConfirmScanLoginActivity extends BaseMVPActivity<AcConfirmScanLogin
                 resultType = QrCodeResultType.CODE_AUTH_FAILED;
             }
             ARouter.getInstance().build(RouterPath.UserCenter.SCAN_QR_AUTH_RESULT_CODE)
-                    .withString(Constants.COMMON_EXTRA_KEY,"授权登录")
+                    .withString(Constants.COMMON_TITLE_KEY,"授权登录")
                     .withSerializable(Constants.COMMON_EXTRA_KEY, resultType).navigation();
             finish();
             return;

+ 2 - 2
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/scan/ScanActivity.java

@@ -311,14 +311,14 @@ public class ScanActivity extends BaseMVPActivity<ActivityScanLayoutBinding, Sca
             int errcode = apiException.getErrcode();
             if (errcode == 5440) {
                 ARouter.getInstance().build(RouterPath.UserCenter.SCAN_QR_AUTH_RESULT_CODE)
-                        .withString(Constants.COMMON_EXTRA_KEY, "授权登录")
+                        .withString(Constants.COMMON_TITLE_KEY, "授权登录")
                         .withSerializable(Constants.COMMON_EXTRA_KEY, QrCodeResultType.CODE_EXPIRED).navigation();
                 finish();
                 return;
             }
             if (errcode == 5445) {
                 ARouter.getInstance().build(RouterPath.UserCenter.SCAN_QR_AUTH_RESULT_CODE)
-                        .withString(Constants.COMMON_EXTRA_KEY, "授权登录")
+                        .withString(Constants.COMMON_TITLE_KEY, "授权登录")
                         .withSerializable(Constants.COMMON_EXTRA_KEY, QrCodeResultType.CODE_ERROR_NO_SUPPORT).navigation();
                 finish();
                 return;