Compare commits

...

34 Commits

Author SHA1 Message Date
a0c25a7c56 feat: 使用ASM插件检查隐私政策授权时的隐私问题
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-04-28 10:44:41 +08:00
a2bd5e01e0 Merge branch 'hotfix/v5.35.0-1050/jpush_clear_badge' into 'release'
fix: 修复极光推送清除角标提前获取信息的问题

See merge request halo/android/assistant-android!1649
2024-04-28 10:43:11 +08:00
844d227f19 fix: 修复极光推送清除角标提前获取信息的问题 2024-04-28 10:26:20 +08:00
f982bf6478 Merge branch 'hotfix/v5.35.0-1050/disable_jpush_auto_init' into 'release'
fix: 移除极光推送通过 ContentProvider 自动初始化的问题

See merge request halo/android/assistant-android!1647
2024-04-26 14:01:09 +08:00
33d7afec71 fix: 移除极光推送通过 ContentProvider 自动初始化相关代码 2024-04-26 13:40:16 +08:00
37ef50f323 Merge branch 'feat/GHZSCY-5243' into 'dev'
feat: 穿山甲广告SDK更换新版本与信息流广告优化 https://jira.shanqu.cc/browse/GHZSCY-5243

See merge request halo/android/assistant-android!1641
2024-04-26 10:10:33 +08:00
4c6acdee3a Merge branch 'fix/GHZSCY-5261' into 'dev'
fix: 【光环助手】开屏广告神策埋点数据上报问题 https://jira.shanqu.cc/browse/GHZSCY-5261

See merge request halo/android/assistant-android!1646
2024-04-25 10:36:50 +08:00
6beb060e63 fix: 【光环助手】开屏广告神策埋点数据上报问题 https://jira.shanqu.cc/browse/GHZSCY-5261 2024-04-25 10:31:22 +08:00
a552677e41 Merge branch 'chen/202404/GHZSCY-5187-2' into 'dev'
style:匹配按钮设计规范...

See merge request halo/android/assistant-android!1645
2024-04-24 16:12:37 +08:00
bb148f42b8 style:匹配按钮设计规范 https://jira.shanqu.cc/browse/GHZSCY-5187?focusedCommentId=61918&page=com.atlassian.jira.plugin.system.issuetabpanels%253Acomment-tabpanel#comment-61918 2024-04-24 16:09:44 +08:00
065aa96e18 Merge branch 'fix/GHZSCY-5236' into 'dev'
fix: 多渠道多版本-首次启动跳转问题 https://jira.shanqu.cc/browse/GHZSCY-5236

See merge request halo/android/assistant-android!1640
2024-04-24 11:43:36 +08:00
d9a90ca80b fix: 多渠道多版本-首次启动跳转问题 https://jira.shanqu.cc/browse/GHZSCY-5236 2024-04-24 11:10:39 +08:00
2aeffb1cc4 Merge branch 'chen/202404/GHZSCY-5187' into 'dev'
style:匹配按钮设计规范...

See merge request halo/android/assistant-android!1644
2024-04-23 17:47:19 +08:00
d3188cc3cd style:匹配按钮设计规范 https://jira.shanqu.cc/browse/GHZSCY-5187?focusedCommentId=61918&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-61918 2024-04-23 17:42:52 +08:00
1d7f902a81 feat: 移除一键登录 SDK 依赖 (移除相关无用的资源)
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-04-23 16:19:59 +08:00
13a40806e4 Merge branch 'fix/GHZS-5009' into 'dev'
fix: 插件问题反馈内容默认文案出错 https://jira.shanqu.cc/browse/GHZS-5009

See merge request halo/android/assistant-android!1637
2024-04-23 15:04:29 +08:00
b56e5c4022 Merge branch 'feat/GHZS-5188' into 'dev'
feat: 调整客户端用到的部分域名(同时移除已经从未上线的光能部分相关代码) https://jira.shanqu.cc/browse/GHZS-5188

See merge request halo/android/assistant-android!1638
2024-04-23 15:04:21 +08:00
acca1537da Merge branch 'feat/optimise_package_privacy' into 'dev'
feat: 移除一键登录 SDK 依赖

See merge request halo/android/assistant-android!1642
2024-04-23 15:04:12 +08:00
6e5b639d58 feat: 调整客户端用到的部分域名(同时移除已经从未上线的光能部分相关代码) https://jira.shanqu.cc/browse/GHZS-5188 2024-04-23 14:43:10 +08:00
24000f55af feat: 移除一键登录 SDK 依赖 2024-04-22 17:56:04 +08:00
d11ccba0b7 feat: 穿山甲广告SDK更换新版本与信息流广告优化 https://jira.shanqu.cc/browse/GHZSCY-5243
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-04-22 16:29:42 +08:00
3540c4626d Merge branch 'fix/update_crash' into 'dev'
fix: 修复软更时更新弹窗回到桌面由于下载监听移除不及时导致的闪退问题

See merge request halo/android/assistant-android!1636
2024-04-22 15:34:30 +08:00
e6a2758fdb fix: 修复软更时更新弹窗回到桌面由于下载监听移除不及时导致的闪退问题 2024-04-22 15:08:02 +08:00
a56e2bd16e Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2024-04-22 14:01:25 +08:00
e038c565ff Merge branch 'hotfix/v5.34.8-1038/authorization_crash' into 'release'
fix: 修复通用授权登陆界面出现的闪退问题...

See merge request halo/android/assistant-android!1635
2024-04-22 13:57:42 +08:00
ec5905bb11 fix: 修复通用授权登陆界面出现的闪退问题 https://sentry.shanqu.cc/organizations/lightgame/issues/373879/events/b72b2eb3c7ef4426ba8d42ff5a476bbe/?project=22 2024-04-22 13:49:47 +08:00
21f50c4eed Merge branch 'hotfix/v5.34.8-1038/optional_update_crash' into 'release'
fix: 修复软更时取消弹窗切换页面后有机率触发闪退的问题 https://sentry.shanqu.cc/organizations/lightgame/issues/380566

See merge request halo/android/assistant-android!1634
2024-04-22 11:42:21 +08:00
5a93f3671b fix: 修复软更时取消弹窗切换页面后有机率触发闪退的问题 https://sentry.shanqu.cc/organizations/lightgame/issues/380566 2024-04-22 11:04:57 +08:00
6dcb8b6efe Merge branch 'fix/GHZSCY-5244' into 'dev'
fix:【光环助手】5.35验收问题:极光推送触发了APP角标提示,但不能消除 https://jira.shanqu.cc/browse/GHZSCY-5244

See merge request halo/android/assistant-android!1633
2024-04-19 18:06:48 +08:00
d60916b3bc fix:【光环助手】5.35验收问题:极光推送触发了APP角标提示,但不能消除 https://jira.shanqu.cc/browse/GHZSCY-5244 2024-04-19 18:06:48 +08:00
4e00b5db19 chore: 版本更新至 5.34.8 2024-04-17 15:59:16 +08:00
e6a6bbcf97 Merge branch 'feat/GHZS-5229' into 'release'
chore: 神策 SDK 更新至 6.8.0

See merge request halo/android/assistant-android!1629
2024-04-17 15:58:35 +08:00
0eecc4699f chore: 神策 SDK 更新至 6.8.0 2024-04-17 15:56:04 +08:00
920e7a8038 fix: 插件问题反馈内容默认文案出错 https://jira.shanqu.cc/browse/GHZS-5009
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-03-21 10:07:14 +08:00
92 changed files with 1309 additions and 1554 deletions

3
.gitmodules vendored
View File

@ -5,9 +5,6 @@
[submodule "vspace-bridge"]
path = vspace-bridge
url = ../../../cwzs/android/vspace-bridge.git
[submodule "module_common/src/debug/assets/assistant-android-mock"]
path = module_common/src/debug/assets/assistant-android-mock
url = ../../../halo/android/assistant-android-mock.git
[submodule "ndownload"]
path = ndownload
url = ../../../android/ndownload.git

View File

@ -4,6 +4,7 @@ apply plugin: 'kotlin-android' // kotlin
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'
apply plugin: 'AndResGuard'
apply plugin: 'privacy-sentry-plugin'
import groovy.xml.XmlUtil
@ -409,12 +410,50 @@ dependencies {
}
internalImplementation(project(':module_internal_test'))
// 根据BUILD_PUSH_TYPE决定使用哪个推送SDK目前默认使用阿里云推送
def pushProject = findProperty('BUILD_PUSH_TYPE') == 'jg'
def pushProperty = findProperty('BUILD_PUSH_TYPE')
// 根据BUILD_PUSH_TYPE决定使用哪个推送SDK目前默认使用极光推送
def pushProject = (pushProperty == null || pushProperty == 'jg')
? project(':feature:jg_push') : project(':feature:acloud_push')
implementation(pushProject) {
exclude group: 'androidx.swiperefreshlayout'
}
def privacyVersion = "1.3.4.2"
implementation "com.github.allenymt.PrivacySentry:hook-sentry:$privacyVersion"
implementation "com.github.allenymt.PrivacySentry:privacy-annotation:$privacyVersion"
// 代理类的库如果自己没有代理类那么必须引用这个aar
// 如果不想使用库中本身的代理方法可以不引入这个aar但是自己必须实现代理类
// 引入privacy-proxy也可以自定义类代理方法优先以业务方定义的为准
implementation "com.github.allenymt.PrivacySentry:privacy-proxy:$privacyVersion"
// 1.2.3 新增类替换主要是为了hook构造函数的参数按业务方需求自己决定
implementation "com.github.allenymt.PrivacySentry:privacy-replace:$privacyVersion"
}
privacy {
// 设置免hook的名单
blackList = []
// 开关PrivacySentry插件功能
enablePrivacy = true
// 开启hook反射的方法
hookReflex = true
// 开启hook 替换类目前支持file
hookConstructor = true
// 是否开启hook变量默认为false建议弃用
hookField = true
// 以下是为了解决小米照明弹自启动问题的尝试, 如果没有自启动的需求,这里关闭即可
// hook Service的部分代码修复在MIUI上的自启动问题
// 部分Service把自己的Priority设置为1000这里开启代理功能可以代理成0
enableReplacePriority = true
replacePriority = 1
// 支持关闭Service的Export功能默认为false注意部分厂商通道之类的push(xiaomi、vivo、huawei等厂商的pushService),不能关闭
enableCloseServiceExport = true
// Export白名单Service, 这里根据厂商的名称设置了白名单
serviceExportPkgWhiteList = ["xiaomi","vivo","honor","meizu","oppo","Oppo","Hms","huawei","stp","Honor"]
// 修改Service的onStartCommand 返回值修改为START_NOT_STICKY
enableHookServiceStartCommand = true
}
File propFile = file('sign.properties')

View File

@ -11,6 +11,12 @@
<package android:name="com.lg.vspace" />
</queries>
<!-- 华为/荣耀角标 -->
<uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE "/>
<uses-permission android:name="com.hihonor.android.launcher.permission.CHANGE_BADGE" />
<!-- vivo角标 -->
<uses-permission android:name="com.vivo.notification.permission.BADGE_ICON" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<!-- 允许应用程序访问网络连接 -->

View File

@ -6,8 +6,6 @@
<link rel="stylesheet" type="text/css" href="normalize.css">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="video-js.min.css">
<!-- <link rel="stylesheet" href="https://static-web.ghzs.com/website-static/lib/video-js.min.css">--> <!--在web页面播放视频-->
<!--<link rel="stylesheet" type="text/css" href="https://resource.ghzs.com/css/halo_app.css">-->
</head>
<body style="overflow-x: hidden; word-break: break-all;">
@ -15,8 +13,5 @@
<script type="text/javascript" src="zepto.min.js"></script>
<script type="text/javascript" src="rich_editor.js"></script>
<script type="text/javascript" src="video.min.js"></script>
<!--<script src="https://static-web.ghzs.com/website-static/lib/video.min.js"></script>--> <!--在web页面播放视频-->
<!--<script type="text/javascript" src="content.js"></script>-->
<!--<script type="text/javascript" src="https://resource.ghzs.com/js/halo_app.js"></script>-->
</body>
</html>

View File

