Browse Source

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

hy 3 years ago
parent
commit
7a2d80db43

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

383
    private static final int RC_Location_FIRST_PERM = 126;
383
    private static final int RC_Location_FIRST_PERM = 126;
384
384
385
    private String adfloatUrl = "";
385
    private String adfloatUrl = "";
386
386
    private int mLocationToast=0;
387
    private UpdateDialog updateDialog;
387
    private UpdateDialog updateDialog;
388
    //标识,用于判断是否只显示一次定位信息和用户重新定位
388
    //标识,用于判断是否只显示一次定位信息和用户重新定位
389
    private boolean isFirstLoc = true;
389
    private boolean isFirstLoc = true;
1322
    @Override
1322
    @Override
1323
    protected void onResume() {
1323
    protected void onResume() {
1324
        super.onResume();
1324
        super.onResume();
1325
1325
        mLocationToast=0;
1326
        String search_address = ProfileManager.getInstance().getSearchAddress(this);
1326
        String search_address = ProfileManager.getInstance().getSearchAddress(this);
1327
        if (search_address.equals("")) {
1327
        if (search_address.equals("")) {
1328
            tv_search.setText("请输入地址/关键字");
1328
            tv_search.setText("请输入地址/关键字");
1602
                    isFirstLoc = false;
1602
                    isFirstLoc = false;
1603
                }
1603
                }
1604
            } else {
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
                break;
2479
                break;
2476
            //定位刷新按钮
2480
            //定位刷新按钮
2477
            case R.id.iv_point_again:
2481
            case R.id.iv_point_again:
2482
                mLocationToast=0;
2478
                if (!isFirstLoc) {
2483
                if (!isFirstLoc) {
2479
                    isFirstLoc = true;
2484
                    isFirstLoc = true;
2480
                    mLocationOption.setLocationMode(AMapLocationMode.Hight_Accuracy);
2485
                    mLocationOption.setLocationMode(AMapLocationMode.Hight_Accuracy);

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

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

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

91
    public static String firstPoint = "";
91
    public static String firstPoint = "";
92
    public static Boolean firstSsyd;
92
    public static Boolean firstSsyd;
93
    public static String password = "";
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
    //	public static String url = "https://cdz.d1ev.com";
103
    //	public static String url = "https://cdz.d1ev.com";

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

13
    private String user_pid = "";
13
    private String user_pid = "";
14
    private String timer = "";
14
    private String timer = "";
15
    private String tel1 = "";
15
    private String tel1 = "";
16
    private String money = "";
16
17
17
    public String getUser_id() {
18
    public String getUser_id() {
18
        return user_id;
19
        return user_id;
45
    public void setTel1(String tel1) {
46
    public void setTel1(String tel1) {
46
        this.tel1 = tel1;
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
}