Browse Source

修改bug

hy 2 years ago
parent
commit
44e864a471

+ 82 - 12
app/build.gradle

38
38
39
        multiDexEnabled true
39
        multiDexEnabled true
40
40
41
        ndk {
42
            abiFilters "armeabi-v7a", "arm64-v8a"
43
//            abiFilters "armeabi"
44
        }
41
//        ndk {
42
//            abiFilters "armeabi-v7a", "arm64-v8a"
43
//            abiFilters "armeabi-v7a"
44
//        }
45
        flavorDimensions "default"
45
        flavorDimensions "default"
46
        vectorDrawables.useSupportLibrary = true
46
        vectorDrawables.useSupportLibrary = true
47
        manifestPlaceholders = rootProject.ext.manifestPlaceholders
47
        manifestPlaceholders = rootProject.ext.manifestPlaceholders
108
    }
108
    }
109
109
110
    productFlavors {
110
    productFlavors {
111
        yingyongbao {}
112
        xiaomi {}
113
        huawei {}
114
        oppo {}
115
        cdz {}
116
        vivo {}
111
        yingyongbao_32 {
112
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "yingyongbao"]
113
            ndk {
114
                abiFilters "armeabi-v7a"
115
            }
116
        }
117
        yingyongbao_64 {
118
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "yingyongbao"]
119
            ndk {
120
                abiFilters "arm64-v8a"
121
            }
122
        }
123
        xiaomi_32 {
124
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "xiaomi"]
125
126
            ndk {
127
                abiFilters "armeabi-v7a"
128
            }
129
        }
130
        xiaomi_64 {
131
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "xiaomi"]
132
133
            ndk {
134
                abiFilters "arm64-v8a"
135
            }
136
        }
137
138
        huawei_32 {
139
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "huawei"]
140
            ndk {
141
                abiFilters "armeabi-v7a"
142
            }
143
144
        }
145
146
        huawei_64 {
147
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "huawei"]
148
            ndk {
149
                abiFilters "arm64-v8a"
150
            }
151
        }
152
153
        oppo_32 {
154
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "oppo"]
155
            ndk {
156
                abiFilters "armeabi-v7a"
157
            }
158
        }
159
        oppo_64 {
160
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "oppo"]
161
            ndk {
162
                abiFilters "arm64-v8a"
163
            }
164
        }
165
        vivo_32 {
166
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "vivo"]
167
            ndk {
168
                abiFilters "armeabi-v7a"
169
            }
170
171
        }
172
        vivo_64 {
173
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "vivo"]
174
            ndk {
175
                abiFilters "arm64-v8a"
176
            }
177
        }
178
179
        cdz {
180
            manifestPlaceholders= [UMENG_CHANNEL_VALUE: "cdz"]
181
            ndk{
182
                abiFilters "armeabi-v7a","arm64-v8a"
183
            }
184
        }
