Browse Source

备份奇境SDK

trevorHsu 3 năm trước cách đây
mục cha
commit
b81fcffe7f
35 tập tin đã thay đổi với 295 bổ sung77 xóa
  1. 2 6
      app/src/main/AndroidManifest.xml
  2. 13 9
      app/src/main/java/constant/yysdk/com/main_yy_rh_sdk/MainActivity.java
  3. 1 1
      hnqj/build.gradle
  4. 5 1
      hnqj/src/main/AndroidManifest.xml
  5. 1 1
      hnqj/src/main/java/com/yyrh/Version.java
  6. 3 0
      hnqj/src/main/java/com/yyrh/advertisement/AdSdkCallback.java
  7. 5 0
      hnqj/src/main/java/com/yyrh/advertisement/Advertise.java
  8. 7 0
      hnqj/src/main/java/com/yyrh/advertisement/AdvertiseManager.java
  9. 1 5
      hnqj/src/main/java/com/yyrh/constant/InitConfig.java
  10. 2 2
      hnqj/src/main/java/com/yyrh/constant/SDKSettings.java
  11. 6 7
      hnqj/src/main/java/com/yyrh/constant/URLConstants.java
  12. 7 0
      hnqj/src/main/java/com/yyrh/factory/ChannelSdkOperation.java
  13. 3 1
      hnqj/src/main/java/com/yyrh/factory/ISdkOperation.java
  14. 5 0
      hnqj/src/main/java/com/yyrh/factory/SdkManager.java
  15. 8 0
      hnqj/src/main/java/com/yyrh/factory/YyrhSdkOperation.java
  16. 0 1
      hnqj/src/main/java/com/yyrh/networking/NetRequestApi.java
  17. 10 1
      hnqj/src/main/java/com/yyrh/sdk/SDKEntry.java
  18. 24 6
      hnqj/src/main/java/com/yyrh/sdk/YyrhSdkManager.java
  19. 10 1
      hnqj/src/main/java/com/yyrh/ui/BaseDialog.java
  20. 7 0
      hnqj/src/main/java/com/yyrh/ui/PageJsInteraction.java
  21. 66 1
      hnqj/src/main/java/com/yyrh/ui/WvPageListDialog.java
  22. 11 5
      hnqj/src/main/java/com/yyrh/ui/fragment/BaseFragment.java
  23. 10 0
      hnqj/src/main/java/com/yyrh/ui/fragment/UserAccountLoginFragment.java
  24. 26 9
      hnqj/src/main/java/com/yyrh/ui/fragment/UserPhoneLoginFragment.java
  25. 1 2
      hnqj/src/main/java/com/yyrh/ui/fragment/UserRegisterFragment.java
  26. 16 1
      hnqj/src/main/java/com/yyrh/ui/fragment/UserRetrievePwdFragment.java
  27. 2 1
      hnqj/src/main/java/com/yyrh/utils/SwitchUtil.java
  28. 4 0
      hnqj/src/main/java/com/yythird/base/BaseSDK.java
  29. 4 2
      hnqj/src/main/res/layout/qj_account_login.xml
  30. 2 1
      hnqj/src/main/res/layout/qj_edittext_style.xml
  31. 2 1
      hnqj/src/main/res/layout/qj_phone_login.xml
  32. 3 1
      hnqj/src/main/res/layout/qj_register_dialog.xml
  33. 3 0
      hnqj/src/main/res/layout/qj_retrieve_pwd.xml
  34. 7 11
      hnqj/src/main/res/layout/qj_webview_common_dialog.xml
  35. 18 0
      hnqj/src/main/res/values/styles.xml

+ 2 - 6
app/src/main/AndroidManifest.xml

@@ -25,13 +25,9 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <activity android:name="com.yyrh.ui.activity.UseLoginActivity"
-            android:launchMode="singleTop"
-            android:configChanges="keyboardHidden|orientation|screenSize"
-            android:theme="@style/qj_transparent"
-            >
 
-        </activity>
+
+
 
         <!--适配全面屏手机-->
 

+ 13 - 9
app/src/main/java/constant/yysdk/com/main_yy_rh_sdk/MainActivity.java

@@ -56,6 +56,9 @@ import com.yyrh.utils.ResourceUtil;
 import com.yyrh.utils.Utils;
 
 
+import org.json.JSONException;
+import org.json.JSONObject;
+
 import java.util.HashMap;
 import java.util.Map;
 
@@ -406,15 +409,16 @@ public class MainActivity extends Activity implements View.OnClickListener {
                             Toast.makeText(this, stringBuilder2.toString(), Toast.LENGTH_LONG).show();
                             break;
                         case R.id.user_btn /*2131034225*/:
-                            this.sdk.getRealNameInfo(this, new RealNameMsgCallback() {
-                                public void onLoadRealNameMsg(boolean z, String str) {
-                                    if (z) {
-                                        Toast.makeText(MainActivity.this, str, Toast.LENGTH_LONG).show();
-                                    } else {
-                                        Toast.makeText(MainActivity.this, str, Toast.LENGTH_LONG).show();
-                                    }
-                                }
-                            });
+                            JSONObject json = new JSONObject();
+                            try {
+                                json.put("AE","xio");
+                                json.put("AE5","future");
+                            } catch (JSONException e) {
+                                e.printStackTrace();
+                            }
+
+
+                            sdk.reportAdEvent("Car",json);
                             break;
                     }
                     break;

