作者 朱振飞

add

package com.yinhebairong.clasmanage.bean;
import java.io.Serializable;
public class UndealBean implements Serializable {
/**
* code : 1
* msg : 未处理数量
* time : 1589276231
* data : {"total":0,"undeal":48}
*/
private int code;
private String msg;
private String time;
private DataBean data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public static class DataBean {
/**
* total : 0
* undeal : 48
*/
private int total;
private int undeal;
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public int getUndeal() {
return undeal;
}
public void setUndeal(int undeal) {
this.undeal = undeal;
}
}
}
... ...
... ... @@ -16,6 +16,7 @@ import com.yinhebairong.clasmanage.bean.TeacherInfoBean;
import com.yinhebairong.clasmanage.bean.TeachersStudentsScoreList;
import com.yinhebairong.clasmanage.bean.TzMbBean;
import com.yinhebairong.clasmanage.bean.TztjmbBean;
import com.yinhebairong.clasmanage.bean.UndealBean;
import com.yinhebairong.clasmanage.entity.ActiveSignEntity;
import com.yinhebairong.clasmanage.entity.AllevaitemsEntity;
import com.yinhebairong.clasmanage.entity.BjListEntity;
... ... @@ -809,4 +810,8 @@ public interface ApiService {
, @Field("filesize") String filesize
, @Field("mimetype") String mimetype
);
/* 未处理数量*/
@POST("/api/home_school/getUnDealNum")
Observable<UndealBean> getUnDealNum(@Header("token") String token, @Query("student_id") String student_id);
}
\ No newline at end of file
... ...
... ... @@ -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() {
}
});
}
}
... ...
... ... @@ -260,7 +260,7 @@ public class Fbzy_Activity extends BaseActivity {
if (jxtEntity.getData().getVideo() != null) {
for (int i = 0; i < jxtEntity.getData().getAudio().size(); i++) {
for (int i = 0; i < jxtEntity.getData().getVideo().size(); i++) {
videoUrl.add(jxtEntity.getData().getVideo().get(i));
picAndVideo.add(new JxtImageEntity(jxtEntity.getData().getVideo().get(i), 2, getNetVideoBitmap(jxtEntity.getData().getVideo().get(i))));
}
... ...
... ... @@ -48,7 +48,7 @@
android:background="@null"
android:hint="请输入账号"
android:maxLines="1"
android:text="13064230586"
android:text="15987125081"
android:textColor="@color/color_bdc4ce"
android:textSize="@dimen/sp_16" />
... ...
... ... @@ -89,7 +89,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_10"
android:text=""
android:text="ss"
android:textColor="@color/color_fff"
android:background="@drawable/shape_solid_16_ff5455"
android:paddingLeft="@dimen/dp_2"
... ...
... ... @@ -203,8 +203,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginRight="@dimen/dp_16"
android:layout_marginBottom="@dimen/dp_12"
android:textColor="#8C9198"
android:textSize="@dimen/sp_12" />
<LinearLayout
... ...