调整第三方登录逻辑

This commit is contained in:
wushaocheng
2022-09-27 18:40:48 +08:00
parent e5b4b11cbb
commit f66e5cbfc2
24 changed files with 98 additions and 206 deletions

6
.gitignore vendored
View File

@@ -7,7 +7,7 @@
.externalNativeBuild
.idea
.settings
app/yinyou/debug/app-accompany-debug.apk
app/yinyou/debug/output.json
app/peko/debug/app-accompany-debug.apk
app/peko/debug/output.json
*.apk
app/yinyou/release/output.json
app/peko/release/output.json

View File

@@ -38,7 +38,7 @@ android {
variant ->
variant.outputs.all {
def date = new Date().format("MMddHHmm", TimeZone.getTimeZone("GMT+08"))
outputFileName = "yinyou_${buildType.name}_v${defaultConfig.versionName}-${date}.apk"
outputFileName = "peko_${buildType.name}_v${defaultConfig.versionName}-${date}.apk"
}
}
@@ -137,7 +137,7 @@ android {
}
debug {
buildConfigField "String", "BASE_URL", "\"http://api.uat.lecheng163.com/\""
buildConfigField "String", "BASE_URL", "\"https://beta.api.pekolive.com/\""
buildConfigField "String", "BASE_URL_DEBUG", "BASE_URL"
buildConfigField "String", "BASE_URL_STAGING", "\"https://api.lecheng163.com/\""
buildConfigField "String", "BASE_URL_RELEASE", "\"https://api.lecheng163.com/\""

View File

@@ -154,7 +154,7 @@ public class UIHelper {
public static void showMonsterResult(Context context, String monsterId) {
CommonWebViewActivity.start(context, UriProvider.IM_SERVER_URL +
"/yinyou/modules/monster/index.html?monsterId=" + monsterId);
"/peko/modules/monster/index.html?monsterId=" + monsterId);
}
/**
@@ -173,7 +173,7 @@ public class UIHelper {
*/
public static void showRecommendPosH5(Context context) {
String cardUrl = UriProvider.JAVA_WEB_URL +
"/yinyou/modules/recommend-card/index.html";
"/peko/modules/recommend-card/index.html";
CommonWebViewActivity.start(context, cardUrl);
}
@@ -208,6 +208,6 @@ public class UIHelper {
}
public static void openContactUs(Context context) {
CommonWebViewActivity.start(context, UriProvider.IM_SERVER_URL + "/yinyou/modules/contact/contact.html");
CommonWebViewActivity.start(context, UriProvider.IM_SERVER_URL + "/peko/modules/contact/contact.html");
}
}

View File

@@ -71,7 +71,7 @@ public class MyRecommendCardActivity extends BaseActivity {
@Override
public void performAction(View view) {
CommonWebViewActivity.start(context, UriProvider.JAVA_WEB_URL +
"/yinyou/modules/recommend-card/help.html");
"/peko/modules/recommend-card/help.html");
}
});
}

View File

@@ -125,7 +125,7 @@ public class RadishRecordActivity extends BaseMvpActivity<IRadishRecordView, Rad
mTitleBar.addAction(new TitleBar.ImageAction(R.mipmap.common_ic_help_white) {
@Override
public void performAction(View view) {
CommonWebViewActivity.start(RadishRecordActivity.this, UriProvider.JAVA_WEB_URL + "/yinyou/modules/rule/radish.html");
CommonWebViewActivity.start(RadishRecordActivity.this, UriProvider.JAVA_WEB_URL + "/peko/modules/rule/radish.html");
}
});
}

View File

@@ -30,7 +30,7 @@ public class RuleDialog extends BaseBindingDialog<DialogRuleBinding> {
binding.wvRule.getSettings().setTextZoom(100);
binding.wvRule.setWebViewClient(new WebViewClient());
// 设置Webview的user-agent
binding.wvRule.getSettings().setUserAgentString(binding.wvRule.getSettings().getUserAgentString() + " tutuAppAndroid erbanAppAndroid");
binding.wvRule.loadUrl(UriProvider.JAVA_WEB_URL + "/yinyou/modules/rule/rule-popup.html");
binding.wvRule.getSettings().setUserAgentString(binding.wvRule.getSettings().getUserAgentString() + " pekoAppAndroid erbanAppAndroid");
binding.wvRule.loadUrl(UriProvider.JAVA_WEB_URL + "/peko/modules/rule/rule-popup.html");
}
}

