zeki 5 anni fa
parent
commit
026baf0431
22 ha cambiato i file con 169 aggiunte e 82 eliminazioni
  1. 5 7
      app/src/developSheeptest/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java
  2. 9 1
      app/src/main/AndroidManifest.xml
  3. 0 1
      app/src/main/java/com/sheep/gamegroup/model/entity/MiniPayResult.java
  4. 2 1
      app/src/main/java/com/sheep/gamegroup/module/guide/NewbieGuideHelper.java
  5. 9 1
      app/src/main/java/com/sheep/gamegroup/module/home/fragment/FgtMainHeader.java
  6. 0 6
      app/src/main/java/com/sheep/gamegroup/module/login/ChangePasswordAct.java
  7. 7 1
      app/src/main/java/com/sheep/gamegroup/module/login/fragments/SignInFgt.java
  8. 14 11
      app/src/main/java/com/sheep/gamegroup/module/login/fragments/SignUpFgt.java
  9. 3 11
      app/src/main/java/com/sheep/gamegroup/module/pay/activity/SheepWXPayEntryActivity.java
  10. 2 1
      app/src/main/java/com/sheep/gamegroup/module/webview/fragment/FgtWebX5.java
  11. 1 0
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  12. 8 7
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  13. 26 0
      app/src/main/java/com/sheep/gamegroup/util/ProcessEventBroadCastReceiver.java
  14. 25 0
      app/src/main/java/com/sheep/gamegroup/util/ProcessEventBusUtil.java
  15. 1 0
      app/src/main/java/com/sheep/gamegroup/util/js/KFZSJs.java
  16. 1 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/wxutil/WXAPIUtil.java
  17. 9 5
      app/src/main/res/layout/fragment_edit_user_info.xml
  18. 13 9
      app/src/main/res/layout/fragment_sign_in.xml
  19. 30 11
      app/src/main/res/layout/fragment_sign_up.xml
  20. 1 1
      app/src/main/res/layout/newbie_guide_2_3.xml
  21. BIN
      app/src/main/res/mipmap/guide_1_2.png
  22. 3 8
      app/src/sheep/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java

+ 5 - 7
app/src/developSheeptest/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java

@@ -7,10 +7,7 @@ import android.util.Log;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.sheep.gamegroup.event.WXLoginAuthEvent;
 import com.sheep.gamegroup.event.WXLoginAuthEvent;
 import com.sheep.gamegroup.model.entity.MiniPayResult;
 import com.sheep.gamegroup.model.entity.MiniPayResult;
-import com.sheep.gamegroup.util.ApiJSONUtil;
-import com.sheep.gamegroup.util.Jump2View;
-import com.sheep.gamegroup.util.LogUtil;
-import com.sheep.gamegroup.util.QQUtil;
+import com.sheep.gamegroup.util.*;
 import com.sheep.jiuyan.samllsheep.Config;
 import com.sheep.jiuyan.samllsheep.Config;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.tencent.mm.opensdk.modelbase.BaseReq;
 import com.tencent.mm.opensdk.modelbase.BaseReq;
