huyuguo преди 3 години
родител
ревизия
1784adb651
променени са 3 файла, в които са добавени 24 реда и са изтрити 3 реда
  1. 1 0
      app/build.gradle
  2. 23 3
      app/src/main/java/com/electric/chargingpile/activity/MyWebViewActivity.java
  3. 0 0
      gradlew

+ 1 - 0
app/build.gradle

@ -46,6 +46,7 @@ android {
46 46
//            enabled true
47 47
//        }
48 48
    }
49
    ndkVersion '22.1.7171670'
49 50
50 51
    dataBinding {
51 52
        enabled true

+ 23 - 3
app/src/main/java/com/electric/chargingpile/activity/MyWebViewActivity.java

@ -722,7 +722,14 @@ public class MyWebViewActivity extends Activity implements PlatformActionListene
722 722
                break;
723 723
            case "15":
724 724
                if (MainApplication.isLogin()) {
725
                    loadDialog.show();
725
                    runOnUiThread(new Runnable() {
726
                        @TargetApi(Build.VERSION_CODES.KITKAT)
727
                        @Override
728
                        public void run() {
729
                            loadDialog.show();
730
                        }
731
                    });
732
726 733
                    getCarOwnerCertificateList();
727 734
                } else {
728 735
                    startActivity(new Intent(getApplicationContext(), LoginActivity.class));
@ -1594,13 +1601,26 @@ public class MyWebViewActivity extends Activity implements PlatformActionListene
1594 1601
            @Override
1595 1602
            public void onError(Call call, Exception e) {
1596 1603
                e.printStackTrace();
1597
                loadDialog.dismiss();
1604
                runOnUiThread(new Runnable() {
1605
                    @TargetApi(Build.VERSION_CODES.KITKAT)
1606
                    @Override
1607
                    public void run() {
1608
                        loadDialog.dismiss();
1609
                    }
1610
                });
1611
1598 1612
                Toast.makeText(getApplicationContext(), e.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
1599 1613
            }
1600 1614
1601 1615
            @Override
1602 1616
            public void onResponse(String response) {
1603
                loadDialog.dismiss();
1617
                runOnUiThread(new Runnable() {
1618
                    @TargetApi(Build.VERSION_CODES.KITKAT)
1619
                    @Override
1620
                    public void run() {
1621
                        loadDialog.dismiss();
1622
                    }
1623
                });
1604 1624
                String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
1605 1625
                if ("01".equals(rtnCode)) {
1606 1626
                    String data = JsonUtils.getKeyResult(response, "data");

+ 0 - 0
gradlew