Sfoglia il codice sorgente

只要有邀请码的包,就不用输入邀请码

zengjiebin 7 anni fa
parent
commit
7821ab65d3

+ 0 - 3
app/src/main/java/com/sheep/gamegroup/util/DataUtil.java

@@ -438,9 +438,6 @@ public class DataUtil {
         }
         return null;
     }
-    public static boolean 是官方包吗(){
-        return "kfzs".equals(ChannelContent.getInstance().getChannel_name());
-    }
 
     public void addPng(final String imagePath) {
         final String packageName = getPackageNameInForeground();

+ 4 - 4
app/src/main/java/com/sheep/gamegroup/view/activity/LoginAct.java

@@ -8,7 +8,6 @@ import android.text.InputFilter;
 import android.text.InputType;
 import android.text.TextUtils;
 import android.text.TextWatcher;
-import android.util.Log;
 import android.view.View;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
@@ -29,7 +28,6 @@ import com.sheep.gamegroup.util.CertificationUtil;
 import com.sheep.gamegroup.util.ChannelContent;
 import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.Jump2View;
-import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.PreferenceUtils;
 import com.sheep.gamegroup.util.SelfCountDownTimer;
 import com.sheep.gamegroup.util.StringUtils;
@@ -97,6 +95,7 @@ public class LoginAct extends BaseUMActivity implements LoginContract.View {
         return R.layout.login_act_layout;
     }
     private LoginAct activity;
+    private String channelName;
     @Override
     public void initView() {
         activity = this;
@@ -107,7 +106,8 @@ public class LoginAct extends BaseUMActivity implements LoginContract.View {
                 .inject(this);
         TestUtil.testChange(this, (TextView) findViewById(R.id.test_change));
         TestUtil.testChangeUser(this, (TextView) findViewById(R.id.test_change_user));
-        if(DataUtil.是官方包吗()){
+        channelName = ChannelContent.getInstance().getChannel_name();
+        if(!TextUtils.isEmpty(channelName)){
             loginEtScope.setVisibility(View.GONE);
         } else {
             loginEtAccount.addTextChangedListener(new TextWatcher() {
@@ -332,7 +332,7 @@ public class LoginAct extends BaseUMActivity implements LoginContract.View {
         if (!checkCodeInput()) {
             return;
         }
-        String scope = DataUtil.是官方包吗() ? ChannelContent.getInstance().getChannel_name() : loginEtScope.getText().toString();
+        String scope = !TextUtils.isEmpty(channelName) ? channelName : loginEtScope.getText().toString();
         showProgress();
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("account", etPhone);