View File

@@ -395,7 +395,7 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
private JSONObject hwField(IMMessage message) {
Intent hwIntent = new Intent(Intent.ACTION_VIEW);
String intentStr = String.format(
"yinyoupushscheme://com.huawei.codelabpush/deeplink?sessionID=%s&sessionType=%s",
"pekopushscheme://com.huawei.codelabpush/deeplink?sessionID=%s&sessionType=%s",
sessionId, sessionType
);
hwIntent.putExtra("skiptype", PushMessageHandler.PAYLOAD_SKIPTYPE_PRIVATE_MSG);

View File

@@ -79,7 +79,6 @@ public class LoginPasswordActivity extends BaseActivity {
edtPhone.addTextChangedListener(textWatcher);
edtPassword.addTextChangedListener(textWatcher);
btnNext.setOnClickListener(v -> login());
findViewById(R.id.iv_back).setOnClickListener(v -> finish());
findViewById(R.id.tv_forget_password).setOnClickListener(v -> ResetPasswordActivity.start(context, ResetPasswordActivity.FROM_NOT_LOGIN));
}

View File

@@ -53,7 +53,7 @@ public class AddUserInfoFragment extends BaseFragment
private int gender = -1;
private XRadioGroup rgGender;
private RadioButton rbMale;
private String avatarUrl = "https://image.lecheng163.com/yinyou_default_avatar.png";
private String avatarUrl = "https://image.lecheng163.com/peko_default_avatar.png";
public static String INVITE_USER_CODE = "";

View File

@@ -60,7 +60,7 @@ public class LogoutHelper {
String text = "注销时间:" + simpleDateFormat.format(new Date(exception.getCancelDate()));
int end = text.length();
text += "\n\n请联系客服微信yinyoukefu01处理哦";
text += "\n\n请联系客服微信pekokefu01处理哦";
SpannableString spannableString = new SpannableString(text);
spannableString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(activity, R.color.appColor)),
0, end, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);

View File

@@ -26,7 +26,7 @@ public static void start(Context context) {
@Override
protected void init() {
initWhiteTitleBar("青少年模式");
mBinding.tvPlan.setOnClickListener(v -> CommonWebViewActivity.start(PatriarchModeActivity.this, UriProvider.IM_SERVER_URL + "/yinyou/activity/cleanNet/index.html"));
mBinding.tvPlan.setOnClickListener(v -> CommonWebViewActivity.start(PatriarchModeActivity.this, UriProvider.IM_SERVER_URL + "/peko/activity/cleanNet/index.html"));
mBinding.tvOpen.setOnClickListener(v -> start(PatriarchPwdActivity.class));
mBinding.tvPlan.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG); //下划线

View File

@@ -355,7 +355,7 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
// 设置setWebChromeClient对象
webView.setWebChromeClient(wvcc);
// 设置Webview的user-agent
webView.getSettings().setUserAgentString(webView.getSettings().getUserAgentString() + " tutuAppAndroid erbanAppAndroid");
webView.getSettings().setUserAgentString(webView.getSettings().getUserAgentString() + " pekoAppAndroid erbanAppAndroid");
}
private void onGotoAppFinish(WebView view) {

View File

@@ -86,7 +86,7 @@ public class CommonWebViewFragment extends BaseBindingFragment<FragmentCommonWeb
}
});
// 设置Webview的user-agent
webView.getSettings().setUserAgentString(webView.getSettings().getUserAgentString() + " tutuAppAndroid erbanAppAndroid");
webView.getSettings().setUserAgentString(webView.getSettings().getUserAgentString() + " pekoAppAndroid erbanAppAndroid");
}
@Override

View File

