Browse Source

1.移动端学有义方,这是废弃版本(已升级)

FailedToRead 11 hours ago
parent
commit
8ee57f3afa
73 changed files with 339 additions and 1505 deletions
  1. 1 1
      .idea/compiler.xml
  2. 10 0
      .idea/deploymentTargetDropDown.xml
  3. 2 3
      .idea/gradle.xml
  4. 10 0
      .idea/migrations.xml
  5. 8 1
      .idea/misc.xml
  6. 109 7
      app/build.gradle
  7. BIN
      app/libs/alipaySdk-20180601.jar
  8. BIN
      app/libs/phoneNumber-L-AuthSDK-2.11.1.1.aar
  9. 29 73
      app/src/main/AndroidManifest.xml
  10. 10 12
      app/src/main/java/com/edufound/android/xyyf/activity/AgreementActivity.java
  11. 3 5
      app/src/main/java/com/edufound/android/xyyf/activity/MainActivity.java
  12. 0 234
      app/src/main/java/com/edufound/android/xyyf/activity/PhoneNumLoginActivity.java
  13. 0 279
      app/src/main/java/com/edufound/android/xyyf/activity/PhoneNumLoginActivityLandscape.java
  14. 28 18
      app/src/main/java/com/edufound/android/xyyf/application/EApplication.java
  15. 0 1
      app/src/main/java/com/edufound/android/xyyf/base/BaseActivity.java
  16. 0 45
      app/src/main/java/com/edufound/android/xyyf/config/AppUtils.java
  17. 0 19
      app/src/main/java/com/edufound/android/xyyf/config/AuthPageConfig.java
  18. 0 107
      app/src/main/java/com/edufound/android/xyyf/config/BaseUIConfig.java
  19. 0 242
      app/src/main/java/com/edufound/android/xyyf/config/DialogLandConfig.java
  20. 0 106
      app/src/main/java/com/edufound/android/xyyf/config/DialogLandConfigNoUI.java
  21. 0 161
      app/src/main/java/com/edufound/android/xyyf/config/FullPortConfig.java
  22. 12 5
      app/src/main/java/com/edufound/android/xyyf/interfaces/EfunboxPayInterfaces.java
  23. 6 93
      app/src/main/java/com/edufound/android/xyyf/interfaces/JsInterfaces.java
  24. 14 4
      app/src/main/java/com/edufound/android/xyyf/main/MainPersenter.java
  25. 2 1
      app/src/main/java/com/edufound/android/xyyf/pay/PayPersenter.java
  26. 10 4
      app/src/main/java/com/edufound/android/xyyf/receiver/HomeKeyEventReceiver.java
  27. 1 0
      app/src/main/java/com/edufound/android/xyyf/util/DeviceUuidFactory.java
  28. 1 1
      app/src/main/java/com/edufound/android/xyyf/util/EduFoundUtil.java
  29. 0 5
      app/src/main/java/com/edufound/android/xyyf/util/Logger.java
  30. 5 1
      app/src/main/java/com/edufound/android/xyyf/util/OKHttpUtil.java
  31. 1 1
      app/src/main/java/com/edufound/android/xyyf/util/UpdateUtil.java
  32. BIN
      app/src/main/res/drawable/videopower.jpg
  33. 73 72
      app/src/main/res/layout/activity_privacypolicy.xml
  34. 0 1
      app/src/main/res/layout/pay_result.xml
  35. 2 2
      app/src/main/res/values/projectstring.xml
  36. 1 1
      gradle/wrapper/gradle-wrapper.properties
  37. 1 0
      push/build/.transforms/24ec1568bf01f4d4157f3b27170b966d.bin
  38. BIN
      push/build/.transforms/24ec1568bf01f4d4157f3b27170b966d/classes/classes.dex
  39. BIN
      push/build/intermediates/aar_libs_directory/debug/libs/accs_sdk_taobao-3.3.7.2-open.jar
  40. BIN
      push/build/intermediates/aar_libs_directory/debug/libs/alicloud-android-sdk-httpdns-1.1.3.1.jar
  41. BIN
      push/build/intermediates/aar_libs_directory/debug/libs/alicloud-android-utils-1.0.3.jar
  42. BIN
      push/build/intermediates/aar_libs_directory/debug/libs/networksdk-3.5.5-open.jar
  43. BIN
      push/build/intermediates/aar_libs_directory/debug/libs/tlog_adapter-3.0.0.17.jar
  44. BIN
      push/build/intermediates/aar_libs_directory/debug/libs/tnet4android-3.1.14.9.jar
  45. BIN
      push/build/intermediates/aar_libs_directory/debug/libs/umeng-common-2.1.0.jar
  46. BIN
      push/build/intermediates/aar_libs_directory/debug/libs/umeng-push-6.0.1.jar
  47. BIN
      push/build/intermediates/aar_main_jar/debug/classes.jar
  48. 0 0
      push/build/intermediates/annotations_typedef_file/debug/typedefs.txt
  49. BIN
      push/build/intermediates/incremental/debug-mergeJavaRes/merge-state
  50. BIN
      push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/Dj_oFuDn7iW7FteZyfbKM_Z1log=
  51. BIN
      push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/YDJEt8cKWeYSstBl225DV1I6Hik=
  52. BIN
      push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/c16v8l05FZSL95YpZItYT+j5P8I=
  53. BIN
      push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/iDIdcFFPzt9s8US45zY0TyJHp2k=
  54. BIN
      push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/jSCx_aq5CtZ0xDBgjUFaYdR1308=
  55. BIN
      push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/p9Dz+LE26Dr44r8KlasESmJjJck=
  56. BIN
      push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/qfqcwfUM2T6rVsKZNkvZjX3l688=
  57. BIN
      push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/spHJr9_qnIlZxojN5biYafNkGrM=
  58. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/arm64-v8a/libcocklogic-1.1.3.so
  59. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/arm64-v8a/libtnet-3.1.14.so
  60. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/armeabi-v7a/libcocklogic-1.1.3.so
  61. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/armeabi-v7a/libtnet-3.1.14.so
  62. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/armeabi/libcocklogic-1.1.3.so
  63. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/armeabi/libtnet-3.1.14.so
  64. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/mips/libcocklogic-1.1.3.so
  65. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/mips/libtnet-3.1.14.so
  66. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/mips64/libcocklogic-1.1.3.so
  67. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/mips64/libtnet-3.1.14.so
  68. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/x86/libcocklogic-1.1.3.so
  69. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/x86/libtnet-3.1.14.so
  70. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/x86_64/libcocklogic-1.1.3.so
  71. BIN
      push/build/intermediates/library_and_local_jars_jni/debug/jni/x86_64/libtnet-3.1.14.so
  72. BIN
      push/build/intermediates/merged_java_res/debug/out.jar
  73. BIN
      push/build/outputs/aar/push-debug.aar

+ 1 - 1
.idea/compiler.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="CompilerConfiguration">
-    <bytecodeTargetLevel target="1.8" />
+    <bytecodeTargetLevel target="11" />
   </component>
 </project>

+ 10 - 0
.idea/deploymentTargetDropDown.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="deploymentTargetDropDown">
+    <value>
+      <entry key="app">
+        <State />
+      </entry>
+    </value>
+  </component>
+</project>

+ 2 - 3
.idea/gradle.xml

@@ -4,16 +4,15 @@
   <component name="GradleSettings">
     <option name="linkedExternalProjectsSettings">
       <GradleProjectSettings>
-        <option name="testRunner" value="GRADLE" />
-        <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
+        <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
         <option name="modules">
           <set>
             <option value="$PROJECT_DIR$" />
             <option value="$PROJECT_DIR$/app" />
           </set>
         </option>
-        <option name="resolveModulePerSourceSet" value="false" />
+        <option name="resolveExternalAnnotations" value="false" />
       </GradleProjectSettings>
     </option>
   </component>

+ 10 - 0
.idea/migrations.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectMigrations">
+    <option name="MigrateToGradleLocalJavaHome">
+      <set>
+        <option value="$PROJECT_DIR$" />
+      </set>
+    </option>
+  </component>
+</project>

+ 8 - 1
.idea/misc.xml

@@ -1,6 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+  <component name="DesignSurface">
+    <option name="filePathToZoomLevelMap">
+      <map>
+        <entry key="..\:/Work_Space/Android_Space/efunbox-xyyf-mobile-android/efunbox-xyyf-mobile-android-master/app/src/main/res/layout/activity_privacypolicy.xml" value="0.18385416666666668" />
+      </map>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/build/classes" />
   </component>
   <component name="ProjectType">

+ 109 - 7
app/build.gradle

@@ -8,10 +8,10 @@ android {
     compileSdkVersion 28
     defaultConfig {
         applicationId "com.edufound.android.xyyf"
-        minSdkVersion 16
-        targetSdkVersion 28
-        versionCode 10012
-        versionName "1.0.0.1.2"
+        minSdkVersion 19
+        targetSdkVersion 31
+        versionCode 10024
+        versionName "1.0.0.2.4"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         multiDexEnabled true
         flavorDimensions "versionCode"
@@ -70,6 +70,26 @@ android {
                             newoutputFile = "\\萌庄园\\"
                         } else if (channel == ("2010")) {
                             newoutputFile = "\\步步高\\"
+                        } else if (channel == "2016") {
+                            newoutputFile = "\\京东方\\"
+                        } else if (channel == "2015") {
+                            newoutputFile = "\\联想\\"
+                        } else if (channel == "2017") {
+                            newoutputFile = "\\车联网\\"
+                        } else if (channel == "2018") {
+                            newoutputFile = "\\悦道\\"
+                        } else if (channel == "2019") {
+                            newoutputFile = "\\尚鲸\\"
+                        } else if (channel == "2020") {
+                            newoutputFile = "\\冯公\\"
+                        } else if (channel == "2021") {
+                            newoutputFile = "\\理想\\"
+                        }else if(channle=="3001"){
+                            newoutputFile = "\\义方横板广告业\\"
+                        }else if(channle=="2022"){
+                            newoutputFile = "\\博视联\\"
+                        }else if(channle=="2023"){
+                            newoutputFile = "\\荣耀\\"
                         }
                         output.outputFileName = new File(newoutputFile, fileName)
                     }
@@ -95,6 +115,16 @@ android {
         }
     }
     productFlavors {
+
+        channel_efunbox_heng{
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "3001",
+                    appIcon: "@drawable/icon",
+            ]
+        }
+
+
         //义方
         channel_efunbox {
             signingConfig signingConfigs.efunbox
@@ -176,6 +206,78 @@ android {
                     appIcon: "@drawable/icon",
             ]
         }
+        //京东方
+        channel_jingdongfang {
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "2016",
+                    appIcon: "@drawable/icon",
+            ]
+        }
+        //联想
+        channel_lenovo {
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "2015",
+                    appIcon: "@drawable/icon",
+            ]
+        }
+        //车联网
+        channel_chelianwang {
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "2017",
+                    appIcon: "@drawable/icon",
+            ]
+        }
+        //悦道
+        channel_yuedao {
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "2018",
+                    appIcon: "@drawable/icon",
+            ]
+        }
+        //尚鲸
+        channel_shangjing {
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "2019",
+                    appIcon: "@drawable/icon",
+            ]
+        }
+        //冯公
+        channel_fengong {
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "2020",
+                    appIcon: "@drawable/icon",
+            ]
+        }
+        //理想
+        channel_lixiang {
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "2021",
+                    appIcon: "@drawable/icon",
+            ]
+        }
+        //博视联
+        channel_boshilian{
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "2022",
+                    appIcon: "@drawable/icon",
+            ]
+        }
+        //荣耀
+        channel_rongyao{
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "2023",
+                    appIcon: "@drawable/icon",
+            ]
+        }
     }
     productFlavors.all {
         flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode, icon: manifestPlaceholders.appIcon]
@@ -201,15 +303,15 @@ dependencies {
     implementation 'com.alibaba:fastjson:1.2.73'
     //微信登录、微信支付等
     implementation "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+"
-    //支付宝支付
-//    implementation files("libs/alipaySdk-20180601.jar")
-//    implementation files("libs/dom4j-1.6.1.jar")
+
     //okhttp
     implementation "com.squareup.okhttp3:okhttp:3.4.1"
 
     //多种seekbar
     implementation "com.github.warkiz.widget:indicatorseekbar:2.1.0"
 
+    implementation 'com.alipay.sdk:alipaysdk-android:+@aar'
+
 
     //cardView
     implementation 'com.android.support:cardview-v7:28.0.0'

BIN
app/libs/alipaySdk-20180601.jar


BIN
app/libs/phoneNumber-L-AuthSDK-2.11.1.1.aar


+ 29 - 73
app/src/main/AndroidManifest.xml

@@ -15,11 +15,27 @@
     <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
     <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <!-- 切换网络通道 -->
     <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- 开关wifi状态,解决国内机型移动网络权限问题需要 -->
+
+    <queries>
+        <package android:name="com.tencent.mm" />
+        <package android:name="com.eg.android.AlipayGphone" /> <!-- 支付宝 -->
+        <package android:name="hk.alipay.wallet" /> <!-- AlipayHK -->
+    </queries>
+
+    <supports-screens
+        android:anyDensity="true"
+        android:largeScreens="true"
+        android:normalScreens="true"
+        android:resizeable="true"
+        android:smallScreens="true" />
+
     <application
         android:name="com.edufound.android.xyyf.application.EApplication"
         android:allowBackup="false"
+        android:hardwareAccelerated="true"
         android:icon="${icon}"
         android:label="@string/app_name"
+        android:largeHeap="true"
         android:networkSecurityConfig="@xml/network_security_config"
         android:resizeableActivity="true"
         android:supportsRtl="true"
@@ -39,7 +55,8 @@
 
         <activity
             android:name="com.edufound.android.xyyf.activity.MainActivity"
-            android:configChanges="orientation|keyboardHidden|screenSize"
+            android:configChanges="orientation|keyboardHidden|screenSize|locale|navigation|fontScale|uiMode"
+            android:exported="true"
             android:maxAspectRatio="2.1"
             android:resizeableActivity="true"
             android:screenOrientation="landscape"
@@ -58,9 +75,11 @@
         </activity>
         <activity
             android:name="com.edufound.android.xyyf.activity.AgreementActivity"
+            android:configChanges="orientation|keyboardHidden|screenSize|locale|navigation|fontScale|uiMode"
+            android:exported="true"
             android:maxAspectRatio="2.1"
             android:resizeableActivity="true"
-            android:screenOrientation="portrait">
+            android:screenOrientation="landscape">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
@@ -69,22 +88,8 @@
         </activity>
 
         <activity
-            android:name=".activity.PhoneNumLoginActivity"
-            android:launchMode="singleTask"
-            android:screenOrientation="portrait"
-            android:theme="@style/NoTitle"></activity>
-        <!--友盟start-->
-        <meta-data
-            android:name="UMENG_APPKEY"
-            android:value="5ffbb9e0f1eb4f3f9b58b05e" />
-        <meta-data
-            android:name="UMENG_CHANNEL"
-            android:value="${UMENG_CHANNEL_VALUE}" />
-        <!--友盟end-->
-
-        <activity
             android:name="com.edufound.android.xyyf.pay.PayActivity"
-            android:configChanges="orientation|screenSize"
+            android:configChanges="orientation|keyboardHidden|screenSize|locale|navigation|fontScale|uiMode"
             android:screenOrientation="portrait"
             android:theme="@style/NoTitle"></activity>
 
@@ -100,6 +105,7 @@
 
         <activity
             android:name="com.edufound.android.xyyf.wxapi.WXEntryActivity"
+            android:configChanges="orientation|keyboardHidden|screenSize|locale|navigation|fontScale|uiMode"
             android:exported="true"
             android:launchMode="singleTask"
             android:screenOrientation="landscape"
@@ -114,65 +120,15 @@
 
         </activity>
 
-        <activity
-            android:name="com.alipay.sdk.app.H5PayActivity"
-            android:configChanges="orientation|keyboardHidden|navigation|screenSize"
-            android:exported="false"
-            android:screenOrientation="behind"
-            android:windowSoftInputMode="adjustResize|stateHidden"></activity>
-        <activity
-            android:name="com.alipay.sdk.app.H5AuthActivity"
-            android:configChanges="orientation|keyboardHidden|navigation"
-            android:exported="false"
-            android:screenOrientation="behind"
-            android:windowSoftInputMode="adjustResize|stateHidden"></activity>
-
-
-        <meta-data
-            android:name="com.huawei.hms.client.appid"
-            android:value="appid=xxxxxx" />
-
-        <!--vivo push参数声明 -->
-        <!-- vivo start-->
+        <!--友盟start-->
         <meta-data
-            android:name="com.vivo.push.api_key"
-            android:value="xxxxxx" />
+            android:name="UMENG_APPKEY"
+            android:value="5ffbb9e0f1eb4f3f9b58b05e" />
         <meta-data
-            android:name="com.vivo.push.app_id"
-            android:value="xxxxxx" />
-        <!-- VIVO end-->
-
-
-        <activity
-            android:name=".activity.PhoneNumLoginActivityLandscape"
-            android:configChanges="orientation|keyboardHidden|screenSize"
-            android:exported="false"
-            android:launchMode="singleTop"
-            android:screenOrientation="landscape"
-            android:theme="@style/translucent">
-
-        </activity>
+            android:name="UMENG_CHANNEL"
+            android:value="${UMENG_CHANNEL_VALUE}" />
+        <!--友盟end-->
 
-        <!--联通电信授权页-->
-        <activity
-            android:name="com.mobile.auth.gatewayauth.LoginAuthActivity"
-            android:configChanges="orientation|keyboardHidden|screenSize"
-            android:exported="false"
-            android:launchMode="singleTop"
-            android:theme="@style/phonelogin_dialog_activity_landscape" />
-        <!--协议页面webview-->
-        <activity
-            android:name="com.mobile.auth.gatewayauth.activity.AuthWebVeiwActivity"
-            android:configChanges="orientation|keyboardHidden|screenSize"
-            android:exported="false"
-            android:launchMode="singleTop"
-            android:screenOrientation="behind" />
-        <!--移动授权页-->
-        <activity
-            android:name="com.cmic.sso.sdk.activity.LoginAuthActivity"
-            android:configChanges="orientation|keyboardHidden|screenSize"
-            android:exported="false"
-            android:launchMode="singleTop" />
 
     </application>
 

+ 10 - 12
app/src/main/java/com/edufound/android/xyyf/activity/AgreementActivity.java

@@ -1,5 +1,7 @@
 package com.edufound.android.xyyf.activity;
 
+import static com.edufound.android.xyyf.application.EApplication.getAppCode;
+
 import android.content.Intent;
 import android.graphics.Color;
 import android.os.Bundle;
@@ -13,22 +15,18 @@ import android.text.style.ClickableSpan;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.ViewGroup;
-import android.webkit.WebSettings;
 import android.webkit.WebView;
 import android.widget.FrameLayout;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.edufound.android.xyyf.R;
-import com.edufound.android.xyyf.application.EApplication;
 import com.edufound.android.xyyf.base.BaseActivity;
 import com.edufound.android.xyyf.useragreement.UserAgreementPersenter;
 import com.edufound.android.xyyf.useragreement.UserAgreementView;
 import com.edufound.android.xyyf.util.ContextUtil;
-import com.edufound.android.xyyf.util.Logger;
 import com.edufound.android.xyyf.util.SPutil;
-import com.edufound.android.xyyf.util.ToastUtil;
-import com.mobile.auth.gatewayauth.activity.AuthWebVeiwActivity;
+import com.umeng.commonsdk.UMConfigure;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -47,14 +45,12 @@ public class AgreementActivity extends BaseActivity implements UserAgreementView
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_privacypolicy);
-        if (EApplication.getAppCode().equals("2001")) {
-            if (SPutil.getPrefBoolean(this, spKey, false)) {
-                toMain();
-            } else {
-                init();
-            }
-        } else {
+        if (SPutil.getPrefBoolean(this, spKey, false)) {
+            UMConfigure.preInit(this, "5ffbb9e0f1eb4f3f9b58b05e", getAppCode() + "");
+            UMConfigure.init(ContextUtil.getContext(), "5ffbb9e0f1eb4f3f9b58b05e", getAppCode() + "", UMConfigure.DEVICE_TYPE_PHONE, "dfc59afd6dc6b1550ff1c2e0c7eb10fd");
             toMain();
+        } else {
+            init();
         }
 
     }
@@ -76,6 +72,8 @@ public class AgreementActivity extends BaseActivity implements UserAgreementView
         mAgree.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
+                UMConfigure.preInit(AgreementActivity.this, "5ffbb9e0f1eb4f3f9b58b05e", getAppCode() + "");
+                UMConfigure.init(ContextUtil.getContext(), "5ffbb9e0f1eb4f3f9b58b05e", getAppCode() + "", UMConfigure.DEVICE_TYPE_PHONE, "dfc59afd6dc6b1550ff1c2e0c7eb10fd");
                 setSP();
                 toMain();
             }

+ 3 - 5
app/src/main/java/com/edufound/android/xyyf/activity/MainActivity.java

@@ -80,7 +80,7 @@ public class MainActivity extends BaseActivity implements MainView {
 
     @Override
     protected void initVew() {
-        Logger.DebugE("initVew");
+        Logger.e("initVew");
         mRootView = findViewById(R.id.main_root);
         mLoading = findViewById(R.id.main_webloading);
         mLoadingAnim = ObjectAnimator.ofFloat(mLoading, "rotation", 0.0F, 359.0F);//设置Y轴的立体旋转动画
@@ -90,7 +90,7 @@ public class MainActivity extends BaseActivity implements MainView {
         mLoadingAnim.setInterpolator(interpolator); //设置匀速旋转,不卡顿 icon_anim.start();
         mLoadingAnim.start();
 //        为防止内存泄漏,用ContextUtil.getContext,但是不弹alert
-        mWebView = new WebView(ContextUtil.getContext());
+        mWebView = new WebView(ContextUtil.getApplication());
         //        //支持alert,但是容易内存泄漏
 //        mWebView = new WebView(MainActivity.this);
         mPersenter.initWebView(mWebView);
@@ -98,14 +98,13 @@ public class MainActivity extends BaseActivity implements MainView {
         mRootView.addView(mWebView);
         mWebView.bringToFront();
         mLoading.bringToFront();
-        new DeviceUuidFactory(ContextUtil.getContext());
+        new DeviceUuidFactory(mActivity);
         mPersenter.openWeb(getIntent());
     }
 
     @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         ShowDebugUrl.dispatchKeyEvent(event, mActivity);
-        super.onKeyDown(keyCode, event);
         return mPersenter.onKeyDown(keyCode, event);
     }
 
@@ -276,7 +275,6 @@ public class MainActivity extends BaseActivity implements MainView {
 
 
     public void quitPhoneLoginPage() {
-        mPersenter.getJsInterfaces().quitLoginPage();
     }
 
     BroadcastReceiver mainBroad = new BroadcastReceiver() {

+ 0 - 234
app/src/main/java/com/edufound/android/xyyf/activity/PhoneNumLoginActivity.java

@@ -1,234 +0,0 @@
-package com.edufound.android.xyyf.activity;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.ObjectAnimator;
-import android.animation.ValueAnimator;
-import android.app.Activity;
-import android.graphics.Color;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.os.Process;
-import android.support.annotation.Nullable;
-import android.view.Gravity;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewParent;
-import android.view.WindowManager;
-import android.widget.EditText;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import com.edufound.android.xyyf.R;
-import com.edufound.android.xyyf.application.EApplication;
-import com.edufound.android.xyyf.base.BaseActivity;
-import com.edufound.android.xyyf.config.AppUtils;
-import com.edufound.android.xyyf.phonelogin.PhoneLoginPersenter;
-import com.edufound.android.xyyf.phonelogin.PhoneLoginView;
-import com.edufound.android.xyyf.util.Logger;
-
-import org.json.JSONException;
-
-import java.io.IOException;
-
-public class PhoneNumLoginActivity extends BaseActivity implements PhoneLoginView {
-
-
-    PhoneLoginPersenter mPersenter;
-    Activity mActivity;
-    final int COUNT_DOWN = 0x5564;
-    EditText phone_number;
-    EditText intpu_verifaction;
-    TextView phonenumber_getverifcation;
-    TextView phonenumber_login;
-    TextView change_text;
-    int countDownNum = 60;
-    int oldWidth = -1;
-    boolean haveError = false;
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.login_phonenumber);
-        setFinishOnTouchOutside(false);
-        mActivity = this;
-        mPersenter = new PhoneLoginPersenter(this);
-        init();
-    }
-
-
-    void init() {
-        phone_number = (EditText) findViewById(R.id.phonenumber_phonenumber);
-        intpu_verifaction = (EditText) findViewById(R.id.phonenumber_verifcation);
-        phonenumber_getverifcation = (TextView) findViewById(R.id.phonenumber_getverifcation);
-        phonenumber_login = (TextView) findViewById(R.id.phonenumber_login);
-        change_text = (TextView) findViewById(R.id.change_text);
-        setTextSize(phone_number, 6);
-        setTextSize(intpu_verifaction, 6);
-        setTextSize(phonenumber_getverifcation, 6);
-        setTextSize(phonenumber_login, 6);
-        change_text.setText("切换一键登录");
-        if (getIntent().getStringExtra("code") != null) {
-            change_text.setVisibility(View.GONE);
-            haveError = true;
-        }
-        LinearLayout parent = findViewById(R.id.phonenumber_page);
-        ImageView loginicon = findViewById(R.id.loginicon);
-        FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(AppUtils.dp2px(this, 90), AppUtils.dp2px(this, 90));
-        params.gravity = Gravity.CENTER;
-        params.setMargins(0, AppUtils.dp2px(this, 30), 0, 0);
-        loginicon.setLayoutParams(params);
-        loginicon.setVisibility(View.VISIBLE);
-//        FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
-//        params.setMargins(0,  AppUtils.dp2px(this, 20), 0, AppUtils.dp2px(this, 20));
-//        parent.setLayoutParams(params);
-        change_text.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-//                MainActivity.getInstance().mPersenter.getJsInterfaces().showPhoneNumberLogin(2);
-                finish();
-            }
-        });
-        phonenumber_getverifcation.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                //此处获取验证码
-            }
-        });
-        phonenumber_getverifcation.setOnTouchListener(new View.OnTouchListener() {
-            @Override
-            public boolean onTouch(View v, MotionEvent event) {
-                switch (event.getAction()) {
-                    case MotionEvent.ACTION_DOWN:
-                        phonenumber_getverifcation.setBackgroundResource(R.drawable.shape_login_phonenumber_getverification_selected);
-                        phonenumber_getverifcation.setTextColor(Color.WHITE);
-                        if (oldWidth <= 0) {
-                            oldWidth = phonenumber_getverifcation.getWidth();
-                        }
-                        break;
-                    case MotionEvent.ACTION_CANCEL:
-                    case MotionEvent.ACTION_UP:
-                        try {
-                            mPersenter.getVCode(phone_number.getText().toString());
-                        } catch (IOException e) {
-                            e.printStackTrace();
-                        }
-                        break;
-                }
-                return false;
-            }
-        });
-
-        phonenumber_login.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                try {
-                    mPersenter.LoginByVCode(phone_number.getText().toString(), intpu_verifaction.getText().toString());
-                } catch (JSONException e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-
-    }
-
-    void setTextSize(View view, int dpsize) {
-        if (view instanceof EditText) {
-            ((EditText) view).setTextSize(AppUtils.dp2px(this, dpsize));
-        } else if (view instanceof TextView) {
-            ((TextView) view).setTextSize(AppUtils.dp2px(this, dpsize));
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        removeAllHandler();
-    }
-
-    Handler handler = new Handler(new Handler.Callback() {
-        @Override
-        public boolean handleMessage(Message msg) {
-            switch (msg.what) {
-                case COUNT_DOWN:
-                    if (countDownNum <= 0) {
-                        countDownNum = 60;
-                        phonenumber_getverifcation.setEnabled(true);
-                        phonenumber_getverifcation.setText("获取验证码");
-//                        mPersenter.WidthAnim(phonenumber_getverifcation, oldWidth, 500);
-                        return true;
-                    }
-                    countDownNum--;
-                    phonenumber_getverifcation.setText(String.valueOf(countDownNum + "秒后重发"));
-                    handler.sendEmptyMessageDelayed(COUNT_DOWN, 1000);
-                    break;
-            }
-            return false;
-        }
-    });
-
-    void removeAllHandler() {
-        handler.removeMessages(COUNT_DOWN);
-    }
-
-
-    @Override
-    public Activity getActivity() {
-        return mActivity;
-    }
-
-    @Override
-    public void changeVText(int type) {
-        switch (type) {
-            case 0:
-                //请求成功等待验证码
-                handler.post(new Runnable() {
-                    @Override
-                    public void run() {
-//                        mPersenter.WidthAnim(phonenumber_getverifcation, phonenumber_getverifcation.getHeight(), 500);
-                        phonenumber_getverifcation.setEnabled(false);
-                        handler.sendEmptyMessageDelayed(COUNT_DOWN, 0);
-                    }
-                });
-                break;
-            case 1:
-                handler.post(new Runnable() {
-                    @Override
-                    public void run() {
-                        phonenumber_getverifcation.setBackgroundResource(R.drawable.shape_login_phonenumber_getverification);
-                        phonenumber_getverifcation.setTextColor(Color.parseColor("#FFA301"));
-                        countDownNum = 60;
-                        phonenumber_getverifcation.setEnabled(true);
-                        phonenumber_getverifcation.setText("获取验证码");
-//                        mPersenter.WidthAnim(phonenumber_getverifcation, oldWidth, 500);
-                        handler.removeMessages(COUNT_DOWN);
-                    }
-                });
-                break;
-        }
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-            case KeyEvent.KEYCODE_BACK:
-            case KeyEvent.KEYCODE_ESCAPE:
-                Logger.e("haveError:" + haveError);
-                if (haveError) {
-                    EApplication.clearActivity();
-                    System.exit(0);
-                    android.os.Process.killProcess(Process.myPid());
-                } else {
-                    finish();
-                }
-                break;
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-}

+ 0 - 279
app/src/main/java/com/edufound/android/xyyf/activity/PhoneNumLoginActivityLandscape.java

@@ -1,279 +0,0 @@
-package com.edufound.android.xyyf.activity;
-
-import android.app.Activity;
-import android.graphics.Color;
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.text.Editable;
-import android.text.Spannable;
-import android.text.SpannableStringBuilder;
-import android.text.TextPaint;
-import android.text.TextWatcher;
-import android.text.method.LinkMovementMethod;
-import android.text.style.ClickableSpan;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.webkit.WebView;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.EditText;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import com.edufound.android.xyyf.R;
-import com.edufound.android.xyyf.base.BaseActivity;
-import com.edufound.android.xyyf.phonelogin.PhoneLoginPersenter;
-import com.edufound.android.xyyf.phonelogin.PhoneLoginView;
-import com.edufound.android.xyyf.util.ContextUtil;
-import com.edufound.android.xyyf.util.DeviceUtil;
-import com.edufound.android.xyyf.util.LiuHaiScreenUtil;
-import com.edufound.android.xyyf.util.Logger;
-import com.edufound.android.xyyf.util.ToastUtil;
-
-import org.json.JSONException;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-public class PhoneNumLoginActivityLandscape extends BaseActivity implements PhoneLoginView {
-
-    PhoneNumLoginActivityLandscape mIntences;
-    PhoneLoginPersenter mPersenter;
-    DeviceUtil mDeviceUtil;
-    LinearLayout mClose;
-    TextView mGetVetVer;
-    EditText mPhoneNumber;
-    EditText mInputVer;
-    LinearLayout mFrameLayout;
-    CheckBox mPrivacyCheckBox;
-    TextView mPrivacyContext;
-    boolean isShowWeb = false;
-    WebView mWebView;
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_login_phone_landscape);
-        if (mIntences == null) {
-            mIntences = this;
-        }
-        mDeviceUtil = new DeviceUtil();
-        mPersenter = new PhoneLoginPersenter(this);
-        mFrameLayout = findViewById(R.id.phonenumber_login_l_frame);
-        int window_height = mDeviceUtil.getHeight(this);
-        int dialog_width = mDeviceUtil.getWidth(this) / 2;
-        int dialog_height = mDeviceUtil.getHeight(this) / 2;
-        Logger.e("window_height:" + window_height / 720f);
-        if ((window_height / 720f >= 1.4f) && (window_height / 720f <= 1.5f)) {
-
-        } else {
-            mFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(dialog_width, dialog_height));
-        }
-
-        init();
-    }
-
-
-    void init() {
-        mClose = findViewById(R.id.login_phone_landscape_close);
-        mGetVetVer = findViewById(R.id.phonenumber_getverifcation);
-        mPhoneNumber = findViewById(R.id.phonenumber_login_number);
-        mInputVer = findViewById(R.id.phonenumber_login_ver);
-        mPersenter.setVerText(mGetVetVer);
-        mPrivacyCheckBox = findViewById(R.id.privacy_context_check);
-        mPrivacyContext = findViewById(R.id.privacy_context);
-        setContext();
-        initListener();
-    }
-
-    void initListener() {
-        mClose.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                MainActivity.getInstance().loadJSMehtodPost("closeLogin('700000')");
-                finish();
-            }
-        });
-        mGetVetVer.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-            }
-        });
-        mGetVetVer.setOnTouchListener(new View.OnTouchListener() {
-            @Override
-            public boolean onTouch(View v, MotionEvent event) {
-                switch (event.getAction()) {
-                    case MotionEvent.ACTION_DOWN:
-                        mGetVetVer.setBackgroundResource(R.drawable.shape_login_phonenumber_getverification_selected);
-                        mGetVetVer.setTextColor(Color.WHITE);
-                        break;
-                    case MotionEvent.ACTION_CANCEL:
-                    case MotionEvent.ACTION_UP:
-                        try {
-                            mPersenter.getVCode(mPhoneNumber.getText().toString());
-                        } catch (IOException e) {
-                            e.printStackTrace();
-                        }
-
-                        break;
-                }
-                return false;
-            }
-        });
-        mInputVer.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-
-            }
-
-            @Override
-            public void onTextChanged(CharSequence s, int start, int before, int count) {
-                if (s.toString().length() == 4) {
-                    Logger.e("检查验证码并且登录");
-                    try {
-                        if (!mPrivacyCheckBox.isChecked()) {
-                            ToastUtil.showToast("请同意服务条款");
-                            return;
-                        }
-                        mPersenter.LoginByVCode(mPhoneNumber.getText().toString(), s.toString());
-                    } catch (JSONException e) {
-                        e.printStackTrace();
-                    }
-                }
-            }
-
-            @Override
-            public void afterTextChanged(Editable s) {
-
-            }
-        });
-        mPrivacyCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
-            @Override
-            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-                if (mInputVer.getText().toString().length() == 4 && isChecked) {
-                    try {
-                        mPersenter.LoginByVCode(mPhoneNumber.getText().toString(), mInputVer.getText().toString());
-                    } catch (JSONException e) {
-                        e.printStackTrace();
-                    }
-                }
-            }
-        });
-    }
-
-
-    List<Integer> leftBrackets = new ArrayList<>();
-    List<Integer> rightBrackets = new ArrayList<>();
-    String text = "我已阅读并同意《服务协议》和《隐私政策》";
-
-    void setContext() {
-        leftBrackets = getChildIndexFromString(text, "《");
-        rightBrackets = getChildIndexFromString(text, "》");
-        SpannableStringBuilder style = new SpannableStringBuilder();
-        style.append(text);
-        for (int i = 0; i < leftBrackets.size(); i++) {
-            final int finalI = i;
-            style.setSpan(new ClickableSpan() {
-                @Override
-                public void onClick(@NonNull View widget) {
-                    lookPrivacy(finalI);
-                }
-
-                @Override
-                public void updateDrawState(@NonNull TextPaint ds) {
-                    ds.setUnderlineText(false);
-                    ds.setColor(Color.parseColor("#68a5dc"));
-                }
-
-            }, leftBrackets.get(i), rightBrackets.get(i) + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-
-        }
-        mPrivacyContext.setMovementMethod(LinkMovementMethod.getInstance());
-        mPrivacyContext.setHighlightColor(Color.BLACK);
-        mPrivacyContext.setText(style);
-
-    }
-
-    /**
-     * @param parent
-     * @param child
-     * @return
-     */
-    private List<Integer> getChildIndexFromString(String parent, String child) {
-        int startIndex = 0;
-        List<Integer> ids = new ArrayList<>();
-        while (parent.indexOf(child, startIndex) != -1) {
-            //ids.add(startIndex);
-            startIndex = parent.indexOf(child, startIndex);
-            ids.add(startIndex);
-            startIndex = startIndex + child.length();
-        }
-        return ids;
-    }
-
-
-    void lookPrivacy(int index) {
-        if (mWebView == null) {
-            mWebView = new WebView(ContextUtil.getContext());
-            mWebView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
-        }
-        String url = "";
-        switch (index) {
-            case 0:
-                url = "http://m-xyyf-web.ai160.com/res/protocol/service.htm";
-                break;
-            case 1:
-                url = "http://m-xyyf-web.ai160.com/res/protocol/private.htm";
-                break;
-        }
-        mWebView.getSettings().setUseWideViewPort(true);
-        mWebView.getSettings().setLoadWithOverviewMode(true);
-        mWebView.getSettings().setJavaScriptEnabled(true);
-        mWebView.getSettings().setDomStorageEnabled(true);
-        mWebView.loadUrl(url);
-//        mFrameLayout.addView(webview);
-        ((FrameLayout) getWindow().getDecorView()).addView(mWebView);
-        isShowWeb = true;
-    }
-
-    @Override
-    public void changeVText(int type) {
-
-    }
-
-
-    @Override
-    public Activity getActivity() {
-        return mIntences;
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-            case KeyEvent.KEYCODE_ESCAPE:
-            case KeyEvent.KEYCODE_BACK:
-                if (isShowWeb) {
-                    isShowWeb = false;
-                    ((FrameLayout) getWindow().getDecorView()).removeView(mWebView);
-                    mWebView.loadUrl("");
-                    mWebView.clearCache(true);
-//                    if (mPrivacyContext.isChecked()) {
-//                        mPrivacyContext.setChecked(true);
-//                    } else {
-//                        mPrivacyContext.setChecked(false);
-//                    }
-                } else {
-                    MainActivity.getInstance().loadJSMehtodPost("closeLogin('700000')");
-                    finish();
-                }
-                return true;
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-}

+ 28 - 18
app/src/main/java/com/edufound/android/xyyf/application/EApplication.java

@@ -9,10 +9,12 @@ import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
+import android.widget.Toast;
 
 import com.edufound.android.xyyf.R;
 import com.edufound.android.xyyf.pay.PayInit;
 import com.edufound.android.xyyf.util.ContextUtil;
+import com.edufound.android.xyyf.util.DeviceUuidFactory;
 import com.edufound.android.xyyf.util.Logger;
 import com.edufound.android.xyyf.util.OKHttpUtil;
 import com.edufound.android.xyyf.util.SPutil;
@@ -41,14 +43,13 @@ public class EApplication extends Application {
         super.onCreate();
         ContextUtil.setContext(this);
         ContextUtil.setApplication(this);
-        //上线关掉debug模式
-        ContextUtil.setIsDebug(true);
         mUMengAppID = getChannelName();
 //        mUMengAppID = "3001";
         APP_START_TIME = System.currentTimeMillis();
         //根据appcode初始化支付sdk
 //        UMConfigure.setLogEnabled(true);
-        UMConfigure.init(this, "5ffbb9e0f1eb4f3f9b58b05e", getAppCode() + "", UMConfigure.DEVICE_TYPE_PHONE, "dfc59afd6dc6b1550ff1c2e0c7eb10fd");
+
+
 //        PushAgent mPushAgent = PushAgent.getInstance(this);
 //        mPushAgent.register(new IUmengRegisterCallback() {
 //            @Override
@@ -73,10 +74,6 @@ public class EApplication extends Application {
 
 
         PayInit.getInstance().initPaySDK(Integer.valueOf(getAppCode()), EApplication.this);
-        if (!getPackageName().equals(
-                getProcessName(getApplicationContext(), android.os.Process.myPid()))) {
-            return;
-        }
 
         //如果是新应用,默认设置播放器为ijkplayer
         if (SPutil.getPrefInt(this, SPutil.videoType, 0) == 0) {
@@ -209,22 +206,35 @@ public class EApplication extends Application {
                 isForeground = false;
 //                ToastUtil.showToast("app后台了");
                 Logger.e("app后台了");
-                OKHttpUtil.getInstance().postUserTime(new OKHttpUtil.ResultCallback() {
-                    @Override
-                    public void onError(Request request, Exception e) {
+
+                if (SPutil.getPrefBoolean(ContextUtil.getApplication(), "privacy", false)) {
+                    Logger.e("同意用户隐私协议了");
+                    //同意用戶隱私协议了,才提交接口
+                    OKHttpUtil.getInstance().postUserTime(new OKHttpUtil.ResultCallback() {
+                        @Override
+                        public void onError(Request request, Exception e) {
 //                        exitApp();
 //                        android.os.Process.killProcess(android.os.Process.myPid());
-                        APP_START_TIME = 0;
-                    }
+                            APP_START_TIME = 0;
+                        }
 
-                    @Override
-                    public void onResponse(Object response) {
-                        Logger.e("response:" + response);
+                        @Override
+                        public void onResponse(Object response) {
+                            Logger.e("response:" + response);
 //                        exitApp();
 //                        android.os.Process.killProcess(android.os.Process.myPid());
-                        APP_START_TIME = 0;
-                    }
-                });
+                            APP_START_TIME = 0;
+                        }
+                    });
+                }
+
+                if (getAppCode().equals("2017")) {
+                    //车联网渠道
+                    exitApp();
+                    clearActivity();
+                    return;
+                }
+
 
             }
         }

+ 0 - 1
app/src/main/java/com/edufound/android/xyyf/base/BaseActivity.java

@@ -71,7 +71,6 @@ public class BaseActivity extends Activity implements BaseView {
 
 
     void initBoardCastReceiver() {
-        Logger.DebugE("BaseActivity---initBoardCastReceiver");
         mHomeReceiver = new HomeKeyEventReceiver();
         registerReceiver(mHomeReceiver, new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
         mNetworkReceiver = new NetworkChangeReceiver(this);

+ 0 - 45
app/src/main/java/com/edufound/android/xyyf/config/AppUtils.java

@@ -1,45 +0,0 @@
-package com.edufound.android.xyyf.config;
-
-import android.content.Context;
-import android.util.DisplayMetrics;
-import android.view.WindowManager;
-
-public class AppUtils {
-    public static int dp2px(Context context, float dipValue) {
-        try {
-            final float scale = context.getResources().getDisplayMetrics().density;
-            return (int) (dipValue * scale + 0.5f);
-        } catch (Exception e) {
-            return (int) dipValue;
-        }
-    }
-
-    public static int px2dp(Context context, float px) {
-        try {
-            final float scale = context.getResources().getDisplayMetrics().density;
-            return (int) (px / scale + 0.5f);
-        } catch (Exception e) {
-            return (int) px;
-        }
-    }
-
-    public static int getPhoneWidthPixels(Context context) {
-        WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
-        DisplayMetrics var2 = new DisplayMetrics();
-        if (wm != null) {
-            wm.getDefaultDisplay().getMetrics(var2);
-        }
-
-        return var2.widthPixels;
-    }
-
-    public static int getPhoneHeightPixels(Context context) {
-        WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
-        DisplayMetrics var2 = new DisplayMetrics();
-        if (wm != null) {
-            wm.getDefaultDisplay().getMetrics(var2);
-        }
-
-        return var2.heightPixels;
-    }
-}

+ 0 - 19
app/src/main/java/com/edufound/android/xyyf/config/AuthPageConfig.java

@@ -1,19 +0,0 @@
-package com.edufound.android.xyyf.config;
-
-public interface AuthPageConfig {
-
-    /**
-     * 配置授权页样式
-     */
-    void configAuthPage();
-
-    /**
-     * android8.0兼容
-     */
-    void onResume();
-
-    /**
-     * 释放sdk内部引用,防止内存泄漏
-     */
-    void release();
-}

+ 0 - 107
app/src/main/java/com/edufound/android/xyyf/config/BaseUIConfig.java

@@ -1,107 +0,0 @@
-package com.edufound.android.xyyf.config;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.pm.ActivityInfo;
-import android.graphics.Color;
-import android.util.TypedValue;
-import android.view.Surface;
-import android.view.View;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import com.edufound.android.xyyf.main.MainView;
-import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper;
-
-import static com.edufound.android.xyyf.config.AppUtils.dp2px;
-
-public abstract class BaseUIConfig implements AuthPageConfig {
-    public Activity mActivity;
-    public Context mContext;
-    public PhoneNumberAuthHelper mAuthHelper;
-    public int mScreenWidthDp;
-    public int mScreenHeightDp;
-
-    public static AuthPageConfig init(int type, Activity activity, PhoneNumberAuthHelper authHelper, MainView view) {
-        switch (type) {
-            case 0:
-                return new DialogLandConfig(activity, authHelper, view);
-            case 1:
-//                return new DialogLandConfigNoUI(activity, authHelper, view);
-            case 2:
-                return new FullPortConfig(activity, authHelper, view);
-        }
-        return null;
-    }
-
-
-    public static AuthPageConfig init(int type, Activity activity, PhoneNumberAuthHelper authHelper) {
-        switch (type) {
-            case 0:
-                return new DialogLandConfig(activity, authHelper);
-            case 1:
-//                return new DialogLandConfigNoUI(activity, authHelper, view);
-            case 2:
-                return new FullPortConfig(activity, authHelper);
-        }
-        return null;
-    }
-
-    public BaseUIConfig(Activity activity, PhoneNumberAuthHelper authHelper, MainView view) {
-        mActivity = activity;
-        mContext = activity.getApplicationContext();
-        mAuthHelper = authHelper;
-    }
-    public BaseUIConfig(Activity activity, PhoneNumberAuthHelper authHelper) {
-        mActivity = activity;
-        mContext = activity.getApplicationContext();
-        mAuthHelper = authHelper;
-    }
-    protected void updateScreenSize(int authPageScreenOrientation) {
-        int screenHeightDp = AppUtils.px2dp(mContext, AppUtils.getPhoneHeightPixels(mContext));
-        int screenWidthDp = AppUtils.px2dp(mContext, AppUtils.getPhoneWidthPixels(mContext));
-        int rotation = mActivity.getWindowManager().getDefaultDisplay().getRotation();
-        if (authPageScreenOrientation == ActivityInfo.SCREEN_ORIENTATION_BEHIND) {
-            authPageScreenOrientation = mActivity.getRequestedOrientation();
-        }
-        if (authPageScreenOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
-                || authPageScreenOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE
-                || authPageScreenOrientation == ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE) {
-            rotation = Surface.ROTATION_90;
-        } else if (authPageScreenOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
-                || authPageScreenOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT
-                || authPageScreenOrientation == ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT) {
-            rotation = Surface.ROTATION_180;
-        }
-        switch (rotation) {
-            case Surface.ROTATION_0:
-            case Surface.ROTATION_180:
-                mScreenWidthDp = screenWidthDp;
-                mScreenHeightDp = screenHeightDp;
-                break;
-            case Surface.ROTATION_90:
-            case Surface.ROTATION_270:
-                mScreenWidthDp = screenHeightDp;
-                mScreenHeightDp = screenWidthDp;
-                break;
-            default:
-                break;
-        }
-    }
-
-
-    /**
-     * 在横屏APP弹竖屏一键登录页面或者竖屏APP弹横屏授权页时处理特殊逻辑
-     * Android8.0只能启动SCREEN_ORIENTATION_BEHIND模式的Activity
-     */
-    public void onResume() {
-
-    }
-
-    public void release() {
-        mAuthHelper.setAuthListener(null);
-        mAuthHelper.setUIClickListener(null);
-        mAuthHelper.removeAuthRegisterViewConfig();
-        mAuthHelper.removeAuthRegisterXmlConfig();
-    }
-}

+ 0 - 242
app/src/main/java/com/edufound/android/xyyf/config/DialogLandConfig.java

@@ -1,242 +0,0 @@
-package com.edufound.android.xyyf.config;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.pm.ActivityInfo;
-import android.graphics.Color;
-import android.os.Build;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.view.Gravity;
-import android.view.MotionEvent;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import com.edufound.android.xyyf.R;
-import com.edufound.android.xyyf.activity.MainActivity;
-import com.edufound.android.xyyf.main.MainView;
-import com.edufound.android.xyyf.phonelogin.PhoneLoginPersenter;
-import com.edufound.android.xyyf.util.Logger;
-import com.edufound.android.xyyf.util.ToastUtil;
-import com.mobile.auth.gatewayauth.AuthRegisterXmlConfig;
-import com.mobile.auth.gatewayauth.AuthUIConfig;
-import com.mobile.auth.gatewayauth.AuthUIControlClickListener;
-import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper;
-import com.mobile.auth.gatewayauth.ui.AbstractPnsViewDelegate;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.io.IOException;
-
-public class DialogLandConfig extends BaseUIConfig {
-
-    private int mOldScreenOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
-    MainView mView;
-    int showType = 0;
-    PhoneLoginPersenter mPersenter;
-    TextView title;
-    TextView change;
-    LinearLayout mLayout;
-    EditText mPhoneNum;
-    TextView mGetVer;
-    EditText mInputVer;
-    LinearLayout mClose;
-    boolean isCheckedUP = false;
-
-    public DialogLandConfig(Activity activity, PhoneNumberAuthHelper authHelper, MainView view) {
-        super(activity, authHelper, view);
-        mView = view;
-        mPersenter = new PhoneLoginPersenter(null);
-    }
-
-    public DialogLandConfig(Activity activity, PhoneNumberAuthHelper authHelper) {
-        super(activity, authHelper);
-        mPersenter = new PhoneLoginPersenter(null);
-    }
-
-    @Override
-    public void configAuthPage() {
-        mAuthHelper.removeAuthRegisterXmlConfig();
-        mAuthHelper.removeAuthRegisterViewConfig();
-        int authPageOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
-        if (Build.VERSION.SDK_INT == 26) {
-            mOldScreenOrientation = mActivity.getRequestedOrientation();
-            mActivity.setRequestedOrientation(authPageOrientation);
-            authPageOrientation = ActivityInfo.SCREEN_ORIENTATION_BEHIND;
-        }
-        updateScreenSize(authPageOrientation);
-        final int dialogWidth = (int) (mScreenWidthDp * 1.1);
-        final int dialogHeight = (int) (mScreenHeightDp * 0.4);
-        mAuthHelper.addAuthRegisterXmlConfig(new AuthRegisterXmlConfig.Builder()
-                .setLayout(R.layout.custom_land_dialog, new AbstractPnsViewDelegate() {
-                    @Override
-                    public void onViewCreated(final View view) {
-                        title = view.findViewById(R.id.custom_land_login_phone_title);
-                        change = view.findViewById(R.id.changePhoneNumLogin);
-                        mLayout = view.findViewById(R.id.custom_land_login_phone_frame);
-                        mPhoneNum = view.findViewById(R.id.phonenumber_login_number);
-                        mGetVer = view.findViewById(R.id.phonenumber_getverifcation);
-                        mInputVer = view.findViewById(R.id.phonenumber_login_ver);
-                        mClose = view.findViewById(R.id.login_phone_landscape_close);
-                        mGetVer.setOnClickListener(new View.OnClickListener() {
-                            @Override
-                            public void onClick(View v) {
-
-                            }
-                        });
-                        mPersenter.setVerText(mGetVer);
-                        mGetVer.setOnTouchListener(new View.OnTouchListener() {
-                            @Override
-                            public boolean onTouch(View v, MotionEvent event) {
-                                switch (event.getAction()) {
-                                    case MotionEvent.ACTION_DOWN:
-                                        mGetVer.setBackgroundResource(R.drawable.shape_login_phonenumber_getverification_selected);
-                                        mGetVer.setTextColor(Color.WHITE);
-                                        break;
-                                    case MotionEvent.ACTION_CANCEL:
-                                    case MotionEvent.ACTION_UP:
-                                        try {
-                                            mPersenter.getVCode(mPhoneNum.getText().toString());
-                                        } catch (IOException e) {
-                                            e.printStackTrace();
-                                        }
-
-                                        break;
-                                }
-                                return false;
-                            }
-                        });
-                        change.setOnClickListener(new View.OnClickListener() {
-                            @Override
-                            public void onClick(View v) {
-                                switch (showType) {
-                                    case 0:
-                                        //
-                                        view.bringToFront();
-                                        mLayout.setVisibility(View.VISIBLE);
-                                        title.setText("登录注册解锁更多精彩内容");
-                                        change.setText("一键登录");
-                                        showType = 1;
-                                        break;
-                                    case 1:
-//                                        view.bringToFront();
-                                        mLayout.setVisibility(View.INVISIBLE);
-                                        change.setText("切换账号");
-                                        title.setText("登录");
-                                        showType = 0;
-                                        break;
-                                }
-
-                            }
-                        });
-                        mInputVer.addTextChangedListener(new TextWatcher() {
-                            @Override
-                            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-
-                            }
-
-                            @Override
-                            public void onTextChanged(CharSequence s, int start, int before, int count) {
-                                if (s.toString().length() == 4) {
-                                    Logger.e("检查验证码并且登录");
-                                    if (!isCheckedUP) {
-                                        ToastUtil.showToast("请同意服务条款");
-                                        return;
-                                    }
-                                    try {
-                                        mPersenter.LoginByVCode(mPhoneNum.getText().toString(), s.toString());
-                                    } catch (JSONException e) {
-                                        e.printStackTrace();
-                                    }
-                                }
-                            }
-
-                            @Override
-                            public void afterTextChanged(Editable s) {
-
-                            }
-                        });
-                        mClose.setOnClickListener(new View.OnClickListener() {
-                            @Override
-                            public void onClick(View v) {
-                                MainActivity.getInstance().loadJSMehtodPost("closeLogin('700000')");
-                                mAuthHelper.quitLoginPage();
-                            }
-                        });
-                    }
-                }).build());
-        showAllUi(dialogWidth, dialogHeight, authPageOrientation);
-    }
-
-
-    void showAllUi(int dialogWidth, int dialogHeight, int authPageOrientation) {
-        mAuthHelper.setAuthUIConfig(new AuthUIConfig.Builder()
-                .setNavHidden(true)
-                .setCheckboxHidden(false)
-                .setLogoHidden(true)
-                .setSloganHidden(true)
-                .setNavReturnHidden(true)
-                .setSwitchAccHidden(true)
-//                .setNumberFieldOffsetX(60)
-                .setNumberLayoutGravity(Gravity.CENTER)
-                .setNumberSize(24)
-                .setNumFieldOffsetY(10)
-                .setLogBtnOffsetY(60)
-                .setPrivacyOffsetY_B(10)
-                .setLogBtnMarginLeftAndRight(20)
-                .setLogBtnWidth(175)
-                .setLogBtnHeight(35)
-                .setLogBtnLayoutGravity(Gravity.CENTER)
-                .setLogBtnText("本机号码一键登录")
-                .setLogBtnTextSize(18)
-                .setDialogWidth(dialogWidth)
-                .setNavText("")
-                .setDialogHeight(dialogHeight)
-                .setDialogOffsetY(0)
-                .setScreenOrientation(authPageOrientation)
-                .setAppPrivacyOne("《隐私政策》", "http://m-xyyf-web.ai160.com/res/protocol/private.htm")
-                .setAppPrivacyTwo("《用户协议》", "http://m-xyyf-web.ai160.com/res/protocol/service.htm")
-                .setStatusBarHidden(true)
-                .setPrivacyMargin(60)
-                .setPrivacyTextSize(12)
-                .setVendorPrivacyPrefix("《")
-                .setVendorPrivacySuffix("》")
-                .create());
-        mAuthHelper.setUIClickListener(new AuthUIControlClickListener() {
-            @Override
-            public void onClick(String s, Context context, String s1) {
-                Logger.e("s:" + s);
-                Logger.e("s1:" + s1);
-                switch (Integer.valueOf(s)) {
-                    case 700003:
-                        JSONObject jsonObject = null;
-                        try {
-                            jsonObject = new JSONObject(s1);
-                            isCheckedUP = jsonObject.getBoolean("isChecked");
-                            if (isCheckedUP && mInputVer.getText().toString().length() == 4) {
-                                mPersenter.LoginByVCode(mPhoneNum.getText().toString(), mInputVer.getText().toString());
-                            }
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                        }
-
-                        break;
-                }
-            }
-        });
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        if (mOldScreenOrientation != mActivity.getRequestedOrientation()) {
-            mActivity.setRequestedOrientation(mOldScreenOrientation);
-        }
-    }
-
-
-}

+ 0 - 106
app/src/main/java/com/edufound/android/xyyf/config/DialogLandConfigNoUI.java

@@ -1,106 +0,0 @@
-package com.edufound.android.xyyf.config;
-
-import android.app.Activity;
-import android.content.pm.ActivityInfo;
-import android.os.Build;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.View;
-import android.widget.FrameLayout;
-import android.widget.RelativeLayout;
-
-import com.edufound.android.xyyf.R;
-import com.edufound.android.xyyf.main.MainView;
-import com.mobile.auth.gatewayauth.AuthRegisterXmlConfig;
-import com.mobile.auth.gatewayauth.AuthUIConfig;
-import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper;
-import com.mobile.auth.gatewayauth.ui.AbstractPnsViewDelegate;
-
-public class DialogLandConfigNoUI extends BaseUIConfig {
-
-    private int mOldScreenOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
-    MainView mView;
-
-    public DialogLandConfigNoUI(Activity activity, PhoneNumberAuthHelper authHelper, MainView view) {
-        super(activity, authHelper, view);
-        mView = view;
-    }
-
-
-    @Override
-    public void configAuthPage() {
-        mAuthHelper.removeAuthRegisterXmlConfig();
-        mAuthHelper.removeAuthRegisterViewConfig();
-        int authPageOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
-        if (Build.VERSION.SDK_INT == 26) {
-            mOldScreenOrientation = mActivity.getRequestedOrientation();
-            mActivity.setRequestedOrientation(authPageOrientation);
-            authPageOrientation = ActivityInfo.SCREEN_ORIENTATION_BEHIND;
-        }
-        updateScreenSize(authPageOrientation);
-        final int dialogWidth = (int) (mScreenWidthDp * 0.9);
-        final int dialogHeight = (int) (mScreenHeightDp * 0.4);
-
-        //sdk默认控件的区域是marginTop50dp
-        int designHeight = dialogHeight - 60;
-        int unit = designHeight / 10;
-        int logBtnHeight = (int) (unit * 1.2);
-        final int logBtnOffsetY = unit * 3;
-
-        mAuthHelper.addAuthRegisterXmlConfig(new AuthRegisterXmlConfig.Builder()
-                .setLayout(R.layout.custom_land_dialog, new AbstractPnsViewDelegate() {
-                    @Override
-                    public void onViewCreated(View view) {
-//                        findViewById(R.id.tv_title).setVisibility(View.VISIBLE);
-//                        findViewById(R.id.btn_close).setOnClickListener(new View.OnClickListener() {
-//                            @Override
-//                            public void onClick(View v) {
-//                                mAuthHelper.quitLoginPage();
-//                            }
-//                        });
-//                        int iconTopMargin = AppUtils.dp2px(getContext(), logBtnOffsetY + 130);
-//                        View iconContainer = findViewById(R.id.container_icon);
-//                        RelativeLayout.LayoutParams iconLayout = (RelativeLayout.LayoutParams) iconContainer.getLayoutParams();
-//                        iconLayout.topMargin = iconTopMargin;
-//                        View phoneNumLogin = findViewById(R.id.changePhoneNumLogin);
-//                        final FrameLayout changePhoneUi = (FrameLayout) findViewById(R.id.changePhoneFrame);
-//                        phoneNumLogin.setOnClickListener(new View.OnClickListener() {
-//                            @Override
-//                            public void onClick(View v) {
-//                                Log.e("PhoneNumberAuthDemo", "-----------NOUI---切换手机号登录------------");
-//                                mAuthHelper.quitLoginPage();
-//
-//                            }
-//                        });
-
-
-//                        iconLayout.width = AppUtils.dp2px(getContext(), dialogWidth / 2 - 60);
-                    }
-                }).build());
-        mAuthHelper.setAuthUIConfig(new AuthUIConfig.Builder()
-                .setNavHidden(true)
-                .setCheckboxHidden(true)
-                .setLogoHidden(true)
-                .setSloganHidden(true)
-                .setNavReturnHidden(true)
-                .setStatusBarHidden(true)
-                .setSwitchAccHidden(true)
-                .setLogBtnToastHidden(true)
-                .setDialogWidth(dialogWidth)
-                .setDialogHeight(dialogHeight)
-                .setDialogBottom(false)
-                .setNumberSize(0)
-                .setPrivacyTextSize(0)
-                .create());
-    }
-
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        if (mOldScreenOrientation != mActivity.getRequestedOrientation()) {
-            mActivity.setRequestedOrientation(mOldScreenOrientation);
-        }
-    }
-
-}

+ 0 - 161
app/src/main/java/com/edufound/android/xyyf/config/FullPortConfig.java

@@ -1,161 +0,0 @@
-package com.edufound.android.xyyf.config;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.ActivityInfo;
-import android.graphics.Color;
-import android.os.Build;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.MotionEvent;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.TextView;
-
-import com.alibaba.fastjson.JSONObject;
-import com.edufound.android.xyyf.R;
-import com.edufound.android.xyyf.activity.PhoneNumLoginActivity;
-import com.edufound.android.xyyf.application.EApplication;
-import com.edufound.android.xyyf.main.MainView;
-import com.edufound.android.xyyf.util.Logger;
-import com.mobile.auth.gatewayauth.AuthRegisterViewConfig;
-import com.mobile.auth.gatewayauth.AuthRegisterXmlConfig;
-import com.mobile.auth.gatewayauth.AuthUIConfig;
-import com.mobile.auth.gatewayauth.AuthUIControlClickListener;
-import com.mobile.auth.gatewayauth.CustomInterface;
-import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper;
-import com.mobile.auth.gatewayauth.ResultCode;
-import com.mobile.auth.gatewayauth.ui.AbstractPnsViewDelegate;
-
-public class FullPortConfig extends BaseUIConfig {
-    private final String TAG = "全屏竖屏样式";
-    EditText phone_number;
-    EditText intpu_verifaction;
-    TextView phonenumber_getverifcation;
-    TextView phonenumber_login;
-    TextView change_text;
-    MainView mView;
-    int pageType = 0;//0是一键登录,1是输入手机号登录
-
-    public FullPortConfig(Activity activity, PhoneNumberAuthHelper authHelper, MainView view) {
-        super(activity, authHelper, view);
-        mView = view;
-    }
-    public FullPortConfig(Activity activity, PhoneNumberAuthHelper authHelper) {
-        super(activity, authHelper);
-    }
-    @Override
-    public void configAuthPage() {
-        mAuthHelper.setUIClickListener(new AuthUIControlClickListener() {
-            @Override
-            public void onClick(String s, Context context, String s1) {
-                switch (s) {
-                    //点击授权页默认样式的返回按钮
-                    case ResultCode.CODE_ERROR_USER_CANCEL:
-                        Logger.e("CODE_ERROR_USER_CANCEL");
-                        mAuthHelper.quitLoginPage();
-                        mActivity.finish();
-                        break;
-                    //点击授权页默认样式的切换其他登录方式 会关闭授权页
-                    //如果不希望关闭授权页那就setSwitchAccHidden(true)隐藏默认的  通过自定义view添加自己的
-                    case ResultCode.CODE_ERROR_USER_SWITCH:
-                        Logger.e("CODE_ERROR_USER_SWITCH");
-                        return;
-                    //点击一键登录按钮会发出此回调
-                    //当协议栏没有勾选时 点击按钮会有默认toast 如果不需要或者希望自定义内容 setLogBtnToastHidden(true)隐藏默认Toast
-                    //通过此回调自己设置toast
-                    case ResultCode.CODE_ERROR_USER_LOGIN_BTN:
-                        Logger.e("CODE_ERROR_USER_LOGIN_BTN:" + s1);
-
-                        break;
-                    //checkbox状态改变触发此回调
-                    case ResultCode.CODE_ERROR_USER_CHECKBOX:
-                        Logger.e("CODE_ERROR_USER_CHECKBOX");
-                        break;
-                    //点击协议栏触发此回调
-                    case ResultCode.CODE_ERROR_USER_PROTOCOL_CONTROL:
-                        Logger.e("CODE_ERROR_USER_PROTOCOL_CONTROL");
-                        break;
-                    default:
-                        break;
-
-                }
-            }
-
-
-        });
-        mAuthHelper.removeAuthRegisterXmlConfig();
-        mAuthHelper.removeAuthRegisterViewConfig();
-        mAuthHelper.addAuthRegisterXmlConfig(new AuthRegisterXmlConfig.Builder()
-                .setLayout(R.layout.login_phonenumber, new AbstractPnsViewDelegate() {
-                    @Override
-                    public void onViewCreated(final View view) {
-                        phone_number = (EditText) findViewById(R.id.phonenumber_phonenumber);
-                        intpu_verifaction = (EditText) findViewById(R.id.phonenumber_verifcation);
-                        phonenumber_getverifcation = (TextView) findViewById(R.id.phonenumber_getverifcation);
-                        phonenumber_login = (TextView) findViewById(R.id.phonenumber_login);
-                        change_text = (TextView) findViewById(R.id.change_text);
-                        phone_number.setVisibility(View.INVISIBLE);
-                        intpu_verifaction.setVisibility(View.INVISIBLE);
-                        phonenumber_getverifcation.setVisibility(View.INVISIBLE);
-                        phonenumber_login.setVisibility(View.INVISIBLE);
-                        change_text.setOnClickListener(new View.OnClickListener() {
-                            @Override
-                            public void onClick(View v) {
-//                                mAuthHelper.quitLoginPage();
-                                Intent intent = new Intent(mActivity, PhoneNumLoginActivity.class);
-                                mActivity.startActivity(intent);
-                            }
-                        });
-                    }
-                })
-                .build());
-
-        int authPageOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
-        if (Build.VERSION.SDK_INT == 26) {
-            authPageOrientation = ActivityInfo.SCREEN_ORIENTATION_BEHIND;
-        }
-        AuthUIConfig authUIConfig = new AuthUIConfig.Builder()
-                .setAppPrivacyOne("《隐私权限和用户协议》", "http://m-xyyf-web.ai160.com/res/protocol/protocol.htm")
-//                .setAppPrivacyTwo("《百度》", "https://www.baidu.com")
-                .setPrivacyState(false)
-                .setAppPrivacyColor(Color.parseColor("#0B0B0B"), Color.parseColor("#2CBCFF"))
-                //隐藏默认切换其他登录方式
-                .setSwitchAccHidden(true)
-                //隐藏默认Toast
-                .setLogBtnToastHidden(false)
-                //沉浸式状态栏
-                .setStatusBarHidden(false)
-                .setStatusBarColor(Color.WHITE)
-                .setStatusBarUIFlag(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
-                .setLightColor(true)
-                .setWebNavTextSize(20)
-                //图片或者xml的传参方式为不包含后缀名的全称 需要文件需要放在drawable或drawable-xxx目录下 in_activity.xml, mytel_app_launcher.png
-//                .setAuthPageActIn("in_activity", "out_activity")
-//                .setAuthPageActOut("in_activity", "out_activity")
-                .setVendorPrivacyPrefix("《")
-                .setVendorPrivacySuffix("》")
-                .setPageBackgroundPath("page_background_color")
-                .setLogoImgPath("icon")
-                //一键登录按钮三种状态背景示例login_btn_bg.xml
-                .setLogBtnBackgroundPath("login_btn_bg")
-                .setLogBtnTextSize(AppUtils.dp2px(mContext, 6))
-                .setLogBtnOffsetY(AppUtils.dp2px(mContext, 100))
-                .setScreenOrientation(authPageOrientation)
-                .setNavText("")
-                .setNavReturnHidden(true)
-                .setNavColor(Color.WHITE)
-                .setSloganHidden(true)
-                .setSwitchAccText("其他手机号登录")
-                .setSwitchAccTextColor(Color.parseColor("#0B0B0B"))
-                .setProtocolLayoutGravity(Gravity.TOP)
-                .setUncheckedImgPath("logincheck")
-                .setCheckedImgPath("logincheck_selected")
-                .setPrivacyTextSize(12)
-                .setProtocolGravity(Gravity.TOP)
-                .create();
-        mAuthHelper.setAuthUIConfig(authUIConfig);
-    }
-
-}

+ 12 - 5
app/src/main/java/com/edufound/android/xyyf/interfaces/EfunboxPayInterfaces.java

@@ -5,6 +5,8 @@ import android.webkit.JavascriptInterface;
 
 import com.edufound.android.xyyf.main.MainView;
 import com.edufound.android.xyyf.pay.PayActivity;
+import com.edufound.android.xyyf.pay.PayInit;
+import com.edufound.android.xyyf.util.ToastUtil;
 
 public class EfunboxPayInterfaces {
     public static final int START_PAY_DB = 0x3211;
@@ -23,11 +25,16 @@ public class EfunboxPayInterfaces {
 
     @JavascriptInterface
     public void WeChatPay(String json) {
-        JsInterfaces.startWX = true;
-        Intent intent = new Intent(mView.getActivity(), PayActivity.class);
-        intent.putExtra("type", "1");
-        intent.putExtra("payString", json);
-        mView.getActivity().startActivity(intent);
+        if (!PayInit.getInstance().WX_API.isWXAppInstalled()) {
+            ToastUtil.showToast("请安装微信");
+        } else {
+            JsInterfaces.startWX = true;
+            Intent intent = new Intent(mView.getActivity(), PayActivity.class);
+            intent.putExtra("type", "1");
+            intent.putExtra("payString", json);
+            mView.getActivity().startActivity(intent);
+        }
+
     }
 
     @JavascriptInterface

+ 6 - 93
app/src/main/java/com/edufound/android/xyyf/interfaces/JsInterfaces.java

@@ -13,14 +13,9 @@ import android.webkit.JavascriptInterface;
 
 import com.alibaba.fastjson.JSON;
 import com.edufound.android.xyyf.R;
-import com.edufound.android.xyyf.activity.PhoneNumLoginActivity;
-import com.edufound.android.xyyf.activity.PhoneNumLoginActivityLandscape;
 import com.edufound.android.xyyf.application.EApplication;
 import com.edufound.android.xyyf.bean.MessageDialogBean;
 import com.edufound.android.xyyf.bean.UpgradeBean;
-import com.edufound.android.xyyf.config.AppUtils;
-import com.edufound.android.xyyf.config.AuthPageConfig;
-import com.edufound.android.xyyf.config.BaseUIConfig;
 import com.edufound.android.xyyf.main.MainView;
 import com.edufound.android.xyyf.pay.PayInit;
 import com.edufound.android.xyyf.util.ContextUtil;
@@ -33,10 +28,6 @@ import com.edufound.android.xyyf.util.ShowSetting;
 import com.edufound.android.xyyf.util.ToastUtil;
 import com.edufound.android.xyyf.util.UpdateUtil;
 import com.google.gson.Gson;
-import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper;
-import com.mobile.auth.gatewayauth.ResultCode;
-import com.mobile.auth.gatewayauth.TokenResultListener;
-import com.mobile.auth.gatewayauth.model.TokenRet;
 import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram;
 import com.tencent.mm.opensdk.modelmsg.SendAuth;
 
@@ -54,7 +45,6 @@ public class JsInterfaces {
     MediaPlayer mediaPlayer;
     AlertDialog.Builder mMessageDialogBuilder;
     MessageDialogBean mMessageBean;
-    PhoneNumberAuthHelper mPhoneNumberAuthHelperl;
     String mSecret = "UgC3rEZPVMBKi8WqdoubeWMSJNSeeA6i0dLu3Z1GZKfIgXFhF8RmMLdsmDSgmwWjg2TUOhkvbuHZH6pt4RUxiQSpVyu9P1Q7h9Th05DhNVqxuOU2GRLLs0C43B59eS6nXrUEy7PZzn3wPTXEpelTmH5rMl+VZ7UKa3tC35qkB073Dfikr6ITRfCF31mTPjOGQRo9RKrtbeIhj4jIqx7M9PJSp9+W8huzLCUEOVquVNKDtpCBUq2Znu+PgISvLg3JouLtVv9ldoftxKci+VfHaO3izxkHOi+3jauqBTigrfA7D4I4va/7PlgCNoXJogcy";
     public static boolean startWX = false;
 
@@ -66,8 +56,6 @@ public class JsInterfaces {
             mediaPlayer.reset();
             mediaPlayer = MediaPlayer.create(mView.getActivity(), R.raw.click_music);
         }
-        mPhoneNumberAuthHelperl = PhoneNumberAuthHelper.getInstance(mView.getActivity(), tokenResultListener);
-        mPhoneNumberAuthHelperl.setAuthSDKInfo(mSecret);
     }
 
     Map<String, String> jsMap = new HashMap<>();
@@ -173,7 +161,7 @@ public class JsInterfaces {
     public void upgradeApp(String infoJson) {
         // 测试json {'title': '升级','type': '1','context': '修正登录异常','download_url':
         // 'http://www.baidu.com'}
-        Logger.DebugE("升级提示框:" + infoJson);
+        Logger.e("升级提示框:" + infoJson);
         final UpgradeBean entity = mGson.fromJson(infoJson, UpgradeBean.class);
         AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity());
         builder.setTitle(entity.title);
@@ -245,6 +233,7 @@ public class JsInterfaces {
         if (mediaPlayerType == 0) {
 
         } else {
+            mediaPlayer.release();
             mediaPlayerType = 0;
             mediaPlayer = new MediaPlayer();
             mediaPlayer.reset();
@@ -261,6 +250,7 @@ public class JsInterfaces {
         if (mediaPlayerType == 1) {
 
         } else {
+            mediaPlayer.release();
             mediaPlayerType = 1;
             mediaPlayer = new MediaPlayer();
             mediaPlayer.reset();
@@ -276,6 +266,7 @@ public class JsInterfaces {
         if (mediaPlayerType == 2) {
 
         } else {
+            mediaPlayer.release();
             mediaPlayerType = 2;
             mediaPlayer = new MediaPlayer();
             mediaPlayer.reset();
@@ -292,6 +283,8 @@ public class JsInterfaces {
 
     @JavascriptInterface
     public void toMiniProgram(final String programId, final String path) {
+        Logger.e("programId:" + programId);
+        Logger.e("path:" + path);
         PackageManager packageManager = mView.getActivity().getPackageManager();
         Intent intent = packageManager.getLaunchIntentForPackage("com.tencent.mm");
         if (intent == null) {
@@ -385,11 +378,6 @@ public class JsInterfaces {
     }
 
 
-    public int getdp(int num) {
-        return AppUtils.dp2px(mView.getActivity(), num);
-    }
-
-
     @JavascriptInterface
     public void showPhoneNumberLogin(int type) {
         //0是横屏。2是竖屏
@@ -398,81 +386,6 @@ public class JsInterfaces {
 //        mPhoneNumberAuthHelperl.getLoginToken(mView.getActivity(), 3000);
     }
 
-    @JavascriptInterface
-    public void showPhoneNumberLogin() {
-        AuthPageConfig mUIConfig = BaseUIConfig.init(2, mView.getActivity(), mPhoneNumberAuthHelperl, mView);
-        mUIConfig.configAuthPage();
-        mPhoneNumberAuthHelperl.getLoginToken(mView.getActivity(), 3000);
-    }
-
-    public void quitLoginPage() {
-        mPhoneNumberAuthHelperl.quitLoginPage();
-    }
-
-
-    @JavascriptInterface
-    public void showPhoneNumberLoginLandscape() {
-        AuthPageConfig mUIConfig = BaseUIConfig.init(0, mView.getActivity(), mPhoneNumberAuthHelperl);
-        mUIConfig.configAuthPage();
-        mPhoneNumberAuthHelperl.getLoginToken(mView.getActivity(), 3000);
-    }
-
-
-    TokenResultListener tokenResultListener = new TokenResultListener() {
-        @Override
-        public void onTokenSuccess(String s) {
-            TokenRet tokenRet = null;
-            try {
-                tokenRet = JSON.parseObject(s, TokenRet.class);
-                if (ResultCode.CODE_START_AUTHPAGE_SUCCESS.equals(tokenRet.getCode())) {
-                    mPhoneNumberAuthHelperl.hideLoginLoading();
-                }
-                if (ResultCode.CODE_GET_TOKEN_SUCCESS.equals(tokenRet.getCode())) {
-                    mPhoneNumberAuthHelperl.hideLoginLoading();
-                    mPhoneNumberAuthHelperl.quitLoginPage();
-                    String token = JSON.parseObject(s).get("token").toString();
-                    OKHttpUtil.postDataAsync(ContextUtil.getGetUserPhonenumberUrl(), new OKHttpUtil.ResultCallback() {
-                        @Override
-                        public void onError(Request request, Exception e) {
-                            Logger.e("error-------------");
-                        }
-
-                        @Override
-                        public void onResponse(Object response) {
-                            String user_phone = JSON.parseObject(response.toString()).getString("data").toString();
-                            SPutil.setPrefString(mView.getActivity(), "user_phone", Base64.encodeToString(user_phone.getBytes(), Base64.DEFAULT));
-                            mView.loadJsMehtod("phoneLogin('" + user_phone + "')");
-                        }
-                    }, new OKHttpUtil.Param("accessToken", token));
-//
-                }
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-
-        @Override
-        public void onTokenFailed(String s) {
-//            ToastUtil.showToast("失败了:" + s);
-            String code = JSON.parseObject(s).get("code").toString();
-            Logger.e("code:" + code);
-            Intent intent = new Intent(mView.getActivity(), PhoneNumLoginActivityLandscape.class);
-            if (code.equals("700000")) {
-                mView.loadJsMehtod("closeLogin(" + code + ")");
-            } else {
-                intent.putExtra("code", code);
-                mView.getActivity().startActivity(intent);
-//                ToastUtil.showToast(JSON.parseObject(s).get("msg").toString());
-                Logger.e("一键登录onTokenFailed:" + JSON.parseObject(s).get("msg").toString());
-                mPhoneNumberAuthHelperl.quitLoginPage();
-            }
-            return;
-
-        }
-
-
-    };
-
 
     @JavascriptInterface
     public void setScreenOriention(int oriention) {

+ 14 - 4
app/src/main/java/com/edufound/android/xyyf/main/MainPersenter.java

@@ -78,6 +78,7 @@ public class MainPersenter implements MainIPersenter {
     private DeviceUtil deviceUtil;
     Bitmap mVideoBitmap = null;
     Intent getIntent;
+    String preuuid;
 
     public MainPersenter(MainView view) {
         mView = view;
@@ -126,7 +127,7 @@ public class MainPersenter implements MainIPersenter {
         }
         webview.getSettings().setBlockNetworkImage(false);
         // webview.getSettings().set
-        webview.setBackgroundColor(Color.TRANSPARENT);
+//        webview.setBackgroundColor(Color.TRANSPARENT);
 //       webview.setBackgroundResource();
         webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
         webview.getSettings().setUseWideViewPort(true);
@@ -206,6 +207,8 @@ public class MainPersenter implements MainIPersenter {
             }
 
         });
+
+
         webview.addJavascriptInterface(mJsInterfaces, "efunboxJS");
         webview.addJavascriptInterface(mPayInterfaces, "efunboxPay");
 
@@ -244,7 +247,7 @@ public class MainPersenter implements MainIPersenter {
         if (intent_url != null && !intent_url.isEmpty()) {
             mLoadUrl = intent_url;
         }
-        String preuuid = SPutil.getPrefString(ContextUtil.getContext(), DeviceUuidFactory.UUID_SPKEY, "");
+        preuuid = SPutil.getPrefString(ContextUtil.getContext(), DeviceUuidFactory.UUID_SPKEY, "");
         if (preuuid.equals("")) {
             preuuid = DeviceUuidFactory.getUuid().toString();
         }
@@ -255,9 +258,16 @@ public class MainPersenter implements MainIPersenter {
         buffer.append("&width=" + deviceUtil.getWidth(mView.getActivity()));
         buffer.append("&height=" + deviceUtil.getHeight(mView.getActivity()));
         buffer.append("&version=" + deviceUtil.getVersionCode(mView.getActivity()));
+//        mLoadUrl = "http://192.168.1.15:8080/efunbox-xyyf-web/1.0.0/stage/index/index.html?";
         mLoadUrl += buffer.toString();
-        Logger.DebugE("LOADURL=" + mLoadUrl);
+        Logger.e("LOADURL=" + mLoadUrl);
         mView.loadUrl(mLoadUrl);
+
+        //测试用
+//        TextView tv = new TextView(mView.getActivity());
+//        tv.setTextColor(Color.RED);
+//        tv.setText("加载地址:" + mLoadUrl);
+//        mView.getRootView().addView(tv);
     }
 
     @Override
@@ -269,11 +279,11 @@ public class MainPersenter implements MainIPersenter {
                 break;
             case KeyEvent.KEYCODE_BACK:
             case KeyEvent.KEYCODE_ESCAPE:
+                Logger.e("uuid:" + preuuid);
                 mView.loadJsMehtod("boxEventHandler('key_down','KEY_BACK')");
                 return true;
             case KeyEvent.KEYCODE_HOME:
                 // Home键 -,- P.S:不一定能监听到
-                Logger.DebugE("onkeydown click home");
                 EApplication.exitApp();
                 break;
             case KeyEvent.KEYCODE_DPAD_UP:

+ 2 - 1
app/src/main/java/com/edufound/android/xyyf/pay/PayPersenter.java

@@ -45,6 +45,7 @@ public class PayPersenter implements PayIPersenter {
     public void WeChatPay(String json) {
         if (!PayInit.getInstance().WX_API.isWXAppInstalled()) {
             ToastUtil.showToast("请安装微信");
+            mView.getActivity().finish();
             return;
         }
         Message msg = new Message();
@@ -73,7 +74,7 @@ public class PayPersenter implements PayIPersenter {
 
     @Override
     public void HuaWeiPay(String json) {
-        
+
     }
 
     Handler resultHandler = new Handler(new Handler.Callback() {

+ 10 - 4
app/src/main/java/com/edufound/android/xyyf/receiver/HomeKeyEventReceiver.java

@@ -4,8 +4,11 @@ import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.text.TextUtils;
+import android.widget.Toast;
 
+import com.edufound.android.xyyf.application.EApplication;
 import com.edufound.android.xyyf.util.Logger;
+import com.edufound.android.xyyf.util.ToastUtil;
 
 public class HomeKeyEventReceiver extends BroadcastReceiver {
 
@@ -20,11 +23,14 @@ public class HomeKeyEventReceiver extends BroadcastReceiver {
         if (action.equals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) {
             String reason = intent.getStringExtra(SYSTEM_REASON);
             if (TextUtils.equals(reason, SYSTEM_HOME_KEY)) {
-                Logger.DebugE("click home");
-//                EApplication.exitApp();
-//                android.os.Process.killProcess(android.os.Process.myPid());
+                Logger.e("click home");
+                if (EApplication.getAppCode().equals("2017")) {
+                    EApplication.exitApp();
+                    EApplication.clearActivity();
+                    android.os.Process.killProcess(android.os.Process.myPid());
+                }
             } else if (TextUtils.equals(reason, SYSTEM_DIALOG_REASON_RECENT_APPS)) {
-                Logger.DebugE(" click recentapps");
+                Logger.e(" click recentapps");
             }
         }
     }

+ 1 - 0
app/src/main/java/com/edufound/android/xyyf/util/DeviceUuidFactory.java

@@ -14,6 +14,7 @@ public class DeviceUuidFactory {
 
     public DeviceUuidFactory(Context context) {
         if (uuid == null) {
+            Logger.e("获取UUID的类:" + context.getClass().getName());
             synchronized (DeviceUuidFactory.class) {
                 if (uuid == null) {
                     try {

+ 1 - 1
app/src/main/java/com/edufound/android/xyyf/util/EduFoundUtil.java

@@ -218,7 +218,7 @@ public class EduFoundUtil {
                 mRespBuff.append(buff, 0, ch);
             }
             mReader.close();
-            Logger.DebugE(mRespBuff.toString());
+            Logger.e(mRespBuff.toString());
         } catch (IOException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();

+ 0 - 5
app/src/main/java/com/edufound/android/xyyf/util/Logger.java

@@ -10,10 +10,5 @@ public class Logger {
         Log.e(TAG, message);
     }
 
-    public static void DebugE(String message) {
-        if (ContextUtil.isIsDebug()) {
-            Log.e(TAG, message);
-        }
-    }
 
 }

+ 5 - 1
app/src/main/java/com/edufound/android/xyyf/util/OKHttpUtil.java

@@ -288,7 +288,7 @@ public class OKHttpUtil {
                 fileBody = RequestBody.create(MediaType.parse(guessMimeType(fileName)), file);
                 //TODO 根据文件名设置contentType
                 builder.addPart(Headers.of("Content-Disposition",
-                        "form-data; name=\"" + fileKeys[i] + "\"; filename=\"" + fileName + "\""),
+                                "form-data; name=\"" + fileKeys[i] + "\"; filename=\"" + fileName + "\""),
                         fileBody);
             }
         }
@@ -493,8 +493,12 @@ public class OKHttpUtil {
             obj.put("mobile", userphone);
         }
         obj.put("timeAcc", String.valueOf(runtime));
+        if (DeviceUuidFactory.getUuid() == null) {
+            new DeviceUuidFactory(ContextUtil.getApplication());
+        }
         obj.put("deviceCode", DeviceUuidFactory.getUuid().toString());
         String json = obj.toJSONString();
+        Logger.e("post-user-time:" + json);
         MediaType JSON = MediaType.parse("application/json;charset=utf-8");
         RequestBody requestBody = RequestBody.create(JSON, json);
         Request request = new Request.Builder().url(ContextUtil.URL_POST_USER_TIME).post(requestBody).build();

+ 1 - 1
app/src/main/java/com/edufound/android/xyyf/util/UpdateUtil.java

@@ -79,7 +79,7 @@ public class UpdateUtil {
         try {
             is.close();
         } catch (Exception ex) {
-            Logger.DebugE("下载文件异常--" + ex.getMessage());
+            Logger.e("下载文件异常--" + ex.getMessage());
         }
     }
 

BIN
app/src/main/res/drawable/videopower.jpg


+ 73 - 72
app/src/main/res/layout/activity_privacypolicy.xml

@@ -1,110 +1,111 @@
 <?xml version="1.0" encoding="utf-8"?>
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        android:id="@+id/privacy_root"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@drawable/privacy_bg">
+    android:id="@+id/privacy_root"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white">
 
     <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="vertical">
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/result_view"
+        android:orientation="vertical">
 
         <View
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="5"></View>
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="5"></View>
 
         <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="8"
-                android:orientation="horizontal">
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="8"
+            android:orientation="horizontal">
 
             <View
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"></View>
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="1"></View>
 
             <FrameLayout
 
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="8">
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="8">
 
                 <LinearLayout
-                        android:id="@+id/privacy_text_frame"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:background="@drawable/shape_corner"
-                        android:orientation="vertical">
+                    android:id="@+id/privacy_text_frame"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:background="@drawable/shape_corner"
+                    android:orientation="vertical">
 
                     <TextView
-                            android:layout_width="match_parent"
-                            android:layout_height="0dp"
-                            android:layout_weight="1"
-                            android:gravity="center"
-                            android:text="用户协议和隐私政策"
-                            android:textColor="@color/black"
-                            android:textStyle="bold"></TextView>
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="1"
+                        android:gravity="center"
+                        android:text="用户协议和隐私政策"
+                        android:textColor="@color/black"
+                        android:textStyle="bold"></TextView>
 
                     <TextView
-                            android:id="@+id/privacy_context"
-                            android:layout_width="match_parent"
-                            android:layout_height="0dp"
-                            android:layout_gravity="center"
-                            android:layout_weight="5"
-                            android:gravity="center|left|top"
-                            android:paddingLeft="15dp"
-                            android:paddingRight="15dp"
-                            android:text=""
-                            android:textSize="16sp"></TextView>
+                        android:id="@+id/privacy_context"
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_gravity="center"
+                        android:layout_weight="5"
+                        android:gravity="center|left|top"
+                        android:paddingLeft="15dp"
+                        android:paddingRight="15dp"
+                        android:text=""
+                        android:textSize="16sp"></TextView>
 
                     <View
-                            android:layout_width="match_parent"
-                            android:layout_height="0dp"
-                            android:layout_weight="0.02"
-                            android:background="@color/black"></View>
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.02"
+                        android:background="@color/black"></View>
 
                     <LinearLayout
-                            android:layout_width="match_parent"
-                            android:layout_height="0dp"
-                            android:layout_weight="1"
-                            android:orientation="horizontal">
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="1"
+                        android:orientation="horizontal">
 
                         <TextView
-                                android:id="@+id/privacy_cancel"
-                                android:layout_width="0dp"
-                                android:layout_height="match_parent"
-                                android:layout_weight="1"
-                                android:gravity="center"
-                                android:text="暂不使用"
-                                android:textSize="16dp"></TextView>
+                            android:id="@+id/privacy_cancel"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="暂不使用"
+                            android:textSize="16dp"></TextView>
 
                         <TextView
-                                android:id="@+id/privacy_ok"
-                                android:layout_width="0dp"
-                                android:layout_height="match_parent"
-                                android:layout_gravity="center"
-                                android:layout_weight="1"
-                                android:gravity="center"
-                                android:text="同意"
-                                android:textColor="#68a5dc"
-                                android:textSize="18dp"></TextView>
+                            android:id="@+id/privacy_ok"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="center"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="同意"
+                            android:textColor="#68a5dc"
+                            android:textSize="18dp"></TextView>
                     </LinearLayout>
                 </LinearLayout>
             </FrameLayout>
 
             <View
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"></View>
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="1"></View>
         </LinearLayout>
 
         <View
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="5"></View>
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="5"></View>
 
     </LinearLayout>
 

+ 0 - 1
app/src/main/res/layout/pay_result.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     style="@style/NavPage"
-
     android:background="@color/yellow">
 
 </LinearLayout>

+ 2 - 2
app/src/main/res/values/projectstring.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <string name="default_url">http://m-xyyf-web.ai160.com/stage/index/index.html</string>
-    <!--    王洋本地-->
-    <!--    <string name="default_url">http://192.168.1.34:8080/efunbox-xyyf-web/1.0.0/stage/index/index.html</string>-->
+    <!--测试环境-->
+    <!--    <string name="default_url">http://192.168.1.52:8080/efunbox-xyyf-web/1.0.0/stage/index/index.html</string>-->
     <!--义方渠道-->
     <string name="app_code_yf">2006</string>
     <!--应用宝-->

+ 1 - 1
gradle/wrapper/gradle-wrapper.properties

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=http://mirrors.cloud.tencent.com/gradle/gradle-6.1.1-all.zip

+ 1 - 0
push/build/.transforms/24ec1568bf01f4d4157f3b27170b966d.bin

@@ -0,0 +1 @@
+o/classes

BIN
push/build/.transforms/24ec1568bf01f4d4157f3b27170b966d/classes/classes.dex


BIN
push/build/intermediates/aar_libs_directory/debug/libs/accs_sdk_taobao-3.3.7.2-open.jar


BIN
push/build/intermediates/aar_libs_directory/debug/libs/alicloud-android-sdk-httpdns-1.1.3.1.jar


BIN
push/build/intermediates/aar_libs_directory/debug/libs/alicloud-android-utils-1.0.3.jar


BIN
push/build/intermediates/aar_libs_directory/debug/libs/networksdk-3.5.5-open.jar


BIN
push/build/intermediates/aar_libs_directory/debug/libs/tlog_adapter-3.0.0.17.jar


BIN
push/build/intermediates/aar_libs_directory/debug/libs/tnet4android-3.1.14.9.jar


BIN
push/build/intermediates/aar_libs_directory/debug/libs/umeng-common-2.1.0.jar


BIN
push/build/intermediates/aar_libs_directory/debug/libs/umeng-push-6.0.1.jar


BIN
push/build/intermediates/aar_main_jar/debug/classes.jar


+ 0 - 0
push/build/intermediates/annotations_typedef_file/debug/typedefs.txt


BIN
push/build/intermediates/incremental/debug-mergeJavaRes/merge-state


BIN
push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/Dj_oFuDn7iW7FteZyfbKM_Z1log=


BIN
push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/YDJEt8cKWeYSstBl225DV1I6Hik=


BIN
push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/c16v8l05FZSL95YpZItYT+j5P8I=


BIN
push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/iDIdcFFPzt9s8US45zY0TyJHp2k=


BIN
push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/jSCx_aq5CtZ0xDBgjUFaYdR1308=


BIN
push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/p9Dz+LE26Dr44r8KlasESmJjJck=


BIN
push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/qfqcwfUM2T6rVsKZNkvZjX3l688=


BIN
push/build/intermediates/incremental/debug-mergeJavaRes/zip-cache/spHJr9_qnIlZxojN5biYafNkGrM=


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/arm64-v8a/libcocklogic-1.1.3.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/arm64-v8a/libtnet-3.1.14.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/armeabi-v7a/libcocklogic-1.1.3.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/armeabi-v7a/libtnet-3.1.14.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/armeabi/libcocklogic-1.1.3.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/armeabi/libtnet-3.1.14.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/mips/libcocklogic-1.1.3.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/mips/libtnet-3.1.14.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/mips64/libcocklogic-1.1.3.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/mips64/libtnet-3.1.14.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/x86/libcocklogic-1.1.3.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/x86/libtnet-3.1.14.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/x86_64/libcocklogic-1.1.3.so


BIN
push/build/intermediates/library_and_local_jars_jni/debug/jni/x86_64/libtnet-3.1.14.so


BIN
push/build/intermediates/merged_java_res/debug/out.jar


BIN
push/build/outputs/aar/push-debug.aar