Pārlūkot izejas kodu

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_RMA

Zhou.xiaoning 3 gadi atpakaļ
vecāks
revīzija
9e002996b4

+ 9 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/xhcp/XhcpHomeFragment.kt

@@ -2,6 +2,7 @@ package cn.muchinfo.rma.view.base.home.xhcp
 
 import android.annotation.SuppressLint
 import android.content.Intent
+import android.graphics.Color
 import android.graphics.Rect
 import android.net.Uri
 import android.os.Bundle
@@ -99,10 +100,10 @@ class XhcpHomeFragment : BaseFragment<XhcpHomeViewModel>(){
 
     fun initMessageMenuData() {
 
-        tabsArray.add("通知公告")
-        uiMessageList.add(xhcpAnnouncementUI.root)
         tabsArray.add("新闻资讯")
         uiMessageList.add(informationUI.root)
+        tabsArray.add("通知公告")
+        uiMessageList.add(xhcpAnnouncementUI.root)
 
         pagerAdapter = object : PagerAdapter() {
 
@@ -174,9 +175,10 @@ class XhcpHomeFragment : BaseFragment<XhcpHomeViewModel>(){
                 GlobalScope.launch(Dispatchers.Main) {
                 }
             }
-
             viewModel.queryNotice()
+
             verticalLayout {
+                // 标题栏
                 linearLayout {
                     background = resources.getDrawable(R.color.main_title_bg_color)
                     verticalLayout {
@@ -223,6 +225,7 @@ class XhcpHomeFragment : BaseFragment<XhcpHomeViewModel>(){
                         })
                         verticalLayout {
                             background = resources.getDrawable(R.color.white)
+                            // banner
                             inflateLayout<BGABanner>(R.layout.banner) {
                                 // TODO 目前没有banner
                                 viewModel.bannerList.bindOptional(context) {
@@ -304,7 +307,7 @@ class XhcpHomeFragment : BaseFragment<XhcpHomeViewModel>(){
                                 background = resources.getDrawable(R.color.white)
                                 viewPager = this
                                 adapter = pagerAdapter
-                            }.lparams(matchParent, matchParent)
+                            }.lparams(matchParent, autoSize(1000))
 
                             segment.setupWithViewPager(viewPager)
                             segment.selectTab(selectedTabIndex)
@@ -330,6 +333,8 @@ class XhcpInformationUI(private val baseFragment: Fragment, private val viewModu
     val root = _FrameLayout(baseFragment.context!!).apply {
         verticalLayout {
             viewModule.querySiteColumnDetail()
+
+            backgroundColor = Color.WHITE
             statusLayout(contentBlock = {
                 statusLayout = this
 //                bindTaskStatus(viewModule.status)

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/xhcp/XhcpHomeViewModel.kt

@@ -73,7 +73,7 @@ class XhcpHomeViewModel : BaseViewModel(){
         val params = mutableMapOf<String,String>().apply {
             put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
         }
-        MyApplication.getInstance()?.commonManager?.querySiteColumnDetail(params = params){isSuccess, respData, error ->
+        MyApplication.getInstance()?.commonManager?.queryYrdzSiteColumnDetail(params = params){isSuccess, respData, error ->
             if (isSuccess){
                 SiteColumnDetailList.postValue(respData)
             }