|
@@ -18,14 +18,17 @@ import androidx.viewpager.widget.ViewPager
|
|
|
import cn.bingoogolapple.bgabanner.BGABanner
|
|
import cn.bingoogolapple.bgabanner.BGABanner
|
|
|
import cn.muchinfo.rma.R
|
|
import cn.muchinfo.rma.R
|
|
|
import cn.muchinfo.rma.global.GlobalDataCollection
|
|
import cn.muchinfo.rma.global.GlobalDataCollection
|
|
|
|
|
+import cn.muchinfo.rma.global.data.BannerData
|
|
|
import cn.muchinfo.rma.global.data.NoticeData
|
|
import cn.muchinfo.rma.global.data.NoticeData
|
|
|
import cn.muchinfo.rma.global.data.PendingAuditInfoData
|
|
import cn.muchinfo.rma.global.data.PendingAuditInfoData
|
|
|
import cn.muchinfo.rma.global.data.SiteColumnDetailData
|
|
import cn.muchinfo.rma.global.data.SiteColumnDetailData
|
|
|
|
|
+import cn.muchinfo.rma.global.data.database.BannerEntity
|
|
|
import cn.muchinfo.rma.global.isBlankString
|
|
import cn.muchinfo.rma.global.isBlankString
|
|
|
import cn.muchinfo.rma.lifecycle.bindOptional
|
|
import cn.muchinfo.rma.lifecycle.bindOptional
|
|
|
import cn.muchinfo.rma.lifecycle.getAppCompatActivity
|
|
import cn.muchinfo.rma.lifecycle.getAppCompatActivity
|
|
|
import cn.muchinfo.rma.view.autoWidget.*
|
|
import cn.muchinfo.rma.view.autoWidget.*
|
|
|
import cn.muchinfo.rma.view.base.BaseFragment
|
|
import cn.muchinfo.rma.view.base.BaseFragment
|
|
|
|
|
+import cn.muchinfo.rma.view.base.app.Constant
|
|
|
import cn.muchinfo.rma.view.base.future.trade.GoodsTradeActivity
|
|
import cn.muchinfo.rma.view.base.future.trade.GoodsTradeActivity
|
|
|
import cn.muchinfo.rma.view.base.home.accountmanager.AccountManagerActivity
|
|
import cn.muchinfo.rma.view.base.home.accountmanager.AccountManagerActivity
|
|
|
import cn.muchinfo.rma.view.base.home.business.BusinessManagementActivity
|
|
import cn.muchinfo.rma.view.base.home.business.BusinessManagementActivity
|
|
@@ -49,10 +52,7 @@ import cn.muchinfo.rma.view.base.platinumtreasure.trade.PlatinumTradeActivity
|
|
|
import cn.muchinfo.rma.view.base.qhjhome.QhjInformationViewHolder
|
|
import cn.muchinfo.rma.view.base.qhjhome.QhjInformationViewHolder
|
|
|
import cn.muchinfo.rma.view.eventbus.EventConstent
|
|
import cn.muchinfo.rma.view.eventbus.EventConstent
|
|
|
import cn.muchinfo.rma.view.eventbus.MessageEvent
|
|
import cn.muchinfo.rma.view.eventbus.MessageEvent
|
|
|
-import com.blankj.utilcode.util.ActivityUtils
|
|
|
|
|
-import com.blankj.utilcode.util.ConvertUtils
|
|
|
|
|
-import com.blankj.utilcode.util.LogUtils
|
|
|
|
|
-import com.blankj.utilcode.util.ToastUtils
|
|
|
|
|
|
|
+import com.blankj.utilcode.util.*
|
|
|
import com.facebook.drawee.view.SimpleDraweeView
|
|
import com.facebook.drawee.view.SimpleDraweeView
|
|
|
import com.qmuiteam.qmui.util.QMUIDisplayHelper
|
|
import com.qmuiteam.qmui.util.QMUIDisplayHelper
|
|
|
import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
|
|
import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
|
|
@@ -292,33 +292,44 @@ class NewHomeFragment : BaseFragment<HomeViewModel>() {
|
|
|
verticalLayout {
|
|
verticalLayout {
|
|
|
background = resources.getDrawable(R.color.white)
|
|
background = resources.getDrawable(R.color.white)
|
|
|
|
|
|
|
|
- imageView {
|
|
|
|
|
- scaleType = ImageView.ScaleType.CENTER_CROP
|
|
|
|
|
- imageResource = R.mipmap.banner
|
|
|
|
|
- }.lparams(matchParent, autoSize(400))
|
|
|
|
|
|
|
+// imageView {
|
|
|
|
|
+// visibility = View.GONE
|
|
|
|
|
+// scaleType = ImageView.ScaleType.CENTER_CROP
|
|
|
|
|
+// imageResource = R.mipmap.banner
|
|
|
|
|
+// }.lparams(matchParent, autoSize(400))
|
|
|
|
|
|
|
|
inflateLayout<BGABanner>(R.layout.banner) {
|
|
inflateLayout<BGABanner>(R.layout.banner) {
|
|
|
- visibility = View.GONE
|
|
|
|
|
// TODO 目前没有banner
|
|
// TODO 目前没有banner
|
|
|
-// viewModel.bannerList.bindOptional(context) {
|
|
|
|
|
-// setData(
|
|
|
|
|
-// R.layout.item_fresco,
|
|
|
|
|
-// it,
|
|
|
|
|
-// null
|
|
|
|
|
-// )
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+ viewModel.bannerList.bindOptional(context) {
|
|
|
|
|
+ setData(
|
|
|
|
|
+ R.layout.item_fresco,
|
|
|
|
|
+ it,
|
|
|
|
|
+ null
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ setDelegate { banner, itemView, model, position ->
|
|
|
|
|
+ val data = model as BannerData
|
|
|
|
|
+ ToastUtils.showLong(data.url + "2-----")
|
|
|
|
|
+ }
|
|
|
|
|
+// setDelegate(new BGABanner.Delegate() {
|
|
|
|
|
+// @Override
|
|
|
|
|
+// public void onBannerItemClick(BGABanner banner, View itemView, @Nullable Object model, int position) {
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
|
|
|
|
|
|
|
|
|
|
- setAdapter(object : BGABanner.Adapter<CardView, String> {
|
|
|
|
|
|
|
+ setAdapter(object : BGABanner.Adapter<CardView, BannerData> {
|
|
|
override fun fillBannerItem(
|
|
override fun fillBannerItem(
|
|
|
banner: BGABanner?,
|
|
banner: BGABanner?,
|
|
|
itemView: CardView?,
|
|
itemView: CardView?,
|
|
|
- model: String?,
|
|
|
|
|
|
|
+ model: BannerData?,
|
|
|
position: Int
|
|
position: Int
|
|
|
) {
|
|
) {
|
|
|
val simpleDraweeView: SimpleDraweeView =
|
|
val simpleDraweeView: SimpleDraweeView =
|
|
|
itemView!!.findViewById(R.id.sdv_item_fresco_content)
|
|
itemView!!.findViewById(R.id.sdv_item_fresco_content)
|
|
|
- simpleDraweeView.setImageURI(Uri.parse(model))
|
|
|
|
|
|
|
+ simpleDraweeView.setImageURI(Uri.parse(SPUtils.getInstance().getString(
|
|
|
|
|
+ Constant.openApiUrl) + model?.imagepath?.substring(1)))
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -593,6 +604,11 @@ class NewInformationUI(private val baseFragment: Fragment, private val viewModul
|
|
|
fun jumpActivity(context : Context,code : String){
|
|
fun jumpActivity(context : Context,code : String){
|
|
|
val intent = Intent()
|
|
val intent = Intent()
|
|
|
if (code == "client_qhjcztx"){
|
|
if (code == "client_qhjcztx"){
|
|
|
|
|
+ if (GlobalDataCollection.instance?.bankAccountSignData?.accountcode.isNullOrEmpty()){
|
|
|
|
|
+ ToastUtils.showLong("请先添加提现账户信息")
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ intent.putExtra("selectindex",0)
|
|
|
intent.setClass(context,WithdrawalActivity::class.java)
|
|
intent.setClass(context,WithdrawalActivity::class.java)
|
|
|
}else if (code == "client_qhjzjxx"){
|
|
}else if (code == "client_qhjzjxx"){
|
|
|
intent.putExtra("goodsId", "0")
|
|
intent.putExtra("goodsId", "0")
|