Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_youyou
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_youyou
Commits
7d36ccc6
Commit
7d36ccc6
authored
Mar 29, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
a134d7e4
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
274 additions
and
249 deletions
+274
-249
build.gradle
app/build.gradle
+4
-4
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+9
-9
MhManager.kt
app/src/main/java/com/wenshu/youyou/manager/MhManager.kt
+21
-21
YwhzManager.kt
app/src/main/java/com/wenshu/youyou/manager/YwhzManager.kt
+48
-49
MobileLoginActivity.kt
...ava/com/wenshu/youyou/ui/activitys/MobileLoginActivity.kt
+5
-5
WxLoginActivity.kt
...in/java/com/wenshu/youyou/ui/activitys/WxLoginActivity.kt
+5
-8
MyFragment.kt
...src/main/java/com/wenshu/youyou/ui/fragment/MyFragment.kt
+172
-142
PanFragment.kt
...rc/main/java/com/wenshu/youyou/ui/fragment/PanFragment.kt
+7
-9
wenshuApplication.java
app/src/main/java/com/wenshu/youyou/wenshuApplication.java
+3
-2
No files found.
app/build.gradle
View file @
7d36ccc6
...
@@ -224,10 +224,10 @@ dependencies {
...
@@ -224,10 +224,10 @@ dependencies {
// 数美
// 数美
implementation
files
(
'libs/smantifraud.aar'
)
implementation
files
(
'libs/smantifraud.aar'
)
// 鱼丸盒子
// 鱼丸盒子
implementation
(
name:
'xzzq_ywsdk_1.1.0'
,
ext:
'aar'
)
//
implementation(name: 'xzzq_ywsdk_1.1.0', ext: 'aar')
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.0"
//
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.0"
implementation
'com.liulishuo.filedownloader:library:1.7.7'
//
implementation 'com.liulishuo.filedownloader:library:1.7.7'
implementation
"org.greenrobot:eventbus:3.1.0-RC"
//
implementation "org.greenrobot:eventbus:3.1.0-RC"
// 变现猫
// 变现猫
// implementation(name: 'bxmsdk-release-3.3.1', ext: 'aar')
// implementation(name: 'bxmsdk-release-3.3.1', ext: 'aar')
// 闪电盒子
// 闪电盒子
...
...
app/src/main/AndroidManifest.xml
View file @
7d36ccc6
...
@@ -299,15 +299,15 @@
...
@@ -299,15 +299,15 @@
</provider>
</provider>
<!-- 鱼丸盒子广告 -->
<!-- 鱼丸盒子广告 -->
<provider
<!-- <provider-->
android:name=
"com.component.dly.xzzq_ywsdk.YwFileProvider"
<!-- android:name="com.component.dly.xzzq_ywsdk.YwFileProvider"-->
android:authorities=
"${applicationId}.YwFileProvider"
<!-- android:authorities="${applicationId}.YwFileProvider"-->
android:exported=
"false"
<!-- android:exported="false"-->
android:grantUriPermissions=
"true"
>
<!-- android:grantUriPermissions="true">--
>
<meta-data
<!-- <meta-data-->
android:name=
"android.support.FILE_PROVIDER_PATHS"
<!-- android:name="android.support.FILE_PROVIDER_PATHS"-->
android:resource=
"@xml/ywsdk_file_paths"
/
>
<!-- android:resource="@xml/ywsdk_file_paths" />--
>
</provider
>
<!-- </provider>--
>
<!-- 穿山甲广告 -->
<!-- 穿山甲广告 -->
<provider
<provider
...
...
app/src/main/java/com/wenshu/youyou/manager/MhManager.kt
View file @
7d36ccc6
//package com.wenshu.youyou.manager
package
com.wenshu.youyou.manager
//
//import android.app.Application
import
android.app.Application
//import com.maplehaze.adsdk.MaplehazeSDK
import
com.maplehaze.adsdk.MaplehazeSDK
//
///**
/**
// * 描述:枫岚激励视频
* 描述:枫岚激励视频
// * 作者:孟崔广
* 作者:孟崔广
// */
*/
//object MhManager {
object
MhManager
{
//
// const val APP_ID = ""
const
val
APP_ID
=
""
// const val POS_ID = ""
const
val
POS_ID
=
""
//
// /**
/**
// * 初始化
* 初始化
// */
*/
// fun initWn(application: Application) {
fun
initWn
(
application
:
Application
)
{
// MaplehazeSDK.init(application)
MaplehazeSDK
.
init
(
application
)
// }
}
//}
}
\ No newline at end of file
\ No newline at end of file
app/src/main/java/com/wenshu/youyou/manager/YwhzManager.kt
View file @
7d36ccc6
package
com.wenshu.youyou.manager
//package com.wenshu.youyou.manager
//
import
android.app.Application
//import android.app.Application
import
android.os.Build
//import android.os.Build
import
android.text.TextUtils
//import android.text.TextUtils
import
com.component.dly.xzzq_ywsdk.YwSDK.Companion.init
//import com.component.dly.xzzq_ywsdk.YwSDK.Companion.setDebugMode
import
com.component.dly.xzzq_ywsdk.YwSDK.Companion.setDebugMode
//import com.wenshu.youyou.BuildConfig
import
com.wenshu.youyou.BuildConfig
//import com.wenshu.youyou.wenshuApplication
import
com.wenshu.youyou.wenshuApplication
//
///**
/**
// * 描述:鱼丸盒子游戏
* 描述:鱼丸盒子游戏
// * 作者:孟崔广
* 作者:孟崔广
// */
*/
//object YwhzManager {
object
YwhzManager
{
//
// private const val APPID_DEBUG = ""
private
const
val
APPID_DEBUG
=
""
// private const val APPSECRET_DEBUG = ""
private
const
val
APPSECRET_DEBUG
=
""
//
// private const val APPID_RELEASE = ""
private
const
val
APPID_RELEASE
=
""
// private const val APPSECRET_RELEASE = ""
private
const
val
APPSECRET_RELEASE
=
""
//
// fun init(application: Application) {
fun
init
(
application
:
Application
)
{
// val userManager = UserManager.getInstance()
val
userManager
=
UserManager
.
getInstance
()
// var userID = userManager.userID
var
userID
=
userManager
.
userID
// if (!userManager.userIsLogin() || TextUtils.isEmpty(userID)) {
if
(!
userManager
.
userIsLogin
()
||
TextUtils
.
isEmpty
(
userID
))
{
// // 用户id为空 或 未登录 = 游客
// 用户id为空 或 未登录 = 游客
// userID = "0"
userID
=
"0"
// }
}
//
// val appid: String
val
appid
:
String
// val appSecret: String
val
appSecret
:
String
// if (BuildConfig.DEBUG) {
if
(
BuildConfig
.
DEBUG
)
{
// appid = APPID_DEBUG
appid
=
APPID_DEBUG
// appSecret = APPSECRET_DEBUG
appSecret
=
APPSECRET_DEBUG
// } else {
}
else
{
// appid = APPID_RELEASE
appid
=
APPID_RELEASE
// appSecret = APPSECRET_RELEASE
appSecret
=
APPSECRET_RELEASE
// }
}
// var oaid: String = ""
var
oaid
:
String
=
""
// if (Build.VERSION.SDK_INT > 28) {
if
(
Build
.
VERSION
.
SDK_INT
>
28
)
{
// if (!TextUtils.isEmpty(wenshuApplication.OAID)) {
if
(!
TextUtils
.
isEmpty
(
wenshuApplication
.
OAID
))
{
// oaid = wenshuApplication.OAID
oaid
=
wenshuApplication
.
OAID
// }
}
// }
}
// setDebugMode()
setDebugMode
()
// init(application, appSecret, appid, userID, "1", oaid)
init
(
application
,
appSecret
,
appid
,
userID
,
"1"
,
oaid
)
// }
}
//}
}
\ No newline at end of file
\ No newline at end of file
app/src/main/java/com/wenshu/youyou/ui/activitys/MobileLoginActivity.kt
View file @
7d36ccc6
...
@@ -90,11 +90,11 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
...
@@ -90,11 +90,11 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
}
}
override
fun
loginSuc
()
{
override
fun
loginSuc
()
{
try
{
//
try {
// 登录成功初始化鱼玩盒子userid
//
// 登录成功初始化鱼玩盒子userid
YwhzManager
.
init
(
baseApplication
)
//
YwhzManager.init(baseApplication)
}
catch
(
e
:
Exception
)
{
//
} catch (e: Exception) {
}
//
}
// 每日任务是否刷新任务数
// 每日任务是否刷新任务数
TrackManager
.
getInstance
().
innerApp
()
TrackManager
.
getInstance
().
innerApp
()
...
...
app/src/main/java/com/wenshu/youyou/ui/activitys/WxLoginActivity.kt
View file @
7d36ccc6
...
@@ -15,9 +15,7 @@ import com.wenshu.youyou.common.Constant
...
@@ -15,9 +15,7 @@ import com.wenshu.youyou.common.Constant
import
com.wenshu.youyou.login.LoginApi
import
com.wenshu.youyou.login.LoginApi
import
com.wenshu.youyou.login.OnLoginListener
import
com.wenshu.youyou.login.OnLoginListener
import
com.wenshu.youyou.manager.RsNewsManager
import
com.wenshu.youyou.manager.RsNewsManager
//import com.wenshu.youyou.manager.SceneManager
import
com.wenshu.youyou.manager.TrackManager
import
com.wenshu.youyou.manager.TrackManager
import
com.wenshu.youyou.manager.YwhzManager
import
com.wenshu.youyou.mvp.model.WXInfo
import
com.wenshu.youyou.mvp.model.WXInfo
import
com.wenshu.youyou.mvp.presenters.LoginPresenter
import
com.wenshu.youyou.mvp.presenters.LoginPresenter
import
com.wenshu.youyou.mvp.views.LoginView
import
com.wenshu.youyou.mvp.views.LoginView
...
@@ -116,16 +114,15 @@ class WxLoginActivity : BaseActivity()
...
@@ -116,16 +114,15 @@ class WxLoginActivity : BaseActivity()
}
}
override
fun
loginSuc
()
{
override
fun
loginSuc
()
{
try
{
//
try {
// 登录成功初始化鱼玩盒子userid
//
// 登录成功初始化鱼玩盒子userid
YwhzManager
.
init
(
baseApplication
)
//
YwhzManager.init(baseApplication)
}
catch
(
e
:
Exception
)
{
//
} catch (e: Exception) {
}
//
}
// 每日任务是否刷新任务数
// 每日任务是否刷新任务数
TrackManager
.
getInstance
().
innerApp
()
TrackManager
.
getInstance
().
innerApp
()
// SceneManager.signIn(this)
RsNewsManager
.
init
(
baseApplication
)
RsNewsManager
.
init
(
baseApplication
)
showToast
(
"登录成功"
)
showToast
(
"登录成功"
)
...
...
app/src/main/java/com/wenshu/youyou/ui/fragment/MyFragment.kt
View file @
7d36ccc6
This diff is collapsed.
Click to expand it.
app/src/main/java/com/wenshu/youyou/ui/fragment/PanFragment.kt
View file @
7d36ccc6
...
@@ -3,7 +3,6 @@ package com.wenshu.youyou.ui.fragment
...
@@ -3,7 +3,6 @@ package com.wenshu.youyou.ui.fragment
import
android.os.Bundle
import
android.os.Bundle
import
android.text.TextUtils
import
android.text.TextUtils
import
android.webkit.WebChromeClient
import
android.webkit.WebChromeClient
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity
import
com.github.lzyzsd.jsbridge.CallBackFunction
import
com.github.lzyzsd.jsbridge.CallBackFunction
import
com.github.lzyzsd.jsbridge.DefaultHandler
import
com.github.lzyzsd.jsbridge.DefaultHandler
import
com.wenshu.youyou.BuildConfig
import
com.wenshu.youyou.BuildConfig
...
@@ -11,7 +10,6 @@ import com.wenshu.youyou.R
...
@@ -11,7 +10,6 @@ import com.wenshu.youyou.R
import
com.wenshu.youyou.common.AppConfig
import
com.wenshu.youyou.common.AppConfig
import
com.wenshu.youyou.common.Constant
import
com.wenshu.youyou.common.Constant
import
com.wenshu.youyou.manager.UserManager
import
com.wenshu.youyou.manager.UserManager
import
com.wenshu.youyou.manager.YwhzManager
import
com.wenshu.youyou.mvp.model.PanActionInfo
import
com.wenshu.youyou.mvp.model.PanActionInfo
import
com.wenshu.youyou.mvp.model.TurntableBean
import
com.wenshu.youyou.mvp.model.TurntableBean
import
com.wenshu.youyou.mvp.presenters.PanPresenter
import
com.wenshu.youyou.mvp.presenters.PanPresenter
...
@@ -37,12 +35,12 @@ class PanFragment : BaseFragment(), PanView {
...
@@ -37,12 +35,12 @@ class PanFragment : BaseFragment(), PanView {
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
panPresenter
.
attachView
(
this
)
panPresenter
.
attachView
(
this
)
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
//
if (!TextUtils.isEmpty(userManager.userID)) {
// 登录成功的用户初始化鱼丸盒子
//
// 登录成功的用户初始化鱼丸盒子
if
(
userManager
.
userIsLogin
())
{
//
if (userManager.userIsLogin()) {
YwhzManager
.
init
(
baseApplication
)
//
YwhzManager.init(baseApplication)
}
//
}
}
//
}
}
}
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
...
@@ -151,7 +149,7 @@ class PanFragment : BaseFragment(), PanView {
...
@@ -151,7 +149,7 @@ class PanFragment : BaseFragment(), PanView {
}
}
try
{
try
{
activity
?.
let
{
YwSDK_WebActivity
.
open
(
it
)
}
//
activity?.let { YwSDK_WebActivity.open(it) }
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
showToast
(
"请重新退出账号登录"
)
showToast
(
"请重新退出账号登录"
)
...
...
app/src/main/java/com/wenshu/youyou/wenshuApplication.java
View file @
7d36ccc6
...
@@ -13,6 +13,7 @@ import androidx.multidex.MultiDexApplication;
...
@@ -13,6 +13,7 @@ import androidx.multidex.MultiDexApplication;
import
com.hjq.toast.ToastUtils
;
import
com.hjq.toast.ToastUtils
;
import
com.wenshu.youyou.common.Constant
;
import
com.wenshu.youyou.common.Constant
;
import
com.wenshu.youyou.manager.KsManager
;
import
com.wenshu.youyou.manager.KsManager
;
import
com.wenshu.youyou.manager.MhManager
;
import
com.wenshu.youyou.manager.MiitHelper
;
import
com.wenshu.youyou.manager.MiitHelper
;
import
com.wenshu.youyou.manager.TtCsjAdManager
;
import
com.wenshu.youyou.manager.TtCsjAdManager
;
import
com.wenshu.youyou.manager.TzManager
;
import
com.wenshu.youyou.manager.TzManager
;
...
@@ -125,10 +126,10 @@ public class wenshuApplication extends MultiDexApplication {
...
@@ -125,10 +126,10 @@ public class wenshuApplication extends MultiDexApplication {
// MhManager.INSTANCE.initWn(this);
// MhManager.INSTANCE.initWn(this);
// 天卓珊瑚
// 天卓珊瑚
TzManager
.
INSTANCE
.
initTz
(
this
);
//
TzManager.INSTANCE.initTz(this);
// 一览视频
// 一览视频
YlVideoManager
.
INSTANCE
.
init
(
this
);
//
YlVideoManager.INSTANCE.init(this);
// 瑞狮新闻
// 瑞狮新闻
// RsNewsManager.INSTANCE.initX5Environment(this);
// RsNewsManager.INSTANCE.initX5Environment(this);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment