Browse Source

修改定位Toast异常提示,修改邀请记录显示

hy 3 years ago
parent
commit
7a2d80db43

+ 10 - 5
app/src/main/java/com/electric/chargingpile/activity/MainMapActivity.java

@ -383,7 +383,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
383 383
    private static final int RC_Location_FIRST_PERM = 126;
384 384
385 385
    private String adfloatUrl = "";
386
386
    private int mLocationToast=0;
387 387
    private UpdateDialog updateDialog;
388 388
    //标识,用于判断是否只显示一次定位信息和用户重新定位
389 389
    private boolean isFirstLoc = true;
@ -1322,7 +1322,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1322 1322
    @Override
1323 1323
    protected void onResume() {
1324 1324
        super.onResume();
1325
1325
        mLocationToast=0;
1326 1326
        String search_address = ProfileManager.getInstance().getSearchAddress(this);
1327 1327
        if (search_address.equals("")) {
1328 1328
            tv_search.setText("请输入地址/关键字");
@ -1602,9 +1602,13 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1602 1602
                    isFirstLoc = false;
1603 1603
                }
1604 1604
            } else {
1605
                String errText = "定位失败," + amapLocation.getErrorCode() + ": " + amapLocation.getErrorInfo();
1606
                Log.e(TAG, errText);
1607
                Toast.makeText(this, "定位失败", Toast.LENGTH_SHORT).show();
1605
                if (mLocationToast == 0){
1606
                    mLocationToast = 1;
1607
                    String errText = "定位失败," + amapLocation.getErrorCode() + ": " + amapLocation.getErrorInfo();
1608
                    Log.e(TAG, errText);
1609
                    Toast.makeText(this, "定位失败", Toast.LENGTH_SHORT).show();
1610
                }
1611
1608 1612
            }
1609 1613
        }
1610 1614
    }
@ -2475,6 +2479,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
2475 2479
                break;
2476 2480
            //定位刷新按钮
2477 2481
            case R.id.iv_point_again:
2482
                mLocationToast=0;
2478 2483
                if (!isFirstLoc) {
2479 2484
                    isFirstLoc = true;
2480 2485
                    mLocationOption.setLocationMode(AMapLocationMode.Hight_Accuracy);

+ 1 - 1
app/src/main/java/com/electric/chargingpile/adapter/YaoQingAdapter.java

@ -83,7 +83,7 @@ public class YaoQingAdapter extends BaseAdapter {
83 83
            //				holder.tv_ClaimName.setText(datas.get(position).getString(
84 84
//						"zhan_name"));
85 85
            holder.tv_hotAddress.setText("尾号" + datas.get(position).getTel1() +
86
                    "用户使用了您的邀请码成功注册,受邀用户首次消费时,系统将赠送您20元邀请红包奖励。");
86
                    "用户使用了您的邀请码成功注册,受邀用户首次消费时,系统将赠送您"+datas.get(position).getMoney()+"元邀请红包奖励。");
87 87
            if (datas.get(position).getTel1().equals("")) {
88 88
                holder.tv_hotAddress.setText("暂无");
89 89
            }

+ 6 - 6
app/src/main/java/com/electric/chargingpile/application/MainApplication.java

@ -91,13 +91,13 @@ public class MainApplication extends MultiDexApplication {
91 91
    public static String firstPoint = "";
92 92
    public static Boolean firstSsyd;
93 93
    public static String password = "";
94
//    public static String url = "http://59.110.68.162";// 充电桩测试环境
95
//    public static String pic_url = "http://59.110.68.162/zhannew/uploadfile/";
96
    public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
97
    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
94
    public static String url = "http://59.110.68.162";// 充电桩测试环境
95
    public static String pic_url = "http://59.110.68.162/zhannew/uploadfile/";
96
//    public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
97
//    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
98 98

99
//        public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
100
    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
99
        public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
100
//    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
101 101

102 102

103 103
    //	public static String url = "https://cdz.d1ev.com";

+ 9 - 0
app/src/main/java/com/electric/chargingpile/data/ShareNoList.java

@ -13,6 +13,7 @@ public class ShareNoList implements Serializable {
13 13
    private String user_pid = "";
14 14
    private String timer = "";
15 15
    private String tel1 = "";
16
    private String money = "";
16 17
17 18
    public String getUser_id() {
18 19
        return user_id;
@ -45,4 +46,12 @@ public class ShareNoList implements Serializable {
45 46
    public void setTel1(String tel1) {
46 47
        this.tel1 = tel1;
47 48
    }
49
50
    public String getMoney() {
51
        return money;
52
    }
53
54
    public void setMoney(String money) {
55
        this.money = money;
56
    }
48 57
}