|
@@ -1,12 +1,18 @@
|
|
|
package com.cooleshow.usercenter.constants;
|
|
|
|
|
|
+import android.text.SpannableString;
|
|
|
+
|
|
|
+import com.cooleshow.base.utils.UiUtils;
|
|
|
+import com.cooleshow.base.utils.Utils;
|
|
|
+
|
|
|
/**
|
|
|
* Author by pq, Date on 2022/12/23.
|
|
|
*/
|
|
|
public enum QrCodeResultType {
|
|
|
CODE_EXPIRED("code_expired", "二维码已过期", "请在乐教通刷新二维码后重新扫码"),
|
|
|
CODE_ERROR("code_error", "无法识别", "当前二维码无法识别"),
|
|
|
- CODE_AUTH_FAILED("code_auth_failed", "授权失败", "授权失败,请重新扫码授权");
|
|
|
+ CODE_AUTH_FAILED("code_auth_failed", "授权失败", "授权失败,请重新扫码授权"),
|
|
|
+ CODE_ERROR_NO_SUPPORT("code_auth_failed", "授权失败", "您的账号暂不支持登录「乐教通」");
|
|
|
|
|
|
private final String tip;
|
|
|
private final String title;
|
|
@@ -17,7 +23,11 @@ public enum QrCodeResultType {
|
|
|
return id;
|
|
|
}
|
|
|
|
|
|
- public String getTip() {
|
|
|
+ public CharSequence getTip() {
|
|
|
+ if (this == QrCodeResultType.CODE_ERROR_NO_SUPPORT) {
|
|
|
+ SpannableString string = UiUtils.diffColorString("您的账号暂不支持登录", "「乐教通」", Utils.getApp().getResources().getColor(com.cooleshow.base.R.color.color_777777), Utils.getApp().getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
|
|
|
+ return string;
|
|
|
+ }
|
|
|
return tip;
|
|
|
}
|
|
|
|