185
186
117
//        wandoujia {} baidu {} anzhi {} pp {} vivo {} meizu {} sougou {} c360 {}
187
//        wandoujia {} baidu {} anzhi {} pp {} vivo {} meizu {} sougou {} c360 {}
118
        productFlavors.all { flavor ->
188
        productFlavors.all { flavor ->
119
            flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
120
            if (name == "vivo") {
189
           // flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
190
            if (name.contains("vivo") ) {
121
                resValue "string", "app_name", "一电充电桩"
191
                resValue "string", "app_name", "一电充电桩"
122
                buildConfigField("String","PRIVACY_LINK","\"http://evcharge.cc/pc/privacy-vivo.html\"")
192
                buildConfigField("String","PRIVACY_LINK","\"http://evcharge.cc/pc/privacy-vivo.html\"")
123
                buildConfigField("String","USER_AGREEMENT_LINK","\"http://evcharge.cc/activity/user-proto-vivo.html\"")
193
                buildConfigField("String","USER_AGREEMENT_LINK","\"http://evcharge.cc/activity/user-proto-vivo.html\"")

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

121
import com.electric.chargingpile.gen.DaoSession;
121
import com.electric.chargingpile.gen.DaoSession;
122
import com.electric.chargingpile.gen.zhan_listDao;
122
import com.electric.chargingpile.gen.zhan_listDao;
123
import com.electric.chargingpile.manager.ProfileManager;
123
import com.electric.chargingpile.manager.ProfileManager;
124
import com.electric.chargingpile.util.ActivityManagerApplication;
124
import com.electric.chargingpile.util.BarColorUtil;
125
import com.electric.chargingpile.util.BarColorUtil;
125
import com.electric.chargingpile.util.DES3;
126
import com.electric.chargingpile.util.DES3;
126
import com.electric.chargingpile.util.DES3S;
127
import com.electric.chargingpile.util.DES3S;
158
159
159
import org.greenrobot.eventbus.Subscribe;
160
import org.greenrobot.eventbus.Subscribe;
160
import org.greenrobot.eventbus.ThreadMode;
161
import org.greenrobot.eventbus.ThreadMode;
162
import org.json.JSONArray;
161
import org.json.JSONException;
163
import org.json.JSONException;
162
import org.json.JSONObject;
164
import org.json.JSONObject;
163
165
344
346
345
    private TextView tv_tishi, paoName, paoName1, paoAddress, paoCostWay, paoDaohang, paoDistance,
347
    private TextView tv_tishi, paoName, paoName1, paoAddress, paoCostWay, paoDaohang, paoDistance,
346
            paoFast, paoSlow, paoAlter, paoTotal, tingche, fuwu, dian, tv_grade, tv_shaixuan, tv_recommend_tip,
348
            paoFast, paoSlow, paoAlter, paoTotal, tingche, fuwu, dian, tv_grade, tv_shaixuan, tv_recommend_tip,
347
            tv_daohang, tvOne, tvTwo, tv_num, tvThree, tv_sortDistance, tv_sortStarLevel, iv_list, tv_sortFreeTime;
349
            tv_daohang, tvOne, tvTwo, tv_num, tvThree, tv_sortDistance, tv_sortStarLevel, iv_list, tv_sortFreeTime,notificationText;
348
    public static TextView tv_atCity;
350
    public static TextView tv_atCity;
349
    public static RelativeLayout paoRl;
351
    public static RelativeLayout paoRl;
350
    public static LinearLayout rl_control;
352
    public static LinearLayout rl_control;
358
    private ListView lvZhan;
360
    private ListView lvZhan;
359
    private ZhanAdapter adapter;
361
    private ZhanAdapter adapter;
360
    private long exitTime = 0;
362
    private long exitTime = 0;
361
    private ImageView iv_clear;
363
    private ImageView iv_clear,imgActivityCenter;
362
    private ImageView iv_sceen;
364
    private ImageView iv_sceen;
363
    private ImageView iv_refresh, iv_route;
365
    private ImageView iv_refresh, iv_route;
364
    private ImageView iv_our;
366
    private ImageView iv_our;
646
                //城市站点数量
648
                //城市站点数量
647
                case 4:
649
                case 4:
648
                    try {
650
                    try {
649
//                        JSONObject jsonObj = new JSONObject(msg.obj.toString());
650
//                        String data = jsonObj.getString("data");
651
//                        String time = jsonObj.getString("time");
652
//                    String pic = jsonObj.getString("pic");
653
//                        Log.i("data-----",data);
654
////                    Log.i("pic------",pic);
655
//                        String zhan_data = DES3.decode(data);
656
//                        Log.i("zhan_data-----",zhan_data);
657
//
658
////                    Log.d("appTime---", DateUtils.getCurrentDate());
659
//
660
//                        long phpTime = Long.parseLong(time);
661
//
662
//                        Log.i("phpTime(long)---", phpTime+"");
663
//                        long appTime1 = System.currentTimeMillis()/1000;
664
//                        Log.i("appTime(long)---", appTime1+"");
665
//                        cha = appTime1 - phpTime;
666
667
//                    SharedPreferences mySharedPreferences= MainFragment.getSharedPreferences("userName",
668
//                            Activity.MODE_PRIVATE);
669
//                    SharedPreferences.Editor editor = mySharedPreferences.edit();
670
//                    editor.putInt("cha", cha);
671
//                    editor.commit();
672
//                        Log.d("cha(long)---", cha + "");
673
674
675
                        try {
651
                        try {
676
                            String date = JsonUtils.getKeyResult(msg.obj.toString(), "data");
652
                            String date = JsonUtils.getKeyResult(msg.obj.toString(), "data");
677
//                            Log.e("data", date);
653
//                            Log.e("data", date);
933
        }
909
        }
934
910
935
        showPostDelayedDialog();
911
        showPostDelayedDialog();
912
        getSwitch();
936
//        ConfirmOrderActivity.actionStart(this);
913
//        ConfirmOrderActivity.actionStart(this);
937
//        startActivity(new Intent(getApplication(), ChargingStatusActivity.class));
914
//        startActivity(new Intent(getApplication(), ChargingStatusActivity.class));
938
//        startActivity(new Intent(this, SkipUserInfoActivity.class));
915
//        startActivity(new Intent(this, SkipUserInfoActivity.class));
1033
        windowComments = (RelativeLayout) findViewById(R.id.window_rl_comment);
1010
        windowComments = (RelativeLayout) findViewById(R.id.window_rl_comment);
1034
1011
1035
        windowAd = (ImageView) findViewById(R.id.window_iv_ad);
1012
        windowAd = (ImageView) findViewById(R.id.window_iv_ad);
1013
        imgActivityCenter = (ImageView) findViewById(R.id.imgActivityCenter);
1014
1015
1036
        windowGradeImg = (ImageView) findViewById(R.id.window_iv_zhan_grade);
1016
        windowGradeImg = (ImageView) findViewById(R.id.window_iv_zhan_grade);
1037
        iv_tuijian_close = (ImageView) findViewById(R.id.iv_tuijian_close);
1017
        iv_tuijian_close = (ImageView) findViewById(R.id.iv_tuijian_close);
1038
        iv_tuijian_tip_close = (ImageView) findViewById(R.id.iv_tuijian_tip_close);
1018
        iv_tuijian_tip_close = (ImageView) findViewById(R.id.iv_tuijian_tip_close);
1129
        tv_sortStarLevel = (TextView) findViewById(R.id.tv_sortStarLevel);
1109
        tv_sortStarLevel = (TextView) findViewById(R.id.tv_sortStarLevel);
1130
        tv_sortStarLevel.setOnClickListener(this);
1110
        tv_sortStarLevel.setOnClickListener(this);
1131
        tv_sortFreeTime = (TextView) findViewById(R.id.tv_sortFreeTime);
1111
        tv_sortFreeTime = (TextView) findViewById(R.id.tv_sortFreeTime);
1112
        notificationText = (TextView) findViewById(R.id.notificationText);
1132
        tv_sortFreeTime.setOnClickListener(this);
1113
        tv_sortFreeTime.setOnClickListener(this);
1133
        rl_mapList = (RelativeLayout) findViewById(R.id.rl_mapList);
1114
        rl_mapList = (RelativeLayout) findViewById(R.id.rl_mapList);
1134
        iv_roadCondition = (ImageView) findViewById(R.id.iv_roadCondition);
1115
        iv_roadCondition = (ImageView) findViewById(R.id.iv_roadCondition);
1186
////            clickMarker = false;
1167
////            clickMarker = false;
1187
//            firstOpen = false;
1168
//            firstOpen = false;
1188
//        }
1169
//        }
1189
//        getMessage();
1190
1170
1191
        inBtn = (ImageView) findViewById(R.id.zoomin);
1171
        inBtn = (ImageView) findViewById(R.id.zoomin);
1192
        inBtn.setOnClickListener(this);
1172
        inBtn.setOnClickListener(this);
1411
        if (hasLocationPermission() && center == null && mlocationClient!=null) {
1391
        if (hasLocationPermission() && center == null && mlocationClient!=null) {
1412
            mlocationClient.startLocation();
1392
            mlocationClient.startLocation();
1413
        }
1393
        }
1394
        getMessage();
1414
    }
1395
    }
1415
1396
1416
    private void searchAll() {
1397
    private void searchAll() {
3645
3626
3646
    //获取系统消息
3627
    //获取系统消息
3647
    private void getMessage() {
3628
    private void getMessage() {
3648
        new Thread(new Runnable() {
3649
            @Override
3650
            public void run() {
3651
                long appTime1 = System.currentTimeMillis() / 1000;
3652
//                Log.i("appTime(long)---", appTime1 + "");
3653
                String token = String.valueOf(appTime1);
3654
//                Log.e("token", token);
3655
                String url = null;
3656
                if (MainApplication.msgTime.equals("0")) {
3657
                    MainApplication.firstOpenTime = token;
3658
                    ProfileManager.getInstance().setFirstOpenTime(getApplicationContext(), token);
3659
                    MainApplication.msgTime = token;
3660
                    ProfileManager.getInstance().setSystemMsgTime(getApplicationContext(), token);
3661
                }
3662
                try {
3663
                    url = MainApplication.url + "/zhannew/basic/web/index.php/zhangonggao/release?timer=" + MainApplication.msgTime;
3664
//                    Log.e("890", url);
3665
                } catch (Exception e) {
3666
                    e.printStackTrace();
3667
                }
3668
                submitMessage(url);
3669
            }
3670
        }).start();
3671
    }
3629
        long appTime1 = System.currentTimeMillis() / 1000;
3630
        String token = String.valueOf(appTime1);
3672
3631
3673
    private void submitMessage(String sms) {
3632
        if (MainApplication.msgTime.equals("0")) {
3633
            MainApplication.firstOpenTime = token;
3634
            ProfileManager.getInstance().setFirstOpenTime(getApplicationContext(), token);
3635
            MainApplication.msgTime = token;
3636
            ProfileManager.getInstance().setSystemMsgTime(getApplicationContext(), token);
3637
        }
3638
        String url = MainApplication.url + "/zhannew/basic/web/index.php/zhangonggao/release2?timer=" + MainApplication.msgTime;
3639
//        Log.e(TAG, "onResponse hc url: "+url);
3640
        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
3641
            @Override
3642
            public void onError(Call call, Exception e) {
3674
3643
3675
//        Log.e("url", sms);
3676
        Request request = new Request.Builder().url(sms).build();
3677
        Response response = null;
3678
        try {
3679
            if (request == null) {
3680
                Message msg = new Message();
3681
                msg.what = 5;
3682
                hand.sendMessage(msg);
3683
                return;
3684
            }
3644
            }
3685
            response = OkHttpUtil.execute(request);
3686
            if (response.code() == 200) {
3687
                String json = "";
3645
3646
            @Override
3647
            public void onResponse(String response) {
3688
                try {
3648
                try {
3689
                    json = response.body().string();
3690
                    Message msg = new Message();
3691
                    msg.obj = json;
3692
                    msg.what = 7;
3693
                    hand.sendMessage(msg);
3694
//                    Log.e("url", json);
3695
                } catch (Exception e) {
3649
                    JSONArray jsonArray=new JSONArray(response);
3650
                    if (jsonArray.length()>0){
3651
                        JSONObject jsonObject = (JSONObject) jsonArray.get(0);
3652
                        String content = jsonObject.optString("content");
3653
                        String url = jsonObject.optString("url");
3654
                        if (rl_charging_notice.getVisibility() != View.VISIBLE){
3655
                            notificationText.setText(content);
3656
                            rl_charging_notice.setOnClickListener(view -> {
3657
                                if (!TextUtils.isEmpty(url)){
3658
                                    Uri.Builder builder = Uri.parse(url).buildUpon();
3659
                                    builder.appendQueryParameter("user_id", MainApplication.userId);
3660
                                    builder.appendQueryParameter("tel", MainApplication.userPhone);
3661
                                    builder.appendQueryParameter("token", MainApplication.userId);
3662
                                    LogUtils.e(builder.toString());
3663
                                    Intent intent = new Intent(getApplicationContext(), MyWebViewActivity.class);
3664
                                    intent.putExtra("url", url);
3665
                                    startActivity(intent);
3666
                                }
3667
                            });
3668
                            rl_charging_notice.setVisibility(View.VISIBLE);
3669
                        }
3670
                    }
3671
                } catch (JSONException e) {
3696
                    e.printStackTrace();
3672
                    e.printStackTrace();
3697
                    Message msg = new Message();
3698
                    msg.what = 5;
3699
                    hand.sendMessage(msg);
3700
                }
3673
                }
3701
            }
3674
            }
3702
        } catch (Exception e) {
3703
            e.printStackTrace();
3704
            Message msg = new Message();
3705
            msg.what = 5;
3706
            hand.sendMessage(msg);
3707
        }
3675
        });
3708
    }
3676
    }
3709
3677
3678
3710
    public void MainMapp() {
3679
    public void MainMapp() {
3711
        eteCityTime("{\"fun\":\"timer\"}");
3680
        eteCityTime("{\"fun\":\"timer\"}");
3712
        clickMarker = false;
3681
        clickMarker = false;
3817
3786
3818
    }
3787
    }
3819
3788
3789
    /**
3790
     * 是否展示 活动中心
3791
     * */
3792
    private void getSwitch(){
3793
        String url =MainApplication.url+"/zhannew/basic/web/index.php/zhangonggao/switch";
3794
        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
3795
            @Override
3796
            public void onError(Call call, Exception e) {
3797
3798
            }
3799
3800
            @Override
3801
            public void onResponse(String response) {
3802
                String rtnCode = JsonUtils.getKeyResult(response, "code");
3803
                if (!TextUtils.isEmpty(rtnCode) && rtnCode.equals("100")) {
3804
                    String data = JsonUtils.getKeyResult(response, "data");
3805
                    String url = JsonUtils.getKeyResult(response, "url")==null ?"":JsonUtils.getKeyResult(response, "url");
3806
3807
                    if (!TextUtils.isEmpty(data) && data.equals("1")){
3808
                        imgActivityCenter.setVisibility(View.VISIBLE);
3809
                        imgActivityCenter.setOnClickListener(v->{
3810
                            Uri.Builder builder = Uri.parse(url).buildUpon();
3811
                            builder.appendQueryParameter("user_id", MainApplication.userId);
3812
                            builder.appendQueryParameter("tel", MainApplication.userPhone);
3813
                            builder.appendQueryParameter("token", MainApplication.userId);
3814
                            LogUtils.e(builder.toString());
3815
                            Intent intent = new Intent(getApplicationContext(), MyWebViewActivity.class);
3816
                            intent.putExtra("url", url);
3817
                            startActivity(intent);
3818
                        });
3819
                    }else{
3820
                        imgActivityCenter.setVisibility(View.GONE);
3821
                    }
3822
                }
3823
            }
3824
        });
3825
3826
    }
3827
3820
    //登陆状态判断
3828
    //登陆状态判断
3821
    private void setlogin() {
3829
    private void setlogin() {
3822
        if (TextUtils
3830
        if (TextUtils
3952
                    String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
3960
                    String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
3953
                    if ("306".equals(rtnCode)) {
3961
                    if ("306".equals(rtnCode)) {
3954
                        LogUtils.e("有订单");
3962
                        LogUtils.e("有订单");
3963
                        notificationText.setText("您有一笔订单正在进行中,点击查看详情...");
3955
                        rl_charging_notice.setVisibility(View.VISIBLE);
3964
                        rl_charging_notice.setVisibility(View.VISIBLE);
3956
                        if (firstCheck) {
3965
                        if (firstCheck) {
3957
                            if (isStatusBack == false) {
3966
                            if (isStatusBack == false) {

+ 10 - 1
app/src/main/java/com/electric/chargingpile/activity/SearchActivity.java

79
    private TextView tvSearch;
79
    private TextView tvSearch;
80
    private Toast toast = null;
80
    private Toast toast = null;
81
    private EditText etSearch;
81
    private EditText etSearch;
82
    private ImageView ivClear;
82
    private ImageView ivClear,imgNoData;
83
    private ListView lvContent;
83
    private ListView lvContent;
84
    private SearchAdapter adapter;
84
    private SearchAdapter adapter;
85
    private List<Map<String, String>> addressList = new ArrayList<Map<String, String>>();
85
    private List<Map<String, String>> addressList = new ArrayList<Map<String, String>>();
132
        ivClear = (ImageView) findViewById(R.id.iv_search_clear);
132
        ivClear = (ImageView) findViewById(R.id.iv_search_clear);
133
        ivClear.setOnClickListener(this);
133
        ivClear.setOnClickListener(this);
134
        no_result = findViewById(R.id.no_result);
134
        no_result = findViewById(R.id.no_result);
135
        imgNoData = findViewById(R.id.imgNoData);
135

136

136
        etSearch = (EditText) findViewById(R.id.et_search);
137
        etSearch = (EditText) findViewById(R.id.et_search);
137
        etSearch.setOnClickListener(new OnClickListener() {
138
        etSearch.setOnClickListener(new OnClickListener() {
214
                        lvContent.setVisibility(View.GONE);
215
                        lvContent.setVisibility(View.GONE);
215
                    } else {
216
                    } else {
216
                        no_result.setVisibility(View.GONE);
217
                        no_result.setVisibility(View.GONE);
218
                        imgNoData.setVisibility(View.GONE);
217
                        keyWord = s;
219
                        keyWord = s;
218
                        doSearchQuery();
220
                        doSearchQuery();
219
                        doPointNameSearchQuery();
221
                        doPointNameSearchQuery();
488

490

489
                            if (addressList.size() == 0 && pointList.size() == 0) {
491
                            if (addressList.size() == 0 && pointList.size() == 0) {
490
                                no_result.setVisibility(View.VISIBLE);
492
                                no_result.setVisibility(View.VISIBLE);
493
                                imgNoData.setVisibility(View.VISIBLE);
491
                            } else {
494
                            } else {
492
                                no_result.setVisibility(View.GONE);
495
                                no_result.setVisibility(View.GONE);
496
                                imgNoData.setVisibility(View.GONE);
493
                            }
497
                            }
494

498

495
                        } catch (Exception e) {
499
                        } catch (Exception e) {
503

507

504
                        if (addressList.size() == 0 && pointList.size() == 0) {
508
                        if (addressList.size() == 0 && pointList.size() == 0) {
505
                            no_result.setVisibility(View.VISIBLE);
509
                            no_result.setVisibility(View.VISIBLE);
510
                            imgNoData.setVisibility(View.VISIBLE);
506
                        } else {
511
                        } else {
507
                            no_result.setVisibility(View.GONE);
512
                            no_result.setVisibility(View.GONE);
513
                            imgNoData.setVisibility(View.GONE);
508
                        }
514
                        }
515

509
                    }
516
                    }
510
                }
517
                }
511
            } else {
518
            } else {
1020

1027

1021
                if (addressList.size() == 0 && pointList.size() == 0) {
1028
                if (addressList.size() == 0 && pointList.size() == 0) {
1022
                    no_result.setVisibility(View.VISIBLE);
1029
                    no_result.setVisibility(View.VISIBLE);
1030
                    imgNoData.setVisibility(View.VISIBLE);
1023
                } else {
1031
                } else {
1024
                    no_result.setVisibility(View.GONE);
1032
                    no_result.setVisibility(View.GONE);
1033
                    imgNoData.setVisibility(View.GONE);
1025
                }
1034
                }
1026
            }
1035
            }
1027
        });
1036
        });

+ 4 - 46
app/src/main/java/com/electric/chargingpile/activity/UserCenterActivity.java

664
                    MobclickAgent.onEvent(getApplicationContext(), "1093");
664
                    MobclickAgent.onEvent(getApplicationContext(), "1093");
665
//                    startActivity(new Intent(getApplicationContext(), PersonalPageActivity.class));
665
//                    startActivity(new Intent(getApplicationContext(), PersonalPageActivity.class));
666
//                    startActivity(new Intent(getApplicationContext(), UserInfoActivity.class));
666
//                    startActivity(new Intent(getApplicationContext(), UserInfoActivity.class));
667
                    startActivity(new Intent(getApplicationContext(), UserPageActivity.class));
667
//                    startActivity(new Intent(getApplicationContext(), UserPageActivity.class));
668
                }
668
                }
669
            });
669
            });
