瀏覽代碼

我的礼包 折扣不显示描述,review代码

liujiangyao 7 年之前
父節點
當前提交
842d613b70

+ 9 - 1
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -61,6 +61,7 @@ import com.sheep.gamegroup.model.entity.GiftBagApp;
 import com.sheep.gamegroup.model.entity.HomeListEntity;
 import com.sheep.gamegroup.model.entity.PayEntity;
 import com.sheep.gamegroup.model.entity.RobTask;
+import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.glide.RoundedCornersTransformation;
 import com.sheep.gamegroup.view.activity.PersonalInfoAct;
@@ -1212,9 +1213,16 @@ public class ViewUtil {
         payEntity.setGame_name(gameName);
         newInstance().showGamePayAccount(activity, payEntity);
     }
+    public static void showGamePayAccount(Activity activity, TaskEty taskEty) {
+        PayEntity payEntity = new PayEntity();
+        payEntity.setGame_id(taskEty.getThird_task_id());
+        payEntity.setGame_name(taskEty.getName());
+        payEntity.setTask_type(taskEty.getTask_type()+"");
+        newInstance().showGamePayAccount(activity, payEntity);
+    }
 
     public void showGamePayAccount(Activity activity, PayEntity payEntity) {
-        GAME_INSTEAD_OF_RECHARGE_PLATFORM.onEvent("game_id", payEntity.getGame_id(), "name", payEntity.getGame_name());
+        GAME_INSTEAD_OF_RECHARGE_PLATFORM.onEvent("game_id", payEntity.getGame_id()+"", "name", payEntity.getGame_name()+"");
         new DialogPayAccount(activity, payEntity).showPayaccount();
     }
 

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/view/adapter/WelfareAdapter.java

@@ -64,6 +64,7 @@ public class WelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
         TextView item_download_welfare_btn_top = (TextView)holder.getView(R.id.item_download_welfare_btn_top);
         View item_download_welfare_line = holder.getView(R.id.item_download_welfare_line);
         item_download_welfare_line.setVisibility(holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
+        item_download_welfare_num_tv.setVisibility(View.GONE);
         if(item == null){
             ViewUtil.setDefaultText(item_download_welfare_name_tv);
             ViewUtil.setDefaultText(item_download_welfare_num_tv);
@@ -139,7 +140,7 @@ public class WelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
                         @Override
                         public void onClick(View view) {
                             if (itemTask.getThird_task_id() != null) {
-                                ViewUtil.showGamePayAccount((Activity) context, itemTask.getThird_task_id(), item.getName());
+                                ViewUtil.showGamePayAccount((Activity) context, itemTask);
                             }
                         }
                     });

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/dialog/DialogModifyAccount.java

@@ -130,6 +130,7 @@ public class DialogModifyAccount {
                                     public void call(Integer integer) {
                                         if (integer == 1){
                                             G.showToast("修改成功!");
+                                            EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.DELETE_GAME_ACCOUNT_REFRESH));
                                             dialog.dismiss();
                                         }else {
                                             G.showToast("修改成功!");