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
e24bef1a
Commit
e24bef1a
authored
Dec 04, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
939c3156
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
22 deletions
+42
-22
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+33
-19
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+3
-3
ShareDialog.kt
...c/main/java/com/mints/goodmoney/ui/widgets/ShareDialog.kt
+6
-0
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
e24bef1a
...
...
@@ -12,7 +12,6 @@ import com.mints.goodmoney.ad.video.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.ShumeiManager
import
com.mints.goodmoney.manager.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.TTPreLoadExpressManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.WnManager
...
...
@@ -181,29 +180,14 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 新人福利 放到个人中心展示 防止首页红包转动异常
// 设置视频权限
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVedioAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount}"
)
// 设置视频权重
initAdWeight
(
data
)
// 调用金币视频信息接口
homePresenter
.
getHomeVedioMsg
()
// 手机号登录未绑定微信 弹出界面不能关闭
if
(
userManager
.
userIsLogin
()
&&
TextUtils
.
isEmpty
(
userManager
.
wxOpenid
))
{
if
(
bindWxDialog
==
null
)
{
bindWxDialog
=
BindWxDialog
(
requireActivity
())
bindWxDialog
!!
.
show
()
}
}
else
{
if
(
bindWxDialog
!=
null
&&
bindWxDialog
!!
.
isShowing
)
{
bindWxDialog
?.
dismiss
()
}
}
loginMobileBindWx
()
}
override
fun
getHomeVedioMsgSuc
(
data
:
MainVedioMsgBean
)
{
...
...
@@ -501,4 +485,34 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
})
powerDialog
!!
.
show
()
}
/**
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVedioAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount}"
)
}
/**
* 手机号登录未绑定微信 弹出界面不能关闭
*/
private
fun
loginMobileBindWx
()
{
if
(
userManager
.
userIsLogin
()
&&
TextUtils
.
isEmpty
(
userManager
.
wxOpenid
))
{
if
(
bindWxDialog
==
null
)
{
bindWxDialog
=
BindWxDialog
(
requireActivity
())
bindWxDialog
!!
.
show
()
}
}
else
{
if
(
bindWxDialog
!=
null
&&
bindWxDialog
!!
.
isShowing
)
{
bindWxDialog
?.
dismiss
()
}
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
e24bef1a
...
...
@@ -817,9 +817,9 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
myPresenter
.
cmtShareStatus
()
Timer
().
schedule
(
1000
,{
shareDialog
.
dismiss
()
})
//
Timer().schedule(1000,{
//
shareDialog.dismiss()
//
})
}
})
shareDialog
.
show
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/ShareDialog.kt
View file @
e24bef1a
...
...
@@ -168,6 +168,9 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) {
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
"请先安装微信"
)
}
Timer
().
schedule
(
1000
,{
dismiss
()
})
}
private
fun
shareWechatFavoite
()
{
...
...
@@ -189,5 +192,8 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) {
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
"请先安装微信"
)
}
Timer
().
schedule
(
1000
,{
dismiss
()
})
}
}
\ No newline at end of file
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