修改9.15号提出的问题

This commit is contained in:
wangdongsheng 2021-09-15 18:38:26 +08:00
parent ed105e8ab7
commit a1e735e352
16 changed files with 115 additions and 71 deletions

View File

@ -240,6 +240,8 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
Constant.BACKGROUND =userBankcard.getBankAccount();
navInfoEditor.putString("idNumber",userBankcard.getIdNumber());//银行卡账号
Constant.ID_NUMBER=userBankcard.getIdNumber();
navInfoEditor.putString("bankName",userBankcard.getBankName());//銀行姓名
Constant.BACKGROUND_NAME=userBankcard.getBankName();
}
UserDetailBean.BodyBean.UserAuthBean userAuth = body.getUserAuth();
if (userAuth!=null){//存储身份证信息

View File

@ -8,6 +8,7 @@ import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Matrix;
import android.os.Bundle;
import android.os.Handler;
@ -30,6 +31,7 @@ import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseActivity;
import com.navinfo.outdoor.room.PoiEntity;
import com.navinfo.outdoor.util.AWMp4ParserHelper;
import com.navinfo.outdoor.util.Geohash;
import com.navinfo.outdoor.util.GeometryTools;
import com.navinfo.outdoor.util.MyTecentLocationSource;
import com.navinfo.outdoor.util.SystemTTS;
@ -267,8 +269,9 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
}
private void initLine() {
String geo = poiEntity.getGeoWkt();
if (geo != null) {
String geoWkt = poiEntity.getGeoWkt();
if (geoWkt != null) {
String geo = Geohash.getInstance().decode(geoWkt);
Geometry geometry = GeometryTools.createGeometry(geo);
if (geometry.getGeometryType().equals("LineString")) {//线
BitmapDescriptor bitmapLine = null;
@ -284,7 +287,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
// 折线设置圆形线头
.lineCap(true)
// 折线的颜色为绿色
.color(0xff00ff00)
.color(Color.parseColor("#0096FF"))
// 折线宽度为5像素
.width(20)
.arrow(true)

View File

@ -197,7 +197,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
netWork(httpParams);
break;
case R.id.btn_weChat_binding:
Toast.makeText(this, "微信暂未开通", Toast.LENGTH_SHORT).show();
Toast.makeText(this, "功能未开通", Toast.LENGTH_SHORT).show();
break;
}
}

View File

@ -95,6 +95,7 @@ public class Constant {
public static String NAME = null;//身份证姓名
public static String ID_NUMBER = null;//银行卡号
public static String BACKGROUND = null;//银行卡编码
public static String BACKGROUND_NAME = null;//银行卡名称
public static int SEX = -1;//性别
public static String QQ = null;
public static String WCHAR = null;
@ -188,7 +189,7 @@ public class Constant {
public static TencentMap.OnMarkerClickListener markerClickListener=null;
public static final String NAVIN_FO="9.14.2";//版本
public static final String NAVIN_FO="9.15";//版本
/**
* 联系我们的QQ群名称和QQ群号

View File

@ -42,9 +42,7 @@ public class AboutFragment extends BaseFragment implements View.OnClickListener
RelativeLayout rlAbout = findViewById(R.id.rl_about);
rlAbout.setOnClickListener(this);
RelativeLayout rlServe = findViewById(R.id.rl_serve);
rlServe.setOnClickListener(this);
RelativeLayout rlPrivilege = findViewById(R.id.rl_privilege);
rlPrivilege.setOnClickListener(this);
ImageView ivAboutFinish = findViewById(R.id.iv_about_finish);
ivAboutFinish.setOnClickListener(this);
}
@ -60,10 +58,10 @@ public class AboutFragment extends BaseFragment implements View.OnClickListener
startActivity(regardIntent);
break;
case R.id.rl_serve:
intint2WebActivity(HttpInterface.MAP_AGREEMENT, null);
// intint2WebActivity(HttpInterface.MAP_AGREEMENT, null);
break;
case R.id.rl_privilege:
intint2WebActivity(HttpInterface.MAP_PRIVACY, null);
// intint2WebActivity(HttpInterface.MAP_PRIVACY, null);
break;
}
}

View File

@ -1,6 +1,7 @@
package com.navinfo.outdoor.fragment;
import android.annotation.SuppressLint;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Message;
import android.util.Log;
@ -237,16 +238,13 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
Button btnFilter = findViewById(R.id.btn_filter);
btnFilter.setOnClickListener(this);
RelativeLayout rlDraw = findViewById(R.id.rl_draw);
rlDraw.setOnClickListener(this);
checkOk = findViewById(R.id.check_ok);
Button btnDraw = findViewById(R.id.btn_draw);
btnDraw.setOnClickListener(this);
if (Constant.LEVEL == 1 || Constant.LEVEL == 2) {
checkOk.setEnabled(true);
btnDraw.setEnabled(true);
btnDraw.setBackgroundResource(R.drawable.shape_radius_bg);
} else {
checkOk.setEnabled(false);
btnDraw.setEnabled(false);
btnDraw.setBackgroundResource(R.drawable.shape_red_bg_disable);
}
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
recyclerFilter = findViewById(R.id.recycler_filter);
@ -287,9 +285,15 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
checkOk.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
filterAdapter.setAddFilter(isChecked);
filterAdapter.notifyDataSetChanged();
btnChock.clear();
if (Constant.LEVEL == 1 || Constant.LEVEL == 2) {
filterAdapter.setAddFilter(isChecked);
filterAdapter.notifyDataSetChanged();
btnChock.clear();
} else {
checkOk.setChecked(false);
Toast.makeText(getActivity(), "您的等级暂不具备此权限哦", Toast.LENGTH_SHORT).show();
}
}
});
filterAdapter.setItemCLick(new FilterAdapter.ItemCLick() {
@ -322,24 +326,24 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.rl_draw:
if (Constant.LEVEL != 1 && Constant.LEVEL != 2) {
case R.id.btn_draw:
if (Constant.LEVEL == 1 || Constant.LEVEL == 2) {
if (btnChock == null) {
return;
}
StringBuilder a = new StringBuilder();
for (int i = 0; i < btnChock.size(); i++) {
if (i == btnChock.size() - 1) {
a.append(btnChock.get(i).getTaskId());
} else {
a.append(btnChock.get(i).getTaskId()).append(",");
}
}
initBatch(a.toString());
} else {
Toast.makeText(getActivity(), "您的等级暂不具备此权限哦", Toast.LENGTH_SHORT).show();
}
break;
case R.id.btn_draw:
if (btnChock == null) {
return;
}
StringBuilder a = new StringBuilder();
for (int i = 0; i < btnChock.size(); i++) {
if (i == btnChock.size() - 1) {
a.append(btnChock.get(i).getTaskId());
} else {
a.append(btnChock.get(i).getTaskId()).append(",");
}
}
initBatch(a.toString());
break;
case R.id.btn_filter:
Message obtain = Message.obtain();

View File

@ -1,7 +1,10 @@
package com.navinfo.outdoor.fragment;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
@ -75,9 +78,12 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
return R.layout.gathering_fragment;
}
@SuppressLint("CommitPrefEdits")
@Override
protected void initView() {
super.initView();
SharedPreferences navInfo = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
SharedPreferences.Editor navInfoEditor = navInfo.edit();
ImageView ivGathering = findViewById(R.id.iv_gathering);
ivGathering.setOnClickListener(this);
ImageView imageBank = findViewById(R.id.iv_bank);
@ -89,12 +95,23 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
TextView tvName = (TextView) findViewById(R.id.tv_name);
etBankNum = (EditText) findViewById(R.id.et_bank_num);
gatheringCamera = (ImageView) findViewById(R.id.gathering_camera);
gatheringCamera.setOnClickListener(this);
gatheringCamera.setOnClickListener(this);/*
String bankAccount = navInfo.getString("bankAccount", null);
String bank = navInfo.getString("bankName", null);
String idNumber = navInfo.getString("idNumber", null);
if (bankAccount!=null&&!bankAccount.equals("")&&bank!=null&&!bank.equals("")&&idNumber!=null&&!idNumber.equals("")){
etBankNum.setText(idNumber);
tvBank.setText(bank);
value=bankAccount;
btnBank.setText("重新绑定");
}*/
if (Constant.NAME!=null){
tvName.setText(Constant.NAME);
}
if (Constant.ID_NUMBER!=null){
if (Constant.ID_NUMBER!=null&&Constant.BACKGROUND_NAME!=null&&Constant.BACKGROUND!=null){
etBankNum.setText(Constant.ID_NUMBER);
tvBank.setText(Constant.BACKGROUND_NAME);
value=Constant.BACKGROUND;
btnBank.setText("重新绑定");
}
}
@ -164,7 +181,11 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
private void gatheringNetWork() {
ArrayList<File> gatheringList = new ArrayList<>();
if (gatheringCamera.getTag() == null) {
Toast.makeText(getActivity(), "请先拍银行卡", Toast.LENGTH_SHORT).show();
if (Constant.ID_NUMBER==null){
Toast.makeText(getActivity(), "请先拍银行卡", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(getActivity(), "如果需要重新绑定请先拍照银行卡", Toast.LENGTH_SHORT).show();
}
return;
}
String gatheringCameraTag = (String) gatheringCamera.getTag();
@ -176,6 +197,11 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
return;
}
}
if (value == null) {
Toast.makeText(getActivity(), "请选择所属银行", Toast.LENGTH_SHORT).show();
return;
}
String bank = tvBank.getText().toString().trim();
showLoadingDialog();
HttpParams httpParams = new HttpParams();
httpParams.put("userid", Constant.USHERED);
@ -197,7 +223,12 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Constant.BACKGROUND =value;
Constant.ID_NUMBER=etBankAccount;
Constant.BACKGROUND_NAME=bank;
Constant.ID_NUMBER = etBankAccount;
/*navInfoEditor.putString("bankAccount", value);
navInfoEditor.putString("idNumber", etBankAccount);
navInfoEditor.putString("bankName",bank);
navInfoEditor.commit();*/
getActivity().finish();
return false;
}

View File

@ -39,8 +39,6 @@ import java.util.Objects;
public class MineFragment extends BaseFragment implements View.OnClickListener {
private TextView tvMoney;
private TextView mainGrade;
private TextView tvMainGrade;
public static MineFragment newInstance(Bundle bundle) {
MineFragment fragment = new MineFragment();
@ -95,10 +93,9 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
rlAbout.setOnClickListener(this);
Button btnQuit = findViewById(R.id.btn_quit);
btnQuit.setOnClickListener(this);
mainGrade = (TextView) findViewById(R.id.main_grade);
tvMainGrade = findViewById(R.id.tv_main_grade);
TextView mainGrade = (TextView) findViewById(R.id.main_grade);
if (Constant.LEVEL != 0) {
tvMainGrade.setText(Constant.LEVEL + "");
mainGrade.setText("LV."+Constant.LEVEL);
}
initNetWork();

View File

@ -129,7 +129,9 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
sessionId = response.getBody();
Toast.makeText(getActivity(), "验证码已发送", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
if (response.getMessage()!=null){
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
}
}
}
@Override
@ -209,7 +211,9 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
EventBus.getDefault().post(obtain);
Objects.requireNonNull(getActivity()).finish();
}else {
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
if (response.getMessage()!=null){
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
}
}
}
@Override

View File

@ -94,6 +94,7 @@ import com.tencent.tencentmap.mapsdk.maps.model.Polyline;
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.MultiPoint;
import com.vividsolutions.jts.geom.Point;
import org.greenrobot.eventbus.EventBus;
@ -471,9 +472,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
}
private void iniUserLocation() {
Geometry geometry = GeometryTools.createGeometry(new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()));
try {
String encode = Base64.desEncrypt(geometry.toString());
String encode = Geohash.getInstance().encode(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());
HttpParams httpParams = new HttpParams();
httpParams.put("geom", encode);
long time = System.currentTimeMillis();
@ -499,9 +498,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
Log.d("TAG", "onSuccess:" + e.getMessage() + "");
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
private void initList(TencentLocation tencentLocation) {
@ -892,12 +888,11 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
for (int i = 0; i < allTaskStatus.size(); i++) {
PoiEntity poiEntity = allTaskStatus.get(i);
String geoWkt = allTaskStatus.get(i).getGeoWkt();
LatLng latLng = null;
Log.d("TAG", "onSuccess: " + geoWkt);
String geo = Geohash.getInstance().decode(geoWkt);//解密geo
Geometry geometry = GeometryTools.createGeometry(geo);
if (geometry != null) {
if (geoWkt != null) {
String geo = Geohash.getInstance().decode(geoWkt);//解密geo
Geometry geometry = GeometryTools.createGeometry(geo);
switch (geometry.getGeometryType()) {
case "Point": //
latLng = GeometryTools.createLatLng(geo);
@ -905,18 +900,24 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
case "LineString": //线
case "MultiLineString"://多线
BitmapDescriptor bitmapLine = null;
int color = 0;
if (poiEntity.getType() == 3) {//poi录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
} else if (poiEntity.getType() == 4) {//道路录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
}
if (poiEntity.getTaskStatus()==1){
color= Color.parseColor("#FFE70C");
}else {
color= Color.parseColor("#7fffffff");
}
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
// 构造 PolylineOnions
PolylineOptions polylineOptions = new PolylineOptions()
.addAll(latLineString)
// 折线设置圆形线头
.lineCap(true)
.color(Color.parseColor("#FFE70C"))
.color(color)
// 折线宽度为5像素
.width(28)
.arrow(true)
@ -939,7 +940,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
strokeWidth(5));
polygon.setZIndex(MARKER_FACE);
removablesLocality.add(polygon);
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
Point centroid = geometry.getCentroid();
double x = centroid.getX();
double y = centroid.getY();
latLng = new LatLng();

View File

@ -121,7 +121,7 @@
android:id="@+id/tv_statement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:layout_marginStart="2dp"
android:text="@string/tv_statement"
android:textColor="@color/colorWhite"
app:layout_constraintBottom_toBottomOf="@id/iv_login_check"

View File

@ -33,7 +33,7 @@
android:layout_width="wrap_content"
style="@style/text_style_toolbar_title"
android:layout_toRightOf="@id/iv_find_task"
android:text="免责声明" />
android:text="@string/tv_statement" />
</LinearLayout>
<TextView
android:layout_margin="20dp"

View File

@ -235,13 +235,13 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/check_ok"
android:text="批量领取"
android:text="选择任务"
/>
<Button
android:id="@+id/btn_draw"
style="@style/user_style"
android:layout_width="80dp"
android:padding="@dimen/default_widget_padding"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"

View File

@ -154,28 +154,31 @@
style="@style/main_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="我的等级" />
<TextView
android:id="@+id/main_grade"
android:layout_width="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="40dp"
android:gravity="center"
android:text="LV."
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/image_grade_view"
android:text="LV.0"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_main_grade"
android:layout_width="40dp"
<ImageView
android:id="@+id/image_grade_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="0dp"
android:drawableRight="@drawable/ic_baseline_navigate"
android:layout_centerVertical="true"
android:background="@drawable/ic_baseline_navigate"
android:gravity="center"
android:text="0"
android:textSize="16sp"/>
android:textSize="18sp" />
</RelativeLayout>

View File

@ -218,7 +218,7 @@
android:layout_marginRight="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="注达到10元方可兑换只能兑换整数部分10个工作日内发放,如遇到特殊情况"
android:text="注达到10元方可兑换只能兑换整数部分10个工作日内发放,如遇到特殊情况可能延后"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button" />

View File

@ -155,7 +155,7 @@
<string name="et_login_name">ID/手机号</string>
<string name="tv_login_paw">密码</string>
<string name="et_login_paw">请输入密码</string>
<string name="tv_statement">免责声明</string>
<string name="tv_statement" tools:ignore="MissingTranslation">用户协议</string>
<string name="tv_register">注册</string>
<string name="tv_forget_paw">忘记密码</string>
<string name="btn_login">登录</string>