2 İşlemeler 22f5051923 ... d545db4db6

Yazar SHA1 Mesaj Tarih
  Administrator d545db4db6 Merge branch 'master' of http://zhi-edu.com:3000/lan/zedu_client 3 yıl önce
  Administrator 17cd038d38 新增欠费验证状态重置 3 yıl önce

+ 11 - 5
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/com/zedu/cocos/congming/page/launcher/LauncherActivity.java

@@ -1,5 +1,6 @@
 package com.zedu.cocos.congming.page.launcher;
 
+import android.annotation.SuppressLint;
 import android.app.Dialog;
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
@@ -81,7 +82,6 @@ public class LauncherActivity extends BaseFragmentActivity {
     @Bean(OrganClientZedu.class)
     OrganClient mOrganClient;
     public static String deviceId;
-    public static boolean nextStartExit = true;
 
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
@@ -108,6 +108,7 @@ public class LauncherActivity extends BaseFragmentActivity {
         }
     }
 
+    @SuppressLint("WrongConstant")
     @UiThread
     public void initPermission() {
         AndPermission.with(this)
@@ -166,8 +167,10 @@ public class LauncherActivity extends BaseFragmentActivity {
         if (!activates.isEmpty()) {
             DeviceEntity.DeviceActivateEntity activate = activates.get(0);
             if (activate.status == 0 || activate.status == 2 || activate.status == 3 || activate.isExpireTime()) {
+
                 ActivateActivity_.intent(this).packageName(item.packageName).start();
                 showToast(String.format("%s%s", item.appName, activate.getStateFormat()));
+
             } else if (activate.status == 1) {
                 if (activate.isIssueTime()) {
                     showToast(String.format("%s生效时间%s", item.appName, activate.getIssuedTime()));
@@ -175,11 +178,15 @@ public class LauncherActivity extends BaseFragmentActivity {
                 }
 
                 //判断是否开始验证欠费情况
-                if (isStartCheckIsArrears(activate.issued) && mOrganPrefs.checkArrearsSuccess().get() == 0) {
+                if (isFullMoon(activate.issued) && mOrganPrefs.checkArrearsSuccess().get() == 0) {
                     showToast("StartCheckArrears !");
                     mOrganClient.arrearsStatus(mOrganPrefs.organKey().get());
                     return;
                 }
+                //未满月 且验证过欠费的设备 重置验证欠费状态
+                if(!isFullMoon(activate.issued) && mOrganPrefs.checkArrearsSuccess().get() != 0){
+                    mOrganPrefs.checkArrearsSuccess().put(0);
+                }
                 // 进入游戏页
                 SDKUtils.AppKey= mOrganPrefs.organKey().get();;
                 startAppActivity();
@@ -211,12 +218,11 @@ public class LauncherActivity extends BaseFragmentActivity {
 
 
     /**
-     * 判断是否开始验证 是否欠费
-     *
+     * 判断是否满月了
      * @param issuedDate
      * @return
      */
-    private static boolean isStartCheckIsArrears(Date issuedDate) {
+    private static boolean isFullMoon(Date issuedDate) {
         //激活时间是否满了一个月,满了一个月则要进行是否欠费的验证
         Calendar ct = Calendar.getInstance();
         ct.setTime(issuedDate);