@@ -55,9 +52,9 @@ public class WXEntryActivity extends WXCallbackActivity {//implements IWXAPIEven
         if (resp instanceof SendAuth.Resp) {
         if (resp instanceof SendAuth.Resp) {
             if (resp.errCode == BaseResp.ErrCode.ERR_OK) {
             if (resp.errCode == BaseResp.ErrCode.ERR_OK) {
                 String code = ((SendAuth.Resp) resp).code;
                 String code = ((SendAuth.Resp) resp).code;
-                EventBus.getDefault().post(new WXLoginAuthEvent(code));
+                  ProcessEventBusUtil.postEvent(this, new WXLoginAuthEvent(code));
             } else {
             } else {
-                EventBus.getDefault().post(new WXLoginAuthEvent(null));
+                ProcessEventBusUtil.postEvent(this, new WXLoginAuthEvent(null));
             }
             }
         } else if (resp instanceof WXLaunchMiniProgram.Resp) {
         } else if (resp instanceof WXLaunchMiniProgram.Resp) {
             WXLaunchMiniProgram.Resp miniResp = (WXLaunchMiniProgram.Resp) resp;
             WXLaunchMiniProgram.Resp miniResp = (WXLaunchMiniProgram.Resp) resp;
@@ -73,7 +70,8 @@ public class WXEntryActivity extends WXCallbackActivity {//implements IWXAPIEven
                 code = "9001";
                 code = "9001";
                 pr.errCode = 1;
                 pr.errCode = 1;
             }
             }
-            EventBus.getDefault().post(pr);
+            ProcessEventBusUtil.postEvent(this, pr);
+            //EventBus.getDefault().post(pr);
             String frompackage = QQUtil.getWxPayFrom(SheepApp.getInstance(), result.prepayId);
             String frompackage = QQUtil.getWxPayFrom(SheepApp.getInstance(), result.prepayId);
             String outorderno = QQUtil.getWxPayOrderNo(SheepApp.getInstance(), result.prepayId);
             String outorderno = QQUtil.getWxPayOrderNo(SheepApp.getInstance(), result.prepayId);
             int fromorient = QQUtil.getWxPayOrient(SheepApp.getInstance(), result.prepayId);
             int fromorient = QQUtil.getWxPayOrient(SheepApp.getInstance(), result.prepayId);

+ 9 - 1
app/src/main/AndroidManifest.xml

@@ -104,6 +104,15 @@
                 android:name=".wxutil.WXUmengEntryActivity"
                 android:name=".wxutil.WXUmengEntryActivity"
                 android:exported="true"
                 android:exported="true"
                 android:launchMode="singleTop"/>
                 android:launchMode="singleTop"/>
+
+        <receiver android:name="com.sheep.gamegroup.util.ProcessEventBroadCastReceiver" android:enabled="true" android:exported="true">
+            <intent-filter>
+                <action android:name="flag">
+
+                </action>
+            </intent-filter>
+        </receiver>
+
         <activity
         <activity
                 android:name=".wxapi.WXEntryActivity"
                 android:name=".wxapi.WXEntryActivity"
                 android:configChanges="keyboardHidden|navigation|orientation|screenSize"
                 android:configChanges="keyboardHidden|navigation|orientation|screenSize"
@@ -464,7 +473,6 @@
                 android:name="com.sheep.gamegroup.view.activity.ActWebX5NewProcess"
                 android:name="com.sheep.gamegroup.view.activity.ActWebX5NewProcess"
                 android:configChanges="orientation|screenSize"
                 android:configChanges="orientation|screenSize"
                 android:exported="true"
                 android:exported="true"
-                android:process=":webProcess"
                 android:screenOrientation="portrait"
                 android:screenOrientation="portrait"
                 android:theme="@style/AppActionTheme"/>
                 android:theme="@style/AppActionTheme"/>
 
 

+ 0 - 1
app/src/main/java/com/sheep/gamegroup/model/entity/MiniPayResult.java

@@ -1,7 +1,6 @@
 package com.sheep.gamegroup.model.entity;
 package com.sheep.gamegroup.model.entity;
 
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
-import com.sheep.jiuyan.samllsheep.wxapi.WXEntryActivity;
 
 
 public class MiniPayResult {
 public class MiniPayResult {
     public String payResult;
     public String payResult;

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/module/guide/NewbieGuideHelper.java

@@ -154,7 +154,8 @@ public class NewbieGuideHelper {
             }
             }
         };
         };
         return GuidePage.newInstance()//创建一个实例
         return GuidePage.newInstance()//创建一个实例
-                .addHighLightWithOptions(ActMain.tabBtn1.get(), HighLight.Shape.CIRCLE, new HighlightOptions.Builder().setRelativeGuide(relativeGuide3).useMaxSize(false).build())
+                .addHighLightWithOptions(FgtMainHeader.faceRef.get(), HighLight.Shape.CIRCLE, new HighlightOptions.Builder().setRelativeGuide(relativeGuide3).useMaxSize(true).build())
+                .setLayoutRes(R.layout.newbie_guide_2_3)
                 //.addHighLightWithOptions(FgtMainHeader.msgRef.get(), HighLight.Shape.CIRCLE, new HighlightOptions.Builder().setRelativeGuide(relativeGuide2).useMaxSize(true).build())
                 //.addHighLightWithOptions(FgtMainHeader.msgRef.get(), HighLight.Shape.CIRCLE, new HighlightOptions.Builder().setRelativeGuide(relativeGuide2).useMaxSize(true).build())
                 //.addHighLightWithOptions(FgtHome.newsRef.get(), HighLight.Shape.OVAL, new HighlightOptions.Builder().setRelativeGuide(relativeGuide1).useMaxSize(false).setOffsetLeft(0.2f).setOffsetWidth(0.6f).build())
                 //.addHighLightWithOptions(FgtHome.newsRef.get(), HighLight.Shape.OVAL, new HighlightOptions.Builder().setRelativeGuide(relativeGuide1).useMaxSize(false).setOffsetLeft(0.2f).setOffsetWidth(0.6f).build())
                 .setEnterAnimation(enterAnimation)//进入动画
                 .setEnterAnimation(enterAnimation)//进入动画

+ 9 - 1
app/src/main/java/com/sheep/gamegroup/module/home/fragment/FgtMainHeader.java

@@ -29,9 +29,11 @@ import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.Subscribe;
 import org.greenrobot.eventbus.Subscribe;
+
 import java.lang.ref.WeakReference;
 import java.lang.ref.WeakReference;
 import java.util.List;
 import java.util.List;
 import java.util.Locale;
 import java.util.Locale;
+
 import butterknife.BindView;
 import butterknife.BindView;
 import butterknife.OnClick;
 import butterknife.OnClick;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.android.schedulers.AndroidSchedulers;
@@ -63,6 +65,7 @@ public class FgtMainHeader extends BaseFragment {
 
 
     public static WeakReference<View> downloadRef;
     public static WeakReference<View> downloadRef;
     public static WeakReference<View> msgRef;
     public static WeakReference<View> msgRef;
+    public static WeakReference<View> menuBtn;
     TextView tv_msg_count;
     TextView tv_msg_count;
     TextView tv_download_count;
     TextView tv_download_count;
 
 
@@ -129,7 +132,11 @@ public class FgtMainHeader extends BaseFragment {
                 iv_flag_vip.setImageResource(R.mipmap.level_vip_un);
                 iv_flag_vip.setImageResource(R.mipmap.level_vip_un);
             }
             }
         }
         }
