huyuguo преди 5 години
родител
ревизия
7325d16814

+ 21 - 0
README.md

1
## 地图首页
2
MainMapActivity.java  
3
activity_main_map.xml
4
5
## 智能推荐(地图首页右下角)
6
RecommendZhanActivity.java   
7
activity_recommend_zhan.xml  
8
item_recommend_zhan.xml
9
10
## 筛选(地图首页)
11
NewScreenActivity.java   
12
activity_new_screen.xml
13
14
## 列表(地图首页右上角,旧功能由推荐替换)
15
ZhanListActivity.java   
16
activity_main_map.xml
17
18
## 推荐
19
RecommendChargingStationActivity.java
20
activity_recommend_charging_station.xml
21

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

2867
                controlZoomShow();
2867
                controlZoomShow();
2868
                break;
2868
                break;
2869
            case R.id.recommend_more_detail:
2869
            case R.id.recommend_more_detail:
2870
                recommend_more_detail.setVisibility(View.GONE);
2871
                sharedPreferencesUtil.putBoolean("cdz_recommend_more_detail", true);
2870
//                recommend_more_detail.setVisibility(View.GONE);
2871
//                sharedPreferencesUtil.putBoolean("cdz_recommend_more_detail", true);
2872
                break;
2872
                break;
2873
            //地图&列表切换按钮
2873
            //地图&列表切换按钮
2874
            case R.id.iv_list:
2874
            case R.id.iv_list:

+ 9 - 4
app/src/main/java/com/electric/chargingpile/activity/RecommendZhanActivity.java

494
        int jingdian = 0;
494
        int jingdian = 0;
495
        String eletype = "";
495
        String eletype = "";
496
        if (MainApplication.sudu.equals("1")) {
496
        if (MainApplication.sudu.equals("1")) {
497
            eletype = "1";
497
            eletype = "1"; // 快充
498
        } else if (MainApplication.sudu.equals("2")) {
498
        } else if (MainApplication.sudu.equals("2")) {
499
            eletype = "2";
499
            eletype = "2"; // 慢充
500
        } else {
500
        } else {
501
            eletype = "";
501
            eletype = ""; //
502
        }
502
        }
503
        if (MainApplication.support.equals("true")) {
503
        if (MainApplication.support.equals("true")) {
504
            payway = "1";
504
            payway = "1";
561
                    String data = JsonUtils.getKeyResult(response, "data");
561
                    String data = JsonUtils.getKeyResult(response, "data");
562
                    List<RecommendZhan> recommend_list = JsonUtils.parseToObjectList(data, RecommendZhan.class);
562
                    List<RecommendZhan> recommend_list = JsonUtils.parseToObjectList(data, RecommendZhan.class);
563
                    Log.e(TAG, "onResponse: recommend_list.size()=" + recommend_list.size());
563
                    Log.e(TAG, "onResponse: recommend_list.size()=" + recommend_list.size());
564
                    setRecommendZhanUI(recommend_list);
564
                    if (recommend_list.size() > 3) {
565
                        setRecommendZhanUI(recommend_list.subList(0, 3));
566
                    } else {
567
                        setRecommendZhanUI(recommend_list);
568
                    }
569
565
                } else {
570
                } else {
566
                    String count = JsonUtils.getKeyResult(response, "count");
571
                    String count = JsonUtils.getKeyResult(response, "count");
567
572

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

56
    public static SharedPreferencesHelper sph;
56
    public static SharedPreferencesHelper sph;
57
    public static List<Zhan> collectList;
57
    public static List<Zhan> collectList;
58
    public static String userPhone = "";
58
    public static String userPhone = "";
59
    public static String userTpye = "";
59
    public static String userTpye = ""; // 1:国标 2:特斯拉
60
    public static String userId = "";
60
    public static String userId = "";
61
    public static String userCar = "";
61
    public static String userCar = "";
62
    public static String userIcon = "";
62
    public static String userIcon = "";
64
    public static String userNickname = "";
64
    public static String userNickname = "";
65
    public static String mapStatus = "";
65
    public static String mapStatus = "";
66
    public static String costWay = "";
66
    public static String costWay = "";
67
    public static String sudu = "";
68
    public static String shuxing = "";
67
    public static String sudu = ""; // 1: 快充 2:慢充
68
    public static String shuxing = ""; // 公共、私人
69
    public static String messageToken = "";
69
    public static String messageToken = "";
70
    public static String map = "";
70
    public static String map = "";
71
    public static String atCity = "";
71
    public static String atCity = "";
75
    public static String firstPoint = "";
75
    public static String firstPoint = "";
76
    public static Boolean firstSsyd;
76
    public static Boolean firstSsyd;
77
    public static String password = "";
77
    public static String password = "";
78
//    public static String url = "http://59.110.68.162";// 充电桩测试环境
79
        public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
78
    public static String url = "http://59.110.68.162";// 充电桩测试环境
79
//        public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
80
//    public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
80
//    public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
81
    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
81
    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
82
    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
82
    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
83
    //	public static String url = "https://cdz.d1ev.com";
83
    //	public static String url = "https://cdz.d1ev.com";
84
    public static String build_flag = "0";
84
    public static String build_flag = "0";
85
    public static String support = "0";
86
    public static String freestop = "";
87
    public static String selecthotel = "";
88
    public static String selectexpressway = "";
89
    public static String selectjingdian = "";
85
    public static String support = "0"; // true:本APP支付  false:其他方式支付
86
    public static String freestop = ""; // true:免费停车
87
    public static String selecthotel = ""; // true:酒店
88
    public static String selectexpressway = "";  // true:高速
89
    public static String selectjingdian = ""; // true:景点
90
    public static String logid = "";
90
    public static String logid = "";
91
    public static String suitcar = "";
91
    public static String suitcar = "";
92
    public static Boolean gestureguide;
92
    public static Boolean gestureguide;

+ 4 - 5
app/src/main/res/layout/item_recommend_zhan.xml

6
    android:layout_height="wrap_content"
6
    android:layout_height="wrap_content"
7
    android:background="@color/white"
7
    android:background="@color/white"
8
    android:orientation="vertical">
8
    android:orientation="vertical">
9
    <View
10
        android:layout_width="match_parent"
11
        android:layout_height="0.5dp"
12
        android:background="#dddddd"/>
9
13
10
    <RelativeLayout
14
    <RelativeLayout
11
        android:layout_width="match_parent"
15
        android:layout_width="match_parent"
227
231
228
    </LinearLayout>
232
    </LinearLayout>
229
233
230
    <View
231
        android:layout_width="match_parent"
232
        android:layout_height="0.5dp"
233
        android:background="#dddddd"/>
234
235
</LinearLayout>
234
</LinearLayout>