+ 1 - 1
hnqj/build.gradle

@@ -32,7 +32,7 @@ android {
 }
 android.libraryVariants.all { variant ->
     variant.outputs.all {
-        outputFileName = 'yyxxrh_n-release-2.2.0_debug.aar'
+        outputFileName = 'hnqj-release-1.0.4.aar'
     }
 }
 

+ 5 - 1
hnqj/src/main/AndroidManifest.xml

@@ -18,7 +18,11 @@
         android:smallScreens="true" />
     <application
         >
-
+        <activity android:name="com.yyrh.ui.activity.UseLoginActivity"
+            android:launchMode="singleTop"
+            android:configChanges="keyboardHidden|orientation|screenSize"
+            android:theme="@style/qj_transparent"
+            />
     </application>
     </manifest>
 

+ 1 - 1
hnqj/src/main/java/com/yyrh/Version.java

@@ -1,5 +1,5 @@
 package com.yyrh;
 
 public class Version {
-    public static final String VERSION_NAME = "2.2.0";
+    public static final String VERSION_NAME = "1.0.4";
 }

+ 3 - 0
hnqj/src/main/java/com/yyrh/advertisement/AdSdkCallback.java

@@ -4,6 +4,8 @@ import android.app.Activity;
 
 import com.yyrh.constant.RoleInfo;
 
