package com.tengshisoft.mainmodule.fragments;

import android.view.View;
import android.widget.Button;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.tengshisoft.mainmodule.R;
import com.tengshisoft.mainmodule.R2;
import com.tenlionsoft.baselib.constant.PathConfig;
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
import com.tenlionsoft.baselib.utils.LogUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * 作者: adam
 * 日期: 2022/3/31 - 9:26 上午
 * 邮箱: itgaojian@163.com
 * 描述: 个人中心
 */
@Route(path = PathConfig.PATH_MODULE_MAIN_FRAGMENT_USER)
public class MineFragment extends BaseFragment {

    @BindView(R2.id.btn_login_out)
    Button mBtnLoginOut;
    private Unbinder mBind;

    @Override
    protected void setDataToView(View dataView) {
        mBind = ButterKnife.bind(this, dataView);
        LogUtils.e("MineFragment");
        doSync();
        setStateView(STATE_SUCCESS);
        mSrlView.setEnableLoadMore(false);
        mSrlView.setEnableRefresh(false);
        mBtnLoginOut.setOnClickListener(v->doLoginOut());
    }

    private void doLoginOut() {
        this.mActivity.reStartApp();
    }

    /**
     * 同步数据 需要更新9张表
     */
    private void doSync() {

    }

    @Override
    protected void refreshView() {

    }

    @Override
    protected void loadMoreData() {

    }

    @Override
    protected int getContentViewId() {
        return R.layout.fragment_mine;
    }
}
