package com.quansu.heifengwuliu.activity

import android.os.Bundle
import com.quansu.heifengwuliu.base.MBActivity
import com.quansu.heifengwuliu.databinding.ActivityWebviewBinding
import com.ysnows.base.base.BRepository
import com.ysnows.base.base.BViewModel

open class WebViewActivity : MBActivity<BViewModel<BRepository>, ActivityWebviewBinding>() {

    override fun initCreate(savedInstanceState: Bundle?) {
        super.initCreate(savedInstanceState)
        binding.webView.loadUrl(intent?.extras?.getString("url", "http://www.baidu.com"))
    }

    override fun binding(): ActivityWebviewBinding {
        return ActivityWebviewBinding.inflate(layoutInflater)
    }

    override fun onDestroy() {
        binding.webView.destroy()
        super.onDestroy()
    }

}