-        ViewUtil.setText(tv_nickname, user.getNickname());
+        String s = user.getNickname();
+        if (s == null)
+            ViewUtil.setText(tv_nickname, "昵称");
+        else
+            ViewUtil.setText(tv_nickname, s);
     }
     }
 
 
 
 
@@ -236,6 +243,7 @@ public class FgtMainHeader extends BaseFragment {
         tv_download_count = menuContentView.findViewById(R.id.tv_download_count);
         tv_download_count = menuContentView.findViewById(R.id.tv_download_count);
         msgRef = new WeakReference<>(tv_msg_count);
         msgRef = new WeakReference<>(tv_msg_count);
         downloadRef = new WeakReference<>(tv_download_count);
         downloadRef = new WeakReference<>(tv_download_count);
+        menuBtn = new WeakReference<>(iv_menu);
         menuContentView.findViewById(R.id.cl_message).setOnClickListener(v -> {
         menuContentView.findViewById(R.id.cl_message).setOnClickListener(v -> {
             onMsgClick();
             onMsgClick();
         });
         });

+ 0 - 6
app/src/main/java/com/sheep/gamegroup/module/login/ChangePasswordAct.java

@@ -1,13 +1,10 @@
 package com.sheep.gamegroup.module.login;
 package com.sheep.gamegroup.module.login;
 
 
-import android.app.Activity;
 import android.content.Context;
 import android.content.Context;
 import android.content.Intent;
 import android.content.Intent;
-import android.os.Bundle;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentTransaction;
 import android.support.v4.app.FragmentTransaction;
 import android.text.TextUtils;
 import android.text.TextUtils;
-
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.BaseMessage;
@@ -19,15 +16,12 @@ import com.sheep.gamegroup.module.login.fragments.Captcha4ForgetFgt;
 import com.sheep.gamegroup.module.login.fragments.NewPasswordFgt;
 import com.sheep.gamegroup.module.login.fragments.NewPasswordFgt;
 import com.sheep.gamegroup.module.login.fragments.NoPhoneTipFgt;
 import com.sheep.gamegroup.module.login.fragments.NoPhoneTipFgt;
 import com.sheep.gamegroup.module.login.fragments.OldPasswordFgt;
 import com.sheep.gamegroup.module.login.fragments.OldPasswordFgt;
-import com.sheep.gamegroup.module.login.fragments.SignInFgt;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
-
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.schedulers.Schedulers;
 import io.reactivex.schedulers.Schedulers;
 
 

+ 7 - 1
app/src/main/java/com/sheep/gamegroup/module/login/fragments/SignInFgt.java

@@ -77,7 +77,6 @@ public class SignInFgt extends AbsLoginFgt {
     TextView verifyBox;
     TextView verifyBox;
     @BindView(R.id.captcha_code_view)
     @BindView(R.id.captcha_code_view)
     ImageView verifyImageView;
     ImageView verifyImageView;
-
     @BindView(R.id.cb_remember_pwd)
     @BindView(R.id.cb_remember_pwd)
     CheckBox cbRememberPwd;
     CheckBox cbRememberPwd;
 
 
@@ -339,6 +338,13 @@ public class SignInFgt extends AbsLoginFgt {
     }
     }
 
 
     public void doToggleLoginType(boolean flag) {
     public void doToggleLoginType(boolean flag) {
+        if(flag){
+            //手机号
+            cbRememberPwd.setVisibility(View.GONE);
+        }else {
+            //账号
+            cbRememberPwd.setVisibility(View.VISIBLE);
+        }
         loginTypeToggle.setSelected(flag);
         loginTypeToggle.setSelected(flag);
         loginTypeToggleText.setText(flag ? "账号" : "手机号");
         loginTypeToggleText.setText(flag ? "账号" : "手机号");
         loginTypeToggleIcon.setImageResource(flag ? R.drawable.zhanghao : R.drawable.shouji);
         loginTypeToggleIcon.setImageResource(flag ? R.drawable.zhanghao : R.drawable.shouji);

+ 14 - 11
app/src/main/java/com/sheep/gamegroup/module/login/fragments/SignUpFgt.java

@@ -6,6 +6,7 @@ import android.support.v4.app.Fragment;
 import android.text.TextUtils;
 import android.text.TextUtils;
 import android.text.method.HideReturnsTransformationMethod;
 import android.text.method.HideReturnsTransformationMethod;
 import android.text.method.PasswordTransformationMethod;
 import android.text.method.PasswordTransformationMethod;
+import android.view.KeyEvent;
 import android.view.View;
 import android.view.View;
 import android.widget.CheckBox;
 import android.widget.CheckBox;
 import android.widget.EditText;
 import android.widget.EditText;
@@ -16,12 +17,7 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.LoginEntity;
 import com.sheep.gamegroup.model.entity.LoginEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.module.login.controller.LoginController;
 import com.sheep.gamegroup.module.login.controller.LoginController;
-import com.sheep.gamegroup.util.ChannelContent;
-import com.sheep.gamegroup.util.DataUtil;
-import com.sheep.gamegroup.util.Jump2View;
-import com.sheep.gamegroup.util.PreferenceUtils;
-import com.sheep.gamegroup.util.StringUtils;
-import com.sheep.gamegroup.util.UMConfigUtils;
+import com.sheep.gamegroup.util.*;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
@@ -33,6 +29,8 @@ import butterknife.OnClick;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.schedulers.Schedulers;
 import io.reactivex.schedulers.Schedulers;
 
 
+import static com.sheep.gamegroup.module.login.controller.LoginController.PLATFORM_PHONE;
+
 /**
 /**
  * A simple {@link Fragment} subclass.
  * A simple {@link Fragment} subclass.
  */
  */
@@ -64,13 +62,14 @@ public class SignUpFgt extends AbsLoginFgt {
     TextView registerToggleText;
     TextView registerToggleText;
     @BindView(R.id.tv_login_title)
     @BindView(R.id.tv_login_title)
     TextView tvLoginTitle;
     TextView tvLoginTitle;
-
+    @BindView(R.id.back_login_btn)
+    TextView tvBackLogin;
 
 
     //用户协议
     //用户协议
     @BindView(R.id.tel_agreement_cb)
     @BindView(R.id.tel_agreement_cb)
     CheckBox tel_agreement_cb;
     CheckBox tel_agreement_cb;
 
 
-    private int registerType = LoginController.PLATFORM_PHONE;
+    private int registerType = PLATFORM_PHONE;
 
 
     public SignUpFgt() {
     public SignUpFgt() {
         // Required empty public constructor
         // Required empty public constructor
@@ -104,6 +103,10 @@ public class SignUpFgt extends AbsLoginFgt {
             tvLoginTitle.setText("手机号注册");
             tvLoginTitle.setText("手机号注册");
             registerToggleIcon.setImageResource(R.drawable.zhanghao);
             registerToggleIcon.setImageResource(R.drawable.zhanghao);
         }
         }
+        tvBackLogin.setOnClickListener(v -> {
+            KeyEventUtil.sendKeyDownUp(KeyEvent.KEYCODE_BACK);
+            //mController.whenToLogin(PLATFORM_PHONE);
+        });
     }
     }
 
 
     @OnClick(R.id.show_hide_pwd_btn)
     @OnClick(R.id.show_hide_pwd_btn)
@@ -166,7 +169,7 @@ public class SignUpFgt extends AbsLoginFgt {
 
 
     @OnClick(R.id.login_type_toggle)
     @OnClick(R.id.login_type_toggle)
     public void doToggleLoginType(View view) {
     public void doToggleLoginType(View view) {
-        registerType = registerType == LoginController.PLATFORM_ACCOUNT ? LoginController.PLATFORM_PHONE : LoginController.PLATFORM_ACCOUNT;
+        registerType = registerType == LoginController.PLATFORM_ACCOUNT ? PLATFORM_PHONE : LoginController.PLATFORM_ACCOUNT;
         onViewCreated();
         onViewCreated();
     }
     }
 
 
@@ -174,7 +177,7 @@ public class SignUpFgt extends AbsLoginFgt {
     public void doRegister(View v) {
     public void doRegister(View v) {
         if (registerType == LoginController.PLATFORM_ACCOUNT) {
         if (registerType == LoginController.PLATFORM_ACCOUNT) {
             registerAccount();
             registerAccount();
-        } else if (registerType == LoginController.PLATFORM_PHONE) {
+        } else if (registerType == PLATFORM_PHONE) {
             registerPhone();
             registerPhone();
         }
         }
     }
     }
@@ -214,7 +217,7 @@ public class SignUpFgt extends AbsLoginFgt {
                                 SpUtils.saveToken(SheepApp.getInstance(), loginEty.getToken());
                                 SpUtils.saveToken(SheepApp.getInstance(), loginEty.getToken());
                                 DataUtil.getInstance().initUserEntity(loginEty.getUser());
                                 DataUtil.getInstance().initUserEntity(loginEty.getUser());
                             }
                             }
-                            mController.whenLoginSuccess(LoginController.PLATFORM_PHONE, loginEty);
+                            mController.whenLoginSuccess(PLATFORM_PHONE, loginEty);
                         }
                         }
                     }
                     }
                 });
                 });