670
            ll_userLogin.setVisibility(View.INVISIBLE);
670
            ll_userLogin.setVisibility(View.INVISIBLE);
1609
                    String log_day = JsonUtils.getKeyResult(rtnMsg, "log_day");
1609
                    String log_day = JsonUtils.getKeyResult(rtnMsg, "log_day");
1610
                    String score = JsonUtils.getKeyResult(rtnMsg, "plusScore");
1610
                    String score = JsonUtils.getKeyResult(rtnMsg, "plusScore");
1611
1611
1612
                    String third = "", second = "", first = "";
1613
1614
                    int length = log_day.length();
1615
1616
                    char words[] = log_day.toCharArray();
1617
                    if (length == 1) {
1618
                        third = "";
1619
                        second = "";
1620
                        first = String.valueOf(words[0]);
1621
                    } else if (length == 2) {
1622
                        third = "";
1623
                        second = String.valueOf(words[0]);
1624
                        first = String.valueOf(words[1]);
1625
                    } else if (length == 3) {
1626
                        third = String.valueOf(words[0]);
1627
                        second = String.valueOf(words[1]);
1628
                        first = String.valueOf(words[2]);
1629
                    }
1630
1631
1612
1632
//                    String weather = JsonUtils.getKeyResult(rtnMsg,"weather");
1633
////                    Log.e(TAG, "onResponse: weather="+weather );
1634
//                    String status = JsonUtils.getKeyResult(weather,"status");
1635
////                    Log.e(TAG, "onResponse: status="+status );
1636
//                    String results = JsonUtils.getKeyResult(weather,"results");
1637
////                    Log.e(TAG, "onResponse: results="+results );
1638
//                    try {
1639
//                        JSONArray jsArray = new JSONArray(results);
1640
////                        if (jsArray.length() >1) {
1641
//                            String s = jsArray.getString(0);
1642
//                            Log.e(TAG, "onResponse: s=" + s);
1643
//                            String pm25 = JsonUtils.getKeyResult(s, "pm25");//*
1644
//                            Log.e(TAG, "onResponse: pm25=" + pm25);
1645
//                            String weather_data = JsonUtils.getKeyResult(s, "weather_data");
1646
//                            Log.e(TAG, "onResponse: weather_data=" + weather_data);
1647
//                            List<WeatherResults.WeatherDataBean> list = JsonUtils.parseToObjectList(weather_data, WeatherResults.WeatherDataBean.class);
1648
//                            String now_weather = list.get(0).getWeather();//*
1649
//                            String temperature = list.get(0).getTemperature();//*
1650
//                            temperature = temperature.replace(" ", "");
1651
//                            temperature = temperature.substring(0, temperature.length() - 1);
1652
//                            String date = list.get(0).getDate();
1653
//                            String now_temperature = date.substring(date.length() - 4, date.length() - 2);//*
1654
//                            Log.e(TAG, "onResponse: now_weather=" + now_weather + "--temperature=" + temperature + "--now_temperature=" + now_temperature);
1655
                    if (activity == null || activity.isFinishing()) {
1613
                    if (activity == null || activity.isFinishing()) {
1656
                        return;
1614
                        return;
1657
                    } else {
1615
                    } else {
1658
                        showDialog(third, second, first, score, now_temperature, now_weather, temperature, MainMapActivity.location_city);
1616
                        showDialog(log_day, score, now_temperature, now_weather, temperature, MainMapActivity.location_city);
1659
                    }
1617
                    }
