huyuguo преди 4 години
родител
ревизия
6ca9b22003

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

@ -11,8 +11,10 @@ import android.os.AsyncTask;
11 11
import android.os.Bundle;
12 12
import android.os.Handler;
13 13
import android.os.Message;
14
14 15
import androidx.viewpager.widget.ViewPager;
15 16
import androidx.appcompat.app.AppCompatActivity;
17
16 18
import android.view.Gravity;
17 19
import android.view.KeyEvent;
18 20
import android.view.LayoutInflater;
@ -1804,12 +1806,11 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
1804 1806
        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
1805 1807
            @Override
1806 1808
            public void onError(Call call, Exception e) {
1807
1809
                e.printStackTrace();
1808 1810
            }
1809 1811
1810 1812
            @Override
1811 1813
            public void onResponse(String response) {
1812
//                Log.e(TAG, "onResponse: getZhanCommentNum="+response );
1813 1814
                String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
1814 1815
                if (rtnCode != null && rtnCode.equals("01")) {
1815 1816
                    String rtnMsg = JsonUtils.getKeyResult(response, "rtnMsg");

+ 0 - 1
app/src/main/java/com/electric/chargingpile/activity/RecommendChargingStationActivity.java

@ -477,7 +477,6 @@ public class RecommendChargingStationActivity extends AppCompatActivity implemen
477 477
        @Override
478 478
        public void onBindViewHolder(ViewHolder holder, int position) {
479 479
            RecommendZhan recommendZhan = mList.get(position);
480
481 480
            holder.station_item.setOnClickListener(new View.OnClickListener() {
482 481
                @Override
483 482
                public void onClick(View v) {

+ 16 - 15
app/src/main/java/com/electric/chargingpile/activity/SearchActivity.java

@ -623,7 +623,7 @@ public class SearchActivity extends Activity implements OnClickListener, Inputti
623 623
                @Override
624 624
                public void onClick(View v) {
625 625
                    Intent intent = new Intent(getApplication(), NewZhanDetailsActivity.class);
626
                    intent.putExtra("zhan_id", point.getZhan_id());
626
                    intent.putExtra("zhan_id", point.getId());
627 627
                    startActivity(intent);
628 628
                }
629 629
            });
@ -682,26 +682,27 @@ public class SearchActivity extends Activity implements OnClickListener, Inputti
682 682
                viewHolder.zongjia.setText(String.format("%.2f", point.getZongjia()));
683 683
            }
684 684

685
            if (point.getComment_cnt() == 0) {
686
                viewHolder.comment_cnt.setVisibility(View.GONE);
687
            } else {
688
                viewHolder.comment_cnt.setVisibility(View.VISIBLE);
689
                if (point.getComment_cnt() < 1000) {
690
                    viewHolder.comment_cnt.setText(point.getComment_cnt() + "次评论");
691
                } else if (point.getComment_cnt() < 10000) {
692
                    viewHolder.comment_cnt.setText(point.getComment_cnt() / 1000 + "k+次评论");
693
                } else {
694
                    viewHolder.comment_cnt.setText(point.getComment_cnt() / 10000 + "w+次评论");
695
                }
696

697
            }
698

699 685
            if (point.getComment_cnt() == 0 || point.getCharge_record_cnt() == 0 && point.getComment_cnt() == 0) {
700 686
                viewHolder.times_line.setVisibility(View.GONE);
701 687
            } else {
702 688
                viewHolder.times_line.setVisibility(View.VISIBLE);
703 689
            }
704 690

691
            if (point.getCharge_record_cnt() == 0) {
692
                viewHolder.charge_record_cnt.setVisibility(View.GONE);
693
            } else {
694
                viewHolder.charge_record_cnt.setVisibility(View.VISIBLE);
695

696
                if (point.getCharge_record_cnt() < 1000) {
697
                    viewHolder.charge_record_cnt.setText(point.getCharge_record_cnt() + "次充电成功");
698
                } else if (point.getCharge_record_cnt() < 10000) {
699
                    viewHolder.charge_record_cnt.setText(point.getCharge_record_cnt() / 1000 + "k+次充电成功");
700
                } else {
701
                    viewHolder.charge_record_cnt.setText(point.getCharge_record_cnt() / 10000 + "w+次充电成功");
702
                }
703

704
            }
705

705 706
            if (point.getComment_cnt() == 0) {
706 707
                viewHolder.comment_cnt.setVisibility(View.GONE);
707 708
            } else {