package com.yidian.shenghuoquan.bdemo.ui

import android.os.Bundle
import com.yidian.bcommon.base.BaseActivity
import com.yidian.bcommon.constant.XRouterPathConstants
import com.yidian.bcommon.extensions.clickAntiShake
import com.yidian.shenghuoquan.bdemo.databinding.ActivityDemoTestBinding
import com.yidian.xpage.XPageManager


/**
 * 新车测试厂，地板油走起
 */
class DemoTestActivity : BaseActivity<ActivityDemoTestBinding>() {

  override fun createViewBinding(): ActivityDemoTestBinding {
    return ActivityDemoTestBinding.inflate(layoutInflater)
  }

  override fun getXPageName(): String {
    return XRouterPathConstants.DEMO_TEST_ACTIVITY
  }

  override fun init(savedInstanceState: Bundle?) {
    super.init(savedInstanceState)
    initClick()
  }

  private fun initClick() {
    // 模拟h5进入确认订单的参数和逻辑
    viewBind.btnOrderConfirm.clickAntiShake {
      val hashMap = HashMap<String, Any?>()
      hashMap["marketing_id"] = 121231321// 活动id
      XPageManager.push(XRouterPathConstants.CONFIRM_ORDER_ACTIVITY, hashMap)
    }
  }
}
