package com.example.PersonalCenter;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.widget.Toast;

import androidx.annotation.NonNull;

import com.alibaba.fastjson.JSON;
import com.example.cmknowledgegraph.LoginActivity;
import com.example.tools.retuData;

public class HandlerHandle extends Handler {
    LoginActivity loginActivity;
    public HandlerHandle(LoginActivity loginActivity){
        this.loginActivity = loginActivity;
    }
    @Override
    public void handleMessage(@NonNull Message msg) {
        //根据登录状态请求不同的消息
        super.handleMessage(msg);

//        Bundle b = msg.getData();
//        String data = b.getString("msg");
//        Log.i("haha-====","==="+data);
//
//        retuData retuData = JSON.parseObject(data, com.example.tools.retuData.class);
//        if(retuData.msg.equals("success")){
//            //登录成功，返回主页面
//        }else{
////                    登录失败
//            Toast.makeText(loginActivity, retuData.msg, Toast.LENGTH_SHORT).show();
//
//
//        }
    }
}
