package com.zxhl.main.page.activity

import android.view.View
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.utils.NoDoubleClickListener
import com.zxhl.cms.utils.WeChatLoginSuccessCallBall
import com.zxhl.cms.utils.WeChatUtils
import com.zxhl.main.R
import kotlinx.android.synthetic.main.activity_layout_third_party_login.*

class ThirdpartyLoginActivity:BaseActivity(), WeChatLoginSuccessCallBall {
    private var wechatutil: WeChatUtils? = null
    override fun onClick(v: View?) {

    }
    override fun before() {
        super.before()
        setStatusBarBackground(AppContext.get().resources.getColor(R.color.transparent))
    }

    override fun layoutID(): Int {
        return R.layout.activity_layout_third_party_login
    }

    override fun init() {
        wechatutil = WeChatUtils(this, this)
        id_ll_google_login?.setOnClickListener(object :NoDoubleClickListener(){
            override fun onNoDoubleClick(v: View?) {
                //WeChatUtils.
            wechatutil?.GoogleLogin()

            }

        })
        id_ll_facebook_login?.setOnClickListener(object :NoDoubleClickListener(){
            override fun onNoDoubleClick(v: View?) {
                wechatutil?.FackBooklogin()
            }

        })
    }

    override fun loginSuccess(lottery: String?) {
        this.finish()
    }
}