ff-fb38a1b7743cbae29562942f7613bf17af859784R227">227
}
|
|
228
|
228
|
showCarDialog();
|
|
229
|
229
|
requestWebLink();
|
|
|
230
|
switchCarFirends();
|
|
230
|
231
|
// ATTENTION: This was auto-generated to implement the App Indexing API.
|
|
231
|
232
|
// See https://g.co/AppIndexing/AndroidStudio for more information.
|
|
232
|
233
|
client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
|
|
|
@ -941,9 +942,11 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
|
|
941
|
942
|
// Intent i = new Intent(getApplicationContext(), ChatActivity.class);//聊聊页面
|
|
942
|
943
|
// i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
|
943
|
944
|
// startActivity(i);
|
|
944
|
|
Intent i = new Intent(getApplication(), MyWebViewActivity.class);
|
|
945
|
|
i.putExtra("url", mUrl);
|
|
946
|
|
startActivity(i);
|
|
|
945
|
if (!mUrl.equals("")){
|
|
|
946
|
Intent i = new Intent(getApplication(), MyWebViewActivity.class);
|
|
|
947
|
i.putExtra("url", mUrl);
|
|
|
948
|
startActivity(i);
|
|
|
949
|
}
|
|
947
|
950
|
break;
|
|
948
|
951
|
|
|
949
|
952
|
|
|
|
@ -1633,17 +1636,40 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
|
|
1633
|
1636
|
@Override
|
|
1634
|
1637
|
public void onResponse(String response) {
|
|
1635
|
1638
|
// Log.e(TAG, "onResponse: signIn "+response );
|
|
1636
|
|
// {"rtnCode":"01","rtnMsg":{"score":"10","log_day":"1"}}
|
|
|
1639
|
// {"rtnCode":"01","rtnMsg":{"score":"10",r"log_day":"1"}}
|
|
1637
|
1640
|
String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
|
|
1638
|
1641
|
if (rtnCode.equals("01")) {
|
|
1639
|
1642
|
String rtnMsg = JsonUtils.getKeyResult(response, "rtnMsg");
|
|
1640
|
1643
|
mUrl = JsonUtils.getKeyResult(response, "data");
|
|
1641
|
|
|
|
1642
|
1644
|
}
|
|
1643
|
1645
|
}
|
|
1644
|
1646
|
});
|
|
1645
|
1647
|
|
|
1646
|
1648
|
}
|
|
|
1649
|
private void switchCarFirends() {
|
|
|
1650
|
OkHttpUtils.get().url(MainApplication.url + "/zhannew/basic/web/index.php/zhangonggao/switchcheyouquan").build().connTimeOut(3000).readTimeOut(3000)
|
|
|
1651
|
.execute(new StringCallback() {
|
|
|
1652
|
@Override
|
|
|
1653
|
public void onError(Call call, Exception e) {
|
|
|
1654
|
e.printStackTrace();
|
|
|
1655
|
}
|
|
|
1656
|
|
|
|
1657
|
@Override
|
|
|
1658
|
public void onResponse(String response) {
|
|
|
1659
|
String rtnCode = JsonUtils.getKeyResult(response, "code");
|
|
|
1660
|
if ("100".equals(rtnCode)) {
|
|
|
1661
|
String data = JsonUtils.getKeyResult(response, "data");
|
|
|
1662
|
if (data.equals("1")){
|
|
|
1663
|
car_friends_group.setVisibility(View.VISIBLE);
|
|
|
1664
|
}else{
|
|
|
1665
|
car_friends_group.setVisibility(View.GONE);
|
|
|
1666
|
}
|
|
|
1667
|
}else{
|
|
|
1668
|
car_friends_group.setVisibility(View.GONE);
|
|
|
1669
|
}
|
|
|
1670
|
}
|
|
|
1671
|
});
|
|
|
1672
|
}
|
|
1647
|
1673
|
|
|
1648
|
1674
|
private void showDialog(String log_day, String score, String now_temperature, String now_weather, String temperature, String city) {
|
|
1649
|
1675
|
SignInDialog signInDialog = new SignInDialog(this);
|
|
|
@ -23,6 +23,7 @@ import com.blankj.utilcode.util.LogUtils;
|
|
23
|
23
|
import com.blankj.utilcode.util.Utils;
|
|
24
|
24
|
import com.electric.chargingpile.BuildConfig;
|
|
25
|
25
|
import com.electric.chargingpile.activity.MainMapActivity;
|
|
|
26
|
import com.electric.chargingpile.constant.AppKeyConstant;
|
|
26
|
27
|
import com.electric.chargingpile.data.AdDetail;
|
|
27
|
28
|
import com.electric.chargingpile.data.Adin;
|
|
28
|
29
|
import com.electric.chargingpile.data.CarOwnerCertificateBean;
|
|
|
@ -45,6 +46,7 @@ import com.nostra13.universalimageloader.core.assist.ImageScaleType;
|
|
45
|
46
|
import com.shuyu.gsyvideoplayer.GSYVideoManager;
|
|
46
|
47
|
import com.shuyu.gsyvideoplayer.model.VideoOptionModel;
|
|
47
|
48
|
import com.tencent.bugly.crashreport.CrashReport;
|
|
|
49
|
import com.umeng.commonsdk.UMConfigure;
|
|
48
|
50
|
import com.zhy.http.okhttp.OkHttpUtils;
|
|
49
|
51
|
import com.zhy.http.okhttp.callback.StringCallback;
|
|
50
|
52
|
|
|
|
@ -178,6 +180,7 @@ public class MainApplication extends MultiDexApplication implements CameraXConfi
|
|
178
|
180
|
// PermissionMonitor.start(false);
|
|
179
|
181
|
instances = this;
|
|
180
|
182
|
setDatabase();
|
|
|
183
|
UMConfigure.preInit(this, AppKeyConstant.UMENG_KEY,BuildConfig.FLAVOR);
|
|
181
|
184
|
|
|
182
|
185
|
Utils.init(this);
|
|
183
|
186
|
LogUtils.getConfig().setLogSwitch(true);
|
|
|
@ -422,8 +425,11 @@ public class MainApplication extends MultiDexApplication implements CameraXConfi
|
|
422
|
425
|
AMapLocationClient.updatePrivacyAgree(context,true);
|
|
423
|
426
|
MobSDK.init(MainApplication.context);
|
|
424
|
427
|
MobSDK.submitPolicyGrantResult(true,null);
|
|
425
|
|
CrashReport.initCrashReport(MainApplication.context, "900010422", BuildConfig.DEBUG);
|
|
|
428
|
CrashReport.initCrashReport(MainApplication.context, AppKeyConstant.BUGLY_KEY, BuildConfig.DEBUG);
|
|
426
|
429
|
CrashReport.setAppChannel(MainApplication.context, BuildConfig.FLAVOR);
|
|
|
430
|
|
|
|
431
|
UMConfigure.init(context,UMConfigure.DEVICE_TYPE_PHONE,"");
|
|
|
432
|
UMConfigure.setLogEnabled(BuildConfig.DEBUG);
|
|
427
|
433
|
}
|
|
428
|
434
|
|
|
429
|
435
|
@NonNull
|
|
|
@ -0,0 +1,6 @@
|
|
|
1
|
package com.electric.chargingpile.constant;
|
|
|
2
|
|
|
|
3
|
public class AppKeyConstant {
|
|
|
4
|
public static final String UMENG_KEY = "54c65228fd98c583210001c9";
|
|
|
5
|
public static final String BUGLY_KEY = "900010422";
|
|
|
6
|
}
|
|
|
@ -1684,6 +1684,7 @@
|
|
1684
|
1684
|
tools:visibility="visible" />
|
|
1685
|
1685
|
|
|
1686
|
1686
|
<ImageView
|
|
|
1687
|
|
|
1687
|
1688
|
android:id="@+id/iv_tuijian"
|
|
1688
|
1689
|
android:layout_width="wrap_content"
|
|
1689
|
1690
|
android:layout_height="wrap_content"
|
|
|
@ -1691,7 +1692,7 @@
|
|
1691
|
1692
|
android:layout_alignParentBottom="true"
|
|
1692
|
1693
|
android:layout_marginRight="15dp"
|
|
1693
|
1694
|
android:src="@drawable/icon_tuijian"
|
|
1694
|
|
android:visibility="visible"
|
|
|
1695
|
android:visibility="invisible"
|
|
1695
|
1696
|
tools:visibility="visible" />
|
|
1696
|
1697
|
</RelativeLayout>
|
|
1697
|
1698
|
|
|
|
@ -261,6 +261,7 @@
|
|
261
|
261
|
android:layout_above="@+id/ll_tab">
|
|
262
|
262
|
|
|
263
|
263
|
<LinearLayout
|
|
|
264
|
android:layout_marginBottom="12dp"
|
|
264
|
265
|
android:background="@drawable/bg_white_radius10"
|
|
265
|
266
|
android:layout_marginEnd="12dp"
|
|
266
|
267
|
android:layout_marginStart="12dp"
|
|
|
@ -462,10 +463,10 @@
|
|
462
|
463
|
</LinearLayout>
|
|
463
|
464
|
|
|
464
|
465
|
<ImageView
|
|
465
|
|
android:layout_marginEnd="12sp"
|
|
466
|
|
android:layout_marginStart="12sp"
|
|
467
|
|
android:layout_marginBottom="12dp"
|
|
468
|
|
android:layout_marginTop="12dp"
|
|
|
466
|
android:visibility="gone"
|
|
|
467
|
tools:visibility="visible"
|
|
|
468
|
android:layout_marginEnd="12dp"
|
|
|
469
|
android:layout_marginStart="12dp"
|
|
469
|
470
|
android:id="@+id/car_friends_group"
|
|
470
|
471
|
android:background="@drawable/car_friends_group"
|
|
471
|
472
|
android:layout_width="match_parent"
|
|
|
@ -473,6 +474,7 @@
|
|
473
|
474
|
|
|
474
|
475
|
|
|
475
|
476
|
<LinearLayout
|
|
|
477
|
android:layout_marginTop="12dp"
|
|
476
|
478
|
android:layout_marginBottom="20dp"
|
|
477
|
479
|
android:layout_marginEnd="12dp"
|
|
478
|
480
|
android:layout_marginStart="12dp"
|
|
|
@ -18,7 +18,7 @@
|
|
18
|
18
|
<string name="updated_at">上次更新于%1$s前</string>
|
|
19
|
19
|
<string name="updated_just_now">刚刚更新</string>
|
|
20
|
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
|
24
|
<string name="main_name">主界面</string>
|
|
|
@ -13,6 +13,7 @@ buildscript {
|
|
13
|
13
|
maven {url 'https://maven.aliyun.com/repository/public/'}
|
|
14
|
14
|
maven {url 'https://maven.aliyun.com/repository/gradle-plugin/'}
|
|
15
|
15
|
maven { url "https://www.jitpack.io" }
|
|
|
16
|
maven { url 'https://repo1.maven.org/maven2/' }
|
|
16
|
17
|
mavenCentral()
|
|
17
|
18
|
}
|
|
18
|
19
|
|