Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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_goodmoney
Commits
6fb2b3a3
Commit
6fb2b3a3
authored
Feb 24, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化猜成请逻辑
parent
1c2147fd
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
51 additions
and
118 deletions
+51
-118
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+0
-3
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+1
-2
TtCsjAdManager.java
...main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
+7
-7
YlhAdManager.kt
...src/main/java/com/mints/goodmoney/manager/YlhAdManager.kt
+6
-3
MyInfo.java
...p/src/main/java/com/mints/goodmoney/mvp/model/MyInfo.java
+0
-5
MyPresenter.kt
...in/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
+8
-1
DomainInterceptor.java
.../main/java/com/mints/goodmoney/net/DomainInterceptor.java
+0
-80
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+10
-1
MobileLoginActivity.kt
...a/com/mints/goodmoney/ui/activitys/MobileLoginActivity.kt
+3
-0
WrapperActivity.kt
.../java/com/mints/goodmoney/ui/activitys/WrapperActivity.kt
+0
-4
WxLoginActivity.kt
.../java/com/mints/goodmoney/ui/activitys/WxLoginActivity.kt
+4
-5
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+8
-4
SceneIdiomFragment.kt
...ava/com/mints/goodmoney/ui/fragment/SceneIdiomFragment.kt
+2
-2
TaskCpdFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
+2
-1
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
6fb2b3a3
...
...
@@ -115,9 +115,6 @@ public class MintsApplication extends MultiDexApplication {
// 移动安全联盟 oaid
initMiitHelper
();
// 按渠道匹配代码位
ChannelManager
.
INSTANCE
.
updataCodeIdForRegisterChannel
(
null
);
// 优量汇
YlhAdManager
.
INSTANCE
.
initYlhAd
(
this
);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
6fb2b3a3
...
...
@@ -213,14 +213,13 @@ object Constant {
const
val
MERGE_KEY
=
"merge_key"
// wrapper type 0-新闻 1-小说 2-平台分红 3-来电秀 4-微转
5-聚乐云猜成语
// wrapper type 0-新闻 1-小说 2-平台分红 3-来电秀 4-微转
const
val
WRAPPER_TYPE
=
"wrapper_type"
const
val
WRAPPER_TYPE_NEWS
=
0
const
val
WRAPPER_TYPE_BOOK
=
1
const
val
WRAPPER_TYPE_FRIENDS
=
2
const
val
WRAPPER_TYPE_KYL
=
3
const
val
WRAPPER_TYPE_WZ
=
4
const
val
WRAPPER_TYPE_CCY
=
5
//1登录,2提现,3任务
const
val
RISK_EVENT_ID_LOGIN
=
1
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
View file @
6fb2b3a3
...
...
@@ -48,10 +48,10 @@ public class TtCsjAdManager {
/*信息流*/
public
static
String
TT_AD_NATIVEEXPRESS_XMLY
=
"945700753"
;
//喜马拉雅信息流
public
static
String
TT_AD_NATIVEEXPRESS_AWARD
=
"945562047"
;
//信息流弹窗
public
static
String
TT_AD_NATIVEEXPRESS_WALK
=
"945562
480
"
;
//走路
public
static
String
TT_AD_NATIVEEXPRESS_WALK
=
"945562
698
"
;
//走路
public
static
String
TT_AD_NATIVEEXPRESS_WATER
=
"945562698"
;
//喝水
public
static
String
TT_AD_NATIVEEXPRESS_MORNINGCLOCK
=
"945
627921
"
;
//早上打卡
public
static
String
TT_AD_NATIVEEXPRESS_EAT
=
"945
627922
"
;
//餐补
public
static
String
TT_AD_NATIVEEXPRESS_MORNINGCLOCK
=
"945
562698
"
;
//早上打卡
public
static
String
TT_AD_NATIVEEXPRESS_EAT
=
"945
562698
"
;
//餐补
public
static
String
TT_AD_NATIVEEXPRESS_ID_LIEBAO_LISTEXIT
=
"945562050"
;
//猎豹列表和退出
/*全屏广告*/
public
static
String
TT_AD_ALLVEDIO_ID_LIEBAO
=
"945562481"
;
//猎豹全屏带跳过按钮
...
...
@@ -132,16 +132,16 @@ public class TtCsjAdManager {
TT_AD_VEDIO_SMALLHOMEVEDIO
=
idBean
.
getCsjv3
();
// banner
TT_AD_BANNER_MY
=
idBean
.
getCsjv4
();
return
;
//
return;
}
// 对象为空,加载本地
渠道
loadLocalChannel
();
// 对象为空,加载本地
头条包
//
loadLocalChannel();
}
/**
* 加载本地
渠道
* 加载本地
头条包
*/
private
static
void
loadLocalChannel
()
{
String
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/YlhAdManager.kt
View file @
6fb2b3a3
...
...
@@ -73,14 +73,17 @@ object YlhAdManager {
YLH_AD_VEDIO_HOMEVEDIO_POSTID
=
idBean
.
ylhv2
YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID
=
idBean
.
ylhv2
return
//
return
}
// 对象为空,加载本地
渠道
loadLocalChannel
()
// 对象为空,加载本地
头条包
//
loadLocalChannel()
}
/**
* 加载本地头条包
*/
private
fun
loadLocalChannel
()
{
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(
channel
.
contains
(
ChannelManager
.
CHANNEL_TOUTIAO
))
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/MyInfo.java
View file @
6fb2b3a3
...
...
@@ -201,7 +201,6 @@ public class MyInfo implements Serializable {
private
String
downloadUrl
;
private
String
pkg
;
private
String
key
;
private
String
carrierTypeForStatus
;
private
String
doubleCarrierType
;
private
int
complete
;
private
int
status
=
0
;
...
...
@@ -225,10 +224,6 @@ public class MyInfo implements Serializable {
return
key
;
}
public
String
getCarrierTypeForStatus
()
{
return
carrierTypeForStatus
;
}
public
void
setNeedSeconds
(
int
needSeconds
)
{
this
.
needSeconds
=
needSeconds
;
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
View file @
6fb2b3a3
...
...
@@ -246,15 +246,22 @@ open class MyPresenter : BasePresenter<MyView>() {
})
}
fun
setHighTaskType
(
carrierType
:
String
,
value
:
String
)
{
this
.
setHighTaskType
(
carrierType
,
value
,
""
)
}
/**
* 设置高额任务状态
*
* value
*/
fun
setHighTaskType
(
carrierType
:
String
,
value
:
String
)
{
fun
setHighTaskType
(
carrierType
:
String
,
value
:
String
,
key
:
String
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
vo
[
"value"
]
=
value
if
(!
TextUtils
.
isEmpty
(
key
))
{
vo
[
"key"
]
=
key
}
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
setStatusInOneDayByCarrierType
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onCompleted
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/net/DomainInterceptor.java
deleted
100644 → 0
View file @
1c2147fd
package
com
.
mints
.
goodmoney
.
net
;
import
android.text.TextUtils
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
okhttp3.HttpUrl
;
import
okhttp3.Interceptor
;
import
okhttp3.Request
;
import
okhttp3.Response
;
class
DomainInterceptor
implements
Interceptor
{
public
static
Map
<
String
,
HttpUrl
>
sDomainHostUrl
=
new
HashMap
<>();
public
static
final
String
DOMAIN_NAME
=
"domain_name"
;
@Override
public
Response
intercept
(
Chain
chain
)
throws
IOException
{
return
chain
.
proceed
(
processRequest
(
chain
.
request
()));
}
private
Request
processRequest
(
Request
request
)
{
if
(
request
==
null
)
return
null
;
Request
.
Builder
newBuilder
=
request
.
newBuilder
();
// 是否有切换标识
String
domain_name
=
obtainDomainNameFromHeaders
(
request
);
HttpUrl
domain_url
;
if
(!
TextUtils
.
isEmpty
(
domain_name
))
{
domain_url
=
sDomainHostUrl
.
get
(
domain_name
);
// 删除标识header
newBuilder
.
removeHeader
(
DOMAIN_NAME
);
// 更改httpUrl
if
(
null
!=
domain_url
)
{
HttpUrl
httpUrl
=
request
.
url
()
.
newBuilder
()
.
scheme
(
domain_url
.
scheme
())
.
host
(
domain_url
.
host
())
.
port
(
domain_url
.
port
())
.
build
();
if
(
httpUrl
.
url
().
toString
().
contains
(
"api-gm"
))
{
String
replaceUrl
=
httpUrl
.
url
().
toString
().
replace
(
"/api-gm"
,
""
);
return
newBuilder
.
url
(
replaceUrl
)
.
build
();
}
return
newBuilder
.
url
(
httpUrl
.
url
())
.
build
();
}
}
return
newBuilder
.
build
();
}
/**
* @return DomainName
*/
public
static
String
obtainDomainNameFromHeaders
(
Request
request
)
{
List
<
String
>
headers
=
request
.
headers
(
DOMAIN_NAME
);
if
(
headers
.
size
()
==
0
)
return
null
;
if
(
headers
.
size
()
>
1
)
throw
new
IllegalArgumentException
(
"Only one Domain-Name in the headers"
);
return
request
.
header
(
DOMAIN_NAME
);
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
6fb2b3a3
...
...
@@ -174,7 +174,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
Constant
.
CARRIER_GAME_ONLINE
,
Constant
.
CARRIER_EATMEAL
,
Constant
.
CARRIER_RUISHINEWS_CHALLANGE
,
Constant
.
CARRIER_ZHANGYUE_CHALLENGE
,
Constant
.
CARRIER_XMLY_CHALLENGE
,
Constant
.
CARRIER_SHARE_NEWS
,
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
,
Constant
.
CARRIER_FIRSTDOWNLOADS
->
{
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
->
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
awardPresenter
.
reportAddCoinMsg
(
vo
)
...
...
@@ -182,6 +182,15 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardContent
.
text
=
"${curCoin}金币已到账"
tvAwardNext
.
text
=
"我知道了"
}
Constant
.
CARRIER_FIRSTDOWNLOADS
->
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
vo
[
"key"
]
=
extraId
awardPresenter
.
reportAddCoinMsg
(
vo
)
tvAwardContent
.
text
=
"${curCoin}金币已到账"
tvAwardNext
.
text
=
"我知道了"
}
Constant
.
CARRIER_BLESSINGBAG
->
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MobileLoginActivity.kt
View file @
6fb2b3a3
...
...
@@ -4,6 +4,7 @@ import android.Manifest
import
android.text.TextUtils
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.manager.*
import
com.mints.goodmoney.mvp.presenters.LoginPresenter
import
com.mints.goodmoney.mvp.views.LoginView
...
...
@@ -106,6 +107,8 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
// false-登录 true-绑定手机号
showToast
(
"登录成功"
)
AppConfig
.
scene_idiom_flag
=
true
progressDialog
?.
dismiss
()
readyGo
(
MainActivity
::
class
.
java
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WrapperActivity.kt
View file @
6fb2b3a3
...
...
@@ -68,10 +68,6 @@ class WrapperActivity : BaseActivity(), View.OnClickListener {
layoutWrapper
.
visibility
=
View
.
GONE
currentFragment
=
WzFragment
(
true
)
}
Constant
.
WRAPPER_TYPE_CCY
->
{
layoutWrapper
.
visibility
=
View
.
GONE
currentFragment
=
IdiomFragment
.
newInstance
(
""
)
}
else
->
{
tv_title
.
text
=
"书城"
currentFragment
=
MyZhangyueFragment
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WxLoginActivity.kt
View file @
6fb2b3a3
...
...
@@ -11,14 +11,11 @@ import cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.login.LoginApi
import
com.mints.goodmoney.login.OnLoginListener
import
com.mints.goodmoney.manager.BxmManager
import
com.mints.goodmoney.manager.RsNewsManager
import
com.mints.goodmoney.manager.SceneManager
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.manager.YwhzManager
import
com.mints.goodmoney.manager.*
import
com.mints.goodmoney.mvp.model.WXInfo
import
com.mints.goodmoney.mvp.presenters.LoginPresenter
import
com.mints.goodmoney.mvp.views.LoginView
...
...
@@ -130,6 +127,8 @@ class WxLoginActivity : BaseActivity()
RsNewsManager
.
init
(
baseApplication
)
BxmManager
.
bindUserData
()
AppConfig
.
scene_idiom_flag
=
true
showToast
(
"登录成功"
)
progressDialog
?.
dismiss
()
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
))
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
6fb2b3a3
...
...
@@ -89,8 +89,9 @@ class MyFragment : BaseFragment(),
private
var
curSignCoin
=
50
// 牧场人生安装奖励金币
private
var
pkgMCRSName
=
"
com.harvestmoon.android
"
private
var
pkgMCRSName
=
""
private
var
pkgMCRSCarrier
=
""
private
var
pkgMCRSKey
=
""
// 签到信息
private
var
signCardBean
:
SignCardBean
?
=
null
...
...
@@ -740,7 +741,8 @@ class MyFragment : BaseFragment(),
if
(
taskBean
.
otherConfig
!=
null
)
{
when
(
taskBean
.
otherConfig
.
status
)
{
0
->
{
pkgMCRSCarrier
=
taskBean
.
otherConfig
.
carrierTypeForStatus
pkgMCRSCarrier
=
Constant
.
CARRIER_FIRSTDOWNLOADS
pkgMCRSKey
=
taskBean
.
otherConfig
.
key
pkgMCRSName
=
taskBean
.
otherConfig
.
pkg
DownloadApkManager
.
downloadApk
(
requireActivity
(),
taskBean
.
otherConfig
.
downloadUrl
,
pkgMCRSName
)
// 开启广播监听安装事件
...
...
@@ -749,7 +751,8 @@ class MyFragment : BaseFragment(),
1
->
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
taskBean
.
otherConfig
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_FIRSTDOWNLOADS
+
"_"
+
taskBean
.
otherConfig
.
key
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_FIRSTDOWNLOADS
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
taskBean
.
otherConfig
.
key
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
onDestoryBroadcastReceiver
()
...
...
@@ -865,6 +868,7 @@ class MyFragment : BaseFragment(),
if
(
AppConfig
.
scene_flag
)
{
// 猜成语
SceneUtil
.
cCy
(
requireActivity
())
AppConfig
.
scene_idiom_flag
=
true
}
else
{
SceneManager
.
signIn
(
requireActivity
())
}
...
...
@@ -1292,7 +1296,7 @@ class MyFragment : BaseFragment(),
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_HIGH_ACTIVITY
,
"3"
)
}
else
if
(
TextUtils
.
equals
(
pkg
,
pkgMCRSName
))
{
// 上报后台更新按钮状态
myPresenter
.
setHighTaskType
(
pkgMCRSCarrier
,
"1"
)
myPresenter
.
setHighTaskType
(
pkgMCRSCarrier
,
"1"
,
pkgMCRSKey
)
}
}
catch
(
e
:
Exception
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/SceneIdiomFragment.kt
View file @
6fb2b3a3
...
...
@@ -51,8 +51,8 @@ class SceneIdiomFragment : BaseFragment(), OnRefreshListener {
// 游客登录
showToast
(
"请先登录账号"
)
}
else
{
//
只有用户token失效或主动退出时 scene_idiom_flag=true
//
防止新户登录后 界面没有刷新
//
防止界面切换没有刷新
//
只有用户token失效、登录、手动退出、我的界面-猜成语时 scene_idiom_flag=true
if
(
AppConfig
.
scene_idiom_flag
)
{
AppConfig
.
scene_idiom_flag
=
false
idiomFragment
.
refreshData
(
0
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
View file @
6fb2b3a3
...
...
@@ -587,6 +587,8 @@ class TaskCpdFragment : BaseFragment(), TaskView,
val
currentPkgName
=
mFakeTaskList
[
position
].
currentPkgName
if
(
currentPkgName
!=
null
)
{
onDestoryBroadcastReceiver
()
// 时间为0
if
(
needUseTime
==
0
)
{
mFakeTaskList
[
position
].
state
=
2
...
...
@@ -626,7 +628,6 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
}
onDestoryBroadcastReceiver
()
}
else
{
if
(
AppTryPlayManager
.
getTryPlayIsOK
(
currentPkgName
,
5
))
{
// 试玩时间不足
...
...
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