...
|
...
|
@@ -6,12 +6,14 @@ import android.support.v4.app.Fragment; |
|
|
import android.support.v4.app.FragmentManager;
|
|
|
import android.support.v4.app.FragmentPagerAdapter;
|
|
|
import android.support.v4.view.ViewPager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.util.Log;
|
|
|
import android.view.KeyEvent;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
import android.widget.RadioButton;
|
|
|
import android.widget.RadioGroup;
|
|
|
import android.widget.TextView;
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
import com.tencent.bugly.crashreport.CrashReport;
|
...
|
...
|
@@ -23,6 +25,8 @@ import com.yinhebairong.clasmanage.base.instant.InstantViews; |
|
|
import com.yinhebairong.clasmanage.base.instant.Layout;
|
|
|
import com.yinhebairong.clasmanage.base.instant.click.ClickView;
|
|
|
import com.yinhebairong.clasmanage.bean.BaseBean;
|
|
|
import com.yinhebairong.clasmanage.bean.TeacherInfoBean;
|
|
|
import com.yinhebairong.clasmanage.bean.UndealBean;
|
|
|
import com.yinhebairong.clasmanage.m.M;
|
|
|
import com.yinhebairong.clasmanage.ui.fragment.ParenthomeFragment;
|
|
|
import com.yinhebairong.clasmanage.ui.fragment.HomeFragment;
|
...
|
...
|
@@ -31,6 +35,7 @@ import com.yinhebairong.clasmanage.ui.fragment.MineFragment; |
|
|
import com.yinhebairong.clasmanage.ui.fragment.MineFragment_per;
|
|
|
import com.yinhebairong.clasmanage.ui.fragment.StuEvaFragment;
|
|
|
import com.yinhebairong.clasmanage.ui.fragment.StuEvaFragment_per;
|
|
|
import com.yinhebairong.clasmanage.ui.my.MyInfoActivity;
|
|
|
import com.yinhebairong.clasmanage.utils.SharedPreferenceUtil;
|
|
|
import com.yinhebairong.clasmanage.view.DebugLog;
|
|
|
import com.yinhebairong.clasmanage.widget.OptimizeViewpager;
|
...
|
...
|
@@ -38,6 +43,7 @@ import com.yinhebairong.clasmanage.widget.OptimizeViewpager; |
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
import butterknife.BindView;
|
|
|
import cn.jpush.android.api.JPushInterface;
|
|
|
import io.reactivex.Observer;
|
|
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
...
|
...
|
@@ -59,7 +65,8 @@ public class MainActivity extends BaseActivity { |
|
|
RadioButton mainRad4;
|
|
|
@InstantViews(R.id.main_group)
|
|
|
RadioGroup mainGroup;
|
|
|
|
|
|
@BindView(R.id.main_jxt_num)
|
|
|
TextView main_jxt_num;
|
|
|
// frag
|
|
|
private List<Fragment> listfrag = new ArrayList<>();
|
|
|
MyAdapter myAdapter;
|
...
|
...
|
@@ -237,4 +244,42 @@ public class MainActivity extends BaseActivity { |
|
|
}
|
|
|
return super.onKeyDown(keyCode, event);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected void onResume() {
|
|
|
super.onResume();
|
|
|
getUnDealNum();
|
|
|
}
|
|
|
|
|
|
private void getUnDealNum() {
|
|
|
String id = Config.IDENTITY == 0 ? "" : Config.id + "";
|
|
|
Api().getUnDealNum(Config.Token, id)
|
|
|
.subscribeOn(Schedulers.io())
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
|
.subscribe(new Observer<UndealBean>() {
|
|
|
@Override
|
|
|
public void onSubscribe(Disposable d) {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onNext(UndealBean info) {
|
|
|
if (info.getCode() == M.success) {
|
|
|
if(info!=null&&info.getData()!=null&&info.getData().getUndeal()!=0){
|
|
|
main_jxt_num.setText(info.getData().getUndeal()+"");
|
|
|
main_jxt_num.setVisibility(View.VISIBLE);
|
|
|
}
|
|
|
}else {
|
|
|
main_jxt_num.setVisibility(View.GONE);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onError(Throwable e) {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onComplete() {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
} |
...
|
...
|
|