+ 3 - 11
app/src/main/java/com/sheep/gamegroup/module/pay/activity/SheepWXPayEntryActivity.java

@@ -2,23 +2,14 @@ package com.sheep.gamegroup.module.pay.activity;
 
 
 import android.app.Activity;
 import android.app.Activity;
 import android.content.Intent;
 import android.content.Intent;
-import android.net.Uri;
 import android.os.Bundle;
 import android.os.Bundle;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.sheep.gamegroup.util.ApiJSONUtil;
-import com.sheep.gamegroup.util.Jump2View;
-import com.sheep.gamegroup.util.LogUtil;
-import com.sheep.gamegroup.util.QQUtil;
-import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.gamegroup.util.*;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.tencent.mm.opensdk.constants.ConstantsAPI;
 import com.tencent.mm.opensdk.constants.ConstantsAPI;
 import com.tencent.mm.opensdk.modelbase.BaseReq;
 import com.tencent.mm.opensdk.modelbase.BaseReq;
 import com.tencent.mm.opensdk.modelbase.BaseResp;
 import com.tencent.mm.opensdk.modelbase.BaseResp;
 import com.tencent.mm.opensdk.modelpay.PayResp;
 import com.tencent.mm.opensdk.modelpay.PayResp;
 import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
 import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
-
 import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.EventBus;
 
 
 /**
 /**
@@ -78,8 +69,9 @@ public abstract class SheepWXPayEntryActivity extends Activity implements IWXAPI
             }
             }
             result = String.valueOf(resp.errCode + 9000);//"9000" 代表支付成功
             result = String.valueOf(resp.errCode + 9000);//"9000" 代表支付成功
         }
         }
-
+        //ProcessEventBusUtil.postEvent(this,resp);
         EventBus.getDefault().post(resp);
         EventBus.getDefault().post(resp);
+
         PayResp payResp = (PayResp) resp;
         PayResp payResp = (PayResp) resp;
         String frompackage = QQUtil.getWxPayFrom(SheepApp.getInstance(), payResp.prepayId);
         String frompackage = QQUtil.getWxPayFrom(SheepApp.getInstance(), payResp.prepayId);
         String outorderno = QQUtil.getWxPayOrderNo(SheepApp.getInstance(), payResp.prepayId);
         String outorderno = QQUtil.getWxPayOrderNo(SheepApp.getInstance(), payResp.prepayId);

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/module/webview/fragment/FgtWebX5.java

@@ -417,7 +417,8 @@ public class FgtWebX5 extends BaseFgtWebX5 {
             @Override
             @Override
             public WebResourceResponse shouldInterceptRequest(WebView webView, String s) {
             public WebResourceResponse shouldInterceptRequest(WebView webView, String s) {
                 if (url.contains("h5.qzone.qq.com")) {
                 if (url.contains("h5.qzone.qq.com")) {
-                    if (s.equals("https://qzonestyle.gtimg.cn/qz-proj/qz-common/img/m-error/pic-error.png")) {
+                    if (s.equals("https://qzonestyle.gtimg.cn/qz-proj/qz-common/img/m-error/pic-error.png") || s.equals("https://qzonestyle.gtimg.cn/qz-proj/qz-common/page-error.css")) {
+                        //鱼死网破
                         needWxLogin = true;
                         needWxLogin = true;
                         kfzsJs.loginThirdPartApp("wx");
                         kfzsJs.loginThirdPartApp("wx");
                     }
                     }

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -1257,6 +1257,7 @@ public class CommonUtil {
                                                 context,
                                                 context,
                                                 null);
                                                 null);
                             } else {
                             } else {
+
                                 EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.ONFRESH_GAMETASK_ORDER_LIST_PAGE));
                                 EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.ONFRESH_GAMETASK_ORDER_LIST_PAGE));
                                 G.showToast("充值成功!");
                                 G.showToast("充值成功!");
                             }
                             }

+ 8 - 7
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -184,15 +184,17 @@ public class Jump2View {
         SheepApp.getInstance().clearGameAuthData();
         SheepApp.getInstance().clearGameAuthData();
         Intent intent = new Intent(context, LoginAct.class);
         Intent intent = new Intent(context, LoginAct.class);
         intent.putExtra("where_from", from);
         intent.putExtra("where_from", from);
-        if (!(context instanceof Activity)) {
-            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
+        /*if (!(context instanceof Activity)) {
+
         } else if (!TextUtils.isEmpty(from)) {
         } else if (!TextUtils.isEmpty(from)) {
             try {
             try {
                 ((Activity) context).finish();
                 ((Activity) context).finish();
             } catch (Exception e) {
             } catch (Exception e) {
                 e.printStackTrace();
                 e.printStackTrace();
             }
             }
-        }
+        }*/
         context.startActivity(intent);
         context.startActivity(intent);
     }
     }
 
 
