作者 liming

扫码BUG

... ... @@ -76,7 +76,7 @@ public class HdTjmbBean
private String inscription;
private int recommend;
private String content;
boolean isChecked;
boolean isChecked = false;
public boolean isChecked() {
return isChecked;
... ...
package com.yinhebairong.clasmanage.bean;
public class fanhuiBean {
/**
* id : 923
* type : level
* teacher_id : 7
* id_card : 530103199211180646
* batch : 202002281057193996
*/
private int id;
private String type;
private int teacher_id;
private String id_card;
private String batch;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public int getTeacher_id() {
return teacher_id;
}
public void setTeacher_id(int teacher_id) {
this.teacher_id = teacher_id;
}
public String getId_card() {
return id_card;
}
public void setId_card(String id_card) {
this.id_card = id_card;
}
public String getBatch() {
return batch;
}
public void setBatch(String batch) {
this.batch = batch;
}
}
... ...
... ... @@ -428,15 +428,12 @@ public class StuEvaFragment extends BaseFragment {
@Override
public void onNext(LoginEntity entity) {
if (entity.getCode() == 1000) {
M.toast(getActivity(), "登录成功");
Config.Token = entity.getData().getToken();
Config.ClassId = entity.getData().getUser().getClassId();
SharedPreferenceUtil.put(getActivity(), M.Token, entity.getData().getToken() + "");
SharedPreferenceUtil.put(getActivity(), M.ClassId, entity.getData().getUser().getClassId() + "");
SharedPreferenceUtil.put(getActivity(), M.UserBody, json + "");
}else {
M.toast(getActivity(), "登录失败");
}
}
... ...
... ... @@ -1292,7 +1292,7 @@ public class PjfxActivity_per extends BaseActivity implements OnChartValueSelect
YAxis leftAxis = char2[0].getAxisLeft();
leftAxis.setAxisMaximum(yaxis.get(0));
M.log("leftAxis", maxA + "");
leftAxis.setAxisMinimum(0); // 最小值 --
leftAxis.setAxisMinimum(-100); // 最小值 --
leftAxis.setDrawGridLines(true);
LineData cul_data = getData(current, colors[0]);// 设置本周 x , y 轴
... ...
... ... @@ -16,11 +16,14 @@ import android.view.WindowManager;
import android.widget.ImageButton;
import android.widget.Toast;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.DecodeHintType;
import com.google.zxing.Result;
import com.yinhebairong.clasmanage.Config;
import com.yinhebairong.clasmanage.R;
import com.yinhebairong.clasmanage.entity.ErweimaEntity;
import com.yinhebairong.clasmanage.network.ApiService;
import com.yinhebairong.clasmanage.network.ApiStore;
import com.yinhebairong.clasmanage.zxing.Jifen_Activity;
import com.yinhebairong.clasmanage.zxing.camera.CameraManager;
import com.yinhebairong.clasmanage.zxing.view.ViewfinderView;
... ... @@ -29,6 +32,11 @@ import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* 这个activity打开相机,在后台线程做常规的扫描;它绘制了一个结果view来帮助正确地显示条形码,在扫描的时候显示反馈信息,
* 然后在扫描成功的时候覆盖扫描结果
... ... @@ -188,10 +196,40 @@ public final class CaptureActivity extends Activity implements
Toast.makeText(this, "扫描成功", Toast.LENGTH_SHORT).show();
Intent intent = getIntent();
intent.putExtra("codedContent", rawResult.getText());
intent.putExtra("codedBitmap", barcode);
setResult(RESULT_OK, intent);
Log.i(TAG, "handleDecode: "+rawResult.getText());
ApiStore.createApi(ApiService.class)
.erweima(Config.Token,Config.id,rawResult.getText())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<ErweimaEntity>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(ErweimaEntity erweimaEntity) {
intent.setClass(CaptureActivity.this, Jifen_Activity.class);
startActivity(intent);
finish();
// if (erweimaEntity.getCode() == M.success){
//
// }else {
//
// }
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
}
}
... ...
... ... @@ -50,7 +50,7 @@
android:hint="请输入账号"
android:layout_marginLeft="@dimen/dp_32"
android:textSize="@dimen/sp_16"
android:text="18687807482"
android:text="15987125081"
android:textColor="@color/color_bdc4ce"
android:id="@+id/edit_zh"
android:maxLines="1"
... ...
... ... @@ -164,7 +164,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_21"
android:paddingTop="@dimen/dp_16"
android:visibility="visible"
/>
... ...
... ... @@ -6,7 +6,7 @@
<LinearLayout
android:id="@+id/item_b_X"
android:layout_width="wrap_content"
android:layout_width="@dimen/dp_90"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_19"
android:layout_marginTop="@dimen/dp_15"
... ... @@ -24,7 +24,7 @@
android:id="@+id/item_b_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="早读"
android:text="午托-午餐"
android:layout_gravity="center"
android:textColor="@color/color_3d444d"
android:textSize="@dimen/sp_13" />
... ...