package com.qhclh.ytzh.index;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.TextView;

import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseActivity;


import butterknife.BindView;
import cn.jpush.android.api.JPushInterface;

/**
 * Created by 青花瓷 on 2017/12/6.
 */

public class GetjpActivity extends BaseActivity{
    @BindView(R.id.toolbar)
    Toolbar mToolbar;
    @BindView(R.id.tv_getjp)
    TextView tv_getjp;
    @Override
    protected int setLayoutId() {
        return R.layout.act_getjp;
    }

    @Override
    protected void initView() {
        initToolbar(mToolbar, "消息", new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

    @Override
    protected void initData() {
        Intent intent = getIntent();
        if (null != intent) {
            Bundle bundle = getIntent().getExtras();
            String title = null;
            String content = null;
            if(bundle!=null){
                title = bundle.getString(JPushInterface.EXTRA_NOTIFICATION_TITLE);
                content = bundle.getString(JPushInterface.EXTRA_ALERT);

            }
            tv_getjp.setText("消息 : " + content);
        }
    }

    @Override
    protected void initOper() {

    }
}
