Browse Source

优化代码

hy 1 year ago
parent
commit
199dd26370

+ 0 - 16
app/src/main/java/com/electric/chargingpile/activity/AlterOneActivity.java

867
                        }
867
                        }
868
                    }
868
                    }
869
                });
869
                });
870

871

872
      /*  if (isPermissionOK()) {
873
            callGallery();
874
            // Have permission, do the thing!
875
//            Toast.makeText(this, "TODO: Camera things", Toast.LENGTH_LONG).show();
876
//            ifTimeout();
877
        } else {
878
            // Ask for one permission
879
            EasyPermissions.requestPermissions(
880
                    this, "充电桩想要获取您的图片读取权限,是否允许?",
881
                    RC_ALBUM_PERM,
882
                    Manifest.permission.CAMERA,
883
                    Manifest.permission.WRITE_EXTERNAL_STORAGE,
884
                    Manifest.permission.READ_EXTERNAL_STORAGE);
885
        }*/
886
    }
870
    }
887

871

888
    private boolean isPermissionOK() {
872
    private boolean isPermissionOK() {

+ 0 - 14
app/src/main/java/com/electric/chargingpile/activity/UserInfoActivity.java

520
            @Override
520
            @Override
521
            public void onClick(View view) {
521
            public void onClick(View view) {
522
                openPhotoAlbum();
522
                openPhotoAlbum();
523
524
                popupWindow.dismiss();
523
                popupWindow.dismiss();
525
            }
524
            }
526
        });
525
        });
678
                        }
677
                        }
679
                    }
678
                    }
680
                });
679
                });
681
682
        if (hasCameraPermission()) {
683
            showWindow();
684
        } else {
685
            // Ask for one permission
686
            EasyPermissions.requestPermissions(
687
                    this,
688
                    "充电桩需要获取您相关权限,是否允许?",
689
                    RC_CAMERA_PERM,
690
                    Manifest.permission.CAMERA,
691
                    Manifest.permission.WRITE_EXTERNAL_STORAGE,
692
                    Manifest.permission.READ_EXTERNAL_STORAGE);
693
        }
694
    }
680
    }
695
681
696
    private boolean hasCameraPermission() {
682
    private boolean hasCameraPermission() {

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

103
    public static String firstPoint = "";
103
    public static String firstPoint = "";
104
    public static Boolean firstSsyd;
104
    public static Boolean firstSsyd;
105
    public static String password = "";
105
    public static String password = "";
106
    public static String url = "http://59.110.68.162";// 充电桩测试环境
107
    public static String pic_url = "http://59.110.68.162/zhannew/uploadfile/";
108
//    public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
109
//    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
106
//    public static String url = "http://59.110.68.162";// 充电桩测试环境
107
//    public static String pic_url = "http://59.110.68.162/zhannew/uploadfile/";
108
    public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
109
    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
110

110

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

113

114
    public static String d1evUrl = "https://d1ev-new.yiduyongche.com";// 评论上传视频
114
    public static String d1evUrl = "https://d1ev-new.yiduyongche.com";// 评论上传视频
115
    public static String CDN = "https://cdn-fs.d1ev.com";
115
    public static String CDN = "https://cdn-fs.d1ev.com";