hy 2 ans auparavant
Parent
commit
5fcf574dd7

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

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

103
//        public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
104
    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
102 105

103
        public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
104 106
    public static String d1evUrl = "https://d1ev-new.yiduyongche.com";// 评论上传视频
105 107
    public static String CDN = "https://cdn-fs.d1ev.com";
106
//    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
107 108

108 109

109 110
    //	public static String url = "https://cdz.d1ev.com";
@ -308,7 +309,7 @@ public class MainApplication extends MultiDexApplication {
308 309
                    }
309 310

310 311
                    String url = MainApplication.url + "/zhannew/basic/web/index.php/car/my?userid=" + MainApplication.userId + "&order=1" + "&token=" + token;
311
                    Log.e("TAG -- hyc", "getCarOwnerCertificateList: "+url);
312
                  //  Log.e("TAG -- hyc", "getCarOwnerCertificateList: "+url);
312 313
                    OkHttpUtils.get().url(url).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
313 314

314 315
                        @Override

+ 5 - 3
app/src/main/java/com/electric/chargingpile/fragment/MonthListFragment.java

@ -5,6 +5,7 @@ import android.content.Intent;
5 5
import android.os.Bundle;
6 6
import androidx.fragment.app.Fragment;
7 7
8
import android.text.TextUtils;
8 9
import android.util.Log;
9 10
import android.view.LayoutInflater;
10 11
import android.view.View;
@ -122,13 +123,14 @@ public class MonthListFragment extends Fragment {
122 123
                        if (code.equals("200")) {
123 124
                            //当月该用户充电数据
124 125
                            String data = JsonUtils.getKeyResult(response, "data");
125
                            String own = JsonUtils.getKeyResult(response, "own");
126
                            String own = JsonUtils.getKeyResult(data, "own");
126 127
127 128
                            String user_id = JsonUtils.getKeyResult(own, "user_id");
128 129
                            String power = JsonUtils.getKeyResult(own, "power");
129 130
                            String nickname = JsonUtils.getKeyResult(own, "nickname");
130 131
                            String tel = JsonUtils.getKeyResult(own, "tel");
131
                            String sort = JsonUtils.getKeyResult(own, "sort");
132
                            String sort = JsonUtils.getKeyResult(own, "rank");
133
                            sort= TextUtils.isEmpty(sort)?"":sort;
132 134
                            String userpic = JsonUtils.getKeyResult(own, "userpic");
133 135
134 136
                            if (power.equals("") && nickname.equals("") && tel.equals("") && sort.equals("") && userpic.equals("")) {
@ -158,7 +160,7 @@ public class MonthListFragment extends Fragment {
158 160
                                } else {
159 161
                                    tv_month_name.setText(nickname);
160 162
                                }
161
                                if (sort.equals("0")) {
163
                                if (sort==null || sort.equals("0")) {
162 164
                                    tv_ranking_zanwu.setVisibility(View.VISIBLE);
163 165
                                    ll_ranking.setVisibility(View.GONE);
164 166

+ 8 - 16
app/src/main/java/com/electric/chargingpile/fragment/TotalListFragment.java

@ -49,19 +49,19 @@ import org.json.JSONObject;
49 49
50 50
import java.net.URLEncoder;
51 51
import java.util.ArrayList;
52
import java.util.LinkedHashMap;
52 53
53 54
import okhttp3.Call;
54 55
55 56
public class TotalListFragment extends Fragment implements View.OnClickListener {
56
    private TextView tv_total_name, tv_total_ranking, tv_total_charge, tv_notice, tv_ranking_zanwu;
57
    private CircleImageView iv_icon;
57
    private TextView  tv_notice;
58 58
    private ListView lv_total;
59
    private LinearLayout ll_ranking;
60
    private TextView tv_no_login, tv_login;
61
    private RelativeLayout rl_totalList;
59
60
61
62 62
    private LinearLayout layoutQuarter;
63 63
    private PopupWindow mPopupWindow;
64
    private String mQuarter="1";
64
    private String mQuarter="0";
65 65
66 66
    @Override
67 67
    public void onCreate(Bundle savedInstanceState) {
@ -80,17 +80,9 @@ public class TotalListFragment extends Fragment implements View.OnClickListener
80 80
    }
81 81
82 82
    private void initView(View v) {
83
        tv_total_name = (TextView) v.findViewById(R.id.tv_total_name);
84
        tv_total_ranking = (TextView) v.findViewById(R.id.tv_total_ranking);
85
        tv_total_charge = (TextView) v.findViewById(R.id.tv_total_charge);
83
86 84
        tv_notice = (TextView) v.findViewById(R.id.tv_notice);
87
        iv_icon = (CircleImageView) v.findViewById(R.id.iv_icon);
88 85
        lv_total = (ListView) v.findViewById(R.id.lv_total);
89
        ll_ranking = (LinearLayout) v.findViewById(R.id.ll_ranking);
90
        tv_ranking_zanwu = (TextView) v.findViewById(R.id.tv_ranking_zanwu);
91
        tv_no_login = (TextView) v.findViewById(R.id.tv_no_login);
92
        tv_login = (TextView) v.findViewById(R.id.tv_login);
93
        rl_totalList = (RelativeLayout) v.findViewById(R.id.rl_totalList);
94 86
        layoutQuarter = (LinearLayout) v.findViewById(R.id.layoutQuarter);
95 87
        layoutQuarter.setOnClickListener(this);
96 88
    }
@ -248,7 +240,7 @@ public class TotalListFragment extends Fragment implements View.OnClickListener
248 240
        recyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
249 241
        QuarterAdapter adapter = new QuarterAdapter(requireContext());
250 242
        adapter.setItemOnClick((posistion,name) -> {
251
            mQuarter=String.valueOf(posistion+1);
243
            mQuarter=String.valueOf( posistion + 1);
252 244
            getData(null);
253 245
            mPopupWindow.dismiss();
254 246
        });

+ 0 - 107
app/src/main/res/layout/fragment_total_list.xml

@ -47,113 +47,6 @@
47 47
        android:layout_height="0.5dp"
48 48
        android:background="@color/ui_line"/>
49 49
50
    <RelativeLayout
51
        android:id="@+id/rl_totalList"
52
        android:layout_width="match_parent"
53
        android:layout_height="62dp"
54
        android:background="@color/white">
55
56
        <com.electric.chargingpile.view.CircleImageView
57
            android:layout_width="33dp"
58
            android:layout_height="33dp"
59
            android:id="@+id/iv_icon"
60
            android:layout_alignParentLeft="true"
61
            app:border_color="@color/white"
62
            android:layout_centerVertical="true"
63
            android:layout_marginLeft="15dp"
64
            android:src="@drawable/icon_touxiang0128"/>
65
66
        <TextView
67
            android:id="@+id/tv_total_name"
68
            android:layout_width="wrap_content"
69
            android:layout_height="wrap_content"
70
            android:textSize="13sp"
71
            android:text=""
72
            android:textColor="@color/ui_62"
73
            android:layout_alignParentTop="true"
74
            android:layout_toRightOf="@+id/iv_icon"
75
            android:layout_marginTop="13dp"
76
            android:layout_marginLeft="10dp"/>
77
78
        <TextView
79
            android:id="@+id/tv_login"
80
            android:layout_width="60dp"
81
            android:layout_height="21dp"
82
            android:textSize="12sp"
83
            android:gravity="center"
84
            android:text="立刻登录"
85
            android:textColor="@color/lvse"
86
            android:background="@drawable/bg_yjlbbd"
87
            android:layout_alignParentTop="true"
88
            android:layout_toRightOf="@+id/iv_icon"
89
            android:layout_marginTop="12dp"
90
            android:layout_marginLeft="10dp"/>
91
92
        <TextView
93
            android:id="@+id/tv_no_login"
94
            android:layout_width="wrap_content"
95
            android:layout_height="wrap_content"
96
            android:textSize="12sp"
97
            android:text="登录后可查看您的排名"
98
            android:textColor="@color/ui_69"
99
            android:layout_alignParentBottom="true"
100
            android:layout_toRightOf="@+id/iv_icon"
101
            android:layout_marginLeft="10dp"
102
            android:layout_marginBottom="10dp"
103
            android:visibility="visible"/>
104
105
        <TextView
106
            android:id="@+id/tv_ranking_zanwu"
107
            android:layout_width="wrap_content"
108
            android:layout_height="wrap_content"
109
            android:textSize="12sp"
110
            android:text="暂无排名"
111
            android:textColor="@color/ui_69"
112
            android:layout_alignParentBottom="true"
113
            android:layout_toRightOf="@+id/iv_icon"
114
            android:layout_marginLeft="10dp"
115
            android:layout_marginBottom="14dp"
116
            android:visibility="gone"/>
117
118
        <LinearLayout
119
            android:id="@+id/ll_ranking"
120
            android:layout_width="wrap_content"
121
            android:layout_height="wrap_content"
122
            android:layout_alignParentBottom="true"
123
            android:layout_toRightOf="@+id/iv_icon"
124
            android:layout_marginLeft="10dp"
125
            android:layout_marginBottom="14dp"
126
            android:visibility="gone">
127
128
            <TextView
129
                android:layout_width="wrap_content"
130
                android:layout_height="wrap_content"
131
                android:textSize="12sp"
132
                android:text="我的排名: "
133
                android:textColor="@color/ui_69" />
134
135
            <TextView
136
                android:id="@+id/tv_total_ranking"
137
                android:layout_width="wrap_content"
138
                android:layout_height="wrap_content"
139
                android:textSize="12sp"
140
                android:text=""
141
                android:textColor="@color/lvse" />
142
143
        </LinearLayout>
144
145
        <TextView
146
            android:id="@+id/tv_total_charge"
147
            android:layout_width="wrap_content"
148
            android:layout_height="wrap_content"
149
            android:textSize="17sp"
150
            android:text=""
151
            android:textColor="@color/ui_65"
152
            android:layout_alignParentRight="true"
153
            android:layout_centerVertical="true"
154
            android:layout_marginRight="15dp"/>
155
156
    </RelativeLayout>
157 50
158 51
    <View
159 52
        android:layout_width="match_parent"