Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
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
杨凯
YDL-Component-Medical
Commits
21900601
Commit
21900601
authored
Dec 24, 2019
by
konghaorui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复首页数据显示问题
parent
9adaa2d4
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
4 deletions
+19
-4
MainActivity.kt
app/src/main/java/com/ydl/component/MainActivity.kt
+1
-2
FragmentContainerActivity.kt
app/src/main/java/com/ydl/component/music/FragmentContainerActivity.kt
+4
-0
config.gradle
config.gradle
+1
-1
home_data_xlzx.json
m-home/src/main/assets/home_data_xlzx.json
+0
-0
HomePresenterImpl.kt
m-home/src/xlzx/java/com/yidianling/home/presenter/HomePresenterImpl.kt
+5
-0
YdlHomeFragment.kt
m-home/src/xlzx/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
+2
-0
HomePresenterImpl.kt
m-home/src/ydl/java/com/yidianling/home/presenter/HomePresenterImpl.kt
+6
-1
No files found.
app/src/main/java/com/ydl/component/MainActivity.kt
View file @
21900601
...
...
@@ -15,7 +15,6 @@ import com.alibaba.android.arouter.facade.annotation.Route
import
com.alibaba.android.arouter.launcher.ARouter
import
com.tbruyelle.rxpermissions2.RxPermissions
import
com.umeng.analytics.MobclickAgent
import
com.ydl.component.home.HomeActivity
import
com.ydl.component.music.FragmentContainerActivity
import
com.ydl.component.mvp.DemoContract
import
com.ydl.component.mvp.DemoPresenter
...
...
@@ -141,7 +140,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
.
navigation
()
}
bt_to_home
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
HomeActivity
::
class
.
java
)
)
FragmentContainerActivity
.
start
(
this
,
"YdlHomeFragment"
)
}
}
...
...
app/src/main/java/com/ydl/component/music/FragmentContainerActivity.kt
View file @
21900601
...
...
@@ -8,6 +8,7 @@ import com.ydl.component.mvp.DemoPresenter
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import
com.yidianling.dynamic.trendsHome.TrendsHomeFragment
import
com.yidianling.home.ui.fragment.YdlHomeFragment
import
com.yidianling.im.ui.page.NewMultiMessageFragment
...
...
@@ -63,6 +64,9 @@ class FragmentContainerActivity : BaseLceActivity<DemoContract.View, DemoContra
if
(
"TrendsHomeFragment"
==
fragmentName
)
{
return
TrendsHomeFragment
()
}
if
(
"YdlHomeFragment"
==
fragmentName
)
{
return
YdlHomeFragment
()
}
return
PlayFragment
()
}
}
config.gradle
View file @
21900601
...
...
@@ -46,7 +46,7 @@ ext {
"m-consultant"
:
"0.0.52"
,
"m-fm"
:
"0.0.24"
,
"m-user"
:
"0.0.42"
,
"m-home"
:
"0.0.
7
"
,
"m-home"
:
"0.0.
8.2
"
,
"m-im"
:
"0.0.4.1"
,
"m-dynamic"
:
"0.0.2"
,
...
...
m-home/src/main/assets/home_data_xlzx.json
View file @
21900601
This source diff could not be displayed because it is too large. You can
view the blob
instead.
m-home/src/xlzx/java/com/yidianling/home/presenter/HomePresenterImpl.kt
View file @
21900601
...
...
@@ -243,6 +243,11 @@ class HomePresenterImpl : BaseHomePresenterImpl<IHomeContract.View, IHomeContrac
mView
.
homeDataFail
(
msg
)
}
},
Action
{
if
(
homeList
.
size
!=
9
){
mView
.
homeDataFail
(
""
)
return
@Action
}
homeList
.
sortWith
(
compareBy
{
it
.
type
})
//更新本地缓存数据,这边顶部数据保存了两份,一个10001,一个10002,防止第二次进来读取的时候homeDataResponse回调中的remove(0)把10002删除
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
View file @
21900601
...
...
@@ -332,8 +332,10 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
if
(
home_swipe_refresh_layout
!=
null
)
{
home_swipe_refresh_layout
.
isRefreshing
=
false
}
if
(!
TextUtils
.
isEmpty
(
msg
)){
ToastHelper
.
show
(
msg
)
}
}
override
fun
couponDataResponse
(
data
:
List
<
CouponBean
>)
{
showCouponDialog
(
data
)
...
...
m-home/src/ydl/java/com/yidianling/home/presenter/HomePresenterImpl.kt
View file @
21900601
...
...
@@ -20,7 +20,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.functions.Action
import
io.reactivex.functions.Consumer
import
io.reactivex.schedulers.Schedulers
import
java.util.*
import
java.util.concurrent.TimeUnit
...
...
@@ -135,6 +134,12 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
mHomeDisposable
?.
dispose
()
}
},
Action
{
if
(
homeList
.
size
!=
11
){
mView
.
homeDataFail
(
""
)
return
@Action
}
homeList
.
sortWith
(
compareBy
{
it
.
type
})
//更新本地缓存数据
...
...
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