@@ -961,13 +963,12 @@ public class Jump2View {
             return;
             return;
         }
         }
         Intent intent;
         Intent intent;
-        intent = new Intent(context, ActWebX5.class);
-        /*if (SheepApp.getInstance().shouldOpenWebInNewProcess) {
-            //
+        //intent = new Intent(context, ActWebX5.class);
+        if (SheepApp.getInstance().shouldOpenWebInNewProcess) {
             intent = new Intent(context, ActWebX5NewProcess.class);
             intent = new Intent(context, ActWebX5NewProcess.class);
         } else {
         } else {
             intent = new Intent(context, ActWebX5.class);
             intent = new Intent(context, ActWebX5.class);
-        }*/
+        }
 
 
         intent.putExtra(WebParams.class.getSimpleName(), webParams);
         intent.putExtra(WebParams.class.getSimpleName(), webParams);
         if (needNewTask) {
         if (needNewTask) {

+ 26 - 0
app/src/main/java/com/sheep/gamegroup/util/ProcessEventBroadCastReceiver.java

@@ -0,0 +1,26 @@
+package com.sheep.gamegroup.util;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+import com.sheep.jiuyan.samllsheep.utils.G;
+import org.greenrobot.eventbus.EventBus;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class ProcessEventBroadCastReceiver extends BroadcastReceiver {
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        String eventJson = intent.getStringExtra("eventJson");
+        G.showToast("~~~~~收到广播,json:" + eventJson);
+        try {
+            Object event = new JSONObject(eventJson);
+            EventBus.getDefault().post(event);
+            G.showToast("发送了事件");
+        } catch (JSONException e) {
+            e.printStackTrace();
+            G.showToast("error" + e.getMessage());
+        }
+    }
+}

+ 25 - 0
app/src/main/java/com/sheep/gamegroup/util/ProcessEventBusUtil.java

@@ -0,0 +1,25 @@
+package com.sheep.gamegroup.util;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+
+/**
+ * 使用广播解决EventBus不能跨进程通讯的问题
+ */
+public class ProcessEventBusUtil {
+    public static void postEvent(Context context, Object event) {
+        Log.d("!!!", "开始发送事件");
+        /*//是主进程,直接发送EventBus事件
+        EventBus.getDefault().post(event);*/
+
+        //不是在主进程,使用跨进程广播
+        Intent intent = new Intent();
+        intent.putExtra("eventJson", GsonUtils.getGlobalGson().toJson(event));
+        intent.setAction("flag");
+        intent.setComponent(new ComponentName(context.getPackageName(), ProcessEventBroadCastReceiver.class.getName()));
+        context.sendBroadcast(intent);
+
+    }
+}

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/util/js/KFZSJs.java

@@ -919,6 +919,7 @@ public class KFZSJs {
 
 
     @Subscribe
     @Subscribe
     public void whenWXAuth(WXLoginAuthEvent ev) {
     public void whenWXAuth(WXLoginAuthEvent ev) {
+        G.showToast("收到了微信登录后的事件"+ev.code);
         EventBus.getDefault().unregister(this);
         EventBus.getDefault().unregister(this);
         if (!TextUtils.isEmpty(ev.code)) {
         if (!TextUtils.isEmpty(ev.code)) {
             WXAPIUtil.loadWXUserToken(ev.code, (ret, openid, accessToken, refreshToken) -> {
             WXAPIUtil.loadWXUserToken(ev.code, (ret, openid, accessToken, refreshToken) -> {

+ 1 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/wxutil/WXAPIUtil.java

@@ -20,6 +20,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Map;
 
 
 import okhttp3.Call;
 import okhttp3.Call;
+import org.greenrobot.eventbus.EventBus;
 
 
 public class WXAPIUtil {
 public class WXAPIUtil {
 
 

+ 9 - 5
app/src/main/res/layout/fragment_edit_user_info.xml

@@ -3,14 +3,12 @@
               android:layout_width="match_parent"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:layout_height="match_parent"
               android:gravity="center_horizontal"
               android:gravity="center_horizontal"
-              android:orientation="vertical"
-              android:fitsSystemWindows="true"
-              android:padding="@dimen/content_padding_24">
+              android:orientation="vertical">
 
 
     <TextView
     <TextView
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="8dp"
+            android:layout_marginTop="32dp"
             android:textSize="18dp"
             android:textSize="18dp"
             android:textColor="@color/black"
             android:textColor="@color/black"
             android:text="登录小绵羊"/>
             android:text="登录小绵羊"/>
@@ -35,9 +33,10 @@
             android:layout_width="match_parent"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:textSize="16dp"
             android:textSize="16dp"
-            style="@style/login_edit_style"
             android:background="@drawable/selector_login_edit_text"
             android:background="@drawable/selector_login_edit_text"
             android:layout_marginTop="56dp"
             android:layout_marginTop="56dp"
+            android:layout_marginStart="24dp"
+            android:layout_marginEnd="24dp"
             android:paddingStart="24dp"
             android:paddingStart="24dp"
             android:paddingEnd="24dp"
             android:paddingEnd="24dp"
             android:paddingTop="16dp"
             android:paddingTop="16dp"
@@ -51,6 +50,8 @@
             android:layout_width="match_parent"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:textSize="16dp"
             android:textSize="16dp"
+            android:layout_marginStart="24dp"
+            android:layout_marginEnd="24dp"
             android:paddingStart="24dp"
             android:paddingStart="24dp"
             android:paddingEnd="24dp"
             android:paddingEnd="24dp"
             android:paddingTop="16dp"
             android:paddingTop="16dp"
@@ -99,6 +100,8 @@
             android:id="@+id/submit_btn"
             android:id="@+id/submit_btn"
             android:text="下一步"
             android:text="下一步"
             android:layout_marginTop="56dp"
             android:layout_marginTop="56dp"
+            android:layout_marginStart="24dp"
+            android:layout_marginEnd="24dp"
             style="@style/login_theme_round_button"/>
             style="@style/login_theme_round_button"/>
 
 
     <Space
     <Space
@@ -109,6 +112,7 @@
     <LinearLayout
     <LinearLayout
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
+android:layout_marginBottom="24dp"
             android:orientation="horizontal">
             android:orientation="horizontal">
 
 
         <TextView
         <TextView

+ 13 - 9
app/src/main/res/layout/fragment_sign_in.xml

@@ -34,7 +34,7 @@
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:textColor="@color/white"
             android:textColor="@color/white"
-            android:layout_marginTop="12dp"
+            android:layout_marginTop="4dp"
             android:textSize="17dp"
             android:textSize="17dp"
             android:text="小绵羊"
             android:text="小绵羊"
             app:layout_constraintEnd_toEndOf="@+id/cardView"
             app:layout_constraintEnd_toEndOf="@+id/cardView"
@@ -56,6 +56,7 @@
         <LinearLayout
         <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
+                android:layout_marginTop="16dp"
                 android:orientation="vertical">
                 android:orientation="vertical">
 
 
             <android.support.constraint.ConstraintLayout
             <android.support.constraint.ConstraintLayout
@@ -185,8 +186,8 @@
                         android:hint="请输入手机号"
                         android:hint="请输入手机号"
                         android:layout_width="match_parent"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_marginStart="26dp"
-                        android:layout_marginEnd="26dp"
+                        android:layout_marginStart="24dp"
+                        android:layout_marginEnd="24dp"
                         android:paddingStart="28dp"
                         android:paddingStart="28dp"
                         android:paddingEnd="28dp"
                         android:paddingEnd="28dp"
                         android:paddingTop="21dp"
                         android:paddingTop="21dp"
@@ -203,8 +204,8 @@
                         style="@style/login_edit_style"
                         style="@style/login_edit_style"
                         android:layout_width="match_parent"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_marginStart="26dp"
-                        android:layout_marginEnd="26dp"
+                        android:layout_marginStart="24dp"
+                        android:layout_marginEnd="24dp"
                         android:layout_marginBottom="16dp"
                         android:layout_marginBottom="16dp"
                         android:paddingStart="28dp"
                         android:paddingStart="28dp"
                         android:paddingEnd="28dp"
                         android:paddingEnd="28dp"
@@ -221,6 +222,7 @@
                         android:id="@+id/send_captcha_btn"
                         android:id="@+id/send_captcha_btn"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
+                        android:layout_marginEnd="12dp"
                         android:text="获取验证码"
                         android:text="获取验证码"
                         android:background="@null"
                         android:background="@null"
                         android:textColor="#4266B2"
                         android:textColor="#4266B2"
@@ -247,7 +249,7 @@
                         android:layout_marginStart="6dp"
                         android:layout_marginStart="6dp"
                         android:checked="true"
                         android:checked="true"
                         android:text="  记住密码"
                         android:text="  记住密码"
-                        android:textSize="15dp"
+                        android:textSize="12dp"
                         android:textColor="#4266B2"
                         android:textColor="#4266B2"
                         android:button="@drawable/drawable_selector_check"/>
                         android:button="@drawable/drawable_selector_check"/>
 
 
@@ -260,7 +262,7 @@
                         android:text="登录遇到问题?"
                         android:text="登录遇到问题?"
                         android:layout_gravity="end"
                         android:layout_gravity="end"
                         android:textColor="#4266B2"
                         android:textColor="#4266B2"
-                        android:textSize="15dp"/>
+                        android:textSize="12dp"/>
 
 
             </LinearLayout>
             </LinearLayout>
 
 
@@ -273,6 +275,7 @@
                     android:layout_marginBottom="20dp"
                     android:layout_marginBottom="20dp"
                     android:layout_marginStart="26dp"
                     android:layout_marginStart="26dp"
                     android:layout_marginEnd="26dp"
                     android:layout_marginEnd="26dp"
+                    android:textSize="13dp"
                     android:text="登录"
                     android:text="登录"
                     app:layout_constraintTop_toBottomOf="@id/trouble_btn"
                     app:layout_constraintTop_toBottomOf="@id/trouble_btn"
                     app:layout_constraintStart_toStartOf="@+id/cl_account_login"
                     app:layout_constraintStart_toStartOf="@+id/cl_account_login"
@@ -283,10 +286,11 @@
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
                     android:text="新用户注册"
                     android:text="新用户注册"
+                    android:padding="8dp"
                     android:layout_gravity="center"
                     android:layout_gravity="center"
                     android:textColor="@color/blue_34a6e7"
                     android:textColor="@color/blue_34a6e7"
-                    android:textSize="15dp"
-                    android:layout_marginBottom="@dimen/content_padding_24"
+                    android:textSize="12dp"
+                    android:layout_marginBottom="16dp"
                     app:layout_constraintStart_toStartOf="@+id/login_btn"
                     app:layout_constraintStart_toStartOf="@+id/login_btn"
                     app:layout_constraintTop_toBottomOf="@+id/login_btn"
                     app:layout_constraintTop_toBottomOf="@+id/login_btn"
                     app:layout_constraintBottom_toBottomOf="parent"
                     app:layout_constraintBottom_toBottomOf="parent"

+ 30 - 11
app/src/main/res/layout/fragment_sign_up.xml

@@ -33,7 +33,7 @@
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:textColor="@color/white"
             android:textColor="@color/white"
-            android:layout_marginTop="12dp"
+            android:layout_marginTop="4dp"
             android:textSize="17dp"
             android:textSize="17dp"
             android:text="小绵羊"
             android:text="小绵羊"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
@@ -223,23 +223,16 @@
                         app:layout_constraintTop_toTopOf="@+id/captcha_box"/>
                         app:layout_constraintTop_toTopOf="@+id/captcha_box"/>
             </android.support.constraint.ConstraintLayout>
             </android.support.constraint.ConstraintLayout>
 
 
-            <Button
-                    android:id="@+id/register_btn"
-                    style="@style/login_theme_round_button"
-                    android:layout_marginStart="24dp"
-                    android:layout_marginEnd="24dp"
-                    android:layout_marginTop="48dp"
-                    android:text="注册"/>
-
             <LinearLayout
             <LinearLayout
                     android:id="@+id/tel_agreement_ll"
                     android:id="@+id/tel_agreement_ll"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_gravity="center"
+                    android:layout_gravity="start"
+                    android:layout_marginStart="54dp"
                     app:layout_constraintTop_toBottomOf="@id/register_btn"
                     app:layout_constraintTop_toBottomOf="@id/register_btn"
                     app:layout_constraintBottom_toBottomOf="parent"
                     app:layout_constraintBottom_toBottomOf="parent"
                     android:orientation="horizontal"
                     android:orientation="horizontal"
-                    android:layout_marginTop="32dp"
+                    android:layout_marginTop="21dp"
                     android:layout_marginBottom="24dp"
                     android:layout_marginBottom="24dp"
                     android:gravity="center">
                     android:gravity="center">
                 <android.support.v7.widget.AppCompatCheckBox
                 <android.support.v7.widget.AppCompatCheckBox
@@ -257,6 +250,32 @@
                         android:textSize="12sp"/>
                         android:textSize="12sp"/>
             </LinearLayout>
             </LinearLayout>
 
 
+            <Button
+                    android:id="@+id/register_btn"
+                    style="@style/login_theme_round_button"
+                    android:layout_marginStart="24dp"
+                    android:layout_marginEnd="24dp"
+                    android:layout_marginTop="16dp"
+                    android:textSize="13dp"
+                    android:text="注册"/>
+
+            <TextView
+                    android:id="@+id/back_login_btn"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="返回登录"
+                    android:padding="8dp"
+                    android:layout_marginTop="12dp"
+                    android:layout_gravity="center"
+                    android:textColor="@color/blue_34a6e7"
+                    android:textSize="12dp"
+                    android:layout_marginBottom="@dimen/content_padding_24"
+                    app:layout_constraintStart_toStartOf="@+id/login_btn"
+                    app:layout_constraintTop_toBottomOf="@+id/login_btn"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="@+id/login_btn"/>
+
+
         </LinearLayout>
         </LinearLayout>
 
 
 
 

+ 1 - 1
app/src/main/res/layout/newbie_guide_2_3.xml

@@ -4,7 +4,7 @@
     android:layout_height="wrap_content">
     android:layout_height="wrap_content">
     <ImageView
     <ImageView
         android:id="@+id/i1"
         android:id="@+id/i1"
-        android:src="@mipmap/guide_2_3"
+        android:src="@mipmap/guide_1_2"
         android:adjustViewBounds="true"
         android:adjustViewBounds="true"
         android:layout_width="52dp"
         android:layout_width="52dp"
         android:layout_height="wrap_content" />
         android:layout_height="wrap_content" />

BIN
app/src/main/res/mipmap/guide_1_2.png


+ 3 - 8
app/src/sheep/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java

@@ -2,15 +2,9 @@ package com.sheep.jiuyan.samllsheep.wxapi;
 
 
 import android.content.Intent;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Bundle;
-import android.util.Log;
-
-import com.alibaba.fastjson.JSONObject;
 import com.sheep.gamegroup.event.WXLoginAuthEvent;
 import com.sheep.gamegroup.event.WXLoginAuthEvent;
 import com.sheep.gamegroup.model.entity.MiniPayResult;
 import com.sheep.gamegroup.model.entity.MiniPayResult;
-import com.sheep.gamegroup.util.ApiJSONUtil;
-import com.sheep.gamegroup.util.Jump2View;
-import com.sheep.gamegroup.util.LogUtil;
-import com.sheep.gamegroup.util.QQUtil;
+import com.sheep.gamegroup.util.*;
 import com.sheep.jiuyan.samllsheep.Config;
 import com.sheep.jiuyan.samllsheep.Config;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.tencent.mm.opensdk.modelbase.BaseReq;
 import com.tencent.mm.opensdk.modelbase.BaseReq;
@@ -21,7 +15,6 @@ import com.tencent.mm.opensdk.modelpay.PayResp;
 import com.tencent.mm.opensdk.openapi.IWXAPI;
 import com.tencent.mm.opensdk.openapi.IWXAPI;
 import com.tencent.mm.opensdk.openapi.WXAPIFactory;
 import com.tencent.mm.opensdk.openapi.WXAPIFactory;
 import com.umeng.socialize.weixin.view.WXCallbackActivity;
 import com.umeng.socialize.weixin.view.WXCallbackActivity;
-
 import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.EventBus;
 
 
 public class WXEntryActivity extends WXCallbackActivity {//implements IWXAPIEventHandler
 public class WXEntryActivity extends WXCallbackActivity {//implements IWXAPIEventHandler
@@ -55,8 +48,10 @@ public class WXEntryActivity extends WXCallbackActivity {//implements IWXAPIEven
         if (resp instanceof SendAuth.Resp) {
         if (resp instanceof SendAuth.Resp) {
             if (resp.errCode == BaseResp.ErrCode.ERR_OK) {
             if (resp.errCode == BaseResp.ErrCode.ERR_OK) {
                 String code = ((SendAuth.Resp) resp).code;
                 String code = ((SendAuth.Resp) resp).code;
+                //ProcessEventBusUtil.postEvent(this,new WXLoginAuthEvent(code));
                 EventBus.getDefault().post(new WXLoginAuthEvent(code));
                 EventBus.getDefault().post(new WXLoginAuthEvent(code));
             } else {
             } else {
+                //ProcessEventBusUtil.postEvent(this,new WXLoginAuthEvent(null));
                 EventBus.getDefault().post(new WXLoginAuthEvent(null));
                 EventBus.getDefault().post(new WXLoginAuthEvent(null));
             }
             }
         } else if (resp instanceof WXLaunchMiniProgram.Resp) {
         } else if (resp instanceof WXLaunchMiniProgram.Resp) {