1660
1618
1661
1619
1687
1645
1688
    }
1646
    }
1689
1647
1690
    private void showDialog(String third, String second, String first, String score, String now_temperature, String now_weather, String temperature, String city) {
1648
    private void showDialog(String log_day, String score, String now_temperature, String now_weather, String temperature, String city) {
1691
        SignInDialog signInDialog = new SignInDialog(this);
1649
        SignInDialog signInDialog = new SignInDialog(this);
1692
        signInDialog.builder()
1650
        signInDialog.builder()
1693
                .setCancelable(true)
1651
                .setCancelable(true)
1694
                .setTitle(third, second, first, score, city)
1652
                .setTitle(log_day, score, city)
1695
                .setWeatherUI(now_temperature, now_weather, temperature)
1653
                .setWeatherUI(now_temperature, now_weather, temperature)
1696
                .show();
1654
                .show();
1697
    }
1655
    }

+ 22 - 80
app/src/main/java/com/electric/chargingpile/activity/ZhanCommentActivity.java

267
267
268
            @Override
268
            @Override
269
            public void afterTextChanged(Editable s) {
269
            public void afterTextChanged(Editable s) {
270
                if (et_pinglun.getText().toString().equals("") && NewZhanDetailsActivity.replaceBlank(et_pinglun.getText().toString()).equals("")) {
270
271
272
                String s1 = et_pinglun.getText().toString();
273
                s1= s1.replace(" " ,"");
274
                if (s1.length() >= 5){
275
                    tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
276
                    tv_make_sure.setEnabled(true);
277
                }else{
278
                    tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
279
                    tv_make_sure.setEnabled(false);
280
                }
281
               /* if (s1.equals("") && NewZhanDetailsActivity.replaceBlank(s1).equals("")) {
271
                    if (!star_level.equals("") && !select_s.equals("")) {
282
                    if (!star_level.equals("") && !select_s.equals("")) {
272
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
283
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
273
                        tv_make_sure.setEnabled(true);
284
                        tv_make_sure.setEnabled(true);
276
                        tv_make_sure.setEnabled(false);
287
                        tv_make_sure.setEnabled(false);
277
                    }
288
                    }
278
                } else {
289
                } else {
279
                    Log.e("edit===", et_pinglun.getText().toString());
280
                    if (et_pinglun.getText().toString().equals("#" + MainApplication.huodonglabel + "# ")) {
290
                    Log.e("edit===", s1);
291
                    if (s1.equals("#" + MainApplication.huodonglabel + "# ")) {
281
                        if (!star_level.equals("") && !select_s.equals("")) {
292
                        if (!star_level.equals("") && !select_s.equals("")) {
282
                            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
293
                            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
283
                            tv_make_sure.setEnabled(true);
294
                            tv_make_sure.setEnabled(true);
290
                        tv_make_sure.setEnabled(true);
301
                        tv_make_sure.setEnabled(true);
291
                    }
302
                    }
292
303
293
                }
294
                if (!et_pinglun.getText().toString().contains("#" + MainApplication.huodonglabel + "#")) {
304
                }*/
305
                if (!s1.contains("#" + MainApplication.huodonglabel + "#")) {
295
                    final LayoutInflater mInflater = LayoutInflater.from(getApplicationContext());
306
                    final LayoutInflater mInflater = LayoutInflater.from(getApplicationContext());
296
                    mFlowLayoutTwo.setAdapter(new TagAdapter<String>(mValss) {
307
                    mFlowLayoutTwo.setAdapter(new TagAdapter<String>(mValss) {
297
                        @Override
308
                        @Override
317
                star_level = String.valueOf(RatingScore);
328
                star_level = String.valueOf(RatingScore);
318
                mFlowLayout.setVisibility(View.VISIBLE);
329
                mFlowLayout.setVisibility(View.VISIBLE);
319
                select_s = "";
330
                select_s = "";
320
                if (et_pinglun.getText().toString().equals("") && NewZhanDetailsActivity.replaceBlank(et_pinglun.getText().toString()).equals("")) {
321
                    if (!star_level.equals("") && !select_s.equals("")) {
322
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
323
                        tv_make_sure.setEnabled(true);
324
                    } else {
325
                        tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
326
                        tv_make_sure.setEnabled(false);
327
                    }
328
                } else {
329
                    if (et_pinglun.getText().toString().equals("#" + MainApplication.huodonglabel + "# ")) {
330
                        if (!star_level.equals("") && !select_s.equals("")) {
331
                            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
332
                            tv_make_sure.setEnabled(true);
333
                        } else {
334
                            tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
335
                            tv_make_sure.setEnabled(false);
336
                        }
337
                    } else {
338
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
339
                        tv_make_sure.setEnabled(true);
340
                    }
341
331
342
                }
343
                switch (RatingScore) {
332
                switch (RatingScore) {
344
                    case 1:
333
                    case 1:
345
                        if (!MainApplication.level_one.equals("")) {
334
                        if (!MainApplication.level_one.equals("")) {
413
                    select_ss = MainApplication.huodonglabel;
402
                    select_ss = MainApplication.huodonglabel;
414
                    setTopic();
403
                    setTopic();
415
                }
404
                }
416
                if (et_pinglun.getText().toString().equals("") && NewZhanDetailsActivity.replaceBlank(et_pinglun.getText().toString()).equals("")) {
417
                    if (!star_level.equals("") && !select_s.equals("")) {
418
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
419
                        tv_make_sure.setEnabled(true);
420
                    } else {
421
                        tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
422
                        tv_make_sure.setEnabled(false);
423
                    }
424
                } else {
425
                    if (et_pinglun.getText().toString().equals("#" + MainApplication.huodonglabel + "# ")) {
426
//                        tv_make_sure.setBackgroundResource(R.color.huise);
427
//                        tv_make_sure.setEnabled(false);
428
                        if (!star_level.equals("") && !select_s.equals("")) {
429
                            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
430
                            tv_make_sure.setEnabled(true);
431
                        } else {
432
                            tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
433
                            tv_make_sure.setEnabled(false);
434
                        }
435
                    } else {
436
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
437
                        tv_make_sure.setEnabled(true);
438
                    }
439
405
440
                }
441
//                Toast.makeText(getApplicationContext(), mVals[position], Toast.LENGTH_SHORT).show();
406
//                Toast.makeText(getApplicationContext(), mVals[position], Toast.LENGTH_SHORT).show();
442
                return true;
407
                return true;
443
            }
408
            }
646
                }
611
                }
647
                Log.e("select===", select_s);
612
                Log.e("select===", select_s);
648
613
649
650
                if (et_pinglun.getText().toString().equals("") && NewZhanDetailsActivity.replaceBlank(et_pinglun.getText().toString()).equals("")) {
651
                    if (!star_level.equals("") && !select_s.equals("")) {
652
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
653
                        tv_make_sure.setEnabled(true);
654
                    } else {
655
                        tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
656
                        tv_make_sure.setEnabled(false);
657
                    }
658
                } else {
659
                    if (et_pinglun.getText().toString().equals("#" + MainApplication.huodonglabel + "# ")) {
660
                        if (!star_level.equals("") && !select_s.equals("")) {
661
                            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
662
                            tv_make_sure.setEnabled(true);
663
                        } else {
664
                            tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
665
                            tv_make_sure.setEnabled(false);
666
                        }
667
                    } else {
668
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
669
                        tv_make_sure.setEnabled(true);
670
                    }
671
                }
672
                return true;
614
                return true;
673
            }
615
            }
674
        });
616
        });