@@ -163,7 +163,7 @@ public class SimpleWebViewActivity extends AppCompatActivity {
// 设置setWebChromeClient对象
webView.setWebChromeClient(wvcc);
// 设置Webview的user-agent
webView.getSettings().setUserAgentString(webView.getSettings().getUserAgentString() + " tutuAppAndroid erbanAppAndroid");
webView.getSettings().setUserAgentString(webView.getSettings().getUserAgentString() + " pekoAppAndroid erbanAppAndroid");
}
private void initView() {

View File

@@ -156,15 +156,15 @@ public class MonsterDialog extends BaseDialog implements View.OnClickListener {
case R.id.tv_msg:
long beforeAppearSeconds = dataBean.getBeforeAppearSeconds();
if (beforeAppearSeconds >= 30) {
CommonWebViewActivity.start(getContext(), UriProvider.IM_SERVER_URL + "/yinyou/modules/monster/intro.html");
CommonWebViewActivity.start(getContext(), UriProvider.IM_SERVER_URL + "/peko/modules/monster/intro.html");
} else if (beforeAppearSeconds < 30 && beforeAppearSeconds > 15) {
CommonWebViewActivity.start(getContext(), UriProvider.IM_SERVER_URL + "/yinyou/modules/monster/intro.html");
CommonWebViewActivity.start(getContext(), UriProvider.IM_SERVER_URL + "/peko/modules/monster/intro.html");
} else if (beforeAppearSeconds <= 15) {
AVRoomActivity.start(getContext(), dataBean.getAppearRoomUid());
}
if (dataBean.getMonsterStatus() == MonsterInfo.MONSTER_STATUS_DID_DEAD) {
CommonWebViewActivity.start(getContext(), UriProvider.IM_SERVER_URL +
"/yinyou/modules/monster/index.html?monsterId=" + dataBean.getMonsterId());
"/peko/modules/monster/index.html?monsterId=" + dataBean.getMonsterId());
}
break;
}

View File

@@ -380,7 +380,7 @@ public class WithdrawActivity extends BaseActivity {
});
tvWithdrawRule.setOnClickListener(v -> CommonWebViewActivity.start(
context, UriProvider.IM_SERVER_URL + "/yinyou/modules/guide/output.html"));
context, UriProvider.IM_SERVER_URL + "/peko/modules/guide/output.html"));
//切换类型
tvWithdrawType.setVisibility(View.GONE);

View File

@@ -15,6 +15,6 @@ public class WithdrawRuleActivity extends BaseActivity {
setContentView(R.layout.activity_withdraw_rule);
initTitleBar("提现规则");
mWebView = (WebView) findViewById(R.id.wv_view);
mWebView.loadUrl(UriProvider.IM_SERVER_URL+"/yinyou/modules/guide/withdraw.html");
mWebView.loadUrl(UriProvider.IM_SERVER_URL+"/peko/modules/guide/withdraw.html");
}
}

View File