@ -34,18 +34,18 @@ try {
var script = document.createElement("script")
document.body.appendChild(script)
if (isDebug) {
script.src = "https://resource.ghzs.com/js/halo_app_test.js" + "?timestamp=" + Math.round(new Date().getTime() / 1000)
script.src = "https://dev-and-static.ghzs66.com/web/js/halo.js" + "?timestamp=" + Math.round(new Date().getTime() / 1000)
} else {
script.src = "https://resource.ghzs.com/js/halo.js" + "?timestamp=" + Math.round(new Date().getTime() / 1000 / 1000)
script.src = "https://and-static.ghzs66.com/web/js/halo.js" + "?timestamp=" + Math.round(new Date().getTime() / 1000 / 1000)
}
var style = document.createElement("link")
style.rel = "stylesheet"
style.type = "text/css"
if (isDebug) {
style.href = "https://resource.ghzs.com/css/halo_app_test.css" + "?timestamp=" + Math.round(new Date().getTime() / 1000)
style.href = "https://dev-and-static.ghzs66.com/web/css/halo.css" + "?timestamp=" + Math.round(new Date().getTime() / 1000)
} else {
style.href = "https://resource.ghzs.com/css/halo.css" + "?timestamp=" + Math.round(new Date().getTime() / 1000 / 1000)
style.href = "https://and-static.ghzs66.com/web/css/halo.css" + "?timestamp=" + Math.round(new Date().getTime() / 1000 / 1000)
}
document.head.appendChild(style)

View File

@ -4,6 +4,7 @@ import android.app.Activity
import android.app.Application
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.alibaba.android.arouter.launcher.ARouter
import com.gh.ad.AdDelegateHelper
import com.gh.common.util.FloatingBackViewManager
import com.gh.common.xapk.XapkInstaller
@ -14,7 +15,9 @@ import com.gh.gamecenter.SplashAdActivity
import com.gh.gamecenter.SplashScreenActivity
import com.gh.gamecenter.authorization.AuthorizationActivity
import com.gh.gamecenter.common.base.GlobalActivityManager
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.utils.PackageFlavorHelper
import com.gh.gamecenter.core.provider.IPushProvider
import com.gh.vspace.VHelper
import com.halo.assistant.HaloApp
@ -42,6 +45,14 @@ class GlobalActivityLifecycleObserver : Application.ActivityLifecycleCallbacks {
}
isFromBackgroundToForeground = false
}
if (activityCount == 1) {
// 清除桌面角标
if (activity !is SplashScreenActivity && activity !is AuthorizationActivity) {
val pushProvider = ARouter.getInstance().build(RouteConsts.provider.push).navigation() as? IPushProvider
pushProvider?.cleanBadgeNumber(activity.applicationContext)
}
}
}
override fun onActivityResumed(activity: Activity) {

View File

@ -45,7 +45,6 @@ import com.gh.gamecenter.login.user.LoginTag
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.login.user.UserRepository
import com.gh.gamecenter.login.utils.LoginHelper
import com.gh.gamecenter.login.utils.QuickLoginHelper
import com.gh.gamecenter.login.view.LoginActivity
import com.gh.gamecenter.personalhome.border.AvatarBorderActivity
import com.gh.gamecenter.setting.SettingBridge
@ -130,12 +129,12 @@ class DefaultJsApi(
@JavascriptInterface
fun login(msg: Any) {
if (SPUtils.getBoolean(Constants.SP_HAS_GET_PHONE_INFO) || NetworkUtils.isOpenMobileData(context)) {
QuickLoginHelper.startLogin(context, "浏览器")
} else {
// if (SPUtils.getBoolean(Constants.SP_HAS_GET_PHONE_INFO) || NetworkUtils.isOpenMobileData(context)) {
// QuickLoginHelper.startLogin(context, "浏览器")
// } else {
val intent = LoginActivity.getIntent(context, "浏览器")
context.startActivity(intent)
}
// }
}
@JavascriptInterface

View File

@ -57,8 +57,7 @@ public class Config {
public static final String WEIBO_APPKEY = BuildConfig.WEIBO_APPKEY;
public static final String QUICK_LOGIN_APPID = BuildConfig.QUICK_LOGIN_APPID;
public static final String QUICK_LOGIN_APPKEY = BuildConfig.QUICK_LOGIN_APPKEY;
// http://www.ghzs666.com/article/${articleId}.html
public static final String URL_ARTICLE = "http://www.ghzs666.com/article/"; // ghzs/ghzs666 统一
public static final String URL_ARTICLE = "www.ghzs666.com/article/"; // ghzs/ghzs666 统一
private static final String SETTINGS_KEY = "settingsKey";

View File

@ -22,34 +22,6 @@ class DirectProviderImpl : IDirectProvider {
DirectUtils.directToQqConversation(context, qq)
}
override fun directToCommodityDetail(context: Context, commodityId: String) {
DirectUtils.directToCommodityDetail(context, commodityId)
}
override fun directToEnergyRecord(context: Context) {
DirectUtils.directToEnergyRecord(context)
}
override fun directToEnergyRulePage(context: Context) {
DirectUtils.directToEnergyRulePage(context)
}
override fun directToInviteFriends(context: Context) {
DirectUtils.directToInviteFriends(context)
}
override fun directToExchangeRulePage(context: Context) {
DirectUtils.directToExchangeRulePage(context)
}
override fun directToExchangeCommodityPage(context: Context) {
DirectUtils.directToExchangeCommodityPage(context)
}
override fun directToLotteryParadisePage(context: Context) {
DirectUtils.directToLotteryParadisePage(context)
}
override fun directDouyin(context: Context, userId: String) {
DirectUtils.directDouyin(context, userId)
}
@ -97,26 +69,6 @@ class DirectProviderImpl : IDirectProvider {
DirectUtils.directToAmway(context, fixedTopAmwayCommentId, entrance, path)
}
override fun directToOrderCenter(context: Context) {
DirectUtils.directToOrderCenter(context)
}
override fun directToOrderDetail(context: Context, orderId: String) {
DirectUtils.directToOrderDetail(context, orderId)
}
override fun directToEnergyRecord(context: Context, position: Int) {
DirectUtils.directToEnergyRecord(context, position)
}
override fun directToMyPrizePage(context: Context) {
DirectUtils.directToMyPrizePage(context)
}
override fun directToWinOrderDetail(context: Context, orderId: String, activityId: String) {
DirectUtils.directToWinOrderDetail(context, orderId, activityId)
}
override fun directToQGame(context: Context) {
return DirectUtils.directToQGameHome(context)
}

View File

@ -1,17 +1,11 @@
package com.gh.common.util;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import com.gh.gamecenter.common.constant.EntranceConsts;
import com.gh.gamecenter.core.utils.CurrentActivityHolder;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.login.utils.QuickLoginHelper;
import com.gh.gamecenter.login.view.LoginActivity;
import com.gh.gamecenter.common.utils.NetworkUtils;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.login.user.UserManager;
import com.lightgame.utils.Utils;
@ -28,15 +22,15 @@ public class CheckLoginUtils {
LogUtils.login("dialog", null, entrance);
LogUtils.login("activity", null, entrance);
if (SPUtils.getBoolean(Constants.SP_HAS_GET_PHONE_INFO) || NetworkUtils.isOpenMobileData(context)) {
startQuickLogin(context, entrance);
} else {
// 有可能App未启动
Bundle bundle = new Bundle();
bundle.putString(EntranceConsts.KEY_ENTRANCE, entrance);
bundle.putString(EntranceConsts.KEY_TO, LoginActivity.class.getName());
EntranceUtils.jumpActivity(context, bundle);
}
// if (SPUtils.getBoolean(Constants.SP_HAS_GET_PHONE_INFO) || NetworkUtils.isOpenMobileData(context)) {
// startQuickLogin(context, entrance);
// } else {
// 有可能App未启动
Bundle bundle = new Bundle();
bundle.putString(EntranceConsts.KEY_ENTRANCE, entrance);
bundle.putString(EntranceConsts.KEY_TO, LoginActivity.class.getName());
EntranceUtils.jumpActivity(context, bundle);
// }
} else {
if (listener != null) {
listener.onLogin();
@ -44,16 +38,16 @@ public class CheckLoginUtils {
}
}
private static void startQuickLogin(Context context, String entrance) {
// 需要确保传入的 context 不为 application
if (!(context instanceof Activity)) {
context = CurrentActivityHolder.getCurrentActivity();
}
if (context != null) {
QuickLoginHelper.startLogin(context, entrance);
}
}
// private static void startQuickLogin(Context context, String entrance) {
// // 需要确保传入的 context 不为 application
// if (!(context instanceof Activity)) {
// context = CurrentActivityHolder.getCurrentActivity();
// }
//
// if (context != null) {
// QuickLoginHelper.startLogin(context, entrance);
// }
// }
public static void checkLogin(final Context context, Bundle nextToBundle, boolean isTriggerNextStep, String entrance, OnLoginListener listener) {
if (!isLogin()) {

View File

@ -1625,211 +1625,6 @@ object DirectUtils {
jumpActivityCompat(context, newBundle)
}
/**
* 跳转至商品详情
*/
@JvmStatic
fun directToCommodityDetail(context: Context, commodityId: String) {
var url: String = if (EnvHelper.isDevEnv) {
Constants.COMMODITY_DETAIL_ADDRESS_DEV
} else {
Constants.COMMODITY_DETAIL_ADDRESS
}
url = String.format(
Locale.CHINA,
"%s&shopid=%s&timestamp=%d",
url,
commodityId,
(Date().time / 1000 / 1000.toFloat()).roundToInt()
)
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至光能记录默认跳到光能记录第一个Tab
*/
@JvmStatic
fun directToEnergyRecord(context: Context) {
directToEnergyRecord(context, 0)
}
@JvmStatic
fun directToEnergyRecord(context: Context, position: Int) {
var url: String = if (EnvHelper.isDevEnv) {
Constants.ENERGY_RECORD_ADDRESS_DEV
} else {
Constants.ENERGY_RECORD_ADDRESS
}
url = String.format(
Locale.CHINA,
"%s&position=%s&timestamp=%d",
url,
position,
(Date().time / 1000 / 1000.toFloat()).roundToInt()
)
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至订单中心
*/
@JvmStatic
fun directToOrderCenter(context: Context) {
val url: String = if (EnvHelper.isDevEnv) {
Constants.ORDER_CENTER_ADDRESS_DEV
} else {
Constants.ORDER_CENTER_ADDRESS
}
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至订单详情
*/
@JvmStatic
fun directToOrderDetail(context: Context, orderId: String) {
var url: String = if (EnvHelper.isDevEnv) {
Constants.ORDER_DETAIL_ADDRESS_DEV
} else {
Constants.ORDER_DETAIL_ADDRESS
}
url = String.format(
Locale.CHINA,
"%s&order_id=%s&timestamp=%d",
url,
orderId,
(Date().time / 1000 / 1000.toFloat()).roundToInt()
)
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至邀请好友
*/
@JvmStatic
fun directToInviteFriends(context: Context) {
val url: String = if (EnvHelper.isDevEnv) {
Constants.INVITE_FRIENDS_ADDRESS_DEV
} else {
Constants.INVITE_FRIENDS_ADDRESS
}
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至等级页面
*/
@JvmStatic
fun directToLevelPage(context: Context) {
var url: String = if (isPublishEnv()) {
Constants.LEVEL_ADDRESS
} else {
Constants.LEVEL_ADDRESS_DEV
}
url = String.format(Locale.CHINA, "%s?timestamp=%d", url, (Date().time / 1000 / 1000.toFloat()).roundToInt())
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至兑换规则
*/
@JvmStatic
fun directToExchangeRulePage(context: Context) {
var url: String = if (isPublishEnv()) {
Constants.EXCHANGE_RULE_ADDRESS
} else {
Constants.EXCHANGE_RULE_ADDRESS_DEV
}
url = String.format(Locale.CHINA, "%s&timestamp=%d", url, (Date().time / 1000 / 1000.toFloat()).roundToInt())
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至光能规则
*/
@JvmStatic
fun directToEnergyRulePage(context: Context) {
var url: String = if (isPublishEnv()) {
Constants.ENERGY_RULE_ADDRESS
} else {
Constants.ENERGY_RULE_ADDRESS_DEV
}
url = String.format(Locale.CHINA, "%s&timestamp=%d", url, (Date().time / 1000 / 1000.toFloat()).roundToInt())
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至兑换商品
*/
@JvmStatic
fun directToExchangeCommodityPage(context: Context) {
var url: String = if (isPublishEnv()) {
Constants.EXCHANGE_COMMODITY_ADDRESS
} else {
Constants.EXCHANGE_COMMODITY_ADDRESS_DEV
}
url = String.format(Locale.CHINA, "%s&timestamp=%d", url, (Date().time / 1000 / 1000.toFloat()).roundToInt())
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至抽奖乐园
*/
@JvmStatic
fun directToLotteryParadisePage(context: Context) {
var url: String = if (isPublishEnv()) {
Constants.LOTTERY_PARADISE_ADDRESS
} else {
Constants.LOTTERY_PARADISE_ADDRESS_DEV
}
url = String.format(Locale.CHINA, "%s&timestamp=%d", url, (Date().time / 1000 / 1000.toFloat()).roundToInt())
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至我的奖品
*/
@JvmStatic
fun directToMyPrizePage(context: Context) {
var url: String = if (isPublishEnv()) {
Constants.MY_PRIZE_ADDRESS
} else {
Constants.MY_PRIZE_ADDRESS_DEV
}
url = String.format(Locale.CHINA, "%s&timestamp=%d", url, (Date().time / 1000 / 1000.toFloat()).roundToInt())
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至中奖订单详情
*/
@JvmStatic
fun directToWinOrderDetail(context: Context, orderId: String, activityId: String) {
var url: String = if (isPublishEnv()) {
Constants.WIN_ORDER_DETAIL_ADDRESS
} else {
Constants.WIN_ORDER_DETAIL_ADDRESS_DEV
}
url = String.format(
Locale.CHINA,
"%s&order_id=%s&activity_id=%s&timestamp=%d",
url,
orderId,
activityId,
(Date().time / 1000 / 1000.toFloat()).roundToInt()
)
directToFullScreenWebPage(context, url, true)
}
/**
* 跳转至地址信息

View File

@ -35,8 +35,6 @@ object HomeBottomBarHelper {
text = "游戏库",
name = "游戏库",
position = 2,
iconSelect = "https://resource.ghzs.com/image/game/library/entrance/5e183202913fbd002c75f247.png",
iconUnselect = "https://resource.ghzs.com/image/game/library/entrance/5e1831fd913fbd003024641e.png",
animationCode = animationCode,
default = false,
display = Display()

View File

@ -80,7 +80,7 @@ object BrowserInstallHelper {
Base64.encodeToString(URLEncoder.encode(downloadUrl).trim().toByteArray(), Base64.NO_WRAP)
DirectUtils.directToExternalBrowser(
mContext,
"https://down-and.ghzs.com/redirect?location=base64($encodedString)"
"https://down-and.ghzs6.com/redirect?location=base64($encodedString)"
)
} else {
DirectUtils.directToExternalBrowser(mContext, downloadUrl)

View File

@ -98,7 +98,6 @@ import com.gh.gamecenter.feature.utils.PlatformUtils;
import com.gh.gamecenter.home.custom.model.CustomPageShareRepository;
import com.gh.gamecenter.home.skip.PackageSkipActivity;
import com.gh.gamecenter.login.user.UserManager;
import com.gh.gamecenter.login.utils.QuickLoginHelper;
import com.gh.gamecenter.manager.DataCollectionManager;
import com.gh.gamecenter.packagehelper.PackageViewModel;
import com.gh.gamecenter.retrofit.RetrofitManager;
@ -319,8 +318,7 @@ public class MainActivity extends BaseActivity {
mMainWrapperViewModel.requestAllDialogData();
// TODO 去掉一键登录?
QuickLoginHelper.getPhoneInfo();
// QuickLoginHelper.getPhoneInfo();
// TODO 搞清楚为什么这里要获取微信相关配置
WechatBindHelper.getWechatConfig(null);
@ -558,7 +556,10 @@ public class MainActivity extends BaseActivity {
} else {
TextView jumpBtn = findViewById(R.id.jumpBtn);
jumpBtn.setText(String.format(Locale.CHINA, "跳过 %d", COUNTDOWN_MAX_COUNT - mCountdownCount));
mBaseHandler.sendEmptyMessageDelayed(COUNTDOWN_AD, 1000);
Message newMsg = Message.obtain();
newMsg.what = COUNTDOWN_AD;
newMsg.obj = msg.obj;
mBaseHandler.sendMessageDelayed(newMsg, 1000);
}
}
}

View File

@ -111,7 +111,7 @@ public class ShareCardActivity extends ToolBarActivity {
String qrBody;
if (!TextUtils.isEmpty(newsId)) {
qrBody = "http://www.ghzs666.com/article/" + newsId + ".html?source=appshare200";
qrBody = "https://www.ghzs666.com/article/" + newsId + ".html?source=appshare200";
} else {
qrBody = "https://www.ghzs.com/?source=appshare200";
}

View File

@ -166,7 +166,7 @@ public class ShareCardPicActivity extends ToolBarActivity {
String qrBody;
if (!TextUtils.isEmpty(newsId)) {
qrBody = "http://www.ghzs666.com/article/" + newsId + ".html?source=appshare200";
qrBody = "https://www.ghzs666.com/article/" + newsId + ".html?source=appshare200";
} else {
qrBody = "https://www.ghzs.com/?source=appshare200";
}

View File

@ -34,6 +34,8 @@ import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.feature.utils.PlatformUtils
import com.gh.gamecenter.pkg.PkgHelper
import com.halo.assistant.HaloApp
import com.lightgame.download.FileUtils
import com.yl.lib.sentry.hook.PrivacySentry
import org.json.JSONObject
import splitties.systemservices.notificationManager
import java.text.SimpleDateFormat
@ -154,6 +156,8 @@ class SplashScreenActivity : BaseActivity() {
private fun showPrivacyDialog() {
NewPrivacyPolicyDialogFragment.show(this, null) { isSuccess: Boolean ->
if (isSuccess) {
PrivacySentry.Privacy.updatePrivacyShow()
mShouldPrefetchData = false
prefetchData()

View File

@ -89,7 +89,7 @@ class AuthorizationActivity : ToolBarActivity() {
}
private fun initData() {
if (mToken.isNotEmpty()) return
if (mToken.isNotEmpty() || isFinishing) return
val loadingDialog = DialogUtils.showWaitDialog(this, "请稍后...")
mViewModel.getAccessToken(listOf(mContent), {
mToken = it

View File

@ -413,7 +413,7 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At
val shareUrl = if (isPublishEnv()) {
"https://m.ghzs666.com/video/${it.id}"
} else {
"https://resource.ghzs.com/page/video_play/video/video.html?video=${it.id}"
"https://dev-and-static.ghzs66.com/page/video_play/video/video.html?video=${it.id}"
}
val additionalParams = AdditionalParamsEntity().apply {
contentType = "视频帖"

View File

@ -45,6 +45,12 @@ class UpdateDialogFragment : BaseDialogFragment() {
private var mIsDisplayingDownloadingStyle = false // 是否正在显示更新中样式
private val mDataWatcher = object : DataWatcher() {
override fun onDataInit(downloadEntity: DownloadEntity) {
super.onDataInit(downloadEntity)
onDataChanged(downloadEntity)
}
override fun onDataChanged(downloadEntity: DownloadEntity) {
if (downloadEntity.name.contains("光环助手")) {
if (mIsDisplayingDownloadingStyle) {
@ -74,13 +80,11 @@ class UpdateDialogFragment : BaseDialogFragment() {
return
}
DownloadManager.getInstance().addObserver(mDataWatcher)
mUpdateEntity = arguments?.getParcelable(UPDATE_ENTITY)
}
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
showUpdateHintStyle(requireContext(), mUpdateEntity!!)
showUpdateHintStyle(requireContext(), mUpdateEntity!!, true)
return mBinding.root
}
@ -109,8 +113,14 @@ class UpdateDialogFragment : BaseDialogFragment() {
mDismissCallback?.onCallback()
}
override fun onDestroyView() {
super.onDestroyView()
override fun onStart() {
super.onStart()
DownloadManager.getInstance().addObserver(mDataWatcher)
}
override fun onStop() {
super.onStop()
DownloadManager.getInstance().removeObserver(mDataWatcher)
}
@ -120,7 +130,9 @@ class UpdateDialogFragment : BaseDialogFragment() {
* @param context 上下文
* @param updateEntity 更新实体
*/
private fun showUpdateHintStyle(context: Context, updateEntity: AppEntity) {
private fun showUpdateHintStyle(context: Context,
updateEntity: AppEntity,
invokeByViewCreated: Boolean) {
mIsDisplayingDownloadingStyle = false
val updateHintBinding = mBinding.updateHintContainerView
@ -200,12 +212,15 @@ class UpdateDialogFragment : BaseDialogFragment() {
)
}
SensorsBridge.trackVersionUpdateDialogShow(
keyDialogReminderTime = mUpdateEntity?.alert,
keyDialogClose = if (mUpdateEntity?.isForce == true) "关闭且强退" else "仅关闭"
)
if (invokeByViewCreated) {
SensorsBridge.trackVersionUpdateDialogShow(
keyDialogReminderTime = mUpdateEntity?.alert,
keyDialogClose = if (mUpdateEntity?.isForce == true) "关闭且强退" else "仅关闭"
)
DataLogUtils.uploadUpgradeLog(context, "notice") //上传更新通知弹窗数据
}
DataLogUtils.uploadUpgradeLog(context, "notice") //上传更新通知弹窗数据
}
/**
@ -294,13 +309,8 @@ class UpdateDialogFragment : BaseDialogFragment() {
if (DownloadStatus.done == downloadEntity.status) {
DownloadManager.getInstance().cancel(downloadEntity.url, false, true, false)
try {
dismiss()
} catch (ignored: IllegalArgumentException) {
// do nothing
}
if (updateEntity.isForce) {
AppExecutor.uiExecutor.executeWithDelay({ UpdateHelper.exitApp() }, 1000L)
tryWithDefaultCatch {
showUpdateHintStyle(requireContext(), updateEntity, false)
}
} else if (DownloadStatus.neterror == downloadEntity.status) {
ToastUtils.toast("网络错误,请稍后重试")

View File

@ -282,10 +282,10 @@ class RatingEditActivity : ToolBarActivity(), KeyboardHeightObserver {
}
}
mBinding.mWebView.addJavascriptObject(DefaultJsApi(this), null)
val url = if ("internal" == BuildConfig.FLAVOR) {
"https://resource.ghzs.com/page/comment_tag_editor_dev/index.html?timestamp=${System.currentTimeMillis()}"
val url = if (PackageFlavorHelper.IS_TEST_FLAVOR) {
"https://dev-and-static.ghzs66.com/page/comment_tag_editor/index.html?timestamp=${System.currentTimeMillis()}"
} else {
"https://resource.ghzs.com/page/comment_tag_editor/index.html?timestamp=${System.currentTimeMillis()}"
"https://and-static.ghzs66.com/page/comment_tag_editor/index.html?timestamp=${System.currentTimeMillis()}"
}
mBinding.mWebView.loadUrl(url)
}

View File

@ -90,9 +90,6 @@ class UserHomeFragment : ToolbarFragment() {
getUserInfo()
getBadgeList()
getUserPlayedGameCount()
if (PackageFlavorHelper.IS_TEST_FLAVOR) {
getUserLevel()
}
}
mHomeBinding?.container?.setZoomView(mHomeBinding?.userBackgroundContainer)
@ -167,38 +164,12 @@ class UserHomeFragment : ToolbarFragment() {
if (mUserHomeViewModel.userId == UserManager.getInstance().userId) {
mUserHomeViewModel.availableBadges()
}
// if (mUserHomeViewModel.userId == UserManager.getInstance().userId) {
// mUserHomeViewModel.availableBadges()
// } else {
// mHomeBinding?.userBadgeTips?.visibility = View.VISIBLE
// if (it.isNotEmpty()) {
// mHomeBinding?.userBadge?.visibility = View.VISIBLE
// updateUserBadge(it)
// } else {
// mHomeBinding?.userBadge?.visibility = View.GONE
// }
// }
}
mUserHomeViewModel.availableBadgeCount.observeNonNull(this) {
mHomeBinding?.badgeTips?.visibility = if (it > 0) View.VISIBLE else View.GONE
}
// mUserHomeViewModel.availableBadgeCount.observeNonNull(this) {
// mHomeBinding?.viewBadgeMessageTip?.visibleIf(it > 0)
// if (mUserHomeViewModel.badges.value?.isEmpty() == true && it > 0) {
// mHomeBinding?.userBadgeList?.visibility = View.INVISIBLE
// mHomeBinding?.userBadgeTips?.visibility = View.VISIBLE
// mHomeBinding?.userBadgeTips?.text = "有${it}枚徽章可领取"
// } else if (mUserHomeViewModel.badges.value?.isEmpty() == false) {
// mHomeBinding?.userBadgeList?.visibility = View.VISIBLE
// mHomeBinding?.userBadgeTips?.visibility = View.GONE
// updateUserBadge(mUserHomeViewModel.badges.value!!)
// }
// }
mUserHomeViewModel.networkError.observeNonNull(this) {
mHomeBinding?.container?.visibility = View.GONE
mHomeBinding?.reuseNoConnection?.root?.visibility = View.VISIBLE
@ -214,28 +185,10 @@ class UserHomeFragment : ToolbarFragment() {
mPlayGameCount = it
})
mUserHomeViewModel.level.observeNonNull(this) {
mHomeBinding?.run {
levelContainer.visibility = View.VISIBLE
levelContainer.setOnClickListener {
if (mUserHomeViewModel.userId == UserManager.getInstance().userId) {
IntegralLogHelper.run {
log("click_grade_label", LOCATION)
log("view_grade", "等级中心页")
}
DirectUtils.directToLevelPage(requireContext())
}
}
val levelNum = if (it > 9) 9 else it
levelTv.text = "Lv$levelNum "
}
}
mMessageUnreadViewModel.liveData.observeNonNull(this) {
updateUnreadInfo(it)
}
mUserViewModel.editObsUserinfo.observeNonNull(this) {
it.data?.let { updatedUserInfo ->
if (mUserHomeViewModel.userId == UserManager.getInstance().userId) {
@ -542,7 +495,6 @@ class UserHomeFragment : ToolbarFragment() {
// 跳转更换背景页
userChangeBgBtn.setOnClickListener {
IntegralLogHelper.log("click_change _background", LOCATION)
SPUtils.setBoolean(Constants.SP_HAS_CLICK_CHANGE_BG, false)
changeBgTips.visibility = View.GONE
startActivity(PersonalityBackgroundActivity.getIntent(requireContext()))

View File

@ -33,7 +33,6 @@ class UserHomeViewModel(application: Application, var userId: String) : AndroidV
var availableBadge = MutableLiveData<BadgeEntity>()
var availableBadgeCount = MutableLiveData<Int>()
var playGamesCount = MutableLiveData<Int>()
var level = MutableLiveData<Int>()
fun getUserInfo() {
RetrofitManager.getInstance()
@ -133,19 +132,6 @@ class UserHomeViewModel(application: Application, var userId: String) : AndroidV
})
}
@SuppressLint("CheckResult")
fun getUserLevel() {
RetrofitManager.getInstance()
.api.getUserLevels(userId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : BiResponse<JsonObject>() {
override fun onSuccess(data: JsonObject) {
level.postValue(data["level"].asInt)
}
})
}
@SuppressLint("CheckResult")
fun postReport(reason: String, desc: String) {
val requestMap = hashMapOf<String, String>()

View File

@ -56,13 +56,13 @@ object ArticleDetailWebCacheManager {
}
val cacheUrlList = mutableListOf(
"https://static-web.ghzs.com/website-static/lib/polyfill.min.js",
"https://and-static.ghzs.com/web/dplayer/DPlayer.min.js"
"https://and-static.ghzs66.com/web/website-static/lib/polyfill.min.js",
"https://and-static.ghzs66.com/web/dplayer/DPlayer.min.js"
)
if (!EnvHelper.isDevEnv) {
cacheUrlList.add("https://resource.ghzs.com/js/halo.js")
cacheUrlList.add("https://resource.ghzs.com/css/halo.css")
cacheUrlList.add("https://and-static.ghzs66.com/web/js/halo.js")
cacheUrlList.add("https://and-static.ghzs66.com/web/css/halo.css")
}
val okHttpClient = OkHttpClient.Builder()
@ -73,7 +73,7 @@ object ArticleDetailWebCacheManager {
val retrofit = Retrofit.Builder()
.client(okHttpClient)
.baseUrl("https://resource.ghzs.com")
.baseUrl("https://and-static.ghzs66.com")
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.build()

View File

@ -27,7 +27,7 @@ class EditorInsertEntity(
entity.type = "answer"
entity.title = answer.questions.title?.eliminateDoubleQuote()
entity.brief = answer.brief?.eliminateDoubleQuote()
entity.icon = "http://static-web.ghzs.com/website-static/images/icon_new_reply.png"
entity.icon = "https://and-static.ghzs66.com/web/website-static/images/icon_new_reply.png"
return entity
}
@ -39,7 +39,7 @@ class EditorInsertEntity(
entity.type = "community_article"
entity.title = article.title.eliminateDoubleQuote()
entity.brief = article.brief.eliminateDoubleQuote()
entity.icon = "http://static-web.ghzs.com/website-static/images/icon_new_article.png"
entity.icon = "https://and-static.ghzs66.com/web/website-static/images/icon_new_article.png"
return entity
}
@ -60,7 +60,7 @@ class EditorInsertEntity(
entity.type = "game_collection"
entity.title = game.title
entity.brief = game.intro
entity.icon = "https://static-web.ghzs.com/website-static/images/icon_game_collection.png"
entity.icon = "https://and-static.ghzs66.com/web/website-static/images/icon_game_collection.png"
return entity
}
@ -71,7 +71,7 @@ class EditorInsertEntity(
entity.type = "video"
entity.title = video.title
entity.brief = video.des
entity.icon = "https://static-web.ghzs.com/website-static/images/icon_video.png"
entity.icon = "https://and-static.ghzs66.com/web/website-static/images/icon_video.png"
return entity
}
}

View File

@ -408,7 +408,7 @@ class ForumTopVideoView @JvmOverloads constructor(context: Context, attrs: Attri
shareUrl = if (isPublishEnv()) {
"https://m.ghzs666.com/video/${it.id}"
} else {
"https://resource.ghzs.com/page/video_play/video/video.html?video=${it.id}"
"https://dev-and-static.ghzs66.com/page/video_play/video/video.html?video=${it.id}"
},
shareIcon = it.poster,
shareTitle = it.title,

View File

@ -2287,12 +2287,6 @@ public interface ApiService {
@POST("users/{user_id}:report")
Single<ResponseBody> reportUser(@Path("user_id") String userId, @Body RequestBody body);
/**
* 获取用户等级
*/
@GET("users/{user_id}/levels")
Single<JsonObject> getUserLevels(@Path("user_id") String userId);
/**
* 获取新分类2.0侧边栏
*/

View File

@ -358,7 +358,7 @@ class DetailPlayerView @JvmOverloads constructor(context: Context, attrs: Attrib
mBinding.censoringContainer.setOnClickListener {
DirectUtils.directToWebView(
context,
"https://resource.ghzs.com/page/video_rule/video_rule.html",
context.getString(R.string.upload_protocol_url),
mEntrance
)
}

View File

@ -211,7 +211,7 @@ class MainWrapperRepository {
// 如果有优先级更高的选中 tab id则将优先级更高的选中 tab 设置为 default
if (mHighPrioritySelectedTopTabId.isNotEmpty() && mHighPrioritySelectedNavId == multiTabNav?.id) {
val selectedTab = multiTabNav.linkMultiTabNav.firstOrNull {
it.link?.link == mHighPrioritySelectedTopTabId
it.id == mHighPrioritySelectedTopTabId
}
// 将优先级更高的选中 tab 设置为 default
@ -225,7 +225,7 @@ class MainWrapperRepository {
defaultCustomPageId =
multiTabNav?.linkMultiTabNav?.find { it.link?.type == ViewPagerFragmentHelper.TYPE_CUSTOM_PAGE && it.default }?.link?.link ?: ""
multiTabNavLiveData.postValue(multiTabNav)
multiTabNavLiveData.value = multiTabNav
}
companion object : SingletonHolder<MainWrapperRepository>({ MainWrapperRepository() })

View File

@ -13,6 +13,7 @@ import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.TextView
import androidx.core.graphics.ColorUtils
import androidx.core.view.doOnLayout
import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams
import com.gh.common.constant.Config
@ -402,7 +403,9 @@ class SearchToolbarTabWrapperFragment : BaseTabWrapperFragment(), ISearchToolbar
val selectTab = it.getContentWithHandled()
if (selectTab is MainSelectedEvent.SelectedTab) {
if (selectTab.topTabIndex != -1) {
mViewPager?.setCurrentItem(selectTab.topTabIndex, false)
mViewPager?.doOnLayout {
mViewPager?.setCurrentItem(selectTab.topTabIndex, false)
}
}
}
}

View File

@ -85,6 +85,8 @@ import com.lightgame.utils.Utils;
import com.llew.huawei.verifier.LoadedApkHuaWei;
import com.shuyu.gsyvideoplayer.cache.CacheFactory;
import com.shuyu.gsyvideoplayer.player.PlayerFactory;
import com.yl.lib.sentry.hook.PrivacySentry;
import com.yl.lib.sentry.hook.PrivacySentryBuilder;
import java.util.List;
import java.util.ServiceLoader;
@ -617,6 +619,24 @@ public class HaloApp extends MultiDexApplication {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
// 完成功能的初始化
PrivacySentryBuilder builder = new PrivacySentryBuilder()
// 自定义文件结果的输出名
.configResultFileName("buyer_privacy")
// debug打开可以看到logcat的堆栈日志
.syncDebug(true)
// 配置写入文件日志 , 线上包这个开关不要打开true打开文件输入false关闭文件输入
.enableFileResult(true)
// 持续写入文件30分钟
.configWatchTime(30 * 60 * 1000)
// 文件输出后的回调
.configResultCallBack(s -> {
});
// 添加默认结果输出包含log输出和文件输出
PrivacySentry.Privacy.INSTANCE.init(this, builder);
for (IApplication application : mApplicationList) {
application.attachBaseContext();
}

View File

@ -118,7 +118,7 @@ class RealNameInfoFragment : ToolbarFragment() {
) {
DirectUtils.directToWebView(
requireContext(),
"https://resource.ghzs.com/page/privacy_policies/Identity_information.html",
"https://and-static.ghzs66.com/page/privacy_policies/Identity_information.html",
"(实名认证)"
)
}

View File

@ -153,7 +153,7 @@ class UserInfoFragment : ToolbarFragment() {
MtaHelper.onEvent("个人主页详情", "个人中心", "账号安全指南")
DirectUtils.directToWebView(
requireContext(),
"https://resource.ghzs.com/page/guide_page/safety_guide.html",
"https://and-static.ghzs66.com/page/guide_page/safety_guide.html",
"(个人中心)"
)
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

View File

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="12dp"
android:height="6dp"
android:viewportWidth="12"
android:viewportHeight="6">
<path
android:strokeWidth="1"
android:pathData="M10,1L6,5L2,1"
android:strokeLineJoin="round"
android:fillColor="#00000000"
android:strokeColor="@color/text_neutral"
android:strokeLineCap="round"/>
</vector>

View File

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="8dp"
android:height="6dp"
android:viewportWidth="8"
android:viewportHeight="6">
<path
android:strokeWidth="1"
android:pathData="M7,1.5L4,4.5L1,1.5"
android:strokeLineJoin="round"
android:fillColor="#00000000"
android:strokeColor="@color/text_neutral"
android:strokeLineCap="round"/>
</vector>

View File

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="6dp"
android:height="12dp"
android:viewportWidth="6"
android:viewportHeight="12">
<path
android:strokeWidth="1"
android:pathData="M1,2L5,6L1,10"
android:strokeLineJoin="round"
android:fillColor="#00000000"
android:strokeColor="@color/text_neutral"
android:strokeLineCap="round"/>
</vector>

View File

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="5dp"
android:height="8dp"
android:viewportWidth="5"
android:viewportHeight="8">
<path
android:strokeWidth="1"
android:pathData="M1,1L4,4L1,7"
android:strokeLineJoin="round"
android:fillColor="#00000000"
android:strokeColor="@color/text_neutral"
android:strokeLineCap="round"/>
</vector>

View File

@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="12dp"
android:height="12dp"
android:viewportWidth="12"
android:viewportHeight="12">
<group>
<clip-path
android:pathData="M0,0h12v12h-12z"/>
<path
android:pathData="M1.646,1.646C1.842,1.451 2.158,1.451 2.354,1.646L6,5.293L9.646,1.646C9.842,1.451 10.158,1.451 10.354,1.646C10.549,1.842 10.549,2.158 10.354,2.354L6.707,6L10.354,9.646C10.549,9.842 10.549,10.158 10.354,10.354C10.158,10.549 9.842,10.549 9.646,10.354L6,6.707L2.354,10.354C2.158,10.549 1.842,10.549 1.646,10.354C1.451,10.158 1.451,9.842 1.646,9.646L5.293,6L1.646,2.354C1.451,2.158 1.451,1.842 1.646,1.646Z"
android:fillColor="@color/text_neutral"
android:fillType="evenOdd"/>
</group>
</vector>

View File

@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="8dp"
android:height="8dp"
android:viewportWidth="8"
android:viewportHeight="8">
<group>
<clip-path
android:pathData="M0,0h8v8h-8z"/>
<path
android:pathData="M0.6464,0.6465C0.8417,0.4512 1.1583,0.4512 1.3535,0.6465L4,3.2929L6.6465,0.6465C6.8417,0.4512 7.1583,0.4512 7.3535,0.6465C7.5488,0.8417 7.5488,1.1583 7.3535,1.3536L4.7071,4L7.3535,6.6465C7.5488,6.8417 7.5488,7.1583 7.3535,7.3536C7.1583,7.5488 6.8417,7.5488 6.6465,7.3536L4,4.7071L1.3535,7.3536C1.1583,7.5488 0.8417,7.5488 0.6464,7.3536C0.4512,7.1583 0.4512,6.8417 0.6464,6.6465L3.2929,4L0.6464,1.3536C0.4512,1.1583 0.4512,0.8417 0.6464,0.6465Z"
android:fillColor="@color/text_neutral"
android:fillType="evenOdd"/>
</group>
</vector>

View File

@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="12dp"
android:height="12dp"
android:viewportWidth="12"
android:viewportHeight="12">
<group>
<clip-path
android:pathData="M0,0h12v12h-12z"/>
<path
android:pathData="M6,1C6.276,1 6.5,1.224 6.5,1.5V5.5H10.5C10.776,5.5 11,5.724 11,6C11,6.276 10.776,6.5 10.5,6.5H6.5V10.5C6.5,10.776 6.276,11 6,11C5.724,11 5.5,10.776 5.5,10.5V6.5H1.5C1.224,6.5 1,6.276 1,6C1,5.724 1.224,5.5 1.5,5.5H5.5V1.5C5.5,1.224 5.724,1 6,1Z"
android:fillColor="@color/text_neutral"
android:fillType="evenOdd"/>
</group>
</vector>

View File

@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="8dp"
android:height="8dp"
android:viewportWidth="8"
android:viewportHeight="8">
<group>
<clip-path
android:pathData="M0,0h8v8h-8z"/>
<path
android:pathData="M4,0C4.2761,0 4.5,0.2239 4.5,0.5V3.5H7.5C7.7761,3.5 8,3.7239 8,4C8,4.2761 7.7761,4.5 7.5,4.5H4.5V7.5C4.5,7.7761 4.2761,8 4,8C3.7239,8 3.5,7.7761 3.5,7.5V4.5H0.5C0.2239,4.5 0,4.2761 0,4C0,3.7239 0.2239,3.5 0.5,3.5H3.5V0.5C3.5,0.2239 3.7239,0 4,0Z"
android:fillColor="@color/text_neutral"
android:fillType="evenOdd"/>
</group>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="8dp"
android:height="8dp"
android:viewportWidth="8"
android:viewportHeight="8">
<path
android:pathData="M6.4395,2C7.0684,2 7.418,2.7274 7.0252,3.2185L4.5856,6.2679C4.2854,6.6432 3.7146,6.6432 3.4144,6.2679L0.9748,3.2185C0.582,2.7274 0.9316,2 1.5605,2H6.4395Z"
android:fillColor="@color/text_neutral"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="8dp"
android:height="8dp"
android:viewportWidth="8"
android:viewportHeight="8">
<path
android:pathData="M6.4395,6C7.0684,6 7.418,5.2726 7.0252,4.7815L4.5856,1.7321C4.2854,1.3568 3.7146,1.3568 3.4144,1.7321L0.9748,4.7815C0.582,5.2726 0.9316,6 1.5605,6H6.4395Z"
android:fillColor="@color/text_neutral"/>
</vector>

View File

@ -122,41 +122,6 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/user_name">
<LinearLayout
android:id="@+id/levelContainer"
android:layout_width="wrap_content"
android:layout_height="16dp"
android:layout_marginRight="8dp"
android:background="@drawable/bg_user_level"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:src="@drawable/ic_level" />
<TextView
android:id="@+id/levelTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:paddingLeft="1dp"
android:textColor="@color/white"
android:textSize="10sp"
android:textStyle="bold|italic"
tools:text="Lv0" />
<ImageView
android:layout_width="6dp"
android:layout_height="8dp"
android:src="@drawable/ic_user_more" />
</LinearLayout>
<RelativeLayout
android:id="@+id/badge_container"
android:layout_width="wrap_content"

View File

@ -197,9 +197,9 @@
<string name="concern_cancel_failure">取消失敗,請稍後再試</string>
<string name="third_party_sdk_title">光環助手接入第三方SDK目錄</string>
<string name="third_party_sdk_statement_url">https://resource.ghzs.com/page/third_party_sdk/index.html</string>
<string name="third_party_sdk_statement_url">https://and-static.ghzs66.com/page/third_party_sdk/index.html</string>
<string name="comment_rules_title">光環助手評論規則</string>
<string name="comment_rules_url">https://resource.ghzs.com/page/rule_page/comment_rules.html</string>
<string name="comment_rules_url">https://and-static.ghzs66.com/page/rule_page/comment_rules.html</string>
<string name="collection_cancel">取消收藏</string>
<string name="collection_cancel_failure">取消收藏失敗</string>
<string name="collection_success">收藏成功</string>
@ -307,14 +307,14 @@
<string name="share_news_article_url">https://m.ghzs666.com/article/%1$s</string>
<string name="comment_hide_hint">該內容已被刪除</string>
<string name="personal_home_rating_command">%1$s 在 <Data><![CDATA[<font color="#1383EB">%2$s</font>]]></Data> 發表了評論</string>
<string name="upload_game_policy_url">https://resource.ghzs.com/page/game_rule/game_rule.html</string>
<string name="info_list_url">https://resource.ghzs.com/page/privacy_policies/Personal_information_collection_list.html</string>
<string name="sdk_list_url">https://resource.ghzs.com/page/privacy_policies/sdk_directory.html</string>
<string name="permission_and_usage_url">https://resource.ghzs.com/page/privacy_policies/Permission_Usage.html</string>
<string name="upload_game_policy_url">https://and-static.ghzs66.com/page/game_rule/game_rule.html</string>
<string name="info_list_url">https://and-static.ghzs66.com/page/privacy_policies/Personal_information_collection_list.html</string>
<string name="sdk_list_url">https://and-static.ghzs66.com/page/privacy_policies/sdk_directory.html</string>
<string name="permission_and_usage_url">https://and-static.ghzs66.com/page/privacy_policies/Permission_Usage.html</string>
<string name="children_policy_url">https://resource.junrui66.com/page/privacy_policies/Child_privacy_statement_GA.html</string>
<string name="community_rule_title">問答版塊規則</string>
<string name="community_rule_url">https://resource.ghzs.com/page/section_rule/section_rule.html</string>
<string name="community_rule_url">https://and-static.ghzs66.com/page/section_rule/section_rule.html</string>
<string name="upload_protocol">我已閱讀並同意《視頻上傳服務準則》</string>
@ -327,7 +327,7 @@
<string name="upload_game_category_hint">分類<Data><![CDATA[<font color="#ff4147">*</font>]]></Data></string>
<string name="upload_game_video_source_hint">視頻來源<Data><![CDATA[<font color="#ff4147">*</font>]]></Data></string>
<string name="upload_protocol_url"> https://resource.ghzs.com/page/video_rule/video_rule.html</string>
<string name="upload_protocol_url"> https://and-static.ghzs66.com/page/video_rule/video_rule.html</string>
<string name="upload_protocol_title">視頻上傳服務準則</string>
<string name="video_upload_draft_dialog_content">草稿保存之後會關閉視頻上傳頁面!下次可在<Data><![CDATA[<font color="#151515"><b>視頻投稿-草稿箱</b></font>]]></Data>中繼續上傳</string>

View File

@ -199,9 +199,9 @@
<string name="concern_cancel_failure">取消失败,请稍后再试</string>
<string name="third_party_sdk_title">光环助手接入第三方SDK目录</string>
<string name="third_party_sdk_statement_url">https://resource.ghzs.com/page/third_party_sdk/index.html</string>
<string name="third_party_sdk_statement_url">https://and-static.ghzs66.com/page/third_party_sdk/index.html</string>
<string name="comment_rules_title">光环助手评论规则</string>
<string name="comment_rules_url">https://resource.ghzs.com/page/rule_page/comment_rules.html</string>
<string name="comment_rules_url">https://and-static.ghzs66.com/page/rule_page/comment_rules.html</string>
<string name="collection_cancel">取消收藏</string>
<string name="collection_cancel_failure">取消收藏失败</string>
<string name="collection_success">收藏成功</string>
@ -309,14 +309,14 @@
<string name="share_news_article_url">https://m.ghzs666.com/article/%1$s</string>
<string name="comment_hide_hint">该内容已被删除</string>
<string name="personal_home_rating_command">%1$s 在 <Data><![CDATA[<font color="#1383EB">%2$s</font>]]></Data> 发表了评论</string>
<string name="upload_game_policy_url">https://resource.ghzs.com/page/game_rule/game_rule.html</string>
<string name="info_list_url">https://resource.ghzs.com/page/privacy_policies/Personal_information_collection_list.html</string>
<string name="sdk_list_url">https://resource.ghzs.com/page/privacy_policies/sdk_directory.html</string>
<string name="permission_and_usage_url">https://resource.ghzs.com/page/privacy_policies/Permission_Usage.html</string>
<string name="children_policy_url">https://resource.ghzs.com/page/privacy_policies/Child_privacy_statement.html</string>
<string name="upload_game_policy_url">https://and-static.ghzs66.com/page/game_rule/game_rule.html</string>
<string name="info_list_url">https://and-static.ghzs66.com/page/privacy_policies/Personal_information_collection_list.html</string>
<string name="sdk_list_url">https://and-static.ghzs66.com/page/privacy_policies/sdk_directory.html</string>
<string name="permission_and_usage_url">https://and-static.ghzs66.com/page/privacy_policies/Permission_Usage.html</string>
<string name="children_policy_url">https://and-static.ghzs66.com/page/privacy_policies/Child_privacy_statement.html</string>
<string name="community_rule_title">问答版块规则</string>
<string name="community_rule_url">https://resource.ghzs.com/page/section_rule/section_rule.html</string>
<string name="community_rule_url">https://and-static.ghzs66.com/page/section_rule/section_rule.html</string>
<string name="upload_protocol">我已阅读并同意《视频上传服务准则》</string>
@ -329,7 +329,7 @@
<string name="upload_game_category_hint">分类<Data><![CDATA[<font color="#ff4147">*</font>]]></Data></string>
<string name="upload_game_video_source_hint">视频来源<Data><![CDATA[<font color="#ff4147">*</font>]]></Data></string>
<string name="upload_protocol_url"> https://resource.ghzs.com/page/video_rule/video_rule.html</string>
<string name="upload_protocol_url"> https://and-static.ghzs66.com/page/video_rule/video_rule.html</string>
<string name="upload_protocol_title">视频上传服务准则</string>
<string name="video_upload_draft_dialog_content">草稿保存之后会关闭视频上传页面!下次可在<Data><![CDATA[<font color="#151515"><b>视频投稿-草稿箱</b></font>]]></Data>中继续上传</string>

View File

@ -16,6 +16,7 @@ buildscript {
dependencies {
classpath "com.android.tools.build:gradle:7.1.3"
classpath 'com.github.allenymt.PrivacySentry:plugin-sentry:1.3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// 使用了 1.2.21 在蓝叠模拟器上无法进入首页? 但是不使用又会出现触发 V3 签名...
classpath 'io.github.leon406:AndResGuard-gradle-plugin:1.2.23'

View File

@ -2,7 +2,7 @@ ext {
//Android
buildToolsVersion = "30.0.3"
compileSdkVersion = 34
minSdkVersion = 16
minSdkVersion = 21
targetSdkVersion = 30
@ -125,11 +125,11 @@ ext {
composeCompilerVersion = "1.3.2"
constraintlayoutCompose = "1.0.1"
sensorsDataVersion = "6.7.10"
sensorsDataVersion = "6.8.0"
documentfile = "1.0.1"
csjVersion = "5.6.2.0"
csjVersion = "5.8.0.4.0"
qGameVersion = "1.57.14"
qGameAdVersion = "4.520.1390"

View File

@ -41,5 +41,9 @@ class ACloudPushProviderImpl : IPushProvider {
return ""
}
override fun cleanBadgeNumber(applicationContext: Context) {
// do nothing
}
override fun init(p0: Context?) {}
}

View File

@ -72,18 +72,19 @@ object CsjAdHelper {
*/
override fun getDevOaid(): String = oaid
})
.build(),
object : TTVfSdk.InitCallback {
override fun success() {
Utils.log(TAG, "穿山甲初始化成功")
mIsInitialed = true
}
.build())
override fun fail(p0: Int, p1: String?) {
Utils.log(TAG, "穿山甲初始化失败, $p0 $p1")
mIsInitialed = false
}
})
TTVfSdk.start(object : TTVfSdk.Callback {
override fun success() {
Utils.log(TAG, "穿山甲初始化成功")
mIsInitialed = true
}
override fun fail(p0: Int, p1: String?) {
Utils.log(TAG, "穿山甲初始化失败, $p0 $p1")
mIsInitialed = false
}
})
}
fun updateThemeStatus(isDarkMode: Boolean) {
@ -124,8 +125,8 @@ object CsjAdHelper {
}
mTTVfNative.loadSphVs(adSlot, object : TTVfNative.CSJSplashAdListener {
override fun onSplashLoadSuccess() {
Utils.log(TAG, "开屏广告加载成功")
override fun onSplashLoadSuccess(p0: CSJSplashAd?) {
Utils.log(TAG, "开屏广告加载成功 $p0")
}
override fun onSplashLoadFail(p0: CSJAdError?) {
@ -199,7 +200,7 @@ object CsjAdHelper {
.setCodeId(slotId) // 广告位id
.setSupportDeepLink(true)
.setAdCount(1) // 请求广告数量为1到3条
.setExpressViewAcceptedSize(expressViewAcceptedSize, 96F) // 期望模板广告view的size,宽度最低为375单位dp
.setExpressViewAcceptedSize(expressViewAcceptedSize, 0F) // 期望模板广告view的size,宽度最低为375单位dp
.setAdLoadType(TTAdLoadType.LOAD) // 推荐使用,用于标注此次的广告请求用途为预加载(当做缓存)还是实时加载,方便后续为开发者优化相关策略
.build()

View File

@ -32,6 +32,12 @@
</intent-filter>
</service>
<provider
android:name="cn.jpush.android.service.InitProvider"
android:authorities="${applicationId}.jiguang.InitProvider"
android:exported="false"
tools:node="remove" />
</application>
</manifest>

View File

@ -15,6 +15,8 @@ import com.lightgame.utils.Utils
object JPushHelper {
const val TAG = "JPushHelper"
private var badgeCount = 0 // 角标计数
fun init(applicationContext: Context) {
JPushInterface.setDebugMode(BuildConfig.DEBUG)
JPushInterface.init(applicationContext)
@ -45,4 +47,20 @@ object JPushHelper {
Utils.log(TAG, "bind error $it")
})
}
// 角标+1
fun appendBadgeNumber(applicationContext: Context) {
JPushInterface.setBadgeNumber(applicationContext, ++badgeCount)
}
// 角标-1
fun subtractBadgeNumber(applicationContext: Context) {
JPushInterface.setBadgeNumber(applicationContext, if (badgeCount > 0) --badgeCount else 0)
}
// 清除角标
fun cleanBadgeNumber(applicationContext: Context) {
badgeCount = 0
JPushInterface.setBadgeNumber(applicationContext, badgeCount)
}
}

View File

@ -47,5 +47,9 @@ class JGPushProviderImpl : IPushProvider {
return JPushHelper.getRegistrationId(context)
}
override fun cleanBadgeNumber(applicationContext: Context) {
JPushHelper.cleanBadgeNumber(applicationContext)
}
override fun init(p0: Context?) {}
}

View File

@ -1,6 +1,7 @@
package com.gh.gamecenter.jg.push.service
import android.content.Context
import cn.jpush.android.api.NotificationMessage
import cn.jpush.android.service.JPushMessageService
import com.gh.gamecenter.jg.push.JPushHelper
import com.lightgame.utils.Utils
@ -11,6 +12,27 @@ class HaloJPushMessageService: JPushMessageService() {
JPushHelper.bindRegistrationId(registrationId)
}
override fun onNotifyMessageArrived(context: Context, message: NotificationMessage) {
super.onNotifyMessageArrived(context, message)
Utils.log(TAG, "onNotifyMessageArrived: $message")
JPushHelper.appendBadgeNumber(context.applicationContext)
}
override fun onNotifyMessageOpened(context: Context, message: NotificationMessage) {
super.onNotifyMessageOpened(context, message)
Utils.log(TAG, "onNotifyMessageOpened: $message")
JPushHelper.subtractBadgeNumber(context.applicationContext)
}
override fun onNotifyMessageDismiss(context: Context, message: NotificationMessage) {
super.onNotifyMessageDismiss(context, message)
Utils.log(TAG, "onNotifyMessageDismiss: $message")
JPushHelper.subtractBadgeNumber(context.applicationContext)
}
companion object {
const val TAG = "HaloJPushMessageService"
}

View File

@ -1,10 +1,8 @@
package com.gh.gamecenter.feedback.view.help
import android.os.Build
import android.os.Bundle
import android.view.Gravity
import android.view.LayoutInflater
import android.view.MotionEvent
import android.view.View
import android.view.*
import android.view.ViewGroup.MarginLayoutParams
import android.widget.FrameLayout
import android.widget.LinearLayout
@ -21,6 +19,7 @@ import androidx.recyclerview.widget.RecyclerView.SimpleOnItemTouchListener
import androidx.viewpager2.widget.ViewPager2
import com.gh.gamecenter.common.base.fragment.BaseLazyFragment
import com.gh.gamecenter.common.baselist.LoadStatus
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.common.databinding.ItemIconTabBinding
import com.gh.gamecenter.common.databinding.PopupAllTabsBinding
import com.gh.gamecenter.common.utils.*
@ -35,6 +34,7 @@ import com.gh.gamecenter.feedback.view.qa.HelpQaDefaultAdapter
import com.gh.gamecenter.feedback.view.qa.QaActivity
import com.gh.gamecenter.feedback.view.qa.QaSearchActivity
import com.gh.gamecenter.feedback.view.suggest.SuggestionActivity
import com.lightgame.utils.Util_System_ClipboardManager
import splitties.views.bottomPadding
import kotlin.math.abs
@ -214,6 +214,7 @@ class HelpAndFeedbackFragment : BaseLazyFragment() {
}
}
updateFeedbackContentIfAvailable()
observeData()
}
@ -228,6 +229,42 @@ class HelpAndFeedbackFragment : BaseLazyFragment() {
mHelpVideoAdapter?.startScroll()
}
/**
* 根据历史功能,如果剪贴板中有符合条件的内容(插件跳转时的反馈内容),就更新 argument 里的 content
*/
private fun updateFeedbackContentIfAvailable() {
// 默认不带参跳转内容包含 null
if (arguments?.getString(EntranceConsts.KEY_CONTENT)?.contains("null") == false) {
return
}
val updateArgumentClosure = {
val clipboardText = Util_System_ClipboardManager.getText(requireContext())
if (clipboardText != null
&& clipboardText.contains("游戏名")
&& clipboardText.contains("游戏ID")
&& clipboardText.contains("游戏包MD5")
) {
arguments?.putString(EntranceConsts.KEY_CONTENT, clipboardText)
}
}
// Android 10.0 及以后版本需要在获取到了 windowsFocus 后才能访问粘贴版内容
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
val listener = object : ViewTreeObserver.OnWindowFocusChangeListener {
override fun onWindowFocusChanged(hasFocus: Boolean) {
if (hasFocus) {
updateArgumentClosure.invoke()
mBinding.root.viewTreeObserver.removeOnWindowFocusChangeListener(this)
}
}
}
mCachedView?.viewTreeObserver?.addOnWindowFocusChangeListener(listener)
} else {
updateArgumentClosure.invoke()
}
}
private fun showCategoryPopupWindow() {
val binding = PopupAllTabsBinding.inflate(LayoutInflater.from(requireContext()), null, false)
val popupWindow = PopupWindow(

View File

@ -58,11 +58,11 @@ DEV_CSJ_APPID=5410486
CSJ_APPID=5429125
# hosts
DEV_API_HOST=https\://dev-and-api.ghzs.com/v5d5d0/
API_HOST=https\://and-api.ghzs.com/v5d5d0/
DEV_API_HOST=https\://dev-and-api.ghzs6.com/v5d5d0/
API_HOST=https\://and-api.ghzs6.com/v5d5d0/
API_HOST_GAT=https\://and-api.junrui66.com/v5d5d0/
NEW_DEV_API_HOST=https\://dev-app-api.ghzs.com/
NEW_API_HOST=https\://app-api.ghzs.com/
NEW_DEV_API_HOST=https\://dev-app-api.ghzs6.com/
NEW_API_HOST=https\://app-api.ghzs6.com/
NEW_API_HOST_GAT=https\://app-api.junrui66.com/
DEV_VAPI_HOST=https://dev-app-api.796697.com
VAPI_HOST=https://app-api.796697.com

View File

@ -421,14 +421,14 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements IBus
, () -> {
}
, () -> {
if (SPUtils.getBoolean(Constants.SP_HAS_GET_PHONE_INFO) || NetworkUtils.isOpenMobileData(BaseActivity.this)) {
IQuickLoginProvider quickLoginConfig = (IQuickLoginProvider) ARouter.getInstance().build(RouteConsts.provider.quickLogin).navigation();
quickLoginConfig.startLogin(BaseActivity.this, "你的账号已在另外一台设备登录多设备-重新登录");
} else {
ARouter.getInstance().build(RouteConsts.activity.loginActivity)
.withString(EntranceConsts.KEY_ENTRANCE, "你的账号已在另外一台设备登录多设备-重新登录")
.navigation();
}
// if (SPUtils.getBoolean(Constants.SP_HAS_GET_PHONE_INFO) || NetworkUtils.isOpenMobileData(BaseActivity.this)) {
// IQuickLoginProvider quickLoginConfig = (IQuickLoginProvider) ARouter.getInstance().build(RouteConsts.provider.quickLogin).navigation();
// quickLoginConfig.startLogin(BaseActivity.this, "你的账号已在另外一台设备登录多设备-重新登录");
// } else {
ARouter.getInstance().build(RouteConsts.activity.loginActivity)
.withString(EntranceConsts.KEY_ENTRANCE, "你的账号已在另外一台设备登录多设备-重新登录")
.navigation();
// }
}
);
IQGameProvider<?> qProvider = (IQGameProvider<?>) ARouter

View File

@ -7,8 +7,6 @@ import com.gh.gamecenter.core.utils.TimeUtils;
public class Constants {
private static final IPackageUtilsProvider packageUtilsConfig = (IPackageUtilsProvider) ARouter.getInstance().build(RouteConsts.provider.packageUtils).navigation();
public static final int SEND_NEWS_FEEDBACK = 0x126;
public static final int SEND_COMMENT_FEEDBACK = 0x127;
public final static int LIST_FOOTER_ITEM = 1;
public final static int LIST_HEAD_ITEM = 1;
@ -25,20 +23,12 @@ public class Constants {
public static final String DEVICE_KEY = "deviceKey";
public static final String HAS_REQUESTED_NOTIFICATION_PERMISSIONS = "has_requested_notification_permissions";
public static final String SHOULD_SHOW_VIDEO_MOBILE_WARNING = "should_show_video_mobile_warning";
public static final String GAME_DETAIL_COME_IN = "game_detail_come_in"; // 从游戏详情进入
public static final String SPLASH_AD = "splash_ad"; // 启动广告
public static final String XPOSED_INSTALLER_PACKAGE_NAME = "de.robv.android.xposed.installer";
public static final String EB_QUIT_LOGIN = "quit_login";
public static final String EB_SHOW_AD = "show_ad";
public static final String EB_GAME_DETAIL = "eb_game_detail";
// 用于避免历史下载影响到部分依赖名字作为数据更新条件的修饰符
@ -77,7 +67,6 @@ public class Constants {
public static final String EXTRA_DOWNLOAD_TYPE = "extra_download_type";
public static final String EXTRA_IS_MODDED_GAME = "extra_is_modded_game"; // 是否是修改版游戏
public static final String SILENT_UPDATE = "静默更新";
public static final String SILENT_DOWNLOAD = "silent_download"; // 静默下载(不需要显示在下载管理里)
public static final String SIMULATOR_DOWNLOAD = "下载模拟器";
public static final String SIMULATOR_GAME = "simulator_game";
public static final String SIMULATOR = "simulator";
@ -90,12 +79,10 @@ public class Constants {
public static final String GAME_CATEGORY = "game_category"; // 游戏类型
public static final String GAME_CATEGORY_IN_CHINESE = "game_category_in_chinese"; // 游戏类型,以中文显示
public static final String SIMULATOR_DOWNLOAD_START_TIME = "simulator_download_start_time";
public static final String LAST_GHZS_UPDATE_FILE_SIZE = "last_ghzs_update_file_size";
// 新用户首次启动光环的时间
public static final String SP_INITIAL_USAGE_TIME = "initial_usage_time";
public static final String SP_IMEI = "imei";
public static final String SP_ANDROID_ID = "android_id";
// 安装类型
@ -129,8 +116,6 @@ public class Constants {
public static final String SP_MARK_INSTALLED_GAME_USER_HOME = "mark_installed_game_user_home" + packageUtilsConfig.getGhVersionName();
// 标记安装的游戏为已玩过弹窗(我的游戏最多弹一次)
public static final String SP_MARK_INSTALLED_GAME_MY_GAME = "mark_installed_game_my_game" + packageUtilsConfig.getGhVersionName();
//顶部视频声音状态,重启恢复
public static final String SP_TOP_VIDEO_VOICE = "top_video_voice";
//我的光环提醒设置已读
public static final String SP_ADDONS_FUNCS_HAVE_READ = "addons_funcs_have_read";
//视频非wifi提醒只提醒一次重启恢复
@ -147,21 +132,13 @@ public class Constants {
public static final String SP_FILTER_TAGS = "filter_tags";
//我的光环小红点提示
public static final String SP_GH_RED_POINT_REMIND = "gh_red_point_remind";
//论坛首页引导
public static final String SP_FORUM_GUIDE = "forum_guide";
//礼仪考试开启状态
public static final String SP_REGULATION_TEST_LAST_REMIND_TIME = "regulation_test_last_remind_time";
public static final String SP_REGULATION_TEST_STATUS = "regulation_test_status";
public static final String SP_REGULATION_TEST_PASS_STATUS = "regulation_test_pass_status";
//相同设备号,每一种第三方登录方式登录后弹出绑定手机页面的次数
// public static final String SP_QQ_SHOW_BIND_PHONE_TIME = "qq_show_bind_phone_time" + HaloApp.getInstance().getGid();
// public static final String SP_WECHAT_SHOW_BIND_PHONE_TIME = "wechat_show_bind_phone_time" + HaloApp.getInstance().getGid();
// public static final String SP_WEIBO_SHOW_BIND_PHONE_TIME = "weibo_show_bind_phone_time" + HaloApp.getInstance().getGid();
// public static final String SP_DOUYIN_SHOW_BIND_PHONE_TIME = "douyin_show_bind_phone_time" + HaloApp.getInstance().getGid();
//隐私政策是否有更新
public static final String SP_PRIVACY_CURRENT_MD5 = "sp_privacy_current_md5";
public static final String SP_PRIVACY_MINE_MD5 = "sp_privacy_mine_md5";
public static final String SP_PRIVACY_SETTING_MD5 = "sp_privacy_setting_md5";
public static final String SP_PRIVACY_MD5 = "sp_privacy_md5";
public static final String SP_IS_USER_ACCEPTED_PRIVACY_STATEMENT = "has_user_accepted_privacy_statement";
@ -262,8 +239,6 @@ public class Constants {
//游戏库导航栏小红点提示
public static final String SP_GAME_NAVIGATION = "game_navigation";
// V游戏空间是否被使用过
public static final String SP_IS_VSPACE_USED = "is_vspace_used";
//webview version code
public static final String SP_WEBVIEW_VERSION_CODE = "webview_version_code";
//webview abi
@ -273,33 +248,25 @@ public class Constants {
// 发现页列表数据是否强制刷新
public static final String SP_DISCOVER_FORCE_REFRESH = "discover_force_refresh";
//手机号码匹配规则
public static final String REGEX_MOBILE = "^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$";
public static final String REGEX_ACCOUNT = "^[a-zA-Z_]\\w{5,17}$";
public static final String REGEX_PASSWORD = "^[a-zA-Z]\\w{5,31}$";
//输入规则
public static final String INPUT_RULE = "0123456789abcdefghijklnmopqrstuvwxyzABCDEFGHIJKLNMOPQRSTUVWXYZ_";
// 微信绑定地址
public static final String WECHAT_BIND_ADDRESS_DEV = "https://dev-and-static.ghzs.com/web/wechat_bind/index.html#/";
public static final String WECHAT_BIND_ADDRESS = "https://and-static.ghzs.com/web/wechat_bind/index.html#/";
// 礼仪考试地址
public static final String REGULATION_TEST_ADDRESS_DEV = "https://static-web.ghzs.com/etiquette-dev/index.html#/";
public static final String REGULATION_TEST_ADDRESS = "https://static-web.ghzs.com/etiquette/index.html#/";
public static final String REGULATION_TEST_ADDRESS_DEV = "https://dev-and-static.ghzs66.com/web/etiquette/index.html#/";
public static final String REGULATION_TEST_ADDRESS = "https://and-static.ghzs66.com/web/etiquette/index.html#/";
// 徽章中心
public static final String BADGE_ADDRESS_DEV = "https://static-web.ghzs.com/badge-dev/index.html#/";
public static final String BADGE_ADDRESS = "https://static-web.ghzs.com/badge/index.html#/";
public static final String BADGE_ADDRESS_DEV = "https://dev-and-static.ghzs66.com/web/badge/index.html#/";
public static final String BADGE_ADDRESS = "https://and-static.ghzs66.com/web/badge/index.html#/";
// 徽章详情
public static final String BADGE_DETAIL_ADDRESS_DEV = "https://static-web.ghzs.com/badge-dev/index.html#/badgedetail";
public static final String BADGE_DETAIL_ADDRESS = "https://static-web.ghzs.com/badge/index.html#/badgedetail";
public static final String BADGE_DETAIL_ADDRESS_DEV = "https://dev-and-static.ghzs66.com/web/badge/index.html#/badgedetail";
public static final String BADGE_DETAIL_ADDRESS = "https://and-static.ghzs66.com/web/badge/index.html#/badgedetail";
// 分享个人主页地址
public static final String SHARE_USER_HOME_ADDRESS_DEV = "https://static-web.ghzs.com/ghzs-userhome-dev/index.html#/";
public static final String SHARE_USER_HOME_ADDRESS = "https://static-web.ghzs.com/ghzs-userhome/index.html#/";
public static final String SHARE_USER_HOME_ADDRESS_DEV = "https://dev-and-static.ghzs66.com/web/ghzs-userhome/index.html#/";
public static final String SHARE_USER_HOME_ADDRESS = "https://and-static.ghzs66.com/web/ghzs-userhome/index.html#/";
// 腾讯企点地址
public static final String TENCENT_QIDIAN_ADDRESS = "https://admin.qidian.qq.com/template/blue/mp/menu/qr-code-jump.html?linkType=0&env=ol&kfuin=2355094296&fid=457&key=c76dcb2e3d582b6ffbfb5bb22cde85ff&cate=1&source=&isLBS=&isCustomEntry=&type=16&ftype=1&_type=wpa&qidian=true";
@ -308,105 +275,50 @@ public class Constants {
public static final String FORUM_REGULATIONS_NEWS_ID = "5f4db9cc34d44d01b92fd670";
// 权限使用场景地址
public static final String PERMISSION_SCENARIO_ADDRESS = "https://resource.ghzs.com/page/privacy_policies/permissions.html";
public static final String PERMISSION_SCENARIO_ADDRESS = "https://and-static.ghzs66.com/page/privacy_policies/permissions.html";
//帮助内容详情
public static final String HELP_ADDRESS_DEV = "https://static-web.ghzs.com/ghzs_help_dev/help.html?content=";
public static final String HELP_ADDRESS = "https://static-web.ghzs.com/ghzs_help/help.html?content=";
public static final String HELP_ADDRESS_DEV = "https://dev-and-static.ghzs66.com/web/ghzs_help/help.html?content=";
public static final String HELP_ADDRESS = "https://and-static.ghzs66.com/web/ghzs_help/help.html?content=";
// 畅玩助手相关
public static final String SMOOTH_GAME_PRIVACY_POLICY_ADDRESS = "https://sdg-static.79887.com/misc/privacy_CW.html";
// 注销页面
public static final String LOGOUT_ADDRESS_DEV = "https://static-web.ghzs.com/ghzs_help_dev/help.html?content=5f6b1f02786564003944a693&from=ghzs";
public static final String LOGOUT_ADDRESS = "https://static-web.ghzs.com/ghzs_help/help.html?content=5f534111b1f72909fc225672&from=ghzs";
// 商品详情
public static final String COMMODITY_DETAIL_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/product?from=ghzs";
public static final String COMMODITY_DETAIL_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/product?from=ghzs";
// 光能记录
public static final String ENERGY_RECORD_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/record?from=ghzs";
public static final String ENERGY_RECORD_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/record?from=ghzs";
// 订单中心
public static final String ORDER_CENTER_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/orders?from=ghzs";
public static final String ORDER_CENTER_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/orders?from=ghzs";
// 订单详情
public static final String ORDER_DETAIL_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/order-detail?from=ghzs";
public static final String ORDER_DETAIL_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/order-detail?from=ghzs";
// 邀请好友
public static final String INVITE_FRIENDS_ADDRESS_DEV = "https://static-web.ghzs.com/ghzs_activity_dev/inviteFriends.html#/invite";
public static final String INVITE_FRIENDS_ADDRESS = "https://static-web.ghzs.com/ghzs_activity_prod/inviteFriends.html#/invite";
// 等级页面
public static final String LEVEL_ADDRESS_DEV = "https://static-web.ghzs.com/ghzs-userhome-dev/index.html#/level";
public static final String LEVEL_ADDRESS = "https://static-web.ghzs.com/ghzs-userhome/index.html#/level";
// 兑换规则
public static final String EXCHANGE_RULE_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/exchange-rule?from=ghzs";
public static final String EXCHANGE_RULE_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/exchange-rule?from=ghzs";
// 光能规则
public static final String ENERGY_RULE_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/energy-rule?from=ghzs";
public static final String ENERGY_RULE_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/energy-rule?from=ghzs";
// 兑换商品
public static final String EXCHANGE_COMMODITY_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/exchange-log?from=ghzs";
public static final String EXCHANGE_COMMODITY_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/exchange-log?from=ghzs";
// 抽奖乐园
public static final String LOTTERY_PARADISE_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/lottery-list?from=ghzs";
public static final String LOTTERY_PARADISE_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/lottery-list?from=ghzs";
// 我的奖品
public static final String MY_PRIZE_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/mywin?from=ghzs";
public static final String MY_PRIZE_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/mywin?from=ghzs";
// 中奖订单详情
public static final String WIN_ORDER_DETAIL_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/win-order-detail?from=ghzs";
public static final String WIN_ORDER_DETAIL_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/win-order-detail?from=ghzs";
public static final String LOGOUT_ADDRESS_DEV = "https://dev-and-static.ghzs66.com/web/ghzs_help/help.html?content=5f6b1f02786564003944a693&from=ghzs";
public static final String LOGOUT_ADDRESS = "https://and-static.ghzs66.com/web/ghzs_help/help.html?content=5f534111b1f72909fc225672&from=ghzs";
// 地址信息
public static final String ADDRESS_INFO_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/address-list?from=ghzs";
public static final String ADDRESS_INFO_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/address-list?from=ghzs";
public static final String ADDRESS_INFO_ADDRESS_DEV = "https://dev-and-static.ghzs66.com/web/shop/index.html#/address-list?from=ghzs";
public static final String ADDRESS_INFO_ADDRESS = "https://and-static.ghzs66.com/web/shop/index.html#/address-list?from=ghzs";
// 领奖信息
public static final String PRIZE_INFO_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/user-info?from=ghzs";
public static final String PRIZE_INFO_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/user-info?from=ghzs";
public static final String PRIZE_INFO_ADDRESS_DEV = "https://dev-and-static.ghzs66.com/web/shop/index.html#/user-info?from=ghzs";
public static final String PRIZE_INFO_ADDRESS = "https://and-static.ghzs66.com/web/shop/index.html#/user-info?from=ghzs";
// 提现信息
public static final String WITHDRAW_INFO_ADDRESS_DEV = "https://static-web.ghzs.com/shop-dev/index.html#/cash?from=ghzs";
public static final String WITHDRAW_INFO_ADDRESS = "https://static-web.ghzs.com/shop/index.html#/cash?from=ghzs";
public static final String WITHDRAW_INFO_ADDRESS_DEV = "https://dev-and-static.ghzs66.com/web/shop/index.html#/cash?from=ghzs";
public static final String WITHDRAW_INFO_ADDRESS = "https://and-static.ghzs66.com/web/shop/index.html#/cash?from=ghzs";
// 活动详情
public static final String ACTIVITY_DETAIL_ADDRESS_DEV = "https://static-web.ghzs.com/ghzs_activity_dev/common.html";
public static final String ACTIVITY_DETAIL_ADDRESS = "https://static-web.ghzs.com/ghzs_activity_prod/common.html";
public static final String ACTIVITY_DETAIL_ADDRESS_DEV = "https://dev-and-static.ghzs66.com/web/ghzs_activity/common.html";
public static final String ACTIVITY_DETAIL_ADDRESS = "https://and-static.ghzs66.com/web/ghzs_activity/common.html";
// 游戏单详情分享链接
public static final String GAME_COLLECTION_SHARE_ADDRESS_DEV = "https://dev-and-static.ghzs.com/web/game_collection/index.html#/?from=ghzs";
public static final String GAME_COLLECTION_SHARE_ADDRESS = "https://and-static.ghzs.com/web/game_collection/index.html#/?from=ghzs";
// 游戏单活动分享链接 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1638
public static final String GAME_COLLECTION_ACTIVITY_ADDRESS_DEV = "https://dev-and-static.ghzs.com/web/ghzs_activity/haoyouUnlock.html";
public static final String GAME_COLLECTION_ACTIVITY_ADDRESS = "https://and-static.ghzs.com/web/ghzs_activity/haoyouUnlock.html";
// 青少年模式找回密码
public static final String TEEN_MODE_RESET_PASSWORD = "https://resource.ghzs.com/page/privacy_policies/help_password.html";
public static final String TEEN_MODE_RESET_PASSWORD = "https://and-static.ghzs66.com/page/privacy_policies/help_password.html";
// 儿童/青少年使用须知
public static final String TEEN_MODE_RULE = "https://resource.ghzs.com/page/privacy_policies/teenager_privacy.html";
public static final String TEEN_MODE_RULE = "https://and-static.ghzs66.com/page/privacy_policies/teenager_privacy.html";
//游戏单管理规范
public static final String GAME_COLLECTION_RULE = "https://resource.ghzs.com/page/privacy_policies/game_collection.html";
public static final String GAME_COLLECTION_RULE = "https://and-static.ghzs66.com/page/privacy_policies/game_collection.html";
public static final String SP_IS_DEV_ENV = "is_dev_env";
//最少需要多少数据才能上传
public static final int DATA_AMOUNT = 20;
public static final String[] REPORT_LIST = new String[]{"垃圾广告营销", "恶意攻击谩骂", "淫秽色情信息", "违法有害信息", "其他原因"};
public static final String[] FEEDBACK_REASON_LIST = new String[]{"重复推荐", "不感兴趣", "与推荐描述不符", "已经玩过了", "游戏质量差", "游戏太旧"};
@ -417,9 +329,6 @@ public class Constants {
// 触发了安装事件的标记
public static final String MARK_ALREADY_TRIGGERED_INSTALLATION = "triggered_installation";
// 标记下载重试标记(值为任务已下载大小,为空表示需要重试)
public static final String MARK_RETRY_DOWNLOAD = "retry_download";
// 工具箱历史记录最多4个
public static final String TOOLBOX_HISTORY = "toolbox_history";
@ -428,10 +337,8 @@ public class Constants {
// 浏览器安装说明url
public static final String SP_BROWSER_HINT_URL = "browser_hint_url";
public static final String DEFAULT_OPPO_BROWSER_HINT_URL = "https://static-web.ghzs.com/ghzs_help/help.html?content=5fa90fe143d91a022e0d33ff";
public static final String DEFAULT_VIVO_BROWSER_HINT_URL = "https://static-web.ghzs.com/ghzs_help/help.html?content=618112ce04796e63e97643a4&from=ghzs";
public static final int FOLLOW_HINT_TRIGGER_HEIGHT = 10;
public static final String DEFAULT_OPPO_BROWSER_HINT_URL = "https://and-static.ghzs66.com/web/ghzs_help/help.html?content=5fa90fe143d91a022e0d33ff";
public static final String DEFAULT_VIVO_BROWSER_HINT_URL = "https://and-static.ghzs66.com/web/ghzs_help/help.html?content=618112ce04796e63e97643a4&from=ghzs";
// 深色模式
public static final String SP_DARK_MODE_ENABLED = "dark_mode_is_enabled";
@ -447,8 +354,6 @@ public class Constants {
// 登出标识
public static final String LOGOUT_TAG = "logout_tag";
public static final String GIT_LOG_MD5 = "git_log_md5";
public static final String SP_ADDONS_RECOMMEND_HAVE_READ = "addons_recommend_have_read";
//启动广告
public static final String SP_STARTUP_AD_TIMESTAMP = "startup_ad_timestamp";
@ -469,14 +374,10 @@ public class Constants {
public static final String DOWNLOAD_STATUS_IN_CHINESE = "download_status_in_chinese";
public static final String EB_REALNAME_RESULT = "realname_result";
public static final String SP_REALNAME_ERROR_HINT_IGNORED = "realname_error_hint_ignored";
public static final String SP_SENSORS_IS_FIRST_TIME = "sensors_is_first_time";
public static final String SP_SENSORS_IS_FIRST_TIME_HOME_BOTTOM_TAB_SELECT = "sensors_is_first_time_home_bottom_tab_select";
public static final String SP_SENSORS_IS_FIRST_TIME_VIEW_FORUM = "sensors_is_first_time_view_forum";
public static final String SP_SENSORS_IS_FIRST_TIME_ARTICLE_LIKE_CLICK = "sensors_is_first_time_article_like_click";
@ -489,7 +390,6 @@ public class Constants {
public static final String SP_SENSORS_IS_FIRST_TIME_ARTICLE_SHARE = "sensors_is_first_time_article_share";
public static final String SP_HOME_PUSH_POP_UP_SET = "home_push_pop_up_map";
public static final String SP_PULL_DOWN_PUSH_POP_UP_SET = "pull_down_push_pop_up_set";
public static final String FINISH_PULL_DOWN_PUSH = "finish_pull_down_push";
public static final String APK_SIZE = "apk_size";

View File

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

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="999dp" />
<gradient
android:endColor="@color/primary_theme"
android:startColor="@color/button_gradient_blue_start" />
</shape>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="999dp" />
<gradient
android:endColor="@color/button_gradient_green_end"
android:startColor="@color/button_gradient_green_start" />
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="999dp" />
<gradient android:startColor="@color/button_gradient_yellow_start"
android:endColor="@color/button_gradient_yellow_end"/>
</shape>

View File

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

View File

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

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="999dp" />
<stroke android:color="@color/primary_theme"
android:width="1dp"/>
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="999dp" />
<stroke android:color="@color/button_stroke_gray"
android:width="1dp"/>
</shape>

View File

@ -364,4 +364,10 @@
<color name="text_666666_alpha_60">#99666666</color>
<color name="bg_21282E_alpha_40">#6621282E</color>
<color name="text_FFFFFF">@color/white</color>
<color name="button_stroke_gray">#0Affffff</color>
<color name="button_gradient_blue_start">#44AEEB</color>
<color name="button_gradient_green_start">#27C2A3</color>
<color name="button_gradient_green_end">#14A3A3</color>
<color name="button_gradient_yellow_start">#E5A82E</color>
<color name="button_gradient_yellow_end">#E58627</color>
</resources>

View File

@ -71,7 +71,7 @@
<string name="pic_max_hint">圖片不能大於%1$dMB請重新選擇</string>
<string name="title_suggest_game">請選出你要指定的遊戲</string>
<string name="copyright_title">版權保護申訴指引</string>
<string name="copyright_rules_url">https://resource.ghzs.com/page/copyright_guide/copyright_guide.html</string>
<string name="copyright_rules_url">https://and-static.ghzs66.com/page/copyright_guide/copyright_guide.html</string>
<string name="suggestion_game_name">遊戲名字<Data><![CDATA[<font color="#ff4147">*</font>]]></Data></string>
<string name="is_dark_mode_on_id">is_dark_mode_on_id</string>

View File

@ -411,5 +411,10 @@
<color name="bg_21282E_alpha_40">#6621282E</color>
<color name="text_FFFFFF">@color/white</color>
<color name="button_stroke_gray">#12000000</color>
<color name="button_gradient_blue_start">#4BC7FF</color>
<color name="button_gradient_green_start">#00DBB0</color>
<color name="button_gradient_green_end">#00B8B8</color>
<color name="button_gradient_yellow_start">#FFC247</color>
<color name="button_gradient_yellow_end">#FF9933</color>
</resources>

View File

@ -43,9 +43,9 @@
<string name="view_bounded_object">view绑定的对象</string>
<string name="disclaimer_title">用户协议与免责声明</string>
<string name="disclaimer_url">https://resource.ghzs.com/page/privacy_policies/User_agreement.html</string>
<string name="disclaimer_url">https://and-static.ghzs66.com/page/privacy_policies/User_agreement.html</string>
<string name="privacy_policy_title">隐私政策</string>
<string name="privacy_policy_url">https://resource.ghzs.com/page/privacy_policies/privacy_policies.html</string>
<string name="privacy_policy_url">https://and-static.ghzs66.com/page/privacy_policies/privacy_policies.html</string>
<string name="icp">备案查询入口</string>
<string name="icp_url">https://beian.miit.gov.cn/</string>
@ -72,7 +72,7 @@
<string name="pic_max_hint">图片不能大于%1$dMB请重新选择</string>
<string name="title_suggest_game">请选出你要指定的游戏</string>
<string name="copyright_title">版权保护申诉指引</string>
<string name="copyright_rules_url">https://resource.ghzs.com/page/copyright_guide/copyright_guide.html</string>
<string name="copyright_rules_url">https://and-static.ghzs66.com/page/copyright_guide/copyright_guide.html</string>
<string name="suggestion_game_name">游戏名字<Data><![CDATA[<font color="#ff4147">*</font>]]></Data></string>
<string name="is_dark_mode_on_id">is_dark_mode_on_id</string>

View File

@ -228,5 +228,67 @@
<item name="android:textStyle">bold</item>
</style>
<!-- 按钮1 -->
<style name="TextButton1">
<item name="android:textSize">16sp</item>
<item name="android:textStyle">normal</item>
</style>
<!-- 按钮2 -->
<style name="TextButton2">
<item name="android:textSize">14sp</item>
<item name="android:textStyle">normal</item>
</style>
<!-- 按钮3 -->
<style name="TextButton3">
<item name="android:textSize">12sp</item>
<item name="android:textStyle">normal</item>
</style>
<!-- 按钮样式 btn-mini -->
<style name="BtnMiniStyle">
<item name="android:gravity">center</item>
<item name="android:minWidth">48dp</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">24dp</item>
<item name="android:textSize">12sp</item>
<item name="android:paddingLeft">12dp</item>
<item name="android:paddingRight">12dp</item>
</style>
<!-- 按钮样式 btn-small -->
<style name="BtnSmallStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">28dp</item>
<item name="android:gravity">center</item>
<item name="android:minWidth">56dp</item>
<item name="android:textSize">12sp</item>
<item name="android:paddingLeft">12dp</item>
<item name="android:paddingRight">12dp</item>
</style>
<!-- 按钮样式3 btn-regular -->
<style name="BtnRegularStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">40dp</item>
<item name="android:gravity">center</item>
<item name="android:minWidth">60dp</item>
<item name="android:textSize">14sp</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:paddingRight">16dp</item>
</style>
<!-- 按钮样式4 btn-large -->
<style name="BtnLargeStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">44dp</item>
<item name="android:gravity">center</item>
<item name="android:minWidth">66dp</item>
<item name="android:height">44dp</item>
<item name="android:textSize">16sp</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:paddingRight">16dp</item>
</style>
</resources>

View File

@ -11,20 +11,6 @@ interface IDirectProvider : IProvider {
fun directToQqConversation(context: Context, qq: String)
fun directToCommodityDetail(context: Context, commodityId: String)
fun directToEnergyRecord(context: Context)
fun directToEnergyRulePage(context: Context)
fun directToInviteFriends(context: Context)
fun directToExchangeRulePage(context: Context)
fun directToExchangeCommodityPage(context: Context)
fun directToLotteryParadisePage(context: Context)
fun directDouyin(context: Context, userId: String)
fun directToSuggestionFromDiagnosis(context: Context, content: String, diagnosis: String)
@ -63,16 +49,6 @@ interface IDirectProvider : IProvider {
path: String? = ""
)
fun directToOrderCenter(context: Context)
fun directToOrderDetail(context: Context, orderId: String)
fun directToEnergyRecord(context: Context, position: Int)
fun directToMyPrizePage(context: Context)
fun directToWinOrderDetail(context: Context, orderId: String, activityId: String)
fun directToQGame(context: Context)
fun directToExternalBrowser(context: Context, url: String)

View File

@ -47,5 +47,16 @@ interface IPushProvider : IProvider {
*/
fun bindChannel(channel: String): Single<String>
/**
* 获取极光推送 Registration Id
* @param context 上下文
* @return 极光推送 Registration Id
*/
fun getRegistrationId(context: Context): String
/**
* 清除桌面角标
* @param applicationContext 上下文
*/
fun cleanBadgeNumber(applicationContext: Context)
}

View File

@ -54,5 +54,5 @@ dependencies {
implementation(project(path: ":module_common"))
implementation(project(path: ":module_core_feature"))
api project(":module_lib")
// api project(":module_lib")
}

View File

@ -20,16 +20,16 @@
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.gh.gamecenter.login.view.QuickLoginHelperActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.Fullscreen.Transparent" />
<!-- <activity-->
<!-- android:name="com.gh.gamecenter.login.view.QuickLoginHelperActivity"-->
<!-- android:screenOrientation="portrait"-->
<!-- android:theme="@style/Theme.AppCompat.Light.Fullscreen.Transparent" />-->
<activity
android:name="com.cmic.gen.sdk.view.GenLoginAuthActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<!-- <activity-->
<!-- android:name="com.cmic.gen.sdk.view.GenLoginAuthActivity"-->
<!-- android:configChanges="orientation|keyboardHidden|screenSize"-->
<!-- android:launchMode="singleTop"-->
<!-- android:screenOrientation="portrait" />-->
<activity
android:name="${applicationId}.wxapi.WXEntryActivity"

View File

@ -2,29 +2,26 @@ package com.gh.gamecenter.login.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.cmic.gen.sdk.auth.GenAuthnHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IQuickLoginProvider
import com.gh.gamecenter.login.utils.QuickLoginHelper
import org.json.JSONException
@Route(path = RouteConsts.provider.quickLogin, name = "一键登录暴露服务")
class QuickLoginProviderImpl : IQuickLoginProvider {
override fun startLogin(context: Context, entrance: String) {
QuickLoginHelper.startLogin(context, entrance)
// QuickLoginHelper.startLogin(context, entrance)
}
override fun isOpenMobileData(context: Context): Boolean {
val helper = GenAuthnHelper.getInstance(context)
val jsonObject = helper.getNetworkType(context)
val net: Int
try {
net = jsonObject.getString("networktype").toInt()
if (net == 1 || net == 3) return true
} catch (e: JSONException) {
e.printStackTrace()
}
// val helper = GenAuthnHelper.getInstance(context)
// val jsonObject = helper.getNetworkType(context)
// val net: Int
// try {
// net = jsonObject.getString("networktype").toInt()
// if (net == 1 || net == 3) return true
// } catch (e: JSONException) {
// e.printStackTrace()
// }
return false
}

View File

@ -49,7 +49,6 @@ import com.gh.gamecenter.login.retrofit.RetrofitManager;
import com.gh.gamecenter.login.utils.LoginHelper;
import com.gh.gamecenter.login.utils.LoginUtils;
import com.gh.gamecenter.login.utils.NewLogUtils;
import com.gh.gamecenter.login.utils.QuickLoginHelper;
import com.lightgame.utils.Utils;
import org.greenrobot.eventbus.EventBus;
@ -171,7 +170,7 @@ public class UserRepository {
dataUtils.getDeviceCertification();
// 退出登录后进行预取号
QuickLoginHelper.getPhoneInfo();
// QuickLoginHelper.getPhoneInfo();
}
public LiveData<ApiResponse<UserInfoEntity>> getLoginUserInfo() {

View File

@ -56,7 +56,6 @@ import com.gh.gamecenter.login.utils.DialogHelper;
import com.gh.gamecenter.login.utils.LoginHelper;
import com.gh.gamecenter.login.utils.LoginUtils;
import com.gh.gamecenter.login.utils.NewFlatLogUtils;
import com.gh.gamecenter.login.utils.QuickLoginHelper;
import org.greenrobot.eventbus.EventBus;
import org.jetbrains.annotations.NotNull;
@ -466,10 +465,10 @@ public class LoginFragment
if (getActivity() != null && UserManager.getInstance().isLoggedIn()) {
getActivity().finish();
// 如果是从一键登录页跳转过来的登录成功后也要finish一键登录页
if (mIsFromQuickLogin) {
QuickLoginHelper.finishAuthActivity();
}
// // 如果是从一键登录页跳转过来的登录成功后也要finish一键登录页
// if (mIsFromQuickLogin) {
// QuickLoginHelper.finishAuthActivity();
// }
}
}
}

View File

@ -1,142 +1,142 @@
package com.gh.gamecenter.login.view
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.text.TextUtils
import androidx.activity.viewModels
import androidx.lifecycle.Observer
import com.alibaba.android.arouter.launcher.ARouter
import com.gh.gamecenter.common.base.activity.BaseActivity
import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.retrofit.ApiResponse
import com.gh.gamecenter.core.provider.ILogUtilsProvider
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.login.HaloApp
import com.gh.gamecenter.login.R
import com.gh.gamecenter.login.entity.UserInfoEntity
import com.gh.gamecenter.login.user.LoginTag
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.login.user.UserViewModel
import com.gh.gamecenter.login.utils.LoginHelper
import com.gh.gamecenter.login.utils.NewFlatLogUtils
import com.gh.gamecenter.login.utils.QuickLoginHelper
import org.json.JSONObject
/**
* 快速登录辅助页,此页面为透明页面,用于执行各快速登录流程
*/
class QuickLoginHelperActivity : BaseActivity(), LoginHelper.LoginCallback, Observer<ApiResponse<UserInfoEntity>> {
private var mLoginTag: LoginTag? = null
private var mLoginDialog: WaitingDialogFragment? = null
private val mUserViewModel: UserViewModel by viewModels { UserViewModel.Factory(HaloApp.getInstance()) }
override fun getLayoutId() = 0
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
mUserViewModel.loginObsUserinfo.observe(this, this)
handleLoginType()
}
private fun handleLoginType() {
mLoginTag = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
intent?.getSerializableExtra(EntranceConsts.KET_TYPE) as? LoginTag
} else {
intent?.getSerializableExtra(EntranceConsts.KET_TYPE, LoginTag::class.java)
}
when (mLoginTag ?: finish()) {
LoginTag.qq -> LoginHelper.loginWithQQ(this, this)
LoginTag.wechat -> LoginHelper.loginWithWechat(this)
LoginTag.weibo -> LoginHelper.loginWithWeibo(this, this)
LoginTag.oauth -> {
val token = intent.getStringExtra(EntranceConsts.KEY_DATA) ?: finish()
login(JSONObject(mapOf("token" to token)), LoginTag.oauth)
}
}
}
private fun login(content: JSONObject, loginTag: LoginTag) {
val logUtils = ARouter.getInstance().build(RouteConsts.provider.logUtils).navigation() as? ILogUtilsProvider
logUtils?.login("logging", loginTag.name, mEntrance)
if (loginTag != LoginTag.oauth) {
mLoginDialog = WaitingDialogFragment.newInstance(getString(R.string.logging))
mLoginDialog?.show(supportFragmentManager, null)
}
mUserViewModel.login(content, loginTag)
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
when (requestCode) {
// QQ Login callback
com.tencent.connect.common.Constants.REQUEST_LOGIN -> LoginHelper.onQQLoginCallback(
requestCode,
resultCode,
data
)
// WeiBo Login callback
32973 -> LoginHelper.onWeiboLoginCallback(this, requestCode, resultCode, data)
}
}
override fun onLoginSuccess(loginType: LoginTag, jsonContent: JSONObject) {
login(jsonContent, loginType)
}
override fun onLoginFailure(loginType: LoginTag, error: String) {
toast(error)
finish()
}
override fun onChanged(response: ApiResponse<UserInfoEntity>?) {
if (response != null && mLoginDialog != null) {
mLoginDialog?.dismissAllowingStateLoss()
mLoginDialog = null
}
if (response?.data != null) {
val loginTokenEntity = UserManager.getInstance().loginTokenEntity
if (loginTokenEntity != null) {
val loginType = loginTokenEntity.loginType
val logUtils =
ARouter.getInstance().build(RouteConsts.provider.logUtils).navigation() as? ILogUtilsProvider
logUtils?.login("success", loginType, mEntrance)
if (loginType == LoginTag.oauth.name) {
SPUtils.setBoolean(Constants.SP_HAS_GET_PHONE_INFO, false)
NewFlatLogUtils.logFastLoginResult("成功")
}
// 第三方登录方式登录后跳转绑定手机页面https://gitlab.ghzs.com/pm/halo-app-issues/-/issues/1206
val isThirdPartyLogin =
LoginTag.qq.name == loginType || LoginTag.wechat.name == loginType || LoginTag.weibo.name == loginType || LoginTag.douyin.name == loginType
if (isThirdPartyLogin
&& TextUtils.isEmpty(response.data.loginMobile)
) {
ARouter.getInstance().build(RouteConsts.activity.bindPhoneActivity)
.withBoolean(EntranceConsts.KEY_FROM_LOGIN, true)
.withBoolean(EntranceConsts.KEY_CHANGE_PHONE, false)
.navigation()
}
}
// 防止UserManager数据丢失后重复登录
if (TextUtils.isEmpty(UserManager.getInstance().token)) {
mUserViewModel.retryCheckLogin()
}
finish()
if (UserManager.getInstance().isLoggedIn) {
QuickLoginHelper.finishAuthActivity()
}
} else if ((response?.httpException != null || response?.throwable != null) && mLoginTag == LoginTag.oauth) {
NewFlatLogUtils.logFastLoginResult("失败")
}
}
}
//package com.gh.gamecenter.login.view
//
//import android.content.Intent
//import android.os.Build
//import android.os.Bundle
//import android.text.TextUtils
//import androidx.activity.viewModels
//import androidx.lifecycle.Observer
//import com.alibaba.android.arouter.launcher.ARouter
//import com.gh.gamecenter.common.base.activity.BaseActivity
//import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment
//import com.gh.gamecenter.common.constant.Constants
//import com.gh.gamecenter.common.constant.EntranceConsts
//import com.gh.gamecenter.common.constant.RouteConsts
//import com.gh.gamecenter.common.retrofit.ApiResponse
//import com.gh.gamecenter.core.provider.ILogUtilsProvider
//import com.gh.gamecenter.core.utils.SPUtils
//import com.gh.gamecenter.login.HaloApp
//import com.gh.gamecenter.login.R
//import com.gh.gamecenter.login.entity.UserInfoEntity
//import com.gh.gamecenter.login.user.LoginTag
//import com.gh.gamecenter.login.user.UserManager
//import com.gh.gamecenter.login.user.UserViewModel
//import com.gh.gamecenter.login.utils.LoginHelper
//import com.gh.gamecenter.login.utils.NewFlatLogUtils
//import com.gh.gamecenter.login.utils.QuickLoginHelper
//import org.json.JSONObject
//
///**
// * 快速登录辅助页,此页面为透明页面,用于执行各快速登录流程
// */
//class QuickLoginHelperActivity : BaseActivity(), LoginHelper.LoginCallback, Observer<ApiResponse<UserInfoEntity>> {
//
// private var mLoginTag: LoginTag? = null
// private var mLoginDialog: WaitingDialogFragment? = null
// private val mUserViewModel: UserViewModel by viewModels { UserViewModel.Factory(HaloApp.getInstance()) }
//
// override fun getLayoutId() = 0
//
// override fun onCreate(savedInstanceState: Bundle?) {
// super.onCreate(savedInstanceState)
// mUserViewModel.loginObsUserinfo.observe(this, this)
// handleLoginType()
// }
//
// private fun handleLoginType() {
// mLoginTag = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
// intent?.getSerializableExtra(EntranceConsts.KET_TYPE) as? LoginTag
// } else {
// intent?.getSerializableExtra(EntranceConsts.KET_TYPE, LoginTag::class.java)
// }
// when (mLoginTag ?: finish()) {
// LoginTag.qq -> LoginHelper.loginWithQQ(this, this)
// LoginTag.wechat -> LoginHelper.loginWithWechat(this)
// LoginTag.weibo -> LoginHelper.loginWithWeibo(this, this)
// LoginTag.oauth -> {
// val token = intent.getStringExtra(EntranceConsts.KEY_DATA) ?: finish()
// login(JSONObject(mapOf("token" to token)), LoginTag.oauth)
// }
// }
// }
//
// private fun login(content: JSONObject, loginTag: LoginTag) {
// val logUtils = ARouter.getInstance().build(RouteConsts.provider.logUtils).navigation() as? ILogUtilsProvider
// logUtils?.login("logging", loginTag.name, mEntrance)
// if (loginTag != LoginTag.oauth) {
// mLoginDialog = WaitingDialogFragment.newInstance(getString(R.string.logging))
// mLoginDialog?.show(supportFragmentManager, null)
// }
// mUserViewModel.login(content, loginTag)
// }
//
// override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
// super.onActivityResult(requestCode, resultCode, data)
// when (requestCode) {
// // QQ Login callback
// com.tencent.connect.common.Constants.REQUEST_LOGIN -> LoginHelper.onQQLoginCallback(
// requestCode,
// resultCode,
// data
// )
// // WeiBo Login callback
// 32973 -> LoginHelper.onWeiboLoginCallback(this, requestCode, resultCode, data)
// }
// }
//
// override fun onLoginSuccess(loginType: LoginTag, jsonContent: JSONObject) {
// login(jsonContent, loginType)
// }
//
// override fun onLoginFailure(loginType: LoginTag, error: String) {
// toast(error)
// finish()
// }
//
// override fun onChanged(response: ApiResponse<UserInfoEntity>?) {
// if (response != null && mLoginDialog != null) {
// mLoginDialog?.dismissAllowingStateLoss()
// mLoginDialog = null
// }
//
// if (response?.data != null) {
// val loginTokenEntity = UserManager.getInstance().loginTokenEntity
// if (loginTokenEntity != null) {
//
// val loginType = loginTokenEntity.loginType
// val logUtils =
// ARouter.getInstance().build(RouteConsts.provider.logUtils).navigation() as? ILogUtilsProvider
// logUtils?.login("success", loginType, mEntrance)
//
// if (loginType == LoginTag.oauth.name) {
// SPUtils.setBoolean(Constants.SP_HAS_GET_PHONE_INFO, false)
// NewFlatLogUtils.logFastLoginResult("成功")
// }
//
// // 第三方登录方式登录后跳转绑定手机页面https://gitlab.ghzs.com/pm/halo-app-issues/-/issues/1206
// val isThirdPartyLogin =
// LoginTag.qq.name == loginType || LoginTag.wechat.name == loginType || LoginTag.weibo.name == loginType || LoginTag.douyin.name == loginType
// if (isThirdPartyLogin
// && TextUtils.isEmpty(response.data.loginMobile)
// ) {
// ARouter.getInstance().build(RouteConsts.activity.bindPhoneActivity)
// .withBoolean(EntranceConsts.KEY_FROM_LOGIN, true)
// .withBoolean(EntranceConsts.KEY_CHANGE_PHONE, false)
// .navigation()
// }
// }
//
// // 防止UserManager数据丢失后重复登录
// if (TextUtils.isEmpty(UserManager.getInstance().token)) {
// mUserViewModel.retryCheckLogin()
// }
//
// finish()
// if (UserManager.getInstance().isLoggedIn) {
// QuickLoginHelper.finishAuthActivity()
// }
// } else if ((response?.httpException != null || response?.throwable != null) && mLoginTag == LoginTag.oauth) {
// NewFlatLogUtils.logFastLoginResult("失败")
// }
// }
//}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1,126 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="@drawable/bg_quick_login" />
<com.gh.gamecenter.common.view.StatusBarView
android:id="@+id/statusBarView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/closeBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/statusBarView"
android:padding="12dp"
app:srcCompat="@drawable/ic_login_close" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="422dp"
android:includeFontPadding="false"
android:text="本机号码"
android:textColor="@color/text_tertiary"
android:textSize="12sp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="440dp"
android:layout_centerHorizontal="true">
<TextView
android:id="@+id/phonePlaceHolder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:includeFontPadding="false"
android:text="133****0000"
android:textSize="28dp"
android:textStyle="bold"
android:visibility="invisible" />
<ImageView
android:id="@+id/changeLoginBtn"
android:layout_width="24dp"
android:layout_height="24dp"
android:padding="2dp"
android:layout_centerVertical="true"
android:layout_marginLeft="8dp"
android:layout_toRightOf="@+id/phonePlaceHolder"
android:src="@drawable/ic_quick_login_change" />
</RelativeLayout>
<TextView
android:id="@+id/descTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="478dp"
android:includeFontPadding="false"
android:textColor="@color/text_tertiary"
android:textSize="12sp"
tools:text="中国移动提供认证服务" />
<ImageView
android:id="@+id/recommendIv"
android:layout_width="36dp"
android:layout_height="20dp"
android:layout_alignParentRight="true"
android:layout_marginTop="512dp"
android:layout_marginRight="64dp"
android:src="@drawable/ic_quick_login_recommend" />
<View
android:id="@+id/privacyCheckboxClickView"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="592dp"
android:layout_marginLeft="36dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="692dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/qqBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:background="@drawable/bg_quick_login_third_party"
android:src="@drawable/ic_quick_login_qq" />
<ImageView
android:id="@+id/wechatBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="32dp"
android:padding="10dp"
android:background="@drawable/bg_quick_login_third_party"
android:src="@drawable/ic_quick_login_wechat" />
<ImageView
android:id="@+id/weiboBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="32dp"
android:padding="10dp"
android:background="@drawable/bg_quick_login_third_party"
android:src="@drawable/ic_quick_login_weibo" />
</LinearLayout>
</RelativeLayout>

View File

@ -1,17 +0,0 @@
<?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="@dimen/appbar_height"
android:background="@color/ui_surface">
<ImageView
android:id="@+id/backIv"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
app:srcCompat="@drawable/ic_bar_back" />
</RelativeLayout>

View File

@ -28,6 +28,7 @@ import com.gh.gamecenter.common.utils.DialogHelper;
import com.gh.gamecenter.common.utils.ExtensionsKt;
import com.gh.gamecenter.common.utils.ImageUtils;
import com.gh.gamecenter.common.viewholder.FooterViewHolder;
import com.gh.gamecenter.core.utils.ToastUtils;
import com.gh.gamecenter.feature.provider.ICommentUtilsProvider;
import com.gh.gamecenter.core.provider.IDirectProvider;
import com.gh.gamecenter.feature.provider.ISubjectProvider;
@ -407,33 +408,15 @@ public class KeFuFragmentAdapter extends ListAdapter<MessageKeFuEntity> {
}
break;
case "订单中心":
mDirectUtils.directToOrderCenter(mContext);
break;
case "订单详情":
if (!TextUtils.isEmpty(data.getId())) {
mDirectUtils.directToOrderDetail(mContext, data.getId());
}
break;
case "光能记录":
case "光能记录获取":
mDirectUtils.directToEnergyRecord(mContext, 0);
break;
case "光能记录使用":
mDirectUtils.directToEnergyRecord(mContext, 1);
break;
case "抽奖中心":
mDirectUtils.directToLotteryParadisePage(mContext);
break;
case "我的奖品":
mDirectUtils.directToMyPrizePage(mContext);
break;
case "兑换商品":
mDirectUtils.directToExchangeCommodityPage(mContext);
break;
case "中奖订单详情":
if (!TextUtils.isEmpty(data.getId()) && !TextUtils.isEmpty(data.getActivityId())) {
mDirectUtils.directToWinOrderDetail(mContext, data.getId(), data.getActivityId());
}
ToastUtils.toast("功能已下线,详情请咨询客服");
break;
default:
LinkEntity entity = new LinkEntity();
@ -472,33 +455,15 @@ public class KeFuFragmentAdapter extends ListAdapter<MessageKeFuEntity> {
mDirectUtils.directToWebView(mContext, Constants.TENCENT_QIDIAN_ADDRESS, mEntrance);
break;
case "order_center":
mDirectUtils.directToOrderCenter(mContext);
break;
case "order_detail":
if (!TextUtils.isEmpty(data.getLink())) {
mDirectUtils.directToOrderDetail(mContext, data.getLink());
}
break;
case "energy_record":
case "energy_record_get":
mDirectUtils.directToEnergyRecord(mContext, 0);
break;
case "energy_record_cost":
mDirectUtils.directToEnergyRecord(mContext, 1);
break;
case "raffle_center":
mDirectUtils.directToLotteryParadisePage(mContext);
break;
case "raffle_prize":
mDirectUtils.directToMyPrizePage(mContext);
break;
case "exchange_commodity":
mDirectUtils.directToExchangeCommodityPage(mContext);
break;
case "win_order_detail":
if (!TextUtils.isEmpty(data.getLink()) && !TextUtils.isEmpty(data.getActivityId())) {
mDirectUtils.directToWinOrderDetail(mContext, data.getLink(), data.getActivityId());
}
ToastUtils.toast("功能已下线,详情请咨询客服");
break;
case "game_comment_detail":
ExposureSource exposureSource = new ExposureSource("消息中心", "");

View File

@ -24,6 +24,7 @@ import com.gh.gamecenter.common.exposure.ExposureSource
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.provider.IDirectProvider
import com.gh.gamecenter.core.utils.GsonUtils.toJson
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.feature.entity.MessageEntity
import com.gh.gamecenter.feature.exposure.ExposureEvent
import com.gh.gamecenter.feature.provider.ICommentUtilsProvider
@ -598,18 +599,15 @@ class MessageListAdapter(
)
}
"订单中心" -> mDirectUtils.directToOrderCenter(mContext)
"订单详情" -> if (!TextUtils.isEmpty(data.id)) {
mDirectUtils.directToOrderDetail(mContext, data.id!!)
}
"光能记录", "光能记录获取" -> mDirectUtils.directToEnergyRecord(mContext, 0)
"光能记录使用" -> mDirectUtils.directToEnergyRecord(mContext, 1)
"抽奖中心" -> mDirectUtils.directToLotteryParadisePage(mContext)
"我的奖品" -> mDirectUtils.directToMyPrizePage(mContext)
"兑换商品" -> mDirectUtils.directToExchangeCommodityPage(mContext)
"中奖订单详情" -> if (!TextUtils.isEmpty(data.id) && !TextUtils.isEmpty(data.activityId)) {
mDirectUtils.directToWinOrderDetail(mContext, data.id!!, data.activityId!!)
"订单中心" ,
"订单详情" ,
"光能记录", "光能记录获取",
"光能记录使用",
"抽奖中心",
"我的奖品",
"兑换商品",
"中奖订单详情" -> {
ToastUtils.toast("功能已下线,详情请咨询客服")
}
else -> {
@ -646,18 +644,16 @@ class MessageListAdapter(
)
"7moor", "qidian" -> mDirectUtils.directToWebView(mContext, Constants.TENCENT_QIDIAN_ADDRESS, mEntrance)
"order_center" -> mDirectUtils.directToOrderCenter(mContext)
"order_detail" -> if (!TextUtils.isEmpty(data.link)) {
mDirectUtils.directToOrderDetail(mContext, data.link!!)
}
"order_center",
"order_detail",
"energy_record", "energy_record_get" -> mDirectUtils.directToEnergyRecord(mContext, 0)
"energy_record_cost" -> mDirectUtils.directToEnergyRecord(mContext, 1)
"raffle_center" -> mDirectUtils.directToLotteryParadisePage(mContext)
"raffle_prize" -> mDirectUtils.directToMyPrizePage(mContext)
"exchange_commodity" -> mDirectUtils.directToExchangeCommodityPage(mContext)
"win_order_detail" -> if (!TextUtils.isEmpty(data.link) && !TextUtils.isEmpty(data.activityId)) {
mDirectUtils.directToWinOrderDetail(mContext, data.link!!, data.activityId)
"energy_record", "energy_record_get",
"energy_record_cost",
"raffle_center",
"raffle_prize",
"exchange_commodity",
"win_order_detail" -> {
ToastUtils.toast("功能已下线,详情请咨询客服")
}
"game_comment_detail" -> {

View File

@ -32,10 +32,6 @@ object SensorsHelper {
enableLog(EnvHelper.isDevEnv)
enableEncrypt(true)
enableTransportEncrypt()
// 避免神策获取运营商信息
val map = hashMapOf<String, String>()
map[LimitKey.CARRIER] = "default"
registerLimitKeys(map)
})
// 设置静态公共属性

View File

@ -10,12 +10,12 @@ include ':module_setting'
include ':module_setting_compose'
include ':ndownload'
include ':module_core_feature'
include ':module_lib'
//include ':module_lib'
include ':module_sensors_data'
include ':feature:vpn'
//include ':feature:vpn'
include ':feature:pkg'
include ':feature:floating-window'
include ':feature:beizi_startup_ad'
//include ':feature:beizi_startup_ad'
include ':feature:csj_ad'
include ':feature:oaid_lib'
include ':feature:oaid'