1223
                new Thread(new Runnable() {
1165
                new Thread(new Runnable() {
1224
                    @Override
1166
                    @Override
1225
                    public void run() {
1167
                    public void run() {
1226
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
1227
                        tv_make_sure.setEnabled(true);
1168
//                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
1169
//                        tv_make_sure.setEnabled(true);
1228
                    }
1170
                    }
1229
                }).start();
1171
                }).start();
1230
1172
1235
    @Override
1177
    @Override
1236
    protected void onResume() {
1178
    protected void onResume() {
1237
        super.onResume();
1179
        super.onResume();
1238
        if (Bimp.tempSelectBitmap.size() > 0) {
1239
            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
1240
            tv_make_sure.setEnabled(true);
1241
        }
1180
//        if (Bimp.tempSelectBitmap.size() > 0) {
1181
//            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
1182
//            tv_make_sure.setEnabled(true);
1183
//        }
1242
        mAdapter.notifyDataSetChanged();
1184
        mAdapter.notifyDataSetChanged();
1243
1185
1244
        if (mInsterType == 1 && mAdapter.getItemCount() == 1) {
1186
        if (mInsterType == 1 && mAdapter.getItemCount() == 1) {

+ 2 - 2
app/src/main/java/com/electric/chargingpile/adapter/CommentTopicAdapter.java

58
58
59
        holder.title.setText(data.getMeg());
59
        holder.title.setText(data.getMeg());
60
60
61
        holder.participateText.setText(Util.convetW(data.getPartake_number(),"暂无","车主参与"));
62
        holder.onlookersText.setText(Util.convetW(data.getLook_number(),"暂无","车主围观"));
61
        holder.participateText.setText(data.getPartake_number());
62
        holder.onlookersText.setText(data.getLook_number());
63
63
64
        holder.itemView.setOnClickListener(v->{
64
        holder.itemView.setOnClickListener(v->{
65
            if (mListener!=null)
65
            if (mListener!=null)

+ 0 - 8
app/src/main/java/com/electric/chargingpile/adapter/NewPingLunAdapter.java

156
        {
156
        {
157
            final View finalConvertView2 = convertView;
157
            final View finalConvertView2 = convertView;
158
            try {
158
            try {
159
                String is_play = TextUtils.isEmpty( datas.get(position).getString("is_play"))?"": datas.get(position).getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
160
161
                if (!TextUtils.isEmpty(is_play) && is_play.equals("1")){
162
                    convertView.setVisibility(View.VISIBLE);
163
                }else{
164
                    convertView.setVisibility(View.GONE);
165
                }
166
167
//                "fileUrl":"","thumUrl":""
159
//                "fileUrl":"","thumUrl":""
168
                //父级评论图片
160
                //父级评论图片
169
                String fileUrl = datas.get(position).getString("fileUrl");
161
                String fileUrl = datas.get(position).getString("fileUrl");

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

433
                    }
433
                    }
434
                });
434
                });
435
435
436
                String is_play = TextUtils.isEmpty( datas.get(position).getString("is_play"))?"": datas.get(position).getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
436
                String type = TextUtils.isEmpty(datas.get(position).getString("type"))?"":datas.get(position).getString("type"); //23 视频,24 图片
437
437
438
                if (!TextUtils.isEmpty(is_play) && is_play.equals("1")){
439
                    convertView.setVisibility(View.VISIBLE);
440
                }else{
441
                    convertView.setVisibility(View.GONE);
442
                }
443
438
444
                //父级评论图片
439
                //父级评论图片
445
                String fileUrl = datas.get(position).getString("fileUrl");
440
                String fileUrl = datas.get(position).getString("fileUrl");
448
                fileUrl = fileUrl == null?"":fileUrl;
443
                fileUrl = fileUrl == null?"":fileUrl;
449
                file2Url= file2Url == null?"":file2Url;
444
                file2Url= file2Url == null?"":file2Url;
450
                file3Url= file3Url == null?"":file3Url;
445
                file3Url= file3Url == null?"":file3Url;
451
                String type = TextUtils.isEmpty(datas.get(position).getString("type"))?"":datas.get(position).getString("type"); //23 视频,24 图片
452
                if (type.equals("23")){
446
                if (type.equals("23")){
453
                    holder.imgVideo.setVisibility(View.VISIBLE);
447
                    holder.imgVideo.setVisibility(View.VISIBLE);
454
                    holder.imgStart.setVisibility(View.VISIBLE);
448
                    holder.imgStart.setVisibility(View.VISIBLE);

+ 6 - 1
app/src/main/java/com/electric/chargingpile/fragment/NewMyMessageFragment.java

136
                                    JSONObject jsonObject4 = (JSONObject) jsonArray
136
                                    JSONObject jsonObject4 = (JSONObject) jsonArray
137
                                            .opt(j);
137
                                            .opt(j);
138
                                    String is_play = TextUtils.isEmpty( jsonObject4.getString("is_play"))?"": jsonObject4.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
138
                                    String is_play = TextUtils.isEmpty( jsonObject4.getString("is_play"))?"": jsonObject4.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
139
                                    if (is_play.equals("1")){
139
                                    String type = TextUtils.isEmpty(jsonObject4.getString("type"))?"":jsonObject4.getString("type"); //23 视频,24 图片
140
                                    if (type.equals("23")){
141
                                        if (is_play.equals("1")){
142
                                            datas.add(jsonObject4);
143
                                        }
144
                                    }else{
140
                                        datas.add(jsonObject4);
145
                                        datas.add(jsonObject4);
141
                                    }
146
                                    }
142
                                }
147
                                }

+ 14 - 4
app/src/main/java/com/electric/chargingpile/fragment/ZhanCommentFragment.java

229
    public void initCommentData(RankinglistRefreshEvent event) {
229
    public void initCommentData(RankinglistRefreshEvent event) {
230
        String url = MainApplication.url + "/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=1";
230
        String url = MainApplication.url + "/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=1";
231
//        String url = MainApplication.url+"/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=1";
231
//        String url = MainApplication.url+"/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=1";
232
//        Log.e(TAG, "getCommentsData=" + url);
232
        Log.e(TAG, "getCommentsData=" + url);
233
        OkHttpUtils.get().url(url)
233
        OkHttpUtils.get().url(url)
234
                .build().connTimeOut(6000).readTimeOut(6000)
234
                .build().connTimeOut(6000).readTimeOut(6000)
235
                .execute(new StringCallback() {
235
                .execute(new StringCallback() {
256
                                for (int j = 0; j < jsonArray.length(); j++) {
256
                                for (int j = 0; j < jsonArray.length(); j++) {
257
                                    JSONObject jsonObject = (JSONObject) jsonArray.opt(j);
257
                                    JSONObject jsonObject = (JSONObject) jsonArray.opt(j);
258
                                    String is_play = TextUtils.isEmpty( jsonObject.getString("is_play"))?"": jsonObject.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
258
                                    String is_play = TextUtils.isEmpty( jsonObject.getString("is_play"))?"": jsonObject.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
259
                                    if (is_play.equals("1")){
259
                                    String type = TextUtils.isEmpty(jsonObject.getString("type"))?"":jsonObject.getString("type"); //23 视频,24 图片
260
                                    if (type.equals("23")){
261
                                        if (is_play.equals("1")){
262
                                            datas.add(jsonObject);
263
                                        }
264
                                    }else {
260
                                        datas.add(jsonObject);
265
                                        datas.add(jsonObject);
261
                                    }
266
                                    }
262
                                }
267
                                }
309
                                JSONArray jsonArray = new JSONArray(commentData);
314
                                JSONArray jsonArray = new JSONArray(commentData);
310
                                for (int j = 0; j < jsonArray.length(); j++) {
315
                                for (int j = 0; j < jsonArray.length(); j++) {
311
                                    JSONObject jsonObject = (JSONObject) jsonArray.opt(j);
316
                                    JSONObject jsonObject = (JSONObject) jsonArray.opt(j);
312
                                    String is_play = TextUtils.isEmpty( jsonObject.getString("is_play"))?"": jsonObject.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
313
317
314
                                    if (is_play.equals("1")){
318
                                    String is_play = TextUtils.isEmpty( jsonObject.getString("is_play"))?"": jsonObject.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
319
                                    String type = TextUtils.isEmpty(jsonObject.getString("type"))?"":jsonObject.getString("type"); //23 视频,24 图片
320
                                     if (type.equals("23")){
321
                                        if (is_play.equals("1")){
322
                                            datas.add(jsonObject);
323
                                        }
324
                                    }else{
315
                                        datas.add(jsonObject);
325
                                        datas.add(jsonObject);
316
                                    }
326
                                    }
317
                                }
327
                                }

+ 2 - 0
app/src/main/java/com/electric/chargingpile/util/CarTypeUtil.java

26
                        name0 = strarray[0];
26
                        name0 = strarray[0];
27
                    }
27
                    }
28
                    car = name0 + name1;
28
                    car = name0 + name1;
29
                }else{
30
                    car=s;
29
                }
31
                }
30
            }
32
            }
31
        }catch (Exception e) {
33
        }catch (Exception e) {

+ 45 - 7
app/src/main/java/com/electric/chargingpile/view/SignInDialog.java

1
package com.electric.chargingpile.view;
1
package com.electric.chargingpile.view;
2
2
3
import android.content.Context;
3
import android.content.Context;
4
import android.text.Html;
5
import android.text.TextUtils;
4
import android.view.Display;
6
import android.view.Display;
5
import android.view.LayoutInflater;
7
import android.view.LayoutInflater;
6
import android.view.View;
8
import android.view.View;
19
    private Context context;
21
    private Context context;
20
    private android.app.Dialog dialog;
22
    private android.app.Dialog dialog;
21
    private Display display;
23
    private Display display;
22
    private TextView tv_num, tv_third, tv_second, tv_first, tv_now_temperature, tv_du, tv_w, tv_pm, tv_city;
24
    private TextView tv_num, tv_third, tv_second, tv_first, tv_now_temperature, tv_du, tv_w, tv_pm, tv_city,tv_2;
23
    private LinearLayout dialog_bg;
25
    private LinearLayout dialog_bg;
24
26
25
    public SignInDialog(Context context) {
27
    public SignInDialog(Context context) {
37
        // 获取自定义Dialog布局中的控件
39
        // 获取自定义Dialog布局中的控件
38
        dialog_bg = (LinearLayout) view.findViewById(R.id.dialog_bg);
40
        dialog_bg = (LinearLayout) view.findViewById(R.id.dialog_bg);
39
        tv_num = (TextView) view.findViewById(R.id.tv_num);
41
        tv_num = (TextView) view.findViewById(R.id.tv_num);
42
        tv_2 = (TextView) view.findViewById(R.id.tv_2);
40
        tv_third = (TextView) view.findViewById(R.id.tv_third);
43
        tv_third = (TextView) view.findViewById(R.id.tv_third);
41
        tv_second = (TextView) view.findViewById(R.id.tv_second);
44
        tv_second = (TextView) view.findViewById(R.id.tv_second);
42
        tv_first = (TextView) view.findViewById(R.id.tv_first);
45
        tv_first = (TextView) view.findViewById(R.id.tv_first);
59
        return this;
62
        return this;
60
    }
63
    }
61
64
62
    public SignInDialog setTitle(String third, String second, String first, String score, String city) {
63
        if (score != null && !score.equals("")) {
64
            tv_num.setText(score);
65
        } else {
66
            tv_num.setText("");
65
    public SignInDialog setTitle(String log_day, String score, String city) {
66
        String third = "", second = "", first = "";
67
        if (TextUtils.isEmpty(log_day)){
68
            log_day="1";
67
        }
69
        }
68
        tv_num.setText(score);
70
        int length = log_day.length();
71
72
        char words[] = log_day.toCharArray();
73
        if (length == 1) {
74
            third = "";
75
            second = "";
76
            first = String.valueOf(words[0]);
77
        } else if (length == 2) {
78
            third = "";
79
            second = String.valueOf(words[0]);
80
            first = String.valueOf(words[1]);
81
        } else if (length == 3) {
82
            third = String.valueOf(words[0]);
83
            second = String.valueOf(words[1]);
84
            first = String.valueOf(words[2]);
85
        }
86
87
88
89
90
91
69
        if (third.equals("")) {
92
        if (third.equals("")) {
70
            tv_third.setText("0");
93
            tv_third.setText("0");
71
        } else {
94
        } else {
83
        } else {
106
        } else {
84
            tv_first.setText(first);
107
            tv_first.setText(first);
85
        }
108
        }
109
110
        if (score != null && !score.equals("")) {
111
            tv_num.setText(Html.fromHtml("今天签到获得 <font color='#01b637'>"+score+"</font> 个充电币"));
112
            int i = 7 - Integer.parseInt(log_day);
113
            if (i>=0){
114
                tv_2.setText("还有"+ i+"天获得充电优惠哦~");
115
            }
116
        } else {
117
            tv_num.setText("");
118
        }
119
120
        if (Integer.parseInt(log_day)>= 7){
121
            tv_num.setText("充电订单折扣优惠券已到账");
122
            tv_2.setText("充电订单八折");
123
        }
86
        return this;
124
        return this;
87
    }
125
    }
88
126

BIN
app/src/main/res/drawable-xxhdpi/ic_activity_center.webp


BIN
app/src/main/res/drawable-xxhdpi/ic_no_data_search.webp


+ 15 - 0
app/src/main/res/layout/activity_main_map.xml

1497
            android:visibility="gone">
1497
            android:visibility="gone">
1498
1498
1499
            <TextView
1499
            <TextView
1500
                android:id="@+id/notificationText"
1501
                android:maxLines="1"
1502
                android:ellipsize="end"
1500
                android:layout_width="match_parent"
1503
                android:layout_width="match_parent"
1501
                android:layout_height="27dp"
1504
                android:layout_height="27dp"
1502
                android:drawableLeft="@drawable/icon_main_order"
1505
                android:drawableLeft="@drawable/icon_main_order"
1620
                tools:visibility="visible" />
1623
                tools:visibility="visible" />
1621
1624
1622
            <ImageView
1625
            <ImageView
1626
                android:layout_centerVertical="true"
1627
                android:id="@+id/imgActivityCenter"
1628
                android:layout_width="80dp"
1629
                android:layout_height="80dp"
1630
                android:layout_alignParentRight="true"
1631
                android:layout_marginTop="30dp"
1632
                android:layout_marginRight="12dp"
1633
                android:src="@drawable/ic_activity_center"
1634
                android:visibility="gone"
1635
                tools:visibility="visible" />
1636
1637
            <ImageView
1623
                android:id="@+id/iv_route"
1638
                android:id="@+id/iv_route"
1624
                android:layout_width="wrap_content"
1639
                android:layout_width="wrap_content"
1625
                android:layout_height="wrap_content"
1640
                android:layout_height="wrap_content"

+ 27 - 10
app/src/main/res/layout/activity_search.xml

1
<?xml version="1.0" encoding="utf-8"?>
1
<?xml version="1.0" encoding="utf-8"?>
2
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
3
    xmlns:tools="http://schemas.android.com/tools"
4
    xmlns:tools="http://schemas.android.com/tools"
4
    android:layout_width="match_parent"
5
    android:layout_width="match_parent"
5
    android:layout_height="match_parent">
6
    android:layout_height="match_parent">
6

7

7
    <TextView
8
        android:id="@+id/no_result"
9
        android:layout_width="match_parent"
10
        android:layout_height="match_parent"
11
        android:gravity="center"
12
        android:text="没有匹配到搜索结果"
13
        android:textColor="#999999"
14
        android:visibility="gone"
15
        tools:visibility="visible"
16
        android:textSize="16sp" />
17
    <com.zhy.autolayout.AutoLinearLayout
8
    <com.zhy.autolayout.AutoLinearLayout
9
        android:id="@+id/autoLinearLayout"
18
        android:layout_width="match_parent"
10
        android:layout_width="match_parent"
19
        android:layout_height="match_parent"
11
        android:layout_height="match_parent"
20
        android:background="@color/activity_bgcolor"
12
        android:background="@color/activity_bgcolor"
189
            android:listSelector="@color/transparent" />
181
            android:listSelector="@color/transparent" />
190
    </com.zhy.autolayout.AutoLinearLayout>
182
    </com.zhy.autolayout.AutoLinearLayout>
191

183

184
    <ImageView
185
        android:id="@+id/imgNoData"
186
        android:layout_width="wrap_content"
187
        android:layout_height="wrap_content"
188
        android:src="@drawable/ic_no_data_search"
189
        app:layout_constraintBottom_toBottomOf="parent"
190
        app:layout_constraintEnd_toEndOf="parent"
191
        app:layout_constraintStart_toStartOf="parent"
192
        android:visibility="gone"
193
        app:layout_constraintTop_toTopOf="parent" tools:visibility="visible" />
194

195
    <TextView
196
        android:layout_marginTop="28dp"
197
        android:id="@+id/no_result"
198
        android:layout_width="wrap_content"
199
        android:layout_height="wrap_content"
200
        android:gravity="center"
201
        android:text="小主没有您要的内容,请重新输入试试"
202
        android:textColor="#999999"
203
        android:textSize="16sp"
204
        android:visibility="gone"
205
        app:layout_constraintStart_toStartOf="@+id/imgNoData"
206
        app:layout_constraintEnd_toEndOf="@+id/imgNoData"
207
        app:layout_constraintTop_toBottomOf="@+id/imgNoData"
208
        tools:visibility="visible" />
192

209

193
</androidx.constraintlayout.widget.ConstraintLayout>
210
</androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 1
app/src/main/res/layout/activity_zhan_comment.xml

189
                android:layout_marginBottom="7dp"
189
                android:layout_marginBottom="7dp"
190
                android:background="@color/white"
190
                android:background="@color/white"
191
                android:gravity="left|top"
191
                android:gravity="left|top"
192
                android:hint="对本次充电感受如何?跟其他车友分享一下吧~"
192
                android:hint="您的充电体验、站点吐槽、充电趣事,来和其他车友分享吧~"
193
                android:paddingLeft="15dp"
193
                android:paddingLeft="15dp"
194
                android:paddingTop="12dp"
194
                android:paddingTop="12dp"
195
                android:paddingRight="15dp"
195
                android:paddingRight="15dp"

+ 3 - 19
app/src/main/res/layout/item_signin.xml

158
            android:layout_marginBottom="6dp">
158
            android:layout_marginBottom="6dp">
159
159
160
            <TextView
160
            <TextView
161
                android:layout_width="wrap_content"
162
                android:layout_height="wrap_content"
163
                android:text="今天签到获得"
164
                android:textSize="16sp"
165
                android:textColor="@color/ui_62"/>
166
167
            <TextView
168
                android:id="@+id/tv_num"
161
                android:id="@+id/tv_num"
169
                android:layout_width="wrap_content"
162
                android:layout_width="match_parent"
170
                android:layout_height="wrap_content"
163
                android:layout_height="wrap_content"
171
                android:text=""
164
                android:text=""
172
                android:textSize="16sp"
173
                android:textColor="@color/lvse"/>
174
175
            <TextView
176
                android:layout_width="wrap_content"
177
                android:layout_height="wrap_content"
178
                android:text="个充电币"
179
                android:textSize="16sp"
180
                android:textColor="@color/ui_62"/>
181
182
165
                android:textColor="@color/ui_62"
166
                android:textSize="16sp" />
183
        </LinearLayout>
167
        </LinearLayout>
184
168
185
        <TextView
169
        <TextView

+ 3 - 0
app/src/main/res/layout/item_zhancomments.xml

63
                    android:orientation="horizontal">
63
                    android:orientation="horizontal">
64
64
65
                    <TextView
65
                    <TextView
66
                        android:layout_gravity="center_vertical"
66
                        android:id="@+id/tv_pname"
67
                        android:id="@+id/tv_pname"
67
                        android:layout_width="wrap_content"
68
                        android:layout_width="wrap_content"
68
                        android:layout_height="wrap_content"
69
                        android:layout_height="wrap_content"
75
                        tools:text="gin" />
76
                        tools:text="gin" />
76
77
77
                    <ImageView
78
                    <ImageView
79
                        android:layout_gravity="center_vertical"
78
                        android:id="@+id/certified_icon"
80
                        android:id="@+id/certified_icon"
79
                        android:layout_width="18dp"
81
                        android:layout_width="18dp"
80
                        android:layout_height="18dp"
82
                        android:layout_height="18dp"
83
                        android:src="@drawable/certified_icon" />
85
                        android:src="@drawable/certified_icon" />
84
86
85
                    <TextView
87
                    <TextView
88
                        android:layout_gravity="center_vertical"
86
                        android:id="@+id/tv_pcar"
89
                        android:id="@+id/tv_pcar"
87
                        android:layout_width="match_parent"
90
                        android:layout_width="match_parent"
88
                        android:layout_height="wrap_content"
91
                        android:layout_height="wrap_content"

+ 1 - 1
app/src/main/res/values/strings.xml

18
    <string name="updated_at">上次更新于%1$s前</string>
18
    <string name="updated_at">上次更新于%1$s前</string>
19
    <string name="updated_just_now">刚刚更新</string>
19
    <string name="updated_just_now">刚刚更新</string>
20
    <string name="time_error">时间有问题</string>
20
    <string name="time_error">时间有问题</string>
21
    <string name="string_tab_qa">社区</string>
21
    <string name="string_tab_qa">互助</string>
22
22
23
23
24
    <string name="main_name">主界面</string>
24
    <string name="main_name">主界面</string>