@@ -12,7 +12,6 @@ import com.yizhuan.erban.common.widget.dialog.DialogManager;
import com.yizhuan.erban.friend.action.AbstractSelectFriendAction;
import com.yizhuan.erban.module_hall.hall.activity.HallSearchActivity;
import com.yizhuan.erban.module_hall.hall.activity.ModuleHallActivity;
import com.yizhuan.erban.other.activity.SplashActivity;
import com.yizhuan.xchat_android_core.module_hall.hall.HallModel;
import com.yizhuan.xchat_android_core.utils.ActivityUtil;
import com.yizhuan.erban.utils.SpannableBuilder;
@@ -23,17 +22,12 @@ import com.yizhuan.xchat_android_core.module_hall.secretcode.bean.SecretCodeInfo
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
import com.yizhuan.xchat_android_core.user.UserModel;
import com.yizhuan.xchat_android_core.utils.EmojiUtil;
import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
import com.yizhuan.xchat_android_library.utils.UIUtils;
import java.util.concurrent.TimeUnit;
import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
/**
* emoji 暗号的一个缓存处理24小时刷新
@@ -116,60 +110,6 @@ public class PwdCodeMgr {
return false;
}
/**
* 处理弹出口令弹框
*
* @param context
*/
@SuppressLint("CheckResult")
public void handlePopPwdCodeWindow(Context context) {
//闪屏页不弹,登录页不弹
if (UIUtils.isTopActivity(context, SplashActivity.class.getName())) {
return;
}
//noinspection ResultOfMethodCallIgnored
Single.timer(400, TimeUnit.MILLISECONDS, AndroidSchedulers.mainThread())
.compose(RxHelper.bindContext(context))
.subscribe((aLong, throwable) -> {
if (throwable == null) {
if (!ActivityUtil.isValidContext(context)) {
return;
}
//获取复制的文本
String copyText = com.yizhuan.xchat_android_core.utils.
TextUtils.getClipboardFirstText(context);
if (TextUtils.isEmpty(copyText)) {
return;
}
//判断是不是自己复制的
if (isMyselfCode(copyText)) {
return;
}
//是不是我们接口的暗号
if (!EmojiUtil.isTutuAppEmojiPwd(copyText)) {
return;
}
//调用接口则清除粘贴板
//清除粘贴板,防止下次打开还调用
com.yizhuan.xchat_android_core.utils.TextUtils.clearClipboard(context);
//将我们接口的暗号串,传回服务器校验
//noinspection ResultOfMethodCallIgnored
SecretCodeModel.get().checkCode(copyText)
.compose(RxHelper.bindContext(context))
.subscribe(checkCodeResult -> {
if (!ActivityUtil.isValidContext(context)) {
return;
}
showPwdCodeDialog(checkCodeResult, context);
}, throwableSub -> {
});
} else {
throwable.printStackTrace();
}
});
}
private void showPwdCodeDialog(CheckCodeResult checkCodeResult, final Context context) {
//由接口控制,是否需要弹框
if (!checkCodeResult.isShowDialog()) {

View File

@@ -1,10 +1,5 @@
package com.yizhuan.erban;
import android.text.TextUtils;
import com.orhanobut.logger.Logger;
import com.yizhuan.xchat_android_core.utils.EmojiUtil;
import org.junit.Test;
import java.io.UnsupportedEncodingException;
@@ -20,11 +15,9 @@ import io.reactivex.Single;
import io.reactivex.SingleEmitter;
import io.reactivex.SingleObserver;
import io.reactivex.SingleOnSubscribe;
import io.reactivex.SingleSource;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Action;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
import static org.junit.Assert.*;

View File

@@ -11,7 +11,7 @@ public class XChatConstants {
/**
* 包名(各种缓存目录的根目录)
*/
public static final String XCHAT_DIR_NAME = "com.mango.yinyou";
public static final String XCHAT_DIR_NAME = "com.mango.peko";
/**
* sp名字
@@ -138,7 +138,7 @@ public class XChatConstants {
/**
* 分享房间 URL
*/
public static final String SHARE_ROOM_URL = "/yinyou/modules/share_room/index.html?shareUid=";
public static final String SHARE_ROOM_URL = "/peko/modules/share_room/index.html?shareUid=";
/**
* 分享家族文本
@@ -153,7 +153,7 @@ public class XChatConstants {
/**
* 分享家族 URL
*/
public static final String SHARE_FAMILY_URL = "/yinyou/modules/share/share_family.html";
public static final String SHARE_FAMILY_URL = "/peko/modules/share/share_family.html";
/**
* 分享群组文本
@@ -168,17 +168,17 @@ public class XChatConstants {
/**
* 分享群组 URL
*/
public static final String SHARE_TEAM_URL = "/yinyou/modules/share/share_family.html";
public static final String SHARE_TEAM_URL = "/peko/modules/share/share_family.html";
/**
* 分享群组 URL
*/
public static final String SHARE_WORLD_DYNAMIC_URL = "/yinyou/modules/world/share-page/index.html";
public static final String SHARE_WORLD_DYNAMIC_URL = "/peko/modules/world/share-page/index.html";
/**
* 游戏排行榜 URL
*/
public static final String GAME_ROOK = "/yinyou/modules/erbanRank/game_rank.html?type=week";
public static final String GAME_ROOK = "/peko/modules/erbanRank/game_rank.html?type=week";
/**
* 系统消息那个用户的UID
@@ -200,7 +200,7 @@ public class XChatConstants {
/**
* 登录页面「如何登录」对应的 H5 页面
*/
public static final String LOGIN_ERBAN_ACCOUNT_URL = "/yinyou/modules/rule/login_tips.html";
public static final String LOGIN_ERBAN_ACCOUNT_URL = "/peko/modules/rule/login_tips.html";
public static final String ROOM_INTRODUCTION = "可点击房间话题查看本房间公告";
public static final String DATING_TIPS_OPEN = "相亲玩法已开启,请点击主持人麦位选择主持人";
@@ -242,13 +242,13 @@ public class XChatConstants {
/**
* Referer (DEBUG)
*/
public static final String KEY_REFERER_DEBUG = "http://api.uat.lecheng163.com/";
public static final String KEY_REFERER_DEBUG = "https://beta.api.pekolive.com/";
/**
* Referer (RELEASE)
*/
public static final String KEY_REFERER_RELEASE = "https://api.lecheng163.com/";
public static final String APP_MARK = "yinyou";
public static final String APP_MARK = "peko";
/**
* 聊天室文本消息易盾反垃圾业务id
*/

View File

@@ -59,42 +59,42 @@ public class UriProvider {
* @return -
*/
public static String getRoomBg() {
return IM_SERVER_URL.concat("/yinyou/modules/noble/roomBgList.html");
return IM_SERVER_URL.concat("/peko/modules/noble/roomBgList.html");
}
/**
* 贵族介绍页
*/
public static String getNobleIntro() {
return IM_SERVER_URL.concat("/yinyou/modules/nobles/intro.html");
return IM_SERVER_URL.concat("/peko/modules/nobles/intro.html");
}
/**
* 贵族介绍页
*/
public static String getRanking() {
return IM_SERVER_URL.concat("/yinyou/modules/rank/index.html#/rank");
return IM_SERVER_URL.concat("/peko/modules/rank/index.html#/rank");
}
/**
* 帮助页
*/
public static String getHelp() {
return IM_SERVER_URL.concat("/yinyou/modules/rule/guide.html");
return IM_SERVER_URL.concat("/peko/modules/rule/guide.html");
}
/**
* 等级界面
*/
public static String getUserLevelUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/level/index.html");
return JAVA_WEB_URL.concat("/peko/modules/level/index.html");
}
/**
* 邀请好友
*/
public static String getShareUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/inviteCode/index.html");
return JAVA_WEB_URL.concat("/peko/modules/inviteCode/index.html");
}
@@ -102,7 +102,7 @@ public class UriProvider {
* 等级界面
*/
public static String getUserCharmLevelUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/charm/index.html");
return JAVA_WEB_URL.concat("/peko/modules/charm/index.html");
}
@@ -112,7 +112,7 @@ public class UriProvider {
* @return
*/
public static String getErbanTopMessageUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/headNews/index.html");
return JAVA_WEB_URL.concat("/peko/modules/headNews/index.html");
}
/**
@@ -121,7 +121,7 @@ public class UriProvider {
* @return
*/
public static String getRelatedToMeHeadLineUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/headNews/index.html?atMe=1");
return JAVA_WEB_URL.concat("/peko/modules/headNews/index.html?atMe=1");
}
/**
@@ -130,7 +130,7 @@ public class UriProvider {
* @return
*/
public static String getCreateFamilyUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/family/create.html");
return JAVA_WEB_URL.concat("/peko/modules/family/create.html");
}
/**
@@ -139,7 +139,7 @@ public class UriProvider {
* @return
*/
public static String getFamilyInstructionUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/family/handbook.html");
return JAVA_WEB_URL.concat("/peko/modules/family/handbook.html");
}
/**
@@ -148,7 +148,7 @@ public class UriProvider {
* @return
*/
public static String getFamilyCurrencyHelpUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/family/faq.html");
return JAVA_WEB_URL.concat("/peko/modules/family/faq.html");
}
/**
@@ -157,7 +157,7 @@ public class UriProvider {
* @return
*/
public static String getReportWallUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/inform/inform-list.html");
return JAVA_WEB_URL.concat("/peko/modules/inform/inform-list.html");
}
/**
@@ -166,7 +166,7 @@ public class UriProvider {
* @return
*/
public static String getPublicChatHallHelpUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/inform/help.html");
return JAVA_WEB_URL.concat("/peko/modules/inform/help.html");
}
/**
@@ -175,7 +175,7 @@ public class UriProvider {
* @return
*/
public static String getUserProtocolUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/protocol.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/protocol.html");
}
/**
@@ -184,14 +184,14 @@ public class UriProvider {
* @return
*/
public static String getUserReportUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/inform/index.html");
return JAVA_WEB_URL.concat("/peko/modules/inform/index.html");
}
/**
* 话题-说明
*/
public static String getMiniWorldRuleUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/world-rule/index.html");
return JAVA_WEB_URL.concat("/peko/modules/world-rule/index.html");
}
/**
@@ -200,7 +200,7 @@ public class UriProvider {
* @return
*/
public static String getTutuRealNamePage() {
return JAVA_WEB_URL.concat("/yinyou/modules/identity/new.html");
return JAVA_WEB_URL.concat("/peko/modules/identity/new.html");
}
/**
@@ -209,7 +209,7 @@ public class UriProvider {
* @return
*/
public static String getMyIncomeUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/myincome/index.html#/MyIncome");
return JAVA_WEB_URL.concat("/peko/modules/myincome/index.html#/MyIncome");
}
/**
@@ -218,7 +218,7 @@ public class UriProvider {
* @return
*/
public static String getRechargeAgreementUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/rechargeAgreement.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/rechargeAgreement.html");
}
/**
@@ -227,7 +227,7 @@ public class UriProvider {
* @return
*/
public static String getMentoringRelationshipGuide() {
return JAVA_WEB_URL.concat("/yinyou/modules/strategy/strategy.html");
return JAVA_WEB_URL.concat("/peko/modules/strategy/strategy.html");
}
/**
@@ -236,11 +236,11 @@ public class UriProvider {
* @return
*/
public static String getMentorRankingList() {
return JAVA_WEB_URL.concat("/yinyou/modules/strategy/teacher-list.html");
return JAVA_WEB_URL.concat("/peko/modules/strategy/teacher-list.html");
}
public static String getCommnunityNorms() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/community-norms.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/community-norms.html");
}
/**
@@ -249,7 +249,7 @@ public class UriProvider {
* @return
*/
public static String getPrivacyAgreement() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/privacy-wap.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/privacy-wap.html");
}
public static String getLinkUrl(String linkUrl) {
@@ -263,28 +263,28 @@ public class UriProvider {
* 个人魅力榜
*/
public static String getPersonalCharismaRank() {
return JAVA_WEB_URL.concat("/yinyou/modules/charm/index.html");
return JAVA_WEB_URL.concat("/peko/modules/charm/index.html");
}
/**
* 宝箱帮助
*/
public static String getBoxHelp() {
return JAVA_WEB_URL.concat("/yinyou/modules/rank/index.html#/wishingWellRule");
return JAVA_WEB_URL.concat("/peko/modules/rank/index.html#/wishingWellRule");
}
/**
* 宝箱记录
*/
public static String getBoxHistory() {
return JAVA_WEB_URL.concat("/yinyou/modules/rank/index.html#/wishingWellRecord");
return JAVA_WEB_URL.concat("/peko/modules/rank/index.html#/wishingWellRecord");
}
/**
* 获取宝箱钥匙
*/
public static String getBoxKey() {
return JAVA_WEB_URL.concat("/yinyou/activity/explore/index.html");
return JAVA_WEB_URL.concat("/peko/activity/explore/index.html");
}
/**
@@ -293,7 +293,7 @@ public class UriProvider {
* @return
*/
public static String getRedPacketRule() {
return JAVA_WEB_URL.concat("yinyou/modules/rule/red-packet-rule.html");
return JAVA_WEB_URL.concat("peko/modules/rule/red-packet-rule.html");
}
@@ -303,7 +303,7 @@ public class UriProvider {
* @return
*/
public static String getDatingRule() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/dating.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/dating.html");
}
/**
@@ -312,7 +312,7 @@ public class UriProvider {
* @return
*/
public static String getGameShareUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/game/index.html");
return JAVA_WEB_URL.concat("/peko/modules/game/index.html");
}
/**
@@ -321,7 +321,7 @@ public class UriProvider {
* @return
*/
public static String getLinkAccountUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/game/bindAccount.html");
return JAVA_WEB_URL.concat("/peko/modules/game/bindAccount.html");
}
/**
@@ -330,7 +330,7 @@ public class UriProvider {
* @return
*/
public static String getLinkRoomUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/associateAccount/index.html");
return JAVA_WEB_URL.concat("/peko/modules/associateAccount/index.html");
}
@@ -338,7 +338,7 @@ public class UriProvider {
* 房间排行榜
*/
public static String getRoomRanking() {
return IM_SERVER_URL.concat("/yinyou/modules/room_rank/index.html?roomUid=" + AvRoomDataManager.get().getRoomUid());
return IM_SERVER_URL.concat("/peko/modules/room_rank/index.html?roomUid=" + AvRoomDataManager.get().getRoomUid());
}
/**
@@ -347,7 +347,7 @@ public class UriProvider {
* @return
*/
public static String getSDKPermissionUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/sdk.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/sdk.html");
}
/**
@@ -356,112 +356,112 @@ public class UriProvider {
* @return
*/
public static String getDeivcePermissionUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/permissions.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/permissions.html");
}
/**
* 隐私协议-个人信息
*/
public static String getPersonalInfoUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/personal-info.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/personal-info.html");
}
/**
* 隐私指引
*/
public static String getPrivacyUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/privacy-wap.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/privacy-wap.html");
}
/**
* 贵族中心帮助页
*/
public static String getVipHelpUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/introduction-patrician.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/introduction-patrician.html");
}
/**
* Cp装扮
*/
public static String getCpDecorationUrl() {
return JAVA_WEB_URL.concat("/yinyou/activity/act-nameplate-cp/index.html");
return JAVA_WEB_URL.concat("/peko/activity/act-nameplate-cp/index.html");
}
/**
* 用户充值协议
*/
public static String getChargeAgreementUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/rechargeAgreement.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/rechargeAgreement.html");
}
/**
* 用户注册服务协议
*/
public static String getRegistrationAgreementUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/protocol.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/protocol.html");
}
/**
* 直播服务协议
*/
public static String getLiveServiceAgreementUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/live-protocol.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/live-protocol.html");
}
/**
* 社区规范
*/
public static String getCommunitySpecificationUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/community-norms.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/community-norms.html");
}
/**
* 账号注销协议
*/
public static String getCancellationAgreementUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/logout-agreement.html");
return JAVA_WEB_URL.concat("/peko/modules/rule/logout-agreement.html");
}
/**
* 开通粉丝团
*/
public static String getFansTeamOpenUrl(long roomUid) {
return JAVA_WEB_URL.concat("/yinyou/modules/fans_club/nameplate.html?roomUid=" + roomUid);
return JAVA_WEB_URL.concat("/peko/modules/fans_club/nameplate.html?roomUid=" + roomUid);
}
/**
* 粉丝团排行
*/
public static String getFansTeamRankUrl(long roomUid) {
return JAVA_WEB_URL.concat("/yinyou/modules/fans_club/fans_rank.html?roomUid=" + roomUid);
return JAVA_WEB_URL.concat("/peko/modules/fans_club/fans_rank.html?roomUid=" + roomUid);
}
/**
* 我的粉丝团
*/
public static String getFansTeamMyFansUrl(long roomUid) {
return JAVA_WEB_URL.concat("/yinyou/modules/fans_club/myfans.html?roomUid=" + roomUid);
return JAVA_WEB_URL.concat("/peko/modules/fans_club/myfans.html?roomUid=" + roomUid);
}
/**
* 粉丝团规则
*/
public static String getFansTeamRuleUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/fans_club/rule.html");
return JAVA_WEB_URL.concat("/peko/modules/fans_club/rule.html");
}
/**
* 个播小时榜
*/
public static String getSingleRoomHourRankUrl(long roomUid) {
return JAVA_WEB_URL.concat("/yinyou/modules/room_rank/hourRank.html?roomUid=" + roomUid);
return JAVA_WEB_URL.concat("/peko/modules/room_rank/hourRank.html?roomUid=" + roomUid);
}
/**
* 牌照房小时榜
*/
public static String getRoomHourRankUrl(long roomUid) {
return JAVA_WEB_URL.concat("/yinyou/modules/room_rank/hourRankLicense.html?roomUid=" + roomUid);
return JAVA_WEB_URL.concat("/peko/modules/room_rank/hourRankLicense.html?roomUid=" + roomUid);
}
@@ -469,14 +469,14 @@ public class UriProvider {
* 周星榜
*/
public static String getWeekStarUrl() {
return JAVA_WEB_URL.concat("/yinyou/modules/weekStar/newWeekStar.html");
return JAVA_WEB_URL.concat("/peko/modules/weekStar/newWeekStar.html");
}
/**
* 幸运礼物说明
*/
public static String getLuckyGiftRule(int giftID) {
return JAVA_WEB_URL.concat("/yinyou/modules/rule/luckyGiftRule.html?giftID=" + giftID);
return JAVA_WEB_URL.concat("/peko/modules/rule/luckyGiftRule.html?giftID=" + giftID);
}
/**
@@ -485,28 +485,28 @@ public class UriProvider {
* @return
*/
public static String getLiveAgreement() {
return JAVA_WEB_URL.concat("/yinyou/activity/activemodel/index.html?code=ZBGG");
return JAVA_WEB_URL.concat("/peko/activity/activemodel/index.html?code=ZBGG");
}
/**
* 航海帮助
*/
public static String getRadishHelp() {
return JAVA_WEB_URL.concat("/yinyou/activity/act-sail/play_explain.html");
return JAVA_WEB_URL.concat("/peko/activity/act-sail/play_explain.html");
}
/**
* 航海记录
*/
public static String getRadishHistory() {
return JAVA_WEB_URL.concat("/yinyou/activity/act-sail/win_record.html");
return JAVA_WEB_URL.concat("/peko/activity/act-sail/win_record.html");
}
/**
* 获取航海钥匙
*/
public static String getRadishKey() {
return JAVA_WEB_URL.concat("/yinyou/activity/act-sail/more.html");
return JAVA_WEB_URL.concat("/peko/activity/act-sail/more.html");
}
}

View File

@@ -113,9 +113,9 @@ public class AuthModel extends BaseModel implements IAuthModel {
*/
private static final int TYPE_LOGIN_NORMAL = 1;
private static final int TYPE_LOGIN_BIND_QQ = 2;
public static final int TYPE_GOOGLE_LOGIN = 5;
public static final int TYPE_LINE_LOGIN = 6;
public static final int TYPE_FACEBOOK_LOGIN = 7;
public static final int TYPE_GOOGLE_LOGIN = 8;
public static final int TYPE_LINE_LOGIN = 9;
public static final int TYPE_FACEBOOK_LOGIN = 10;
/**
* 校验验证码
*/
@@ -328,7 +328,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
}
/**
* 微信登录
* facebook登录
*
* @return
*/
@@ -375,7 +375,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
})
.flatMap(platform -> {
String openid = platform.getDb().getUserId();
String unionid = platform.getDb().get("unionid");
String unionid = platform.getDb().getUserId();
String avatar = thirdUserInfo.getUserIcon();
if (avatar != null && avatar.equals("null")) {
avatar = null;
@@ -395,7 +395,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
}
/**
* QQ登录
* line
*
* @return
*/
@@ -417,7 +417,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
public void onComplete(Platform platform, int i, HashMap<String, Object> hashMap) {
if (i == Platform.ACTION_USER_INFOR) {
String openid = platform.getDb().getUserId();
String unionid = platform.getDb().get("unionid");
String unionid = platform.getDb().getUserId();
Logger.i("openid:" + openid + " unionid:" + unionid + platform.getDb().getUserIcon());
thirdUserInfo = new ThirdUserInfo();
@@ -487,7 +487,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
public void onComplete(Platform platform, int i, HashMap<String, Object> hashMap) {
if (i == Platform.ACTION_USER_INFOR) {
String openid = platform.getDb().getUserId();
String unionid = platform.getDb().get("unionid");
String unionid = platform.getDb().getUserId();
Logger.i("openid:" + openid + " unionid:" + unionid + platform.getDb().getUserIcon());
thirdUserInfo = new ThirdUserInfo();

View File

@@ -149,12 +149,6 @@ public final class UserModel extends BaseModel implements IUserModel {
UserInfo userInfo = userResult.getData();
//用户信息不全的情况下,currentUserInfo并不会被保存,这里单独保存下预填写的邀请码...
preFillInviteCode = userInfo.getPrefillInviteCode();
//如果没有绑定手机号,提醒去绑定手机号
if (userInfo.getDefUser() != 4 && !userInfo.isBindPhone()) {
EventBus.getDefault().post(new NeedBindPhoneEvent());
SingleToastUtil.showToast("第三方登录需绑定手机号喔~");
return Single.error(new Throwable("need bind phone"));
}
//首次注册需要完善昵称和头像
if (TextUtils.isEmpty(userInfo.getNick()) || TextUtils.isEmpty(userInfo.getAvatar())) {
EventBus.getDefault().post(new NeedCompleteInfoEvent());

View File

@@ -1,34 +0,0 @@
package com.yizhuan.xchat_android_core.utils;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
/**
* emoji表情
* Created by lvzebiao on 2019/2/25.
*/
public class EmojiUtil {
/**
* 判断该字符串是否是我们APP的暗号口令
* 只是简单判断,完整的逻辑,交给后端完成
* //连续匹配到5个emoji + 换行 + 5个emoji则通过
*/
public static boolean isTutuAppEmojiPwd(String emojiText) {
try {
String oneEmojiP = "([\ud83c\udc00-\ud83c\udfff]|[\ud83d\udc00-\ud83d\udfff]|[\ud83e\udc00-\ud83e\udfff]" +
"|[\u2100-\u32ff]|[\u0030-\u007f][\u20d0-\u20ff]|[\u0080-\u00ff])";
String regx = oneEmojiP + "{5}\n" + oneEmojiP + "{5}";
Pattern p = Pattern.compile(regx);
Matcher matcher = p.matcher(emojiText);
return matcher.find();
} catch (Exception ex) {
ex.printStackTrace();
}
return false;
}
}