|
@@ -5,15 +5,13 @@ import android.os.Bundle
|
|
|
import android.view.LayoutInflater
|
|
|
import android.view.View
|
|
|
import android.view.ViewGroup
|
|
|
+import androidx.appcompat.widget.AppCompatImageView
|
|
|
import androidx.appcompat.widget.AppCompatTextView
|
|
|
import androidx.constraintlayout.widget.ConstraintLayout
|
|
|
import androidx.fragment.app.DialogFragment
|
|
|
import com.yingyang.workbenches.R
|
|
|
import com.yingyang.workbenches.entity.GetPayImageEvent
|
|
|
-import com.yingyang.workbenches.entity.PackageInfoBean
|
|
|
import com.yingyangfly.baselib.ext.setOnSingleClickListener
|
|
|
-import com.yingyangfly.baselib.utils.LiveEventBusUtil
|
|
|
-import com.yingyangfly.baselib.utils.RxBusCodes
|
|
|
import com.yingyangfly.baselib.utils.ViewTool
|
|
|
import gorden.rxbus2.RxBus
|
|
|
|
|
@@ -22,8 +20,6 @@ import gorden.rxbus2.RxBus
|
|
|
*/
|
|
|
class PurchaseServicesDialog : DialogFragment() {
|
|
|
|
|
|
- private var weChatLayout: ConstraintLayout? = null
|
|
|
- private var alipayLayout: ConstraintLayout? = null
|
|
|
private var packageId = ""
|
|
|
private var payMoney = ""
|
|
|
private var packageName = ""
|
|
@@ -67,15 +63,18 @@ class PurchaseServicesDialog : DialogFragment() {
|
|
|
private fun findId(rootView: View) {
|
|
|
val tvPackageMoney = rootView.findViewById<AppCompatTextView>(R.id.tvPackageMoney)
|
|
|
tvPackageMoney.text = "您购买的是" + payMoney + "元" + packageName
|
|
|
- weChatLayout = rootView.findViewById(R.id.weChatLayout)
|
|
|
- alipayLayout = rootView.findViewById(R.id.alipayLayout)
|
|
|
+ val weChatLayout = rootView.findViewById<ConstraintLayout>(R.id.weChatLayout)
|
|
|
weChatLayout?.setOnSingleClickListener {
|
|
|
RxBus.get().send(GetPayImageEvent(packageId, "1", payMoney))
|
|
|
}
|
|
|
-
|
|
|
+ val alipayLayout = rootView.findViewById<ConstraintLayout>(R.id.alipayLayout)
|
|
|
alipayLayout?.setOnSingleClickListener {
|
|
|
RxBus.get().send(GetPayImageEvent(packageId, "2", payMoney))
|
|
|
}
|
|
|
+ val imageClose = rootView.findViewById<AppCompatImageView>(R.id.imageClose)
|
|
|
+ imageClose.setOnSingleClickListener {
|
|
|
+ dismiss()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private fun init() {
|