+import org.json.JSONObject;
+
 import java.util.HashMap;
 
 public interface AdSdkCallback {
@@ -17,4 +19,5 @@ public interface AdSdkCallback {
      void onDestory(Activity activity);
      void onRequestPermissionsResult(int requestCode,String[] permissions,int[] grantResults);
      void onExitGame(Activity activity);
+     void onReportAdEvent(String event, JSONObject json);
 }

+ 5 - 0
hnqj/src/main/java/com/yyrh/advertisement/Advertise.java

@@ -9,6 +9,8 @@ import android.util.Log;
 
 import com.yyrh.constant.RoleInfo;
 
+import org.json.JSONObject;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
@@ -54,6 +56,9 @@ public class Advertise {
     public Advertise() {
     }
 
+    public void reportAdEvent(String event, JSONObject json){
+
+    }
     public void onRequestPermissionsResult(int requestCode,String[] permissions,int[] grantResults){
     }
 

+ 7 - 0
hnqj/src/main/java/com/yyrh/advertisement/AdvertiseManager.java

@@ -6,6 +6,8 @@ import android.content.Context;
 
 import com.yyrh.constant.RoleInfo;
 
+import org.json.JSONObject;
+
 import java.util.HashMap;
 
 
@@ -98,6 +100,11 @@ public class AdvertiseManager {
         }
     }
 
+    public void reportAdEvent(String event, JSONObject json){
+        if (advertise != null) {
+            advertise.reportAdEvent(event,json);
+        }
+    }
     public void onRequestPermissionsResult(int requestCode,String[] permissions,int[] grantResults){
         if (advertise != null) {
             advertise.onRequestPermissionsResult(requestCode,permissions,grantResults);

+ 1 - 5
hnqj/src/main/java/com/yyrh/constant/InitConfig.java

@@ -2,10 +2,6 @@ package com.yyrh.constant;
 
 public class InitConfig {
 
-    public static String fristShowPage;
-
-
-
-
+    public static String fristShowPage = "";
 
 }

+ 2 - 2
hnqj/src/main/java/com/yyrh/constant/SDKSettings.java

@@ -29,7 +29,7 @@ public class SDKSettings {
 
     public static boolean isDebug = false;        // debug模式配置
     public static String system = "android";
-    public static String SDK_VERSION = "2.2.0";
+    public static String SDK_VERSION = "1.0.4";
 
 
     public static String UNAME = "";
@@ -43,7 +43,7 @@ public class SDKSettings {
     public static String UserCentUrl = ""; //用户中心功能
     public static boolean isLandscape = true; //用户中心功能
 
-    public static String customer_service_url = "";
+
 
     public static boolean isOpenRealName = false;
 

+ 6 - 7
hnqj/src/main/java/com/yyrh/constant/URLConstants.java

@@ -2,7 +2,7 @@ package com.yyrh.constant;
 
 public class URLConstants {
 
-//    public static final String BASEURL = "https://sdkapi.yyxxgame.com";
+//    public static final String BASEURL = "https://fxsy.qijinghao.com";
   public static final String BASEURL = "http://testsdkapi.yyxxgame.com";
 
 
@@ -26,12 +26,11 @@ public class URLConstants {
 
 
 
-    public static final String  USERPOLICYWEB = "/privacy_policy.html?";
-    public static final String  PHONEBINDWEB = "/phone_bind.html?";
-    public static final String  USERCENTERLISTWEB = "/list.html?";
-    public static final String  USERPROTOCOLWEB = "/protocol.html?";
-    public static final String  USERBINDINFO = "/user_info_bind.html?";
-
+    public static final String  USERPOLICYWEB = "/#/agreement_privacy?";   //隐私协议
+    public static final String  USERCENTERLISTWEB = "/#/user_center?";  //用户中心
+    public static final String  USERPROTOCOLWEB = "/#/agreement_user?"; //用户协议
+    public static final String  USERBINDINFO = "/#/authentication?"; //实名认证
+    public static final String  CUSTOMER_SERVICE_URL = "/#/service_center?"; //客服
 
     public static final String  RSAKEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3eXf1JxdFtx6c8AJTdlSverL8WqRE11yFB6Q+GbQeEVXjSCgQN48qePat7mXbH4LAtjaSEqXHruP4hJO8777wYtEKNKIN2VZgWQElrllAuAtaHyA+UGKwulOKmkR8k1Oxmfd46fnQBwzy+Giab4lqQRQAObCT0QtUrlrsU1U+zwIDAQAB";
 

+ 7 - 0
hnqj/src/main/java/com/yyrh/factory/ChannelSdkOperation.java

@@ -16,6 +16,8 @@ import com.yyrh.utils.YYLog;
 import com.yythird.base.ChannelSdkCallback;
 import com.yythird.sdk.ChannelSDK;
 
+import org.json.JSONObject;
+
 import java.util.HashMap;
 
 
@@ -106,6 +108,11 @@ public class ChannelSdkOperation implements ISdkOperation {
         }
     }
 
+    @Override
+    public void reportAdEvent(String event, JSONObject json) {
+        channelSdk.SDKReportAdInfo(event,json);
+    }
+
     @Override
     public void sdkOnStart(Activity activity) {
         channelSdk.onStart(activity);

+ 3 - 1
hnqj/src/main/java/com/yyrh/factory/ISdkOperation.java

@@ -9,6 +9,8 @@ import com.yyrh.constant.RoleInfo;
 import com.yyrh.sdk.callback.RealNameMsgCallback;
 import com.yythird.base.ChannelSdkCallback;
 
+import org.json.JSONObject;
+
 import java.util.HashMap;
 
 public interface ISdkOperation {
@@ -32,7 +34,7 @@ public interface ISdkOperation {
 
     void getRealNameInfo(Activity activity, RealNameMsgCallback realNameMsgCallback);
 
-
+    void reportAdEvent(String event, JSONObject json);
     /**
      * 生命周期
      */

+ 5 - 0
hnqj/src/main/java/com/yyrh/factory/SdkManager.java

@@ -10,6 +10,8 @@ import com.yyrh.constant.RoleInfo;
 import com.yyrh.sdk.callback.RealNameMsgCallback;
 import com.yythird.base.ChannelSdkCallback;
 
+import org.json.JSONObject;
+
 import java.util.HashMap;
 
 public class SdkManager {
@@ -50,6 +52,9 @@ public class SdkManager {
     public void uploadRoleInfo(String type, Activity activity, RoleInfo roleInfo){
         operation.uploadRoleInfo(type,activity,roleInfo);
     }
+    public void reportAdEvent(String event, JSONObject json){
+        operation.reportAdEvent(event,json);
+    }
 
     public void pay(Activity activity, HashMap<String, Object> map){
         operation.pay(activity,map);

+ 8 - 0
hnqj/src/main/java/com/yyrh/factory/YyrhSdkOperation.java

@@ -7,10 +7,13 @@ import android.content.res.Configuration;
 import android.os.Bundle;
 
 import com.yyrh.constant.RoleInfo;
+import com.yyrh.sdk.SDKEntry;
 import com.yyrh.sdk.YyrhSdkManager;
 import com.yyrh.sdk.callback.RealNameMsgCallback;
 import com.yythird.base.ChannelSdkCallback;
 
+import org.json.JSONObject;
+
 import java.util.HashMap;
 
 public class YyrhSdkOperation implements ISdkOperation {
@@ -58,6 +61,11 @@ public class YyrhSdkOperation implements ISdkOperation {
         yyrhSdkManager.yyrhGetRealNameInfo(activity,realNameMsgCallback);
     }
 
+    @Override
+    public void reportAdEvent(String event, JSONObject json) {
+        SDKEntry.getSdkInstance().adSdkCallback.onReportAdEvent(event,json);
+    }
+
     @Override
     public void sdkOnStart(Activity activity) {
 

+ 0 - 1
hnqj/src/main/java/com/yyrh/networking/NetRequestApi.java

@@ -120,7 +120,6 @@ public class NetRequestApi {
 
                     } else {
                         SDKSettings.UserCentUrl = data.optString("h5_web_host", "");
-                        SDKSettings.customer_service_url = data.optString("customer_service_url", "");
 
                         isThirdLogin = false;
                     }

+ 10 - 1
hnqj/src/main/java/com/yyrh/sdk/SDKEntry.java

@@ -47,7 +47,7 @@ import com.yyrh.sdk.callback.PayCallback;
 import com.yyrh.sdk.callback.PayOrderCallback;
 
 
-
+import org.json.JSONObject;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -130,6 +130,11 @@ public class SDKEntry {
         public void onExitGame(Activity activity) {
             AdvertiseManager.defaultManager(activity).onExitGame(activity);
         }
+
+        @Override
+        public void onReportAdEvent( String event, JSONObject json) {
+            AdvertiseManager.defaultManager(gameAct).reportAdEvent(event,json);
+        }
     };
 
     public ChannelSdkCallback tCallBack = new ChannelSdkCallback() {
@@ -445,6 +450,10 @@ public class SDKEntry {
         }
     }
 
+    public void reportAdEvent(String event, JSONObject json){
+        YYLog.i("game event :" + event  + " and json: "  + json.toString());
+        SdkManager.defaultManager(gameAct).reportAdEvent(event,json);
+    }
 
     /**
      * 生命周期

+ 24 - 6
hnqj/src/main/java/com/yyrh/sdk/YyrhSdkManager.java

@@ -25,7 +25,7 @@ import com.yyrh.ui.activity.UseLoginActivity;
 import com.yyrh.ui.floatmenu.FloatItem;
 import com.yyrh.ui.floatmenu.FloatLogoMenu;
 import com.yyrh.ui.floatmenu.FloatMenuView;
-import com.yyrh.ui.floatmenu.WvPageListDialog;
+import com.yyrh.ui.WvPageListDialog;
 import com.yyrh.ui.fragment.FragmentUtils;
 import com.yyrh.ui.userlist.DatabaseHelper;
 import com.yyrh.utils.InspectSimulator;
@@ -253,12 +253,30 @@ public class YyrhSdkManager {
                 !SDKSettings.LOGINTAG.equals(LOGOUT)) {
             autoLogin(activity);
 
-        }
-        else {
+        }else if (SDKSettings.LOGINTAG.equals(LOGOUT)){
+
+            showLoginView(activity);
+
+        } else {
+
             showLoginDialog(activity);
+
         }
     }
 
+    private void showLoginView(Activity activity) {
+
+        destroyFloat();
+        Intent intent = new Intent(activity, UseLoginActivity.class);
+        intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
+        intent.putExtra("isLandscape", Utils.isLandscape(activity));
+
+        intent.putExtra("fragmentTag", FragmentUtils.SDK_LOGIN_TAG);
+
+        activity.startActivity(intent);
+
+    }
+
     private void showLoginDialog(Activity activity) {
         destroyFloat();
         Intent intent = new Intent(activity, UseLoginActivity.class);
@@ -364,7 +382,7 @@ public class YyrhSdkManager {
                                 map.put("uname",SDKSettings.UNAME);
                                 String url  = Utils.getUserCententerUrl(URLConstants.USERCENTERLISTWEB,map);
 
-                                new WvPageListDialog(activity,ResourceUtil.getStyleId(activity,"qj_base_dialog"),url).show();
+                                new WvPageListDialog(activity,ResourceUtil.getStyleId(activity,"qj_half_black_dialog"),url).show();
                                 mFloatMenu.hideMenu();
                             }
                             else{
@@ -460,7 +478,7 @@ public class YyrhSdkManager {
                 String url  = Utils.getUserCententerUrl(URLConstants.USERBINDINFO,ifmap);
                 if (SDKSettings.isForceRealName){
                     url = url + "&smrz=1";
-                    new WvPageListDialog(context, ResourceUtil.getStyleId(context, "qj_base_dialog"), url,
+                    new WvPageListDialog(context, ResourceUtil.getStyleId(context, "qj_half_black_dialog"), url,
                             new WvPageListDialog.OnClosePageListener() {
                                 @Override
                                 public void onClose() {
@@ -482,7 +500,7 @@ public class YyrhSdkManager {
                                 }
                             },SDKSettings.isForceRealName).show();
                 }else {
-                    new WvPageListDialog(context, ResourceUtil.getStyleId(context, "qj_base_dialog"), url,
+                    new WvPageListDialog(context, ResourceUtil.getStyleId(context, "qj_half_black_dialog"), url,
                                  new WvPageListDialog.OnClosePageListener() {
                                      @Override
                                      public void onClose() {

+ 10 - 1
hnqj/src/main/java/com/yyrh/ui/BaseDialog.java

@@ -4,13 +4,16 @@ package com.yyrh.ui;
 import android.app.Dialog;
 import android.content.Context;
 
+import android.content.Intent;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
-
+import android.util.Log;
+import android.webkit.JavascriptInterface;
 
 
 import com.yyrh.utils.YYLog;
 
+import java.net.URISyntaxException;
 
 
 public class BaseDialog extends Dialog {
@@ -49,4 +52,10 @@ public class BaseDialog extends Dialog {
         YYLog.i("zfOrder:" + message);
     }
 
+    public void openq0q0(String url)  {
+
+        YYLog.i("openq0q0:" + url);
+
+    }
+
 }

+ 7 - 0
hnqj/src/main/java/com/yyrh/ui/PageJsInteraction.java

@@ -1,8 +1,11 @@
 package com.yyrh.ui;
 
 
+import android.content.Intent;
+import android.util.Log;
 import android.webkit.JavascriptInterface;
 
+import java.net.URISyntaxException;
 
 
 public class PageJsInteraction {
@@ -41,5 +44,9 @@ public class PageJsInteraction {
         this.baseDialog.zfOrder(message);
     }
 
+    @JavascriptInterface
+    public void openq0q0(String url)  {
+        this.baseDialog.openq0q0(url);
+    }
 
 }

+ 66 - 1
hnqj/src/main/java/com/yyrh/ui/WvPageListDialog.java

@@ -1,4 +1,4 @@
-package com.yyrh.ui.floatmenu;
+package com.yyrh.ui;
 
 import android.app.Activity;
 import android.content.Context;
@@ -7,6 +7,7 @@ import android.content.Intent;
 import android.content.SharedPreferences;
 import android.net.Uri;
 import android.os.Bundle;
+import android.util.Log;
 import android.view.View;
 import android.view.animation.Animation;
 import android.view.animation.AnimationUtils;
@@ -26,8 +27,11 @@ import com.yyrh.ui.userlist.DatabaseHelper;
 
 import com.yyrh.utils.ResourceUtil;
 import com.yyrh.utils.TosUtil;
+import com.yyrh.utils.Utils;
 
 
+import java.net.URISyntaxException;
+
 import static com.yyrh.constant.SDKSettings.USER_BIRTHDAY;
 import static com.yyrh.constant.SDKSettings.isLandscape;
 import static com.yyrh.constant.SDKSettings.isVefityRealName;
@@ -158,6 +162,32 @@ public class WvPageListDialog extends BaseDialog {
                 }
             }
 
+            @Override
+            public boolean shouldOverrideUrlLoading(WebView view, String url) {
+
+
+
+
+                if (url.startsWith("http:") || url.startsWith("https")) {
+                    return super.shouldOverrideUrlLoading(view, url);
+                } else if (url.startsWith("mqqwpa://")) {
+
+                    Intent intent = null;
+                    try {
+                        intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
+                        context.startActivity(intent);
+                    } catch (URISyntaxException e) {
+                        e.printStackTrace();
+                    }
+
+                    webView.goBack();
+                    return true;
+
+                }else{
+                    return true;
+                }
+            }
+
         });
 
         webView.setDownloadListener(new DownloadListener() {
@@ -232,6 +262,41 @@ public class WvPageListDialog extends BaseDialog {
         DatabaseHelper.excuteSql(context, insert_sql);
     }
 
+
+    @Override
+    public void openq0q0(String url) {
+        super.openq0q0(url);
+
+        {
+            Log.i("openq0q0", url);
+            if (Utils.judgeStrNull(url)) {
+                return;
+            }
+            if (url.equals("mqqwpa://")) {
+                try {
+
+                    Intent intent = context.getPackageManager().getLaunchIntentForPackage("com.tencent.mobileqq");
+                    context.startActivity(intent);
+
+                } catch (Exception e) {
+                    e.printStackTrace();
+
+                }
+            } else {
+                Intent intent = null;
+                try {
+                    intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
+                    context.startActivity(intent);
+                } catch (URISyntaxException e) {
+                    e.printStackTrace();
+                }
+
+            }
+
+
+        }
+    }
+
     @Override
     public void dismiss() {
         super.dismiss();

+ 11 - 5
hnqj/src/main/java/com/yyrh/ui/fragment/BaseFragment.java

@@ -6,16 +6,17 @@ import android.app.FragmentTransaction;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.view.View;
-import android.widget.Button;
 import android.widget.ImageButton;
-import android.widget.Toast;
 
 
 import com.yyrh.constant.SDKSettings;
-import com.yyrh.ui.floatmenu.WvPageListDialog;
+import com.yyrh.constant.URLConstants;
+import com.yyrh.ui.WvPageListDialog;
 import com.yyrh.utils.ResourceUtil;
 import com.yyrh.utils.Utils;
 
+import java.util.HashMap;
+
 public class BaseFragment extends Fragment implements View.OnClickListener {
     private ImageButton btn_kefu;
 
@@ -51,9 +52,14 @@ public class BaseFragment extends Fragment implements View.OnClickListener {
     public void onClick(View v) {
         if (v.getId() == ResourceUtil.getId(getActivity(), "btn_kefu")){
 
-            if (!Utils.judgeStrNull(SDKSettings.customer_service_url)){
+            if (!Utils.judgeStrNull(SDKSettings.UserCentUrl)){
+                HashMap<String,String> map = new HashMap<>();
+                map.put("game_code",SDKSettings.game_code);
+                map.put("gcp_code",SDKSettings.gcp_code);
+
+                String url  = Utils.getUserCententerUrl(URLConstants.CUSTOMER_SERVICE_URL,map);
 
-                new WvPageListDialog(getActivity(),ResourceUtil.getStyleId(getActivity(),"qj_base_dialog"),SDKSettings.customer_service_url).show();
+                new WvPageListDialog(getActivity(),ResourceUtil.getStyleId(getActivity(),"qj_half_black_dialog"),url).show();
 
             }
 

+ 10 - 0
hnqj/src/main/java/com/yyrh/ui/fragment/UserAccountLoginFragment.java

@@ -253,6 +253,16 @@ public class UserAccountLoginFragment extends BaseFragment {
 
     }
 
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        if (time != null){
+            time.cancel();
+        }
+
+
+    }
+
     private ArrayList<User> getData() {
         ArrayList<User> userList = new ArrayList<User>();
         dbHelper = new DatabaseHelper(getActivity());

+ 26 - 9
hnqj/src/main/java/com/yyrh/ui/fragment/UserPhoneLoginFragment.java

@@ -19,7 +19,7 @@ import com.yyrh.constant.URLConstants;
 import com.yyrh.networking.NetRequestApi;
 import com.yyrh.sdk.SDKEntry;
 import com.yyrh.sdk.YyrhSdkManager;
-import com.yyrh.ui.floatmenu.WvPageListDialog;
+import com.yyrh.ui.WvPageListDialog;
 import com.yyrh.utils.ResourceUtil;
 import com.yyrh.utils.SignUtils;
 import com.yyrh.utils.TosUtil;
@@ -35,6 +35,8 @@ public class UserPhoneLoginFragment extends BaseFragment {
     private CheckBox cb_register;
     private TextView tv_tip,tv_private_policy;
     private Button btn_get_code,btn_account_login,btn_guest_login,btn_reg_compete;
+    private CodeVerifyTimeCount codeVerifyTimeCount;
+    private RegTimeCount regTimeCount;
     @Nullable
     @Override
     public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@@ -104,6 +106,7 @@ public class UserPhoneLoginFragment extends BaseFragment {
             getPhoneCaptcha(getActivity(),phone,"register");
 
         }else if(id == ResourceUtil.getId(getActivity(), "btn_account_login")){
+
             Fragment accountLoginFragment = FragmentUtils.getSdkFragment(getActivity(),FragmentUtils.SDK_LOGIN_TAG);
             replaceFragmentToActivity(getFragmentManager(),accountLoginFragment,ResourceUtil.getId(getActivity(),"qj_content"));
 
@@ -115,6 +118,19 @@ public class UserPhoneLoginFragment extends BaseFragment {
 
     }
 
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        if (codeVerifyTimeCount != null){
+            codeVerifyTimeCount.cancel();
+        }
+        if (regTimeCount != null){
+            regTimeCount.cancel();
+        }
+
+
+    }
+
     private void registerWithPhone(final Activity activity){
         String code = et_user_code.getText().toString();
         final String account = et_user_phone.getText().toString();
@@ -165,11 +181,12 @@ public class UserPhoneLoginFragment extends BaseFragment {
 
 
 
+                YyrhSdkManager.defaultManager(SDKEntry.getSdkInstance().gameAct).saveUserLoginInfo(SDKEntry.getSdkInstance().gameAct,account,pwd,msg);
 
+                SDKEntry.getSdkInstance().adSdkCallback.onRegisterSuccess(account);
 
-                YyrhSdkManager.defaultManager(getActivity()).saveUserLoginInfo(getActivity(),account,pwd,msg);
+                getActivity().finish();
 
-                SDKEntry.getSdkInstance().adSdkCallback.onRegisterSuccess(account);
             }
 
             @Override
@@ -204,13 +221,13 @@ public class UserPhoneLoginFragment extends BaseFragment {
         btn_get_code.setEnabled(false);
         btn_get_code.setText("60s");
 
-        TimeCount time = new TimeCount(60000, 1000);
-        time.start();
+        codeVerifyTimeCount = new CodeVerifyTimeCount(60000, 1000);
+        codeVerifyTimeCount.start();
     }
 
-    class TimeCount extends CountDownTimer {
+    class CodeVerifyTimeCount extends CountDownTimer {
 
-        public TimeCount(long millisInFuture, long countDownInterval) {
+        public CodeVerifyTimeCount(long millisInFuture, long countDownInterval) {
             super(millisInFuture, countDownInterval);
             // TODO Auto-generated constructor stub
         }
@@ -256,8 +273,8 @@ public class UserPhoneLoginFragment extends BaseFragment {
         btn_reg_compete.setEnabled(false);
         btn_reg_compete.setText("3s");
         btn_reg_compete.setBackgroundResource(ResourceUtil.getDrawableId(getActivity(),"qj_login_button_grayed_style"));
-        RegTimeCount time = new RegTimeCount(3000, 1000);
-        time.start();
+        regTimeCount = new RegTimeCount(3000, 1000);
+        regTimeCount.start();
     }
 
     class RegTimeCount extends CountDownTimer {

+ 1 - 2
hnqj/src/main/java/com/yyrh/ui/fragment/UserRegisterFragment.java

@@ -18,7 +18,6 @@ import android.widget.EditText;
 import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.TextView;
-import android.widget.Toast;
 
 import com.yyrh.constant.SDKSettings;
 import com.yyrh.constant.URLConstants;
@@ -27,7 +26,7 @@ import com.yyrh.sdk.SDKEntry;
 import com.yyrh.sdk.YyrhSdkManager;
 import com.yyrh.sdk.callback.RegisterCallback;
 
-import com.yyrh.ui.floatmenu.WvPageListDialog;
+import com.yyrh.ui.WvPageListDialog;
 
 import com.yyrh.utils.ResourceUtil;
 import com.yyrh.utils.ScreenShotUtil;

+ 16 - 1
hnqj/src/main/java/com/yyrh/ui/fragment/UserRetrievePwdFragment.java

@@ -16,12 +16,17 @@ import android.widget.ImageButton;
 import android.widget.TextView;
 import android.widget.Toast;
 
+import com.yyrh.constant.SDKSettings;
+import com.yyrh.constant.URLConstants;
 import com.yyrh.networking.NetRequestApi;
+import com.yyrh.ui.WvPageListDialog;
 import com.yyrh.ui.userlist.DatabaseHelper;
 import com.yyrh.utils.ResourceUtil;
 import com.yyrh.utils.TosUtil;
 import com.yyrh.utils.Utils;
 
+import java.util.HashMap;
+
 public class UserRetrievePwdFragment extends BaseFragment {
 
     private EditText et_user_phone,et_user_code,et_user_pwd;
@@ -102,7 +107,17 @@ public class UserRetrievePwdFragment extends BaseFragment {
             replaceFragmentToActivity(getFragmentManager(),accountLoginFragment,ResourceUtil.getId(getActivity(),"qj_content"));
 
         }else if (id == ResourceUtil.getId(getActivity(), "tv_tip_2")) {
-            Toast.makeText(getActivity(), "这是客服",1).show();
+            if (!Utils.judgeStrNull(SDKSettings.UserCentUrl)){
+
+                HashMap<String,String> map = new HashMap<>();
+                map.put("game_code",SDKSettings.game_code);
+                map.put("gcp_code",SDKSettings.gcp_code);
+
+                String url  = Utils.getUserCententerUrl(URLConstants.CUSTOMER_SERVICE_URL,map);
+
+                new WvPageListDialog(getActivity(),ResourceUtil.getStyleId(getActivity(),"qj_half_black_dialog"),url).show();
+
+            }
         }
 
     }

+ 2 - 1
hnqj/src/main/java/com/yyrh/utils/SwitchUtil.java

@@ -61,8 +61,9 @@ public class SwitchUtil {
     }
 
     public  static void saveInitData(JSONArray data){
+
         if (data == null){
-            InitConfig.fristShowPage = "";
+
             YYLog.i("reg_tabs is null.");
 
         }else{

+ 4 - 0
hnqj/src/main/java/com/yythird/base/BaseSDK.java

@@ -11,6 +11,8 @@ import android.os.Bundle;
 import com.yyrh.constant.RoleInfo;
 import com.yyrh.utils.ResourceUtil;
 
+import org.json.JSONObject;
+
 import java.util.HashMap;
 
 public class BaseSDK {
@@ -68,7 +70,9 @@ public class BaseSDK {
 
     public void SDKUploadInfo(String type, Activity activity, RoleInfo roleInfo) {
     }
+    public void SDKReportAdInfo(String event, JSONObject json){
 
+    }
     public void SDKExit(Activity ac, final ChannelSdkCallback sdkCallback) {
         String tip = ac.getString(ResourceUtil.getStringId(ac, "qj_exit_tip"));
         String message = ac.getString(ResourceUtil.getStringId(ac, "qj_issure_exit"));

+ 4 - 2
hnqj/src/main/res/layout/qj_account_login.xml

@@ -62,7 +62,8 @@
             android:maxLines="1"
             android:paddingLeft="20dp"
             android:textColorHint="@color/qj_text_hint_color"
-            android:textSize="14dp" />
+            android:textSize="14dp"
+            android:textColor="@color/qj_text_black"/>
 
         <ImageView
             android:id="@+id/down_btn"
@@ -91,7 +92,8 @@
             android:maxLines="1"
             android:paddingLeft="20dp"
             android:textColorHint="@color/qj_text_hint_color"
-            android:textSize="14dp" />
+            android:textSize="14dp"
+            android:textColor="@color/qj_text_black"/>
 
         <ImageView
             android:id="@+id/iv_show_pwd"

+ 2 - 1
hnqj/src/main/res/layout/qj_edittext_style.xml

@@ -30,7 +30,8 @@ android:layout_height="wrap_content"
         android:maxLength="20"
         android:maxLines="1"
         android:textColorHint="@color/qj_text_hint_color"
-        android:textSize="16dp" />
+        android:textSize="16dp"
+        android:textColor="@color/qj_text_black"/>
     <Button
         android:layout_toRightOf="@+id/et_input"
         android:id="@+id/btn_right_view"

+ 2 - 1
hnqj/src/main/res/layout/qj_phone_login.xml

@@ -52,6 +52,7 @@
             android:maxLength="20"
             android:digits="0123456789"
             android:layout_centerHorizontal="true"
+            android:textColor="@color/qj_text_black"
             />
         <EditText
             android:id="@+id/et_user_code"
@@ -69,7 +70,7 @@
             android:digits="0123456789"
             android:layout_below="@id/et_user_phone"
             android:layout_alignLeft="@id/et_user_phone"
-
+            android:textColor="@color/qj_text_black"
             />
 
         <View

+ 3 - 1
hnqj/src/main/res/layout/qj_register_dialog.xml

@@ -63,7 +63,8 @@
             android:maxLines="1"
             android:paddingLeft="20dp"
             android:textColorHint="@color/qj_text_hint_color"
-            android:textSize="14dp" />
+            android:textSize="14dp"
+            android:textColor="@color/qj_text_black"/>
 
         <ImageView
             android:id="@+id/iv_clear_text"
@@ -92,6 +93,7 @@
             android:textSize="14dp"
             android:layout_marginTop="10dp"
             android:gravity="center_vertical"
+            android:textColor="@color/qj_text_black"
             />
 
         <ImageView

+ 3 - 0
hnqj/src/main/res/layout/qj_retrieve_pwd.xml

@@ -58,6 +58,7 @@
             android:maxLength="20"
             android:digits="0123456789"
             android:layout_centerHorizontal="true"
+            android:textColor="@color/qj_text_black"
             />
         <EditText
             android:id="@+id/et_user_code"
@@ -75,6 +76,7 @@
             android:digits="0123456789"
             android:layout_below="@id/et_user_phone"
             android:layout_alignLeft="@id/et_user_phone"
+            android:textColor="@color/qj_text_black"
 
             />
 
@@ -120,6 +122,7 @@
             android:layout_below="@id/et_user_code"
             android:layout_alignLeft="@id/et_user_code"
             android:inputType="textPassword"
+            android:textColor="@color/qj_text_black"
             />
 
         <Button

+ 7 - 11
hnqj/src/main/res/layout/qj_webview_common_dialog.xml

@@ -18,12 +18,8 @@
             android:id="@+id/wb_user_info"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_marginTop="10dp"
-            android:layout_marginLeft="2dp"
-            android:layout_marginRight="2dp"
-            android:layout_marginBottom="10dp"
-            android:background="@color/qj_transparent"
             android:layout_gravity="center"
+            android:background="@drawable/qj_common_wv_bg"
             />
 
 
@@ -35,14 +31,14 @@
             android:background="@mipmap/qj_loading"/>
         <ImageView
             android:id="@+id/close_btn"
-            android:layout_width="16dp"
-            android:layout_height="16dp"
-            android:layout_margin="20dp"
-            android:background="@mipmap/qj_close"
+            android:layout_width="28dp"
+            android:layout_height="28dp"
+
+            android:src="@mipmap/qj_close"
             android:layout_alignParentRight="true"
-            android:layout_marginRight="5dp"
+            android:layout_marginRight="15dp"
             android:layout_marginTop="15dp"
-            android:padding="10dp"
+            android:padding="6dp"
             />
     </RelativeLayout>
 

+ 18 - 0
hnqj/src/main/res/values/styles.xml

@@ -36,9 +36,27 @@
     <item name="android:windowCloseOnTouchOutside">false</item>
     <item name="android:windowFullscreen">true</item>
 
+
     <!-- 模糊 -->
     </style>
 
+    <style name="qj_half_black_dialog" parent="@android:style/Theme.Dialog">
+    <item name="android:windowFrame">@null</item>
+    <!-- 边框 -->
+    <item name="android:windowIsFloating">true</item>
+    <!-- 是否浮现在activity之上 -->
+    <item name="android:windowIsTranslucent">false</item>
+    <!-- 半透明 -->
+    <item name="android:windowNoTitle">true</item>
+    <!-- 无标题 -->
+    <item name="android:windowBackground">@color/qj_transparent</item>
+    <!-- 背景透明 -->
+    <item name="android:backgroundDimEnabled">true</item>
+    <item name="android:windowCloseOnTouchOutside">false</item>
+    <item name="android:windowFullscreen">true</item>
+    </style>
+
+
     <style name="qj_auto_login_dialog" parent="@android:style/Theme.Dialog">
 
         <item name="android:windowFrame">@null</item>