package com.zswc.creativity.activity

import android.os.Bundle
import android.text.TextUtils
import com.zswc.creativity.base.MBActivity
import com.zswc.creativity.databinding.ActivityCertificationBinding
import com.zswc.creativity.databinding.ActivitySettingBinding
import com.zswc.creativity.model.User
import com.zswc.creativity.vmodel.CertificationVModel
import com.zswc.creativity.vmodel.SettingVModel

/**
 * 实名认证
 *Created by shihuiyun
 *on 2020/9/24
 */
class CertificationActivity : MBActivity<CertificationVModel, ActivityCertificationBinding>() {

    override fun init(savedInstanceState: Bundle?) {
        super.init(savedInstanceState)
        var user=User.get()
        if(null!=user){
            var phone=user.phone
            vm.realPhone.value=user.phone
            if(!TextUtils.isEmpty(phone)){
                var ss=phone.substring(0,3)
                var s1=phone.substring(phone.length-4,phone.length)
                var s2= "$ss****$s1"
                vm.phone.value=s2
            }
        }


    }

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

    override fun vmClass(): Class<CertificationVModel> {
        return CertificationVModel::class.java
    }

    override fun title(): String? {
        return "实名认证"
    }


}
