Explorar el Código

q币 根据后台接口是否显示

liujiangyao hace 8 años
padre
commit
0265686681

+ 5 - 0
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -722,13 +722,18 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
                 homeListEntitysGridview.clear();
                 homeListEntitysListview.clear();
                 homeListEntitys.addAll(homeListEntity);
+                boolean isShowQB = false;
                 for (int i=0;i<homeListEntitys.size();i++){
                     if(i<4){
                         homeListEntitysGridview.add(homeListEntitys.get(i));
                     }else {
                         homeListEntitysListview.add(homeListEntitys.get(i));
                     }
+                    if(homeListEntitys.get(i).getType() == 6){//6Q币充值
+                        isShowQB = !isShowQB;
+                    }
                 }
+                SheepApp.getInstance().setShowQB(isShowQB);
                 adpHomeListGrideview.notifyDataSetChanged();
                 adpHomeListListview.notifyDataSetChanged();
             }else {

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

@@ -682,8 +682,13 @@ public class Jump2View {
      * @param o
      */
     public void goRechargeQAct(Context context, Object o){
-        Intent intent = new Intent(context, RechargeQAct.class);
-        context.startActivity(intent);
+        if(!SheepApp.getInstance().isShowQB()){
+            goRechargeAct(context, o);
+        }else {
+            Intent intent = new Intent(context, RechargeQAct.class);
+            context.startActivity(intent);
+        }
+
     }
 
     /**

+ 9 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -34,6 +34,15 @@ public class SheepApp extends BaseApplication {
     private NetComponent netComponent;
     private AppRecord lastAppRecord;
     private long lastTime;
+    private boolean isShowQB;
+
+    public boolean isShowQB() {
+        return isShowQB;
+    }
+
+    public void setShowQB(boolean showQB) {
+        isShowQB = showQB;
+    }
 
     public AppRecord getLastAppRecord() {
         return lastAppRecord;