Bläddra i källkod

功能开发:免登录的逻辑开发,联系客服弹窗等功能

Sora 1 år sedan
förälder
incheckning
1c085709f3
37 ändrade filer med 1040 tillägg och 1452 borttagningar
  1. 0 3
      app/src/main/AndroidManifest.xml
  2. 1 3
      app/src/main/java/com/sheep/gamegroup/di/modules/NetModule.java
  3. 12 10
      app/src/main/java/com/sheep/gamegroup/event/EventTypes.java
  4. 72 0
      app/src/main/java/com/sheep/gamegroup/gaiban/mainpage/data/source/UserInfoDataSource.java
  5. 116 29
      app/src/main/java/com/sheep/gamegroup/gaiban/mainpage/mine/MineFragment.java
  6. 1 1
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  7. 35 12
      app/src/main/java/com/sheep/gamegroup/model/entity/Applications.java
  8. 11 7
      app/src/main/java/com/sheep/gamegroup/model/entity/GiftBagApp.java
  9. 18 13
      app/src/main/java/com/sheep/gamegroup/model/util/SheepSubscriber.java
  10. 1 73
      app/src/main/java/com/sheep/gamegroup/module/game/activity/ActGameGroupOrGameDetail.java
  11. 5 4
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameDetail.java
  12. 27 88
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameGift.java
  13. 18 14
      app/src/main/java/com/sheep/gamegroup/module/login/LoginAct.java
  14. 6 4
      app/src/main/java/com/sheep/gamegroup/module/search/AdpSearchResult.java
  15. 4 3
      app/src/main/java/com/sheep/gamegroup/module/search/FgtSearch.java
  16. 34 36
      app/src/main/java/com/sheep/gamegroup/module/search/GameHolder.java
  17. 3 0
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  18. 25 21
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  19. 0 436
      app/src/main/java/com/sheep/gamegroup/view/activity/ActGcGameAppDetail.java
  20. 28 2
      app/src/main/java/com/sheep/gamegroup/view/activity/ActGiftDetail.java
  21. 0 2
      app/src/main/java/com/sheep/gamegroup/view/activity/ActMyWelfare.java
  22. 3 3
      app/src/main/java/com/sheep/gamegroup/view/activity/ActUserAppHome.java
  23. 0 3
      app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java
  24. 0 79
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppGiftBag.java
  25. 123 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppGiftBagAdapter.java
  26. 4 3
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppInfoList.java
  27. 29 40
      app/src/main/java/com/sheep/gamegroup/view/adapter/GiftCenterAdapter.java
  28. 0 252
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppDetail.java
  29. 0 154
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppWelfare.java
  30. 1 0
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyGift.java
  31. 2 8
      app/src/main/java/com/sheep/jiuyan/samllsheep/utils/SpUtils.java
  32. 139 0
      app/src/main/res/drawable/qr_code_bg.xml
  33. 1 1
      app/src/main/res/layout/act_new_about_us.xml
  34. 66 0
      app/src/main/res/layout/dialog_lianxikefu.xml
  35. 3 16
      app/src/main/res/layout/item_download_welfare.xml
  36. 1 1
      app/src/main/res/layout/mine_fragment.xml
  37. 251 131
      app/src/main/res/layout/play_game_vertical_list_item.xml

+ 0 - 3
app/src/main/AndroidManifest.xml

@@ -887,9 +887,6 @@
             android:screenOrientation="portrait"
             android:theme="@style/AppActionTheme" />
         <activity
-            android:name="com.sheep.gamegroup.view.activity.ActGcGameAppDetail"
-            android:screenOrientation="portrait" />
-        <activity
             android:name="com.sheep.gamegroup.view.activity.ActCommentGameApp"
             android:screenOrientation="portrait"
             android:theme="@style/AppActionTheme" />

+ 1 - 3
app/src/main/java/com/sheep/gamegroup/di/modules/NetModule.java

@@ -49,9 +49,7 @@ public class NetModule {
         Retrofit retrofit = new Retrofit.Builder()
                 .client(okhttpClient)
                 .baseUrl(SheepApp.getInstance().getConnectAddress().getAppUrl())
-//                .baseUrl("http://ss.17xmy.com/v1/")
-//                .baseUrl("http://192.168.0.109:8080/v1/")
-//                .baseUrl("http://10.8.240.180:8080/v1/")
+//                .baseUrl("http://100.8.200.244:8080")
                 .addConverterFactory(StringConverterFactory.create())
                 .addConverterFactory(FastJsonConverterFactory.create())
 //                .addConverterFactory(GsonConverterFactory.create(EntityUtils.gson))//

+ 12 - 10
app/src/main/java/com/sheep/gamegroup/event/EventTypes.java

@@ -19,10 +19,10 @@ public enum EventTypes {
     STORAGE_LOW,//储存空间不足,此时Data是游戏名
 
     SKIP_PAGE_COUNT,//首页的第一个Tab栏的viewpager跳转到第几个pager,others为第几页\
-    GO_FiRST , //任务功能  登录后 点击返回键 只能返回第一个界面
-    ONFRESH_FGT_FAMLLSHEEP , //刷新fgtSmallSheep数据
-    ONFRESH_TRYMAKEMANY_PAGE , //刷新TryMakeMoneyact数据
-    ONFRESH_GAMETASK_ORDER_LIST_PAGE , //订单记录
+    GO_FiRST, //任务功能  登录后 点击返回键 只能返回第一个界面
+    ONFRESH_FGT_FAMLLSHEEP, //刷新fgtSmallSheep数据
+    ONFRESH_TRYMAKEMANY_PAGE, //刷新TryMakeMoneyact数据
+    ONFRESH_GAMETASK_ORDER_LIST_PAGE, //订单记录
 
     DIALOG_ACTIVITY_DOWNLOAD_FILE,//dialogActivity 下载通知
 
@@ -48,17 +48,19 @@ public enum EventTypes {
     REFRESH_MING_DONG,//刷新界面
 
     REFRESH_XIAOMI_GAME_LIST,//刷新界面
-    FGT_SHEEP_REFRESH_H , //刷新fgtSmallSheep高度
-    FGT_SHEEP_FOOT_VIEW_CALL_BACK , //FgtSmallSheep中ViewPager内容中的任务列表XRecyclerView的FootView刷新回调
-    FGT_SHEEP_SET_BOTTOM_LINE , //设置底线内容
-    FGT_SHEEP_SHOW_NEW_USER_HONG_BAO , //显示红包
+    FGT_SHEEP_REFRESH_H, //刷新fgtSmallSheep高度
+    FGT_SHEEP_FOOT_VIEW_CALL_BACK, //FgtSmallSheep中ViewPager内容中的任务列表XRecyclerView的FootView刷新回调
+    FGT_SHEEP_SET_BOTTOM_LINE, //设置底线内容
+    FGT_SHEEP_SHOW_NEW_USER_HONG_BAO, //显示红包
     REFRESH_AUDITACTIVITY_DATA,//审核数据刷新
     FGT_PLAY_GAME_REFRESH_H, //刷新玩转游戏高度
     FGT_PLAY_GAME_FOOT_VIEW_CALL_BACK, //玩转游戏中ViewPager内容中的任务列表XRecyclerView的FootView刷新回调
-    FGT_PLAY_GAME_SET_BOTTOM_LINE , //设置底线内容
-    ASK_GETMONEY_FRIEND_REFRESH , //邀请赚钱刷新
+    FGT_PLAY_GAME_SET_BOTTOM_LINE, //设置底线内容
+    ASK_GETMONEY_FRIEND_REFRESH, //邀请赚钱刷新
     FGT_SHEEP_HOME_MESSAGE_COUNT, //刷新消息数量
     COMMENT_REFRESH, //刷新消息数量
 
     CHECK_VIP,
+    USER_LOGIN,
+    USER_LOGOUT, USER_INFO,
 }

+ 72 - 0
app/src/main/java/com/sheep/gamegroup/gaiban/mainpage/data/source/UserInfoDataSource.java

@@ -0,0 +1,72 @@
+package com.sheep.gamegroup.gaiban.mainpage.data.source;
+
+import android.content.Context;
+import android.content.Intent;
+
+import com.sheep.gamegroup.model.entity.UserEntity;
+import com.sheep.gamegroup.module.login.LoginAct;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.SpUtils;
+
+import rx.functions.Action1;
+
+public class UserInfoDataSource {
+    UserEntity userEntity;
+    //线程安全的单例模式
+    private static volatile UserInfoDataSource instance;
+
+    // 私有构造函数,防止外部实例化
+    private UserInfoDataSource() {
+        // 初始化操作
+    }
+
+    // 获取单例实例的静态方法
+    public static UserInfoDataSource getInstance() {
+        if (instance == null) { // 第一次检查
+            synchronized (UserInfoDataSource.class) { // 加锁
+                if (instance == null) { // 第二次检查
+                    instance = new UserInfoDataSource();
+                }
+            }
+        }
+        return instance;
+    }
+
+    public void initUserInfo(Action1<UserEntity> action) {
+        CommonUtil.getInstance().callActionWithUserInfo(new Action1<UserEntity>() {
+            @Override
+            public void call(UserEntity userEntity) {
+                if (userEntity != null) {
+                    UserInfoDataSource.this.userEntity = userEntity;
+                    action.call(userEntity);
+                }
+            }
+        });
+    }
+
+    public UserEntity getUserEntity() {
+        return userEntity;
+    }
+
+    public void logout() {
+        userEntity = null;
+    }
+
+    //判断是否登录了
+    public boolean isLogin() {
+        String token = SpUtils.getToken(SheepApp.getInstance());
+        return token != null && !token.isEmpty();
+    }
+
+    public boolean hasLogin(Context context) {
+        if (!isLogin()) {
+            Intent intent = new Intent(context, LoginAct.class);
+            intent.putExtra("where_from", "ActMain");
+            context.startActivity(intent);
+            return false;
+        } else {
+            return true;
+        }
+    }
+}

+ 116 - 29
app/src/main/java/com/sheep/gamegroup/gaiban/mainpage/mine/MineFragment.java

@@ -1,24 +1,43 @@
 package com.sheep.gamegroup.gaiban.mainpage.mine;
 
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.QR_SAVE;
+
 import android.graphics.Color;
 import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
 
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AlertDialog;
 import androidx.core.widget.NestedScrollView;
 
+import com.sheep.gamegroup.event.BigEvent;
+import com.sheep.gamegroup.gaiban.mainpage.data.source.UserInfoDataSource;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.NewAboutUs;
 import com.sheep.gamegroup.model.entity.UserEntity;
-import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
+import com.sheep.jiuyan.samllsheep.databinding.DialogLianxikefuBinding;
 import com.sheep.jiuyan.samllsheep.databinding.MineFragmentBinding;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
 
 import java.util.Objects;
 
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
 import rx.functions.Action1;
 
 public class MineFragment extends BaseFragment {
-    private UserEntity userEntity;
 
     @Override
     public int getLayoutId() {
@@ -28,6 +47,20 @@ public class MineFragment extends BaseFragment {
     MineFragmentBinding binding;
 
     @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (!EventBus.getDefault().isRegistered(this))
+            EventBus.getDefault().register(this);
+    }
+
+    @Override
+    public void onDestroy() {
+        if (EventBus.getDefault().isRegistered(this))
+            EventBus.getDefault().unregister(this);
+        super.onDestroy();
+    }
+
+    @Override
     public void onViewCreated() {
         binding = MineFragmentBinding.bind(Objects.requireNonNull(getView()));
         binding.scrollView.setOnScrollChangeListener((NestedScrollView.OnScrollChangeListener) (v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
@@ -35,46 +68,100 @@ public class MineFragment extends BaseFragment {
             } else {
             }
         });
-        binding.myDownload.setOnClickListener(v -> {
-            Jump2View.getInstance().goActDownloadManager(getActivity());
-        });
+
+        binding.myDownload.setOnClickListener(v -> Jump2View.getInstance().goActDownloadManager(getActivity()));
         binding.mineLibao.setOnClickListener(v -> {
-            Jump2View.getInstance().goMyWelfare(getActivity());
+            if (UserInfoDataSource.getInstance().hasLogin(getContext())) {
+                Jump2View.getInstance().goMyWelfare(getActivity());
+            }
         });
         binding.mineZichan.setOnClickListener(v -> {
-            Jump2View.getInstance().goMyMoney(getActivity());
-        });
-        binding.setting.setOnClickListener(v -> {
-            Jump2View.getInstance().goSetting(getActivity());
-        });
-        binding.personInfo.setOnClickListener(v -> {
-            Jump2View.getInstance().goPersionInfo(getActivity());
+            if (UserInfoDataSource.getInstance().hasLogin(getContext())) {
+                Jump2View.getInstance().goMyMoney(getActivity());
+            }
         });
+        binding.setting.setOnClickListener(v -> Jump2View.getInstance().goSetting(getActivity()));
+        View.OnClickListener personListener = v -> {
+            if (UserInfoDataSource.getInstance().hasLogin(getContext())) {
+                Jump2View.getInstance().goPersionInfo(getActivity());
+            }
+        };
+        binding.ivAvatar.setOnClickListener(personListener);
+        binding.tvNickname.setOnClickListener(personListener);
+        binding.personInfo.setOnClickListener(personListener);
         binding.lianxiKefu.setOnClickListener(v -> {
             //todo 这里是显示客服的对话框
+            showLianxiKefuDialog();
         });
-        //todo 这里要判断是否登录
-        initUserInfo();
+        initWidget();
+    }
+
+    private void showLianxiKefuDialog() {
+        showProgress();
+        SheepApp.getInstance().getNetComponent().getApiService().getNewAboutUs()
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        NewAboutUs newAboutUs = baseMessage.getData(NewAboutUs.class);
+                        if (newAboutUs != null) {
+                            DialogLianxikefuBinding dialogBinding = DialogLianxikefuBinding.inflate(LayoutInflater.from(getContext()));
+                            ViewUtil.setImage(dialogBinding.ivCode, newAboutUs.getCustomerWechatQr());
+                            AlertDialog dialog = new AlertDialog.Builder(getContext())
+                                    .setView(dialogBinding.getRoot())
+                                    .create();
+                            dialogBinding.btnClose.setOnClickListener(v -> dialog.dismiss());
+                            dialogBinding.btnSave.setOnClickListener(v -> {
+                                //保存图片到相册
+                                QR_SAVE.onEvent();
+                                try {
+                                    ViewUtil.sysSaveImage(dialogBinding.ivCode, "小绵羊", "客服二维码");
+                                    G.showToast("已保存");
+                                    dialog.dismiss();
+                                } catch (Exception e) {
+                                    e.printStackTrace();
+                                    G.showToast(BuildConfig.DEBUG ? e.getMessage() : "暂不支持");
+                                }
+                            });
+                            dialog.show();
 
+                        }
+                        hideProgress();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                        hideProgress();
+                    }
+                });
     }
 
-    private void initUserInfo() {
-        CommonUtil.getInstance().callActionWithUserInfo(new Action1<UserEntity>() {
-            @Override
-            public void call(UserEntity userEntity) {
-                if (userEntity != null) {
-                    MineFragment.this.userEntity = userEntity;
-                    //3.4.5个人中心隐藏邀请码相关功能
-//             ivRedpackage.setVisibility(userEntity.isKfzsPackageUser() ? View.GONE : View.VISIBLE);
-                    initWidget();
+    private void initWidget() {
+        if (UserInfoDataSource.getInstance().isLogin()) {
+            UserInfoDataSource.getInstance().initUserInfo(new Action1<UserEntity>() {
+                @Override
+                public void call(UserEntity userEntity) {
+                    GlideImageLoader.setAvatar(binding.ivAvatar, userEntity.getAvatar(), Color.argb(128, 255, 255, 255));
+                    binding.tvNickname.setText(userEntity.getNickname());
                 }
-            }
-        });
+            });
+        }
     }
 
-    private void initWidget() {
-        GlideImageLoader.setAvatar(binding.ivAvatar, userEntity.getAvatar(), Color.argb(128, 255, 255, 255));
-        binding.tvNickname.setText(userEntity.getNickname());
+    @Subscribe
+    public void onEventMainThread(BigEvent event) {
+        switch (event.getEventTypes()) {
+            case USER_LOGIN:
+                initWidget();
+                break;
+            case USER_LOGOUT:
+                UserInfoDataSource.getInstance().logout();
+                binding.tvNickname.setText("登录/注册");
+                binding.ivAvatar.setImageDrawable(getResources().getDrawable(R.drawable.logo));
+                break;
+        }
     }
 
     public static MineFragment newInstance() {

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -1950,7 +1950,7 @@ public interface ApiService {
     @GET("v1/app/user/check_authorization")
     Observable<BaseMessage> checkAuth(@Query("Authorization") String token, @Query("game_id") String game_id, @Query("wlan") String wlan, @Query("auto_login") int autoLogin, @Query("face_url") String face_url);
 
-    @GET("v1/app/search")
+    @GET("v2/app/search")
     Observable<BaseMessage> search(@Query("keyword") String keyword, @Query("game_count") int gameCount, @Query("task_count") int taskCount, @Query("gift_count") int giftCount, @Query("article_count") int articleCount, @Query("goods_count") int goodsCount, @Query("role_count") int roleCount);
 
     @GET("v1/app/search/keywords")

+ 35 - 12
app/src/main/java/com/sheep/gamegroup/model/entity/Applications.java

@@ -2,6 +2,7 @@ package com.sheep.gamegroup.model.entity;
 
 import android.text.TextUtils;
 
+import com.alibaba.fastjson.annotation.JSONField;
 import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.sheep.gamegroup.helper.DownloadHelper;
 import com.sheep.gamegroup.helper.FindAppHelper;
@@ -108,7 +109,7 @@ public class Applications implements IDownload, IGameGroup, Serializable {
 
     private String activity_url;
     private String game_tag_new;
-
+    @JSONField(serialize = false)
     public List<String> getGameTagNewList() {
         String[] arr = game_tag_new.split(",");
         return Arrays.asList(arr);
@@ -501,8 +502,9 @@ public class Applications implements IDownload, IGameGroup, Serializable {
         return record == 1;//1:可记录 其他:不可记录
     }
 
+    @JSONField(serialize = false)
     private FindAppHelper findAppHelper = new FindAppHelper();
-
+    @JSONField(serialize = false)
     public FindAppHelper getFindAppHelper() {
         return findAppHelper;
     }
@@ -516,20 +518,20 @@ public class Applications implements IDownload, IGameGroup, Serializable {
         findAppHelper.updateState(status);
     }
 
-
+    @JSONField(serialize = false)
     public DownloadHelper getDownloadHelper() {
         return findAppHelper.getDownloadHelper();
     }
 
-
+    @JSONField(serialize = false)
     public void updateStateRelease(int status) {
         findAppHelper.getDownloadHelper().updateState(status);
     }
-
+    @JSONField(serialize = false)
     public CharSequence getInfo() {
         return getInfo(null);
     }
-
+    @JSONField(serialize = false)
     public CharSequence getInfo(Action1<SpannableSb> action1) {
         return new SpannableSb("#999999", R.dimen.text_size_12)
                 .callAction(action1)
@@ -538,14 +540,14 @@ public class Applications implements IDownload, IGameGroup, Serializable {
                 .append("人在玩").defaultTcTs()
                 .getSsb();
     }
-
+    @JSONField(serialize = false)
     public CharSequence getInfoContainGameFrom() {
         if (TextUtils.isEmpty(getGameFrom())) {
             return getInfo();
         }
         return getInfo(spannableSb -> spannableSb.append("来源:", R.dimen.text_size_11, "#8e8e8e").kgy().kgy().append(getGameFrom(), R.dimen.text_size_11, "#8e8e8e").br());
     }
-
+    @JSONField(serialize = false)
     public CharSequence getPlayInfo() {
         List<GameListTag> tags = getTags();
         List<String> tagList = new ArrayList<>();
@@ -562,11 +564,11 @@ public class Applications implements IDownload, IGameGroup, Serializable {
                 .append("人在玩")
                 .getSsb();
     }
-
+    @JSONField(serialize = false)
     public CharSequence getSimpleInfo() {
         return new SpannableSb().append(NumberFormatUtils.retainMost2W(download_count), "#2EBEF2").append("人在玩", "#999999").getSsb();
     }
-
+    @JSONField(serialize = false)
     //游戏来源
     public String getGameFrom() {
         if (TextUtils.isEmpty(package_type_name)) {
@@ -576,12 +578,12 @@ public class Applications implements IDownload, IGameGroup, Serializable {
         }
         return port_type_name + "·" + package_type_name;
     }
-
+    @JSONField(serialize = false)
     //有 game_discount_id 就可以跳转vip通过进行3折充值
     public boolean hasGameDiscountId() {
         return game_discount_id > 0;
     }
-
+    @JSONField(serialize = false)
     //主宣传图是视频
     public boolean mainPublicizeIsVideo() {
         return main_publicize.endsWith(".mp4") || main_publicize.startsWith("http://cdn.video.17xmy.com");//如:http://cdn.video.17xmy.com/ljok9RZZvXc5qwvoCxEGudchO6Ti;
@@ -610,4 +612,25 @@ public class Applications implements IDownload, IGameGroup, Serializable {
     public void setRewardSum(double reward_sum) {
         this.reward_sum = reward_sum;
     }
+
+    public int getGift_num() {
+        return gift_num;
+    }
+
+    public void setGift_num(int gift_num) {
+        this.gift_num = gift_num;
+    }
+
+    public int getWelfare_num() {
+        return welfare_num;
+    }
+
+    public void setWelfare_num(int welfare_num) {
+        this.welfare_num = welfare_num;
+    }
+
+    public double getReward_sum() {
+        return reward_sum;
+    }
+
 }

+ 11 - 7
app/src/main/java/com/sheep/gamegroup/model/entity/GiftBagApp.java

@@ -22,27 +22,31 @@ public class GiftBagApp {
         this.received = received;
     }
 
-    public void setGift_bag(GiftBag gift_bag){
+    public void setGift_bag(GiftBag gift_bag) {
         this.gift_bag = gift_bag;
     }
-    public GiftBag getGift_bag(){
+
+    public GiftBag getGift_bag() {
         return this.gift_bag;
     }
-    public void setApp(Applications app){
+
+    public void setApp(Applications app) {
         this.app = app;
     }
-    public Applications getApp(){
+
+    public Applications getApp() {
         return this.app;
     }
-    public void setCode(String code){
+
+    public void setCode(String code) {
         this.code = code;
     }
-    public String getCode(){
+
+    public String getCode() {
         return this.code;
     }
 
 
-
     @Override
     public boolean equals(Object obj) {
         try {

+ 18 - 13
app/src/main/java/com/sheep/gamegroup/model/util/SheepSubscriber.java

@@ -1,21 +1,21 @@
 package com.sheep.gamegroup.model.util;
 
-import android.app.Activity;
 import android.content.Context;
-import android.widget.Toast;
 
 import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.event.BigEvent;
+import com.sheep.gamegroup.event.EventTypes;
 import com.sheep.gamegroup.model.api.BaseMessageConverter;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.module.login.LoginAct;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.NetUtil;
-import com.sheep.gamegroup.util.UMConfigUtils;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 
+import org.greenrobot.eventbus.EventBus;
+
 import io.reactivex.Observer;
 import io.reactivex.disposables.Disposable;
 
@@ -47,9 +47,10 @@ public abstract class SheepSubscriber<T> implements Observer<T> {
     }
 
     public static long showTipTime;
-    public void showNoNetView(){
+
+    public void showNoNetView() {
         long curTime = System.currentTimeMillis();
-        if(showTipTime == 0 || curTime - showTipTime > 5000L) {//5秒内只提示一次
+        if (showTipTime == 0 || curTime - showTipTime > 5000L) {//5秒内只提示一次
             showTipTime = curTime;
             G.shortToast("当前网络不可用,请检查网络情况");
         }
@@ -78,19 +79,23 @@ public abstract class SheepSubscriber<T> implements Observer<T> {
                 }
                 //token 过期
                 if (throwable.code == 401) {
-                    Activity curAct = SheepApp.getInstance().getCurrentActivity();
-                    if (curAct instanceof LoginAct || UMConfigUtils.isNotNeedAct(curAct)) {//本身就是登录界面 或者可以不用登录就存在的界面,如:支付界面
-                    } else {
-                        Jump2View.getInstance().gotoLoginAgain();
-                        return;
-                    }
+                    EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.USER_LOGOUT));
+                    SpUtils.saveToken(SheepApp.getInstance(), "");
+//                    Activity curAct = SheepApp.getInstance().getCurrentActivity();
+//                    if (curAct instanceof LoginAct || UMConfigUtils.isNotNeedAct(curAct)) {//本身就是登录界面 或者可以不用登录就存在的界面,如:支付界面
+//                    } else {
+//                        Jump2View.getInstance().gotoLoginAgain();
+//                        return;
+//                    }
                 }
                 //未绑定手机号
                 if (throwable.code == 302 && baseMessage.getCode() == 30001) {
                     Jump2View.getInstance().goBindPhone(SheepApp.getInstance(), baseMessage.getCode());
                     return;
                 } else if (baseMessage.getCode() == 1002) {
-                    Jump2View.getInstance().gotoLoginAgain();
+                    EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.USER_LOGOUT));
+                    SpUtils.saveToken(SheepApp.getInstance(), "");
+//                    Jump2View.getInstance().gotoLoginAgain();
                     return;
                 }
 

+ 1 - 73
app/src/main/java/com/sheep/gamegroup/module/game/activity/ActGameGroupOrGameDetail.java

@@ -41,7 +41,6 @@ import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.module.game.adapter.AdpGameGroupGameCompare;
 import com.sheep.gamegroup.module.game.fragment.FgtGameDetail;
 import com.sheep.gamegroup.module.game.fragment.FgtGameGift;
-import com.sheep.gamegroup.module.game.fragment.FgtGameWelfare;
 import com.sheep.gamegroup.module.game.model.GameGroup;
 import com.sheep.gamegroup.module.game.util.GameAppointHelper;
 import com.sheep.gamegroup.util.ApiUtil;
@@ -109,49 +108,6 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
         binding = ActGameGroupOrGameDetailBinding.inflate(LayoutInflater.from(this));
         return binding;
     }
-    //    @BindView(R.id.refresh)
-//    SmartRefreshLayout refresh;
-//    @BindView(R.id.tabLayout)
-//    TabLayout tabLayout;
-//    @BindView(R.id.viewPager)
-//    ViewPager viewPager;
-//    @BindView(R.id.binding.gcGameAppDetailIv)
-//    ImageView binding.gcGameAppDetailIv;
-//    @BindView(R.id.binding.gcGameAppDetailIv2)
-//    ImageView binding.gcGameAppDetailIv2;
-//    @BindView(R.id.detail_player)
-//    StandardGSYVideoPlayer binding.detailPlayer;
-//    @BindView(R.id.binding.gcGameAppDetailPlayIv)
-//    ImageView binding.gcGameAppDetailPlayIv;
-//    @BindView(R.id.gc_game_app_detail_icon)
-//    ImageView gc_game_app_detail_icon;
-//    @BindView(R.id.binding.gcGameAppDetailScoreTv)
-//    TextView binding.gcGameAppDetailScoreTv;
-//    @BindView(R.id.gc_game_app_detail_info_tv)
-//    TextView gc_game_app_detail_info_tv;
-//    @BindView(R.id.gc_game_app_detail_bt1)
-//    TextView gc_game_app_detail_bt1;
-//    @BindView(R.id.gc_game_app_detail_name)
-//    TextView gc_game_app_detail_name;
-//    @BindView(R.id.gc_game_app_detail_line)
-//    View gc_game_app_detail_line;
-//    @BindView(R.id.binding.gcGameAppDetailBt2)
-//    TextView binding.gcGameAppDetailBt2;
-//    @BindView(R.id.gc_game_app_detail_bt3)
-//    TextView gc_game_app_detail_bt3;
-//    @BindView(R.id.gc_game_app_detail_bt4)
-//    TextView gc_game_app_detail_bt4;
-//    @BindView(R.id.gc_game_app_detail_tag_list)
-//    RecyclerView recyclerView;
-//    //游戏组界面:比一比
-//    @BindView(R.id.gc_game_app_detail_game_list)
-//    View gc_game_app_detail_game_list;
-//    @BindView(R.id.item_gc_game_app_list_bottom)
-//    View item_gc_game_app_list_bottom;
-//    @BindView(R.id.binding.gcGameAppDetailGameList.itemGcGameAppListRv)
-//    RecyclerView binding.gcGameAppDetailGameList.itemGcGameAppListRv;
-//    @BindView(R.id.item_gc_game_app_list_tv)
-//    TextView item_gc_game_app_list_tv;
 
     private TitleFragmentListAdapter2 mAdapter;
     private FgtGameDetail fgtGameDetail;
@@ -250,28 +206,13 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
 
     private GameEntity gameEntity;
 
-    //更新关注状态,已过时
-    @Deprecated
-    private void updateFocusTv() {
-//        if (binding.gcGameAppDetailBt1 != null && gameEntity != null) {
-//            binding.gcGameAppDetailBt1.setText(gameEntity.isIs_focus_game() ? R.string.has_focus : R.string.focus);
-//            binding.gcGameAppDetailBt1.setSelected(gameEntity.isIs_focus_game());
-//        }
-    }
-
-//    private int pingJiaIndex = 1;
-
     //加载游戏数据
     private void loadData(final GameEntity gameEntity) {
         this.gameEntity = gameEntity;
         //更新关注状态
-        updateFocusTv();
         tryInitFragment();
         //更新评价数量
         if (gameEntity.getApp().getComment_num() > 0) {
-//            TabLayout.Tab tab = binding.tabLayout.getTabAt(pingJiaIndex);
-//            if (tab != null)
-//                tab.setText(String.format(Locale.CHINA, "评价(%d)", gameEntity.getApp().getComment_num()));
             CommonUtil.getInstance().reflex(binding.tabLayout, this, true);
         }
         //检查有没有封面图,这个图可能是图片也可能是视频
@@ -367,25 +308,13 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
         mAdapter.clearData();
         //详情
         fgtGameDetail = FgtGameDetail.newInstance(id);
-//        fgtGameComment = FgtGameComment.newInstance(id);
         fgtGameDetail.setSmartRefreshLayout(binding.refresh);
-//        fgtGameComment.setSmartRefreshLayout(binding.refresh);
-//        fgtGameComment.setListAction1(fgtGameDetail);
         mAdapter.add(fgtGameDetail, "详情");
-
-        if (hasWelfare) {
-            FgtGameWelfare fgtGameWelfare = FgtGameWelfare.newInstance(id);
-            fgtGameWelfare.setSmartRefreshLayout(binding.refresh);
-            mAdapter.add(fgtGameWelfare, "福利");
-        }
         if (gameEntity.isGift()) {
-            fgtGameGift = FgtGameGift.newInstance(id);
+            fgtGameGift = FgtGameGift.newInstance(id, gameEntity);
             fgtGameGift.setSmartRefreshLayout(binding.refresh);
-            fgtGameGift.loadData(gameEntity);
             mAdapter.add(fgtGameGift, "礼包");
         }
-//        mAdapter.add(fgtGameComment, "评价");
-//        pingJiaIndex = mAdapter.getCount() - 1;
         mAdapter.notifyDataSetChanged();
         CommonUtil.getInstance().reflex(binding.tabLayout, this);
         if (binding.viewPager != null) {
@@ -510,7 +439,6 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
             public void onNext(BaseMessage baseMessage) {
                 G.showToast(gameEntity.isIs_focus_game() ? R.string.cancel_focus_success : R.string.focus_success);
                 gameEntity.setIs_focus_game(!gameEntity.isIs_focus_game());
-                updateFocusTv();
                 view.setEnabled(true);
             }
 

+ 5 - 4
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameDetail.java

@@ -1,11 +1,12 @@
 package com.sheep.gamegroup.module.game.fragment;
 
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
 import android.text.TextUtils;
 import android.view.View;
 import android.widget.TextView;
 
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
 import com.alibaba.fastjson.JSONObject;
 import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
 import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
@@ -27,7 +28,7 @@ import com.sheep.gamegroup.util.TextViewUtil;
 import com.sheep.gamegroup.util.TimeUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.AdpGcGameAppComment;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppInfoList;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppInfoListAdapter;
 import com.sheep.gamegroup.view.adapter.AdpGcGameAppList;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -76,7 +77,7 @@ public class FgtGameDetail extends BaseRefreshLoadMoreFragment implements Action
         recyclerView.setHasFixedSize(true);
         recyclerView.setNestedScrollingEnabled(false);
         recyclerView.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        recyclerView.setAdapter(new AdpGcGameAppInfoList(gameInfoListArrayList));
+        recyclerView.setAdapter(new AdpGcGameAppInfoListAdapter(gameInfoListArrayList));
         refreshData();
     }
 

+ 27 - 88
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameGift.java

@@ -4,19 +4,14 @@ import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
 import com.sheep.gamegroup.absBase.BaseRefreshLoadMoreFragment;
-import com.sheep.gamegroup.model.entity.Article;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GameEntity;
-import com.sheep.gamegroup.model.entity.GameInfoList;
 import com.sheep.gamegroup.model.entity.GiftBagApp;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppActivityRecommend;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppArticleRecommend;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppGiftBag;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppInfoList;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppGiftBagAdapter;
+import com.sheep.gamegroup.view.adapter.WelfareAdapter;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
@@ -27,20 +22,22 @@ import java.util.List;
 import butterknife.BindView;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.schedulers.Schedulers;
+import rx.functions.Action1;
 
 /**
  * Created by realicing on 2019/1/22.
  * realicing@sina.com
  * 小绵羊3.4.10新增 -- 玩转游戏 礼包
  */
-public class FgtGameGift extends BaseRefreshLoadMoreFragment {
+public class FgtGameGift extends BaseRefreshLoadMoreFragment implements Action1<Integer> {
 
     @BindView(R.id.recyclerView)
     RecyclerView recyclerView;
 
-    public static FgtGameGift newInstance(int appId) {
+    public static FgtGameGift newInstance(int appId,GameEntity gameEntity) {
         FgtGameGift fgt = new FgtGameGift();
         fgt.appId = appId;
+        fgt.gameEntity=gameEntity;
         return fgt;
     }
 
@@ -49,47 +46,31 @@ public class FgtGameGift extends BaseRefreshLoadMoreFragment {
         return R.layout.common_rv;
     }
 
-
-    private ArrayList<GameInfoList> gameInfoListArrayList = ListUtil.emptyList();
+    AdpGcGameAppGiftBagAdapter adapter;
+    List<GiftBagApp> list = new ArrayList<>();
 
     @Override
     public void onViewCreated() {
         recyclerView.setHasFixedSize(true);
         recyclerView.setNestedScrollingEnabled(false);
         recyclerView.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        AdpGcGameAppInfoList adpGcGameAppInfoList = new AdpGcGameAppInfoList(gameInfoListArrayList);
-        adpGcGameAppInfoList.bindToRecyclerView(recyclerView);
-        adpGcGameAppInfoList.setEmptyView(R.layout.include_empty_view);
-
-        loadExtra();
-        if(gameEntity != null){
-            loadGameData();
+        if (gameEntity != null) {
+            list.addAll(gameEntity.getHas_gift_bag());
         }
-    }
+        adapter = new AdpGcGameAppGiftBagAdapter(list, gameEntity, this);
+        adapter.bindToRecyclerView(recyclerView);
+        adapter.setEmptyView(R.layout.include_empty_view);
 
-    //加载游戏数据
-    private void loadGameData() {
-        if (gameEntity.isGift()) {
-            gameInfoListArrayList.add(new GameInfoList("礼包推荐", new AdpGcGameAppGiftBag(getActivity(), gameEntity.getHas_gift_bag(), gameEntity)).setSort(SORT_GIFT));
-        }
-        ViewUtil.notifyDataSetChanged(recyclerView);
     }
 
-
     private int appId;
 
 
     private GameEntity gameEntity;
-    public void loadData(final GameEntity gameEntity) {
-        this.gameEntity = gameEntity;
-        if(recyclerView != null) {
-            loadGameData();
-        }
-    }
+
 
     @Override
     public void refreshData() {
-        gameInfoListArrayList.clear();
         SheepApp.getInstance().getNetComponent().getApiService().getGiftBagListByAppId(1, 20, appId)
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
@@ -97,61 +78,10 @@ public class FgtGameGift extends BaseRefreshLoadMoreFragment {
 
                     @Override
                     public void onNext(BaseMessage baseMessage) {
-                        List<GiftBagApp> giftList = baseMessage.getDatas(GiftBagApp.class); 
-                        gameInfoListArrayList.add(new GameInfoList("礼包推荐", new AdpGcGameAppGiftBag(getActivity(), giftList, gameEntity)).setSort(SORT_GIFT));
-                        loadExtra();
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        if (TestUtil.isDev()) G.showToast(baseMessage);
-                        refreshOrLoadMoreComplete();
-                    }
-                });
-    }
-
-    private void loadExtra() {
-        ListUtil.removeItem(gameInfoListArrayList, new ListUtil.CallBack<GameInfoList, Boolean>() {
-            @Override
-            public Boolean call(GameInfoList gameInfoList) {
-                return gameInfoList.getSort() == SORT_ACTIVITY || gameInfoList.getSort() == SORT_ARTICLE;
-            }
-        });
-        ViewUtil.notifyDataSetChanged(recyclerView);
-        //文章推荐
-        SheepApp.getInstance().getNetComponent().getApiService().getDetailArticleRecommend(appId)
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        List<Article> newList = baseMessage.getDatas(Article.class);
-                        if (!ListUtil.isEmpty(newList)) {
-                            gameInfoListArrayList.add(new GameInfoList("文章推荐", new AdpGcGameAppArticleRecommend(getContext(), newList)).setSort(SORT_ARTICLE));
-                            ViewUtil.notifyDataSetChanged(recyclerView);
-                        }
-                        refreshOrLoadMoreComplete();
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        if (TestUtil.isDev()) G.showToast(baseMessage);
-                        refreshOrLoadMoreComplete();
-                    }
-                });
-        //活动推荐
-        SheepApp.getInstance().getNetComponent().getApiService().getDetailActivityRecommend(appId)
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        List<Article> newList = baseMessage.getDatas(Article.class);
-                        if (!ListUtil.isEmpty(newList)) {
-                            gameInfoListArrayList.add(new GameInfoList("活动推荐", new AdpGcGameAppActivityRecommend(getContext(), newList)).setSort(SORT_ACTIVITY));
-                            ViewUtil.notifyDataSetChanged(recyclerView);
-                        }
-                        refreshOrLoadMoreComplete();
+                        List<GiftBagApp> giftList = baseMessage.getDatas(GiftBagApp.class);
+                        list.clear();
+                        list.addAll(giftList);
+                        ViewUtil.notifyDataSetChanged(recyclerView);
                     }
 
                     @Override
@@ -174,4 +104,13 @@ public class FgtGameGift extends BaseRefreshLoadMoreFragment {
     public static final int SORT_ARTICLE = 2;
     //活动推荐
     public static final int SORT_ACTIVITY = 3;
+
+    @Override
+    public void call(Integer integer) {
+        switch (integer) {
+            case WelfareAdapter.TO_REFRESH:
+                refreshData();
+                break;
+        }
+    }
 }

+ 18 - 14
app/src/main/java/com/sheep/gamegroup/module/login/LoginAct.java

@@ -16,6 +16,8 @@ import androidx.fragment.app.FragmentTransaction;
 import com.alibaba.fastjson.JSONObject;
 import com.kfzs.duanduan.utils.StatusBarUtils;
 import com.sheep.gamegroup.absBase.BaseUMActivity;
+import com.sheep.gamegroup.event.BigEvent;
+import com.sheep.gamegroup.event.EventTypes;
 import com.sheep.gamegroup.event.WXLoginAuthEvent;
 import com.sheep.gamegroup.greendao.DDProviderHelper;
 import com.sheep.gamegroup.greendao.download.Account;
@@ -28,7 +30,6 @@ import com.sheep.gamegroup.module.login.fragments.FindAccountFgt;
 import com.sheep.gamegroup.module.login.fragments.SignInFgt;
 import com.sheep.gamegroup.module.login.fragments.SignUpFgt;
 import com.sheep.gamegroup.module.login.fragments.ValidCaptchaFgt;
-import com.sheep.gamegroup.module.login.fragments.WelcomeFgt;
 import com.sheep.gamegroup.util.ApiJSONUtil;
 import com.sheep.gamegroup.util.CertificationUtil;
 import com.sheep.gamegroup.util.ChannelContent;
@@ -111,12 +112,12 @@ public class LoginAct extends BaseUMActivity implements LoginController {
         //TitleBarUtils.getInstance().setTitleBack(this);
 //        if (DDProviderHelper.getInstance().getAccountList().size() == 0) {
 
-        if (getIntent().getStringExtra("where_from") != null) {//为空时代表没有登录的情况下直接进入小绵羊
-            whenToLogin(LoginController.PLATFORM_PHONE);
-        } else {
-            WelcomeFgt welcomeFragment = WelcomeFgt.newInstance(this);
-            showFragment("welcome", welcomeFragment);
-        }
+//        if (getIntent().getStringExtra("where_from") != null) {//为空时代表没有登录的情况下直接进入小绵羊
+        whenToLogin(LoginController.PLATFORM_PHONE);
+//        } else {
+//            WelcomeFgt welcomeFragment = WelcomeFgt.newInstance(this);
+//            showFragment("welcome", welcomeFragment);
+//        }
 //        } else {
 //            SignInFgt signInFragment = SignInFgt.newInstance(this);
 //            showFragment("登录", signInFragment);
@@ -163,19 +164,21 @@ public class LoginAct extends BaseUMActivity implements LoginController {
         Log.e("SNOW", "whenLoginSuccess: access_token---------" + loginResult.getUser().getAccess_token());
         SpUtils.saveQQGameAccessToken(SheepApp.getInstance(), loginResult.getUser().getAccess_token());
 //            Snackbar.make(getWindow().getDecorView(), "登录成功", Snackbar.LENGTH_SHORT).show();
-        if (TextUtils.isEmpty(loginResult.getUser().getBirthday())
-                || loginResult.getUser().getBirthday().startsWith("000")) {
-            ApiJSONUtil.postUserForm();//3.5.0 by 曾杰斌,注:这里认为,没有设置过生日的用户都是新注册用户,需要记录注册来源,可能从网页注册的用户进来后,记录来源会有问题,但是现在只记录游戏用户,问题不是很大
-            getUserInfoFromUM(platform, loginResult);
-        } else {
-            goMain(loginResult);
-        }
+//        if (TextUtils.isEmpty(loginResult.getUser().getBirthday())
+//                || loginResult.getUser().getBirthday().startsWith("000")) {
+//            ApiJSONUtil.postUserForm();//3.5.0 by 曾杰斌,注:这里认为,没有设置过生日的用户都是新注册用户,需要记录注册来源,可能从网页注册的用户进来后,记录来源会有问题,但是现在只记录游戏用户,问题不是很大
+//            getUserInfoFromUM(platform, loginResult);
+//        } else {
+//            goMain(loginResult);
+//        }
         TestUtil.saveUser(loginResult);
         if (platform == LoginController.PLATFORM_ACCOUNT || platform == LoginController.PLATFORM_PHONE) {
             DDProviderHelper.getInstance().saveAccount(Account.generateByUser(loginResult.getUser()), platform);
         }
         //登录成功记录设备信息
         ApiJSONUtil.postUserDeviceLog();
+        EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.USER_LOGIN));
+        finish();
     }
 
     private void getUserInfoFromUM(int platform, final LoginEntity entity) {
@@ -236,6 +239,7 @@ public class LoginAct extends BaseUMActivity implements LoginController {
     }
 
     private void goMain(LoginEntity entity) {
+
         CertificationUtil.newInstance().addCurUserToSdkLoginUser(entity.getToken(), entity.getUser());
         if (TextUtils.isEmpty(SheepApp.getInstance().getGameCode())) {
 //            showProgress();

+ 6 - 4
app/src/main/java/com/sheep/gamegroup/module/search/AdpSearchResult.java

@@ -1,25 +1,26 @@
 package com.sheep.gamegroup.module.search;
 
 import android.content.Context;
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.TextView;
 
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
 import com.sheep.jiuyan.samllsheep.R;
 
 import java.util.ArrayList;
 import java.util.List;
 
-public class AdpSearchResult extends RecyclerView.Adapter<SearchResultHolder> {
+public class AdpSearchResultAdapter extends RecyclerView.Adapter<SearchResultHolder> {
 
     private Context mContext;
 
     private List<SearchItem> items = new ArrayList<>();
 
-    public AdpSearchResult(Context context) {
+    public AdpSearchResultAdapter(Context context) {
         this.mContext = context;
     }
 
@@ -38,6 +39,7 @@ public class AdpSearchResult extends RecyclerView.Adapter<SearchResultHolder> {
     public SearchResultHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
         SearchResultHolder holder = null;
         View itemView = null;
+        //这里是搜索的实际结果的a
         if (i == 1) {
             itemView = LayoutInflater.from(mContext).inflate(R.layout.play_game_vertical_list_item, viewGroup, false);
             holder = new GameHolder(itemView);

+ 4 - 3
app/src/main/java/com/sheep/gamegroup/module/search/FgtSearch.java

@@ -1,10 +1,11 @@
 package com.sheep.gamegroup.module.search;
 
-import androidx.recyclerview.widget.LinearLayoutManager;
 import android.view.View;
 import android.widget.ImageView;
 import android.widget.TextView;
 
+import androidx.recyclerview.widget.LinearLayoutManager;
+
 import com.jcodecraeer.xrecyclerview.XRecyclerView;
 import com.sheep.gamegroup.absBase.ISearch;
 import com.sheep.gamegroup.model.entity.Article;
@@ -54,7 +55,7 @@ public class FgtSearch extends BaseFragment implements ISearch {
     protected View check_net_ll;
     @BindView(R.id.view_list)
     public XRecyclerView listView;
-    private AdpSearchResult listAdapter;
+    private AdpSearchResultAdapter listAdapter;
     protected View bottomLine;
 
     @Override
@@ -68,7 +69,7 @@ public class FgtSearch extends BaseFragment implements ISearch {
         empty_view_msg.setText("无数据");
         empty_view.setVisibility(View.GONE);
         check_net_ll.setVisibility(View.GONE);
-        listAdapter = new AdpSearchResult(getContext());
+        listAdapter = new AdpSearchResultAdapter(getContext());
         listView.setLoadingListener(new XRecyclerView.LoadingListener() {
             @Override
             public void onRefresh() {

+ 34 - 36
app/src/main/java/com/sheep/gamegroup/module/search/GameHolder.java

@@ -1,39 +1,23 @@
 package com.sheep.gamegroup.module.search;
 
-import androidx.annotation.NonNull;
 import android.view.View;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
 import android.widget.TextView;
 
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+
+import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
+import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
+import com.sheep.gamegroup.model.entity.Applications;
 import com.sheep.gamegroup.model.entity.GameSimple;
-import com.sheep.gamegroup.model.entity.Lp;
-import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.util.viewHelper.LayoutParamsUtil;
 import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import butterknife.BindView;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.databinding.PlayGameVerticalListItemBinding;
 
 public class GameHolder extends SearchResultHolder<GameSimple> {
 
-    @BindView(R.id.line_tv)
-    View item_download_welfare_line;
-    @BindView(R.id.detail_task_tv_center)
-    TextView detail_task_tv_center;
-    @BindView(R.id.detail_task_tv_center2)
-    TextView detail_task_tv_center2;
-    @BindView(R.id.item_name_tv)
-    TextView item_name_tv;
-    @BindView(R.id.item_date_tv)
-    TextView item_date_tv;
-    @BindView(R.id.ll_game_tag)
-    LinearLayout ll_game_tag;
-    @BindView(R.id.item_icon_iv)
-    ImageView item_icon_iv;
 
     public GameHolder(@NonNull View itemView) {
         super(itemView);
@@ -44,18 +28,32 @@ public class GameHolder extends SearchResultHolder<GameSimple> {
 
     @Override
     public void configView() {
-        LayoutParamsUtil.resetLayoutParams(item_name_tv, new Lp(G.DENSITY).setTopMargin(8));
-        ViewUtil.setText(item_name_tv, item.getName());
-        ViewUtil.setText(item_date_tv, item.getPackage_size()+"M");
-        GlideImageLoader.setGameImage(item_icon_iv, item.getIcon());
-        ViewUtil.setText(detail_task_tv_center, "查看详情");
-
-//        ViewUtil.setVisibility(item_download_welfare_line, getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
-        ViewUtil.setVisibility(detail_task_tv_center2, item.getGame_discount_id() > 0);
-
-        //tag 标签绘制
-        CommonUtil.getInstance().paintLineaLayout(item.getApplications(), ll_game_tag, 4, R.color.txt_bule, R.drawable.shape_blue_stroke_rectangle_no_lb);
-
+        PlayGameVerticalListItemBinding binding = PlayGameVerticalListItemBinding.bind(itemView);
+        Applications app = item.getApplications();
+        //加载游戏图标
+        ViewUtil.setGameImage(binding.gcGameAppDetailIcon, app.getIcon());
+        //加载游戏名字
+        ViewUtil.setText(binding.gcGameAppDetailName, app.getName());
+        //加载游戏大小与多少人在玩信息
+        ViewUtil.setText(binding.gcGameAppDetailInfoTv, app.getPlayInfo());
+        //加载游戏标签
+        if (app.getGameTagNewList() != null) {
+            LinearLayoutManager playGameActManager = new LinearLayoutManager(SheepApp.getInstance(), LinearLayoutManager.HORIZONTAL, false);
+            binding.gcGameAppDetailTagList.setHasFixedSize(true);
+            binding.gcGameAppDetailTagList.setNestedScrollingEnabled(false);
+            binding.gcGameAppDetailTagList.setLayoutManager(playGameActManager);
+            binding.gcGameAppDetailTagList.setAdapter(new RecyclerViewAdapter<String>(SheepApp.getInstance(), R.layout.item_tag, app.getGameTagNewList()) {
+                @Override
+                public void convert(ViewHolder viewHolder, final String item, int position) {
+                    if (item == null)
+                        return;
+                    if (viewHolder.itemView instanceof TextView) {
+                        ViewUtil.setText((TextView) viewHolder.itemView, item);
+                    }
+                }
+            });
+
+        }
     }
 
 }

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

@@ -4,6 +4,7 @@ import static com.sheep.gamegroup.util.UMConfigUtils.Event.NEWBIE_TASK;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.RECEIVE_AWARD_GAME_TASK;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.XIAOMI_GAME_RECEIVE;
 import static com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp.PUBLIC_TAG_PREFIX_TEXTVIEW_LIST;
+import static com.sheep.gamegroup.view.adapter.WelfareAdapter.RECEIVE_FAILED;
 import static com.sheep.gamegroup.view.adapter.WelfareAdapter.TO_REFRESH;
 import static com.sheep.jiuyan.samllsheep.utils.ClassFileHelper.DIR;
 
@@ -2973,6 +2974,8 @@ public class CommonUtil {
 
                     @Override
                     public void onError(BaseMessage baseMessage) {
+                        if (action1 != null)
+                            action1.call(RECEIVE_FAILED);
                         G.showToast(baseMessage);
                     }
                 });

+ 25 - 21
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -147,10 +147,8 @@ import com.sheep.gamegroup.view.activity.ActFootprint;
 import com.sheep.gamegroup.view.activity.ActGameAccount;
 import com.sheep.gamegroup.view.activity.ActGameAgencyRecharge;
 import com.sheep.gamegroup.view.activity.ActGameCenter;
-import com.sheep.gamegroup.view.activity.ActGcGameAppDetail;
 import com.sheep.gamegroup.view.activity.ActGiftCenter;
 import com.sheep.gamegroup.view.activity.ActGiftDetail;
-import com.sheep.gamegroup.view.activity.ActGuide;
 import com.sheep.gamegroup.view.activity.ActGuideDeblocked;
 import com.sheep.gamegroup.view.activity.ActGuideOnHook;
 import com.sheep.gamegroup.view.activity.ActImg;
@@ -461,7 +459,6 @@ public class Jump2View {
      * @param activity
      */
     public void checkOrGoHomePage(final Activity activity) {
-        // todo checkOrGoHome
         CommonUtil.getInstance().updateUserInfo(userEntity -> {
             if (userEntity != null && !TextUtils.isEmpty(userEntity.getShare_link())) {
                 GlideImageLoader.saveAndSetRqImage(null, userEntity.getShareLink(ShareLinkConfig.FACE_TO_FACE), 800);
@@ -1761,17 +1758,26 @@ public class Jump2View {
     }
 
     public void gotoGuideOrMain(final Activity activity) {
-        if (SysAppUtil.isNewSmallSheep()) {
-            Intent intent = new Intent(activity, ActGuide.class);
-            activity.startActivity(intent);
-            activity.finish();
-        } else {
-            gotoMain(activity);
-        }
+        final Intent intent = new Intent(activity, ActMain.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
+        activity.startActivity(intent);
+        activity.finish();
+//        goHomePageView(activity,null);
+//        if (SysAppUtil.isNewSmallSheep()) {
+//            Intent intent = new Intent(activity, ActGuide.class);
+//            activity.startActivity(intent);
+//            activity.finish();
+//        } else {
+//            gotoMain(activity);
+//        }
     }
 
+    /**
+     * 这里是启动后去主页面的实际逻辑
+     * @param activity
+     */
     public void gotoMain(Activity activity) {
         String openId = SpUtils.getToken(SheepApp.getInstance());
+        checkOrGoHomePage(activity);
         if (!TextUtils.isEmpty(openId)) {
             checkOrGoHomePage(activity);
         } else {
@@ -2306,6 +2312,15 @@ public class Jump2View {
         }
     }
 
+    public void goGiftDetailFull(Context context, GiftBagApp object, String icon, String name) {
+        Intent intent = new Intent(context, ActGiftDetail.class);
+        DataUtil.putObject(intent, object);
+        intent.putExtra("icon", icon);
+        intent.putExtra("name", name);
+        context.startActivity(intent);
+        GIFT_DETAIL.onEvent();
+    }
+
     /**
      * 进入我的礼包界面
      */
@@ -2372,17 +2387,6 @@ public class Jump2View {
     }
 
     /**
-     * 老的游戏详情
-     */
-    public void goOldPlayGameDetail(int id) {
-        Activity activity = SheepApp.getInstance().getCurrentActivity();
-        Intent intent = new Intent(activity, ActGcGameAppDetail.class);
-        intent.putExtra("id", id);
-        activity.startActivity(intent);
-        GAME_PLAY_GAME_DETAIL.onEvent();
-    }
-
-    /**
      * 普通的消息详情
      */
     public void goActSysNfDetail(Activity activity, Object object) {

+ 0 - 436
app/src/main/java/com/sheep/gamegroup/view/activity/ActGcGameAppDetail.java

@@ -1,436 +0,0 @@
-package com.sheep.gamegroup.view.activity;
-
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_SHARE;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.text.TextUtils;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.fragment.app.Fragment;
-import androidx.recyclerview.widget.RecyclerView;
-import androidx.viewpager.widget.ViewPager;
-
-import com.google.android.material.tabs.TabLayout;
-import com.kfzs.duanduan.utils.NumberFormatUtils;
-import com.kfzs.duanduan.utils.StatusBarUtils;
-import com.scwang.smartrefresh.layout.SmartRefreshLayout;
-import com.scwang.smartrefresh.layout.api.RefreshLayout;
-import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
-import com.sheep.gamegroup.absBase.AbsGetDownloadListener;
-import com.sheep.gamegroup.absBase.BaseActivity;
-import com.sheep.gamegroup.absBase.ILoadMore;
-import com.sheep.gamegroup.absBase.IRefresh;
-import com.sheep.gamegroup.event.BigEvent;
-import com.sheep.gamegroup.helper.DownloadHelper;
-import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.GameEntity;
-import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.util.ApiUtil;
-import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.util.DataUtil;
-import com.sheep.gamegroup.util.Jump2View;
-import com.sheep.gamegroup.util.ListUtil;
-import com.sheep.gamegroup.util.RefreshUtil;
-import com.sheep.gamegroup.util.RequestCodeConstants;
-import com.sheep.gamegroup.util.TagListUtil;
-import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter2;
-import com.sheep.gamegroup.view.fragment.FgtGcGameAppComment;
-import com.sheep.gamegroup.view.fragment.FgtGcGameAppDetail;
-import com.sheep.gamegroup.view.fragment.FgtGcGameAppWelfare;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import org.afinal.simplecache.ApiKey;
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
-
-import java.util.List;
-import java.util.Locale;
-
-import butterknife.BindView;
-import butterknife.OnClick;
-import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.schedulers.Schedulers;
-
-
-/**
- * Created by realicing on 2018/10/31.
- * realicing@sina.com
- * 新的游戏详情界面
- */
-public class ActGcGameAppDetail extends BaseActivity {
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        StatusBarUtils.setTranslucent(this);
-        super.onCreate(savedInstanceState);
-    }
-
-    @Override
-    protected int getLayoutId() {
-        return R.layout.act_gc_game_app_detail;
-    }
-
-    @BindView(R.id.refresh)
-    SmartRefreshLayout refresh;
-    @BindView(R.id.tabLayout)
-    TabLayout tabLayout;
-    @BindView(R.id.viewPager)
-    ViewPager viewPager;
-    @BindView(R.id.gc_game_app_detail_iv)
-    ImageView gc_game_app_detail_iv;
-    @BindView(R.id.gc_game_app_detail_iv2)
-    ImageView gc_game_app_detail_iv2;
-    @BindView(R.id.gc_game_app_detail_play_iv)
-    ImageView gc_game_app_detail_play_iv;
-    @BindView(R.id.gc_game_app_detail_icon)
-    ImageView gc_game_app_detail_icon;
-    @BindView(R.id.write_comment)
-    ImageView write_comment;
-    @BindView(R.id.gc_game_app_detail_bt1)
-    TextView gc_game_app_detail_bt1;
-    @BindView(R.id.gc_game_app_detail_name)
-    TextView gc_game_app_detail_name;
-    @BindView(R.id.gc_game_app_detail_fl_tv)
-    TextView gc_game_app_detail_fl_tv;
-    @BindView(R.id.gc_game_app_detail_bt2)
-    TextView gc_game_app_detail_bt2;
-    @BindView(R.id.gc_game_app_detail_bt3)
-    TextView gc_game_app_detail_bt3;
-    @BindView(R.id.gc_game_app_detail_tag_list)
-    RecyclerView recyclerView;
-
-    private TitleFragmentListAdapter2 mAdapter;
-    private FgtGcGameAppDetail fgtGcPlayGameDetail;
-    private FgtGcGameAppComment fgtGcGameAppComment;
-
-    private int id;
-
-    @Override
-    public void initView() {
-        id = getIntent().getIntExtra("id", 0);
-        EventBus.getDefault().register(this);
-        //tagList
-        TagListUtil.setTagList(recyclerView, tagList);
-        //viewPager
-        mAdapter = new TitleFragmentListAdapter2(getSupportFragmentManager());
-        fgtGcPlayGameDetail = FgtGcGameAppDetail.newInstance(id);
-        fgtGcGameAppComment = FgtGcGameAppComment.newInstance(id);
-        fgtGcPlayGameDetail.setSmartRefreshLayout(refresh);
-        fgtGcGameAppComment.setSmartRefreshLayout(refresh);
-        fgtGcGameAppComment.setListAction1(fgtGcPlayGameDetail);
-        mAdapter.add(fgtGcPlayGameDetail, "详情");
-        mAdapter.add(fgtGcGameAppComment, "评价");
-        viewPager.setOffscreenPageLimit(mAdapter.getCount());
-        viewPager.setAdapter(mAdapter);
-        tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(viewPager));
-        tabLayout.setupWithViewPager(viewPager);
-        CommonUtil.getInstance().reflex(tabLayout, this);
-        //refresh
-        refresh.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
-
-            @Override
-            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
-                refreshData();
-            }
-
-            @Override
-            public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
-                loadMoreData();
-            }
-        });
-        RefreshUtil.newInstance().publicParameterLoadMore(refresh, this);
-
-        ViewUtil.setImage(write_comment, ViewUtil.getNetImgByName("write_comment"));
-    }
-
-    private List<String> tagList = ListUtil.emptyList();
-
-    //重置view
-    private void resetView() {
-        ViewUtil.setDefaultText(gc_game_app_detail_name);
-        ViewUtil.setText(gc_game_app_detail_fl_tv);
-    }
-
-    //检查数据
-    private void checkData(GameEntity gameEntity) {
-        if (gameEntity != null && gameEntity.getApp() != null) {
-            loadData(gameEntity);
-        } else {
-            resetView();
-        }
-    }
-
-    private GameEntity gameEntity;
-
-    //更新关注状态
-    private void updateFocusTv() {
-        if (gc_game_app_detail_bt1 != null && gameEntity != null)
-            gc_game_app_detail_bt1.setText(gameEntity.isIs_focus_game() ? R.string.has_focus : R.string.focus);
-    }
-
-    //加载游戏数据
-    private void loadData(final GameEntity gameEntity) {
-        this.gameEntity = gameEntity;
-        //更新关注状态
-        updateFocusTv();
-        tryInitWelfare();
-        //更新评价数量
-        if (gameEntity.getApp().getComment_num() > 0) {
-            TabLayout.Tab tab = tabLayout.getTabAt(1);
-            if (tab != null)
-                tab.setText(String.format(Locale.CHINA, "评价(%d)", gameEntity.getApp().getComment_num()));
-            CommonUtil.getInstance().reflex(tabLayout, this, true);
-        }
-        //加载游戏背景
-        if (TextUtils.isEmpty(gameEntity.getApp().getMain_publicize())) {
-            ViewUtil.setImage(gc_game_app_detail_iv, gameEntity.getApp().getPictures());
-            ViewUtil.setVisibility(gc_game_app_detail_iv, true);
-            ViewUtil.setVisibility(gc_game_app_detail_iv2, false);
-        } else {
-            ViewUtil.setImage(gc_game_app_detail_iv2, gameEntity.getApp().getMain_publicize());
-            ViewUtil.setVisibility(gc_game_app_detail_iv, false);
-            ViewUtil.setVisibility(gc_game_app_detail_iv2, true);
-            if (gameEntity.getApp().getMain_publicize().endsWith(".mp4")) {
-                gc_game_app_detail_play_iv.setVisibility(View.VISIBLE);
-                gc_game_app_detail_play_iv.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        Jump2View.getInstance().goActPlayVideo(gameEntity.getApp().getMain_publicize(), gameEntity.getApp().getName());
-                    }
-                });
-            }
-        }
-        //加载游戏图标
-        ViewUtil.setGameImage(gc_game_app_detail_icon, gameEntity.getApp().getIcon());
-        //加载游戏名字
-        ViewUtil.setText(gc_game_app_detail_name, gameEntity.getApp().getName());
-        //加载游戏 福利
-        if (gameEntity.getRelease_task() != null)
-            ViewUtil.setText(gc_game_app_detail_fl_tv, "+\u0020\u0020" + NumberFormatUtils.retainMost2W(gameEntity.getRelease_task().getBonus()) + "元");
-        else
-            ViewUtil.setText(gc_game_app_detail_fl_tv);
-        //加载游戏标签
-        if (gameEntity.getApp().getTags() != null) {
-            tagList.clear();
-            tagList.addAll(gameEntity.getApp().getGameTagNewList());
-            ListUtil.removeNull(tagList);
-            if (recyclerView.getAdapter() != null)
-                recyclerView.getAdapter().notifyDataSetChanged();
-        }
-        //下载按钮
-        CommonUtil.getInstance().palyGameDetailBtnValue(true, gameEntity, gc_game_app_detail_bt2, 0);
-        fgtGcPlayGameDetail.loadData(gameEntity);
-        if (gameEntity.getApp().getGame_discount_id() == 0) {
-            gc_game_app_detail_bt3.setVisibility(View.GONE);
-        } else {
-            gc_game_app_detail_bt3.setVisibility(View.VISIBLE);
-        }
-    }
-
-    private FgtGcGameAppWelfare fgtGcGameAppWelfare;
-
-    //重新初始化viewPager的数据
-    private void tryInitWelfare() {
-        if (fgtGcGameAppWelfare != null || !gameEntity.isGift()) {
-            return;
-        }
-        fgtGcGameAppWelfare = FgtGcGameAppWelfare.newInstance(id);
-        fgtGcGameAppWelfare.setSmartRefreshLayout(refresh);
-        fgtGcGameAppWelfare.loadData(gameEntity);
-        mAdapter.add(fgtGcGameAppWelfare, "礼包");
-        mAdapter.notifyDataSetChanged();
-        viewPager.setOffscreenPageLimit(mAdapter.getCount());
-    }
-
-    //通过网络获取游戏数据并尝试加载
-    private void initDetailFromNet() {
-        SheepApp.getInstance().getNetComponent().getApiService().playGameDetail(id)
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(this) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.playGameDetail(id));
-                        if (isNewData) {
-                            GameEntity gameEntity = baseMessage.getData(GameEntity.class);
-                            checkData(gameEntity);
-                        } else if (gameEntity != null) {
-                            //更新下载按钮
-                            CommonUtil.getInstance().palyGameDetailBtnValue(true, gameEntity, gc_game_app_detail_bt2, 0);
-                        }
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        G.showToast(baseMessage);
-                        resetView();
-                    }
-                });
-    }
-
-    @Override
-    public void initData() {
-        GameEntity gameEntity = DataUtil.getInstance().getCacheResult(ApiKey.playGameDetail(id), GameEntity.class);
-        checkData(gameEntity);
-        refreshData();
-    }
-
-    private int refreshDataCount = 0;
-
-    //刷新数据
-    public void refreshData() {
-        refreshData(viewPager.getCurrentItem());
-    }
-
-    //刷新数据
-    public void refreshData(int position) {
-        initDetailFromNet();
-        boolean isRefresh = false;
-        if (refreshDataCount != 0) {
-            Fragment item = mAdapter.getItem(position);
-            if (item instanceof IRefresh) {//可刷新,就调用当前fragment刷新数据
-                ((IRefresh) item).refreshData();
-                isRefresh = true;
-            }
-        }
-        refreshDataCount++;
-        if (!isRefresh)
-            notifyDataSetChanged();
-    }
-
-    //加载更多数据
-    private void loadMoreData() {
-        Fragment item = mAdapter.getItem(viewPager.getCurrentItem());
-        if (item instanceof ILoadMore) {//可加载更多,就调用当前fragment刷新数据
-            ((ILoadMore) item).loadMoreData();
-        } else {
-            notifyDataSetChanged();
-        }
-    }
-
-    private void notifyDataSetChanged() {
-        if (refresh != null) {
-            refresh.finishRefresh();
-            refresh.finishLoadMore();
-        }
-    }
-
-    //点击返回
-    public void onClickBackImg(View view) {
-        finish();
-    }
-
-    //点击分享
-    public void onClickShareImg(View view) {
-        FIND_SHARE.onEvent("application_id", id);
-        if (gameEntity == null || gameEntity.getApp() == null || TextUtils.isEmpty(gameEntity.getApp().getName())) {
-            Jump2View.getInstance().tryShare(this, "find_share_url", "application_id", id);
-            return;
-        }
-        Jump2View.getInstance().tryShare(this, "find_share_url", "application_id", id, String.format(Locale.CHINA, "【%s】超好玩,来小绵羊一起玩", gameEntity.getApp().getName()));
-    }
-
-    //点击加,发表评论
-    public void onClickPlusDrag(View view) {
-        Jump2View.getInstance().goActCommentGameApp(this, id);
-    }
-
-    //点击关注
-    public void onClickFollowTv(final View view) {
-        if (gameEntity == null) {
-            G.showToast(R.string.loading_data);
-            return;
-        }
-        view.setEnabled(false);
-        ApiUtil.postGameUserFocusGame(id, new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-            @Override
-            public void onNext(BaseMessage baseMessage) {
-                G.showToast(gameEntity.isIs_focus_game() ? R.string.cancel_focus_success : R.string.focus_success);
-                gameEntity.setIs_focus_game(!gameEntity.isIs_focus_game());
-                updateFocusTv();
-                view.setEnabled(true);
-            }
-
-            @Override
-            public void onError(BaseMessage baseMessage) {
-                G.showToast(gameEntity.isIs_focus_game() ? R.string.cancel_focus_fail : R.string.focus_fail);
-                view.setEnabled(true);
-            }
-        });
-    }
-
-    @OnClick(R.id.gc_game_app_detail_bt3)
-    public void onGoDirectionalPay(View v) {
-        CommonUtil.getInstance().getUserInfo(false, user -> {
-            if (user == null) return;
-            if (user.isVIP()) {
-                Jump2View.getInstance().gotoGameVipRecharge(gameEntity.getApp());
-            } else {
-                Jump2View.getInstance().gotoVip(this);
-            }
-        });
-    }
-
-    private AbsGetDownloadListener absGetDownloadListener = new AbsGetDownloadListener(true) {
-        @Override
-        public String getDownloadUrl(String packageName) {
-            return gameEntity != null ? gameEntity.getDownloadUrl(packageName) : null;
-        }
-
-        @Override
-        public TextView getTextView2(String packageName) {
-            return getDownloadUrl(packageName) != null ? gc_game_app_detail_bt2 : null;
-        }
-
-        @Override
-        public TextView getTextView(String downloadUrl) {
-            return gameEntity != null && TextUtils.equals(downloadUrl, gameEntity.downLinks()) ? gc_game_app_detail_bt2 : null;
-        }
-
-        @Override
-        public DownloadHelper getDownloadHelper(String downloadUrl) {
-            return gameEntity != null ? gameEntity.getDownloadHelper(downloadUrl) : null;
-        }
-    };
-
-    @Subscribe
-    public void onEventMainThread(Intent intent) {
-        absGetDownloadListener.onEventMainThread(intent);
-    }
-
-    @Subscribe
-    public void onEventMainThread(BigEvent event) {
-        absGetDownloadListener.onEventMainThread(event);
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        switch (requestCode) {
-            case RequestCodeConstants.REQUEST_CODE_REFRESH:
-                if (resultCode == RESULT_OK)//发表评论成功
-                    refreshData(1);//需要刷新第二页的评论
-                break;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        EventBus.getDefault().unregister(this);
-    }
-
-    //点击领取福利
-    public void onClickDownloadReceiveWelfare(View view) {
-        //TODO 点击领取福利
-        G.showToast(R.string.coming_soon);
-    }
-}

+ 28 - 2
app/src/main/java/com/sheep/gamegroup/view/activity/ActGiftDetail.java

@@ -14,20 +14,24 @@ import com.google.android.material.appbar.AppBarLayout;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.model.entity.GiftBag;
 import com.sheep.gamegroup.model.entity.GiftBagApp;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.StringUtils;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
+import com.sheep.gamegroup.view.adapter.WelfareAdapter;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.databinding.ActGiftDetailBinding;
 import com.sheep.jiuyan.samllsheep.utils.G;
 
+import rx.functions.Action1;
+
 /**
  * Created by realicing on 2018/9/14.
  * realicing@sina.com
  */
-public class ActGiftDetail extends BaseActivity {
+public class ActGiftDetail extends BaseActivity implements Action1<Integer> {
 
     @Override
     protected int getLayoutId() {
@@ -96,10 +100,15 @@ public class ActGiftDetail extends BaseActivity {
     public void initData() {
         data = DataUtil.getObject(getIntent(), GiftBagApp.class);
         if (data.getApp() != null) {
+            //传过来的包数据里有app的信息
             //这个是图标
             GlideImageLoader.setGameImage(binding.imageView4, data.getApp().getIcon());
             ViewUtil.setText(binding.tvGameName, data.getApp().getName());
         }
+        bindingView();
+    }
+
+    void bindingView() {
         GiftBag giftBag = data.getGift_bag();
         if (giftBag != null) {
             //这个是游戏包的内容
@@ -114,7 +123,7 @@ public class ActGiftDetail extends BaseActivity {
                 binding.btnGet.setOnClickListener(new View.OnClickListener() {
                     @Override
                     public void onClick(View view) {
-                        GiftCenterAdapter.receiveGiftBag(ActGiftDetail.this, data, null);
+                        GiftCenterAdapter.receiveGiftBag(ActGiftDetail.this, data, ActGiftDetail.this);
                     }
                 });
             } else {
@@ -133,4 +142,21 @@ public class ActGiftDetail extends BaseActivity {
             }
         }
     }
+
+    void refresh() {
+        CommonUtil.getInstance().getGiftBag((int) data.getGift_bag().getId(), new Action1<GiftBagApp>() {
+            @Override
+            public void call(GiftBagApp giftBagApp) {
+                data = giftBagApp;
+                bindingView();
+            }
+        });
+    }
+
+    @Override
+    public void call(Integer integer) {
+        if (integer == WelfareAdapter.TO_REFRESH) {
+            refresh();
+        }
+    }
 }

+ 0 - 2
app/src/main/java/com/sheep/gamegroup/view/activity/ActMyWelfare.java

@@ -54,7 +54,6 @@ public class ActMyWelfare extends BaseActivity {
     public void initListener() {
         indicator.setVisibility(View.GONE);
         mAdapter = new TitleFragmentListAdapter(getSupportFragmentManager());
-//        mAdapter.add(new FgtMyDownloadWelfareList(), "下载奖励");
         FgtMyGift fgt = new FgtMyGift();
         if (getIntent().hasExtra("token")) {
             String token = getIntent().getStringExtra("token");
@@ -62,7 +61,6 @@ public class ActMyWelfare extends BaseActivity {
             fgt.setToken(token);
         }
         mAdapter.add(fgt, "我的礼包");
-//        mAdapter.add(new FgtWelfareUseRecord(), "使用记录");
         pager.setAdapter(mAdapter);
         indicator.setupWithViewPager(pager);
         pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {

+ 3 - 3
app/src/main/java/com/sheep/gamegroup/view/activity/ActUserAppHome.java

@@ -34,7 +34,7 @@ import com.sheep.gamegroup.util.RefreshUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.share.ShareLinkConfig;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppInfoList;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppInfoListAdapter;
 import com.sheep.gamegroup.view.adapter.AdpGcGameAppList;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
 import com.sheep.gamegroup.view.fragment.FgtUserAppHomeCommentList;
@@ -139,8 +139,8 @@ public class ActUserAppHome extends BaseActivity {
         user_app_home_game_list.setHasFixedSize(true);
         user_app_home_game_list.setNestedScrollingEnabled(false);
         user_app_home_game_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        AdpGcGameAppInfoList adpGcGameAppInfoList = new AdpGcGameAppInfoList(gameInfoListArrayList);
-        adpGcGameAppInfoList.bindToRecyclerView(user_app_home_game_list);
+        AdpGcGameAppInfoListAdapter adpGcGameAppInfoListAdapter = new AdpGcGameAppInfoListAdapter(gameInfoListArrayList);
+        adpGcGameAppInfoListAdapter.bindToRecyclerView(user_app_home_game_list);
     }
 
     @Override

+ 0 - 3
app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java

@@ -169,9 +169,6 @@ public class SplashAct extends BaseActivity {
             ApiJSONUtil.postUserDeviceLog();
         }
         init();
-//        if (requestPermissions()) {
-//            init();
-//        }
     }
 
     private void init() {

+ 0 - 79
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppGiftBag.java

@@ -1,79 +0,0 @@
-package com.sheep.gamegroup.view.adapter;
-
-import android.content.Context;
-import android.view.View;
-import android.widget.TextView;
-
-import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
-import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
-import com.sheep.gamegroup.model.entity.GameEntity;
-import com.sheep.gamegroup.model.entity.GiftBag;
-import com.sheep.gamegroup.model.entity.GiftBagApp;
-import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
-
-import java.util.List;
-
-import rx.functions.Action1;
-
-/**
- * Created by realicing on 2018/11/5.
- * realicing@sina.com
- */
-public class AdpGcGameAppGiftBag extends RecyclerViewAdapter<GiftBagApp> {
-
-    private GameEntity gameEntity;
-    public AdpGcGameAppGiftBag(Context context, List<GiftBagApp> datas, GameEntity gameEntity) {
-        super(context, R.layout.item_gift_bag, datas);
-        this.gameEntity = gameEntity;
-    }
-
-    @Override
-    public void convert(ViewHolder viewHolder, final GiftBagApp item, int position) {
-        View item_gift_bag_line_top = viewHolder.itemView.findViewById(R.id.item_gift_bag_line_top);
-        final TextView btn_tv = viewHolder.itemView.findViewById(R.id.item_gift_bag_btn);
-        TextView item_gift_bag_num = viewHolder.itemView.findViewById(R.id.item_gift_bag_num);
-        TextView item_gift_bag_name = viewHolder.itemView.findViewById(R.id.item_gift_bag_name);
-
-        ViewUtil.setVisibility2(item_gift_bag_line_top, position != 0);
-
-        GiftBag giftBag;
-        if(item == null || (giftBag = item.getGift_bag()) == null){
-            return;
-        }
-        ViewUtil.setText(item_gift_bag_name, giftBag.getGiftName());
-        ViewUtil.setText(item_gift_bag_num, giftBag.getLastNumText());
-
-        if (!item.isReceived()){
-            btn_tv.setText("领取");
-            btn_tv.setEnabled(true);
-            btn_tv.setTextColor(SheepApp.getInstance().getResources().getColor(R.color.txt_bule));
-            btn_tv.setBackgroundResource(R.drawable.shape_blue_stroke_rectangle);
-            btn_tv.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View v) {
-                    if(CommonUtil.getInstance().isInstallApp(gameEntity.getApp().getPackage_name(), gameEntity.getApp().getName())){
-                        CommonUtil.getInstance().receiveGiftById(mContext, item, new Action1<Integer>() {
-                            @Override
-                            public void call(Integer integer) {
-                                item.setReceived(true);
-                                btn_tv.setText("已领取");
-                                btn_tv.setEnabled(false);
-                                notifyDataSetChanged();
-                            }
-                        },gameEntity.getApp().getPackage_name());
-                    }
-
-                }
-            });
-        }else {
-            btn_tv.setText("已领取");
-            btn_tv.setEnabled(false);
-            btn_tv.setTextColor(SheepApp.getInstance().getResources().getColor(R.color.time_created));
-            btn_tv.setBackgroundResource(R.drawable.shape_gray_stroke_rectangle_10_radius);
-        }
-    }
-
-}

+ 123 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppGiftBagAdapter.java

@@ -0,0 +1,123 @@
+package com.sheep.gamegroup.view.adapter;
+
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.GIFT_BAG_COPY_CODE;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.GIFT_BAG_RECEIVE;
+import static com.sheep.gamegroup.view.adapter.WelfareAdapter.RECEIVE_FAILED;
+import static com.sheep.gamegroup.view.adapter.WelfareAdapter.TO_REFRESH;
+
+import android.app.Activity;
+import android.view.View;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.sheep.gamegroup.gaiban.mainpage.data.source.UserInfoDataSource;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.entity.GiftBag;
+import com.sheep.gamegroup.model.entity.GiftBagApp;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.GlideImageLoader;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.StringUtils;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.databinding.ItemDownloadWelfareBinding;
+import com.sheep.jiuyan.samllsheep.service.DownloadService;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.List;
+
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+import rx.functions.Action1;
+
+/**
+ * Created by realicing on 2018/11/5.
+ * realicing@sina.com
+ */
+public class AdpGcGameAppGiftBagAdapter extends BaseQuickAdapter<GiftBagApp, BaseViewHolder> {
+
+    private GameEntity gameEntity;
+    private Action1<Integer> action1;
+
+    public AdpGcGameAppGiftBagAdapter(List<GiftBagApp> datas, GameEntity gameEntity, Action1<Integer> action1) {
+        super(R.layout.item_download_welfare, datas);
+        this.gameEntity = gameEntity;
+        this.action1 = action1;
+    }
+
+    private void obtainGiftBag(final Activity activity, final GiftBagApp item, final Action1<Integer> action1) {
+        if (UserInfoDataSource.getInstance().hasLogin(activity)) {
+            if (!CommonUtil.getInstance().isInstallApp(gameEntity.getApp().getPackage_name(), gameEntity.getApp().getName())) {
+                return;
+            }
+            int gift_bag_id = item.getGift_bag().getId();
+            GIFT_BAG_RECEIVE.onEvent("gift_bag_id", gift_bag_id);
+            SheepApp.getInstance().getNetComponent().getApiService().receiveGiftBag(gift_bag_id)
+                    .subscribeOn(Schedulers.io())
+                    .observeOn(AndroidSchedulers.mainThread())
+                    .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                        @Override
+                        public void onNext(BaseMessage baseMessage) {
+                            String code = baseMessage.getData(String.class);
+                            item.setReceived(true);
+                            item.setCode(code);
+                            if (action1 != null)
+                                action1.call(TO_REFRESH);
+                            if (activity != null)
+                                ViewUtil.showGetWelfareDialog(activity, item);
+                        }
+
+                        @Override
+                        public void onError(BaseMessage baseMessage) {
+                            if (action1 != null)
+                                action1.call(RECEIVE_FAILED);
+                            G.showToast(baseMessage);
+                        }
+                    });
+        }
+    }
+
+
+    @Override
+    protected void convert(BaseViewHolder holder, GiftBagApp item) {
+        ItemDownloadWelfareBinding binding = ItemDownloadWelfareBinding.bind(holder.itemView);
+        final GiftBag itemGiftBag = item.getGift_bag();
+        if (itemGiftBag == null) {
+            return;
+        }
+        GlideImageLoader.setGameImage(binding.icon, gameEntity.getApp().getIcon());
+        ViewUtil.setText(binding.tvTitle, itemGiftBag.getGiftName());
+        ViewUtil.setText(binding.tvContent, itemGiftBag.getGiftContent());
+        if (!item.isReceived()) {//没有code,就视为没有领取礼包
+            binding.btn.setText("领取");
+            binding.btn.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    obtainGiftBag((Activity) holder.itemView.getContext(), item, action1);
+                }
+            });
+        } else {
+            binding.btn.setText("复制");
+            binding.btn.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    GIFT_BAG_COPY_CODE.onEvent("gift_bag_id", item.getGift_bag().getId(), "gift_bag_code", item.getCode());
+                    StringUtils.CopyText(item.getCode());
+                    G.showToast(R.string.success_copy_code);
+                }
+            });
+        }
+        holder.itemView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                item.setApp(gameEntity.getApp());
+                //点击礼包项
+                Jump2View.getInstance().goGiftDetail(holder.itemView.getContext(), item);
+            }
+        });
+        DownloadService.setDownLoadLongClick(holder.itemView, item.getApp());
+    }
+}

+ 4 - 3
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppInfoList.java

@@ -1,9 +1,10 @@
 package com.sheep.gamegroup.view.adapter;
 
-import androidx.recyclerview.widget.RecyclerView;
 import android.view.View;
 import android.widget.TextView;
 
+import androidx.recyclerview.widget.RecyclerView;
+
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
 import com.sheep.gamegroup.model.entity.GameInfoList;
@@ -21,8 +22,8 @@ import java.util.List;
  * 游戏详情中详情列表:游戏介绍、详情信息、用户评价、相关游戏、热门试玩
  * 游戏详情中福利列表:游戏评分、文章推荐、活动推荐
  */
-public class AdpGcGameAppInfoList extends BaseQuickAdapter<GameInfoList, BaseViewHolder> {
-    public AdpGcGameAppInfoList(List<GameInfoList> datas) {
+public class AdpGcGameAppInfoListAdapter extends BaseQuickAdapter<GameInfoList, BaseViewHolder> {
+    public AdpGcGameAppInfoListAdapter(List<GameInfoList> datas) {
         super(R.layout.item_gc_game_app_detail_list, datas);
     }
 

+ 29 - 40
app/src/main/java/com/sheep/gamegroup/view/adapter/GiftCenterAdapter.java

@@ -10,6 +10,7 @@ import android.content.Context;
 import android.text.TextUtils;
 import android.view.View;
 
+import com.sheep.gamegroup.gaiban.mainpage.data.source.UserInfoDataSource;
 import com.sheep.gamegroup.model.entity.Applications;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GiftBag;
@@ -109,48 +110,36 @@ public class GiftCenterAdapter extends AdbCommonRecycler<GiftBagApp> {
      * @param item
      * @param action1
      */
+
     public static void receiveGiftBag(final Activity activity, final GiftBagApp item, final Action1<Integer> action1) {
-        if (item.getGift_bag().getIsVip() == 1) {
-            CommonUtil.getInstance().getUserInfo(true, user -> {
-                if (!user.isVIP()) {
-                    ViewUtil.showConfirmDialog(activity, "温馨提示", "该礼包为VIP特权礼包,推荐您成为VIP用户,领取礼包~!",
-                            "放弃", "成为VIP", diag -> {
-                            },
-                            dialog -> Jump2View.getInstance().gotoVip(activity)).show();
-                } else {
-                    obtainGiftBag(activity, item, action1);
-                }
-            });
+        if (UserInfoDataSource.getInstance().hasLogin(activity)) {
+            if (!CommonUtil.getInstance().isInstallApp(item.getApp().getPackage_name(), item.getApp().getName())) {
+                return;
+            }
+            int gift_bag_id = item.getGift_bag().getId();
+            GIFT_BAG_RECEIVE.onEvent("gift_bag_id", gift_bag_id);
+            SheepApp.getInstance().getNetComponent().getApiService().receiveGiftBag(gift_bag_id)
+                    .subscribeOn(Schedulers.io())
+                    .observeOn(AndroidSchedulers.mainThread())
+                    .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                        @Override
+                        public void onNext(BaseMessage baseMessage) {
+                            String code = baseMessage.getData(String.class);
+                            item.setReceived(true);
+                            item.setCode(code);
+                            if (action1 != null)
+                                action1.call(TO_REFRESH);
+                            if (activity != null)
+                                ViewUtil.showGetWelfareDialog(activity, item);
+                        }
 
-        } else {
-            obtainGiftBag(activity, item, action1);
+                        @Override
+                        public void onError(BaseMessage baseMessage) {
+                            if (action1 != null)
+                                action1.call(RECEIVE_FAILED);
+                            G.showToast(baseMessage);
+                        }
+                    });
         }
     }
-
-    private static void obtainGiftBag(final Activity activity, final GiftBagApp item, final Action1<Integer> action1) {
-        int gift_bag_id = item.getGift_bag().getId();
-        GIFT_BAG_RECEIVE.onEvent("gift_bag_id", gift_bag_id);
-        SheepApp.getInstance().getNetComponent().getApiService().receiveGiftBag(gift_bag_id)
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        String code = baseMessage.getData(String.class);
-                        item.setReceived(true);
-                        item.setCode(code);
-                        if (action1 != null)
-                            action1.call(TO_REFRESH);
-                        if (activity != null)
-                            ViewUtil.showGetWelfareDialog(activity, item);
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        if (action1 != null)
-                            action1.call(RECEIVE_FAILED);
-                        G.showToast(baseMessage);
-                    }
-                });
-    }
 }

+ 0 - 252
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppDetail.java

@@ -1,252 +0,0 @@
-package com.sheep.gamegroup.view.fragment;
-
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
-import android.text.TextUtils;
-import android.view.View;
-import android.widget.TextView;
-
-import com.alibaba.fastjson.JSONObject;
-import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
-import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
-import com.sheep.gamegroup.absBase.AbsObserver;
-import com.sheep.gamegroup.absBase.BaseRefreshLoadMoreFragment;
-import com.sheep.gamegroup.helper.ImageListHelper;
-import com.sheep.gamegroup.model.entity.AppInfoExtDetail;
-import com.sheep.gamegroup.model.entity.Applications;
-import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.Entry;
-import com.sheep.gamegroup.model.entity.GameEntity;
-import com.sheep.gamegroup.model.entity.GameInfoList;
-import com.sheep.gamegroup.model.entity.ShowAll;
-import com.sheep.gamegroup.model.entity.UserComment;
-import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.util.ListUtil;
-import com.sheep.gamegroup.util.TestUtil;
-import com.sheep.gamegroup.util.TextViewUtil;
-import com.sheep.gamegroup.util.TimeUtil;
-import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppComment;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppInfoList;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppList;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import butterknife.BindView;
-import io.reactivex.Observable;
-import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.schedulers.Schedulers;
-import rx.functions.Action1;
-
-/**
- * Created by realicing on 2018/11/1.
- * realicing@sina.com
- * 玩转游戏 详情
- */
-public class FgtGcGameAppDetail extends BaseRefreshLoadMoreFragment implements Action1<List<UserComment>>{
-    @BindView(R.id.gc_game_app_detail_pic_list)
-    RecyclerView gc_game_app_detail_pic_list;
-    @BindView(R.id.gc_game_app_detail_info_list)
-    RecyclerView recyclerView;
-
-    public static FgtGcGameAppDetail newInstance(int appId) {
-        FgtGcGameAppDetail fgt = new FgtGcGameAppDetail();
-        fgt.appId = appId;
-        return fgt;
-    }
-
-    @Override
-    public int getLayoutId() {
-        return R.layout.fgt_gc_game_app_detail;
-    }
-
-
-    private ArrayList<String> pictureList = ListUtil.emptyList();
-    private ArrayList<GameInfoList> gameInfoListArrayList = ListUtil.emptyList();
-
-    @Override
-    public void onViewCreated() {
-        ImageListHelper.initList(getActivity(), gc_game_app_detail_pic_list, pictureList);
-        recyclerView.setHasFixedSize(true);
-        recyclerView.setNestedScrollingEnabled(false);
-        recyclerView.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        recyclerView.setAdapter(new AdpGcGameAppInfoList(gameInfoListArrayList));
-        refreshData();
-    }
-
-    //ActGcGameAppDetail调用该方法传入对应的游戏数据
-    public void loadData(final GameEntity gameEntity) {
-        if(gc_game_app_detail_pic_list == null){
-            Observable.just(1).delay(100L, TimeUnit.MILLISECONDS)
-                    .subscribeOn(Schedulers.io())
-                    .observeOn(AndroidSchedulers.mainThread())
-                    .subscribe(new AbsObserver<Integer>() {
-                        @Override
-                        public void onNext(Integer integer) {
-                            loadData(gameEntity);
-                        }
-                    });
-            return;
-        }
-        Applications gameApp;
-        if (gameEntity == null || (gameApp = gameEntity.getApp()) == null)
-            return;
-        ListUtil.removeItem(gameInfoListArrayList, new ListUtil.CallBack<GameInfoList, Boolean>() {
-            @Override
-            public Boolean call(GameInfoList gameInfoList) {
-                return SORT_GAME_INTRO == gameInfoList.getSort() || SORT_GAME_INFO == gameInfoList.getSort();
-            }
-        });
-        //游戏图片banner
-        String pictures = gameApp.getPictures();
-        if (!TextUtils.isEmpty(pictures)) {
-            pictureList.clear();
-            ListUtil.addAll(pictureList, pictures.split(";"));
-            ListUtil.removeNull(pictureList);
-            ViewUtil.setVisibility(gc_game_app_detail_pic_list, true);
-            ViewUtil.notifyDataSetChanged(gc_game_app_detail_pic_list);
-        } else {
-            ViewUtil.setVisibility(gc_game_app_detail_pic_list, false);
-        }
-        String intro = gameApp.getIntro();
-        if (!TextUtils.isEmpty(intro)) {
-            gameInfoListArrayList.add(new GameInfoList("游戏介绍", new RecyclerViewAdapter<ShowAll>(SheepApp.getInstance(), R.layout.item_gc_game_app_intro, ListUtil.asList(new ShowAll(intro))) {
-                @Override
-                public void convert(ViewHolder viewHolder, ShowAll showAll, int position) {
-                    TextViewUtil.initIntroView(viewHolder.itemView, showAll);
-                }
-            }).setSort(SORT_GAME_INTRO));
-        }
-        final List<Entry<String, String>> entryList = ListUtil.emptyList();
-        entryList.add(new Entry<>("当前版本", gameApp.getVersions()));
-        entryList.add(new Entry<>("大小", gameApp.getPackage_size()));
-        entryList.add(new Entry<>("更新日期", TimeUtil.TimeStamp2Date(gameApp.getUpdated_at(), "yyyy-MM-dd")));
-        entryList.add(new Entry<>("发行商", gameApp.getManufacturer()));
-
-        if(gameApp.getExt_detail() != null) {
-            try {
-                List<AppInfoExtDetail> list = JSONObject.parseArray(gameApp.getExt_detail(), AppInfoExtDetail.class);
-                if (!ListUtil.isEmpty(list)) {
-                    for (AppInfoExtDetail item : list) {
-                        try {
-                            entryList.add(new Entry<>(item.getTitle(), item.getValue()));
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                            if(TestUtil.isDev())
-                                G.showToast(e.getMessage());
-                        }
-                    }
-                }
-            } catch (Exception e) {
-                e.printStackTrace();
-                if(TestUtil.isDev())
-                    G.showToast(e.getMessage());
-            }
-        }
-        gameInfoListArrayList.add(new GameInfoList("详细信息", new RecyclerViewAdapter<Entry<String, String>>(SheepApp.getInstance(), R.layout.item_gc_game_info, entryList) {
-            @Override
-            public void convert(ViewHolder viewHolder, Entry<String, String> item, int position) {
-                View item_gc_game_info_top = viewHolder.itemView.findViewById(R.id.item_gc_game_info_top);
-                TextView item_gc_game_info_key = viewHolder.itemView.findViewById(R.id.item_gc_game_info_key);
-                TextView item_gc_game_info_value = viewHolder.itemView.findViewById(R.id.item_gc_game_info_value);
-                View item_gc_game_info_bottom = viewHolder.itemView.findViewById(R.id.item_gc_game_info_bottom);
-                ViewUtil.setVisibility(item_gc_game_info_top, position == 0);
-                ViewUtil.setVisibility(item_gc_game_info_bottom, position + 1 == entryList.size());
-                ViewUtil.setText(item_gc_game_info_key, item.getK());
-                ViewUtil.setText(item_gc_game_info_value, item.getV());
-            }
-        }).setSort(SORT_GAME_INFO));
-        Collections.sort(gameInfoListArrayList);
-        ViewUtil.notifyDataSetChanged(recyclerView);
-    }
-
-    //加载相关游戏与热门试玩数据列表
-    private void initData(final int sort, final String name, Observable<BaseMessage> observable) {
-        observable.subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        ArrayList<Applications> newList = baseMessage.getDataList(Applications.class);
-                        if (!ListUtil.isEmpty(newList)) {
-                            gameInfoListArrayList.add(new GameInfoList(name, new AdpGcGameAppList(SheepApp.getInstance(), R.layout.item_gc_game_app_63, newList)).setHorizontal().setSort(sort));
-                            Collections.sort(gameInfoListArrayList);
-                            ViewUtil.notifyDataSetChanged(recyclerView);
-                        }
-                        refreshOrLoadMoreComplete();
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        refreshOrLoadMoreComplete();
-                    }
-                });
-    }
-
-    private int appId;
-
-
-    @Override
-    public void loadMoreData() {
-        setNoMore(true);
-        refreshOrLoadMoreComplete();
-    }
-
-    @Override
-    public void refreshData() {
-        ListUtil.removeItem(gameInfoListArrayList, new ListUtil.CallBack<GameInfoList, Boolean>() {
-            @Override
-            public Boolean call(GameInfoList gameInfoList) {
-                return gameInfoList.getSort() == SORT_GAME_RELEVANT || gameInfoList.getSort() == SORT_GAME_HOT;
-            }
-        });
-        initData(SORT_GAME_RELEVANT, "相关游戏", SheepApp.getInstance().getNetComponent().getApiService().getDetailRelevantGames(appId));
-        initData(SORT_GAME_HOT, "热门试玩", SheepApp.getInstance().getNetComponent().getApiService().getDetailHotGames(appId));
-    }
-
-    //评论列表数据
-    private List<UserComment> userCommentList = ListUtil.emptyList();
-    public static final int MAX_USER_COMMENT_NUM = 2;//最多显示评论的个数
-    @Override
-    public void call(List<UserComment> userComments) {
-        userCommentList.clear();
-        if(userComments != null) {
-            for (int i = 0; i < userComments.size(); i++) {
-                if(i < MAX_USER_COMMENT_NUM)
-                    userCommentList.add(userComments.get(i));
-                else
-                    break;
-            }
-        }
-
-        GameInfoList item = ListUtil.getItem(gameInfoListArrayList, new ListUtil.CallBack<GameInfoList, Boolean>(){
-
-            @Override
-            public Boolean call(GameInfoList gameInfoList) {
-               return gameInfoList.getSort() == SORT_USER_COMMENT;
-            }
-        });
-        if(item == null) {
-            gameInfoListArrayList.add(new GameInfoList("用户评价", new AdpGcGameAppComment(userCommentList)).setSort(SORT_USER_COMMENT));
-            Collections.sort(gameInfoListArrayList);
-        }
-        ViewUtil.notifyDataSetChanged(recyclerView);
-    }
-
-    //游戏介绍
-    public static final int SORT_GAME_INTRO = 1;
-    //详细信息
-    public static final int SORT_GAME_INFO = 2;
-    //用户评价
-    public static final int SORT_USER_COMMENT = 3;
-    //相关游戏
-    public static final int SORT_GAME_RELEVANT = 4;
-    //热门试玩
-    public static final int SORT_GAME_HOT = 5;
-}

+ 0 - 154
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppWelfare.java

@@ -1,154 +0,0 @@
-package com.sheep.gamegroup.view.fragment;
-
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
-
-import com.sheep.gamegroup.absBase.BaseRefreshLoadMoreFragment;
-import com.sheep.gamegroup.model.entity.Article;
-import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.GameEntity;
-import com.sheep.gamegroup.model.entity.GameInfoList;
-import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.util.ListUtil;
-import com.sheep.gamegroup.util.TestUtil;
-import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppActivityRecommend;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppArticleRecommend;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppGiftBag;
-import com.sheep.gamegroup.view.adapter.AdpGcGameAppInfoList;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import butterknife.BindView;
-import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.schedulers.Schedulers;
-
-/**
- * Created by realicing on 2018/11/1.
- * realicing@sina.com
- * 玩转游戏 礼包
- */
-public class FgtGcGameAppWelfare extends BaseRefreshLoadMoreFragment {
-
-    @BindView(R.id.recyclerView)
-    RecyclerView recyclerView;
-
-    public static FgtGcGameAppWelfare newInstance(int appId) {
-        FgtGcGameAppWelfare fgt = new FgtGcGameAppWelfare();
-        fgt.appId = appId;
-        return fgt;
-    }
-
-    @Override
-    public int getLayoutId() {
-        return R.layout.common_rv;
-    }
-
-
-    private ArrayList<GameInfoList> gameInfoListArrayList = ListUtil.emptyList();
-
-    @Override
-    public void onViewCreated() {
-        recyclerView.setHasFixedSize(true);
-        recyclerView.setNestedScrollingEnabled(false);
-        recyclerView.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        AdpGcGameAppInfoList adpGcGameAppInfoList = new AdpGcGameAppInfoList(gameInfoListArrayList);
-        adpGcGameAppInfoList.bindToRecyclerView(recyclerView);
-        adpGcGameAppInfoList.setEmptyView(R.layout.include_empty_view);
-
-        refreshData();
-        if(gameEntity != null){
-            loadGameData();
-        }
-    }
-
-    //加载游戏数据
-    private void loadGameData() {
-        if (gameEntity.isGift()) {
-            gameInfoListArrayList.add(new GameInfoList("礼包推荐", new AdpGcGameAppGiftBag(SheepApp.getInstance(), gameEntity.getHas_gift_bag(), gameEntity)).setSort(SORT_GIFT));
-        }
-        ViewUtil.notifyDataSetChanged(recyclerView);
-    }
-
-
-    private int appId;
-
-
-    private GameEntity gameEntity;
-    public void loadData(final GameEntity gameEntity) {
-        this.gameEntity = gameEntity;
-        if(recyclerView != null) {
-            loadGameData();
-        }
-    }
-
-    @Override
-    public void refreshData() {
-        ListUtil.removeItem(gameInfoListArrayList, new ListUtil.CallBack<GameInfoList, Boolean>() {
-            @Override
-            public Boolean call(GameInfoList gameInfoList) {
-                return gameInfoList.getSort() == SORT_ACTIVITY || gameInfoList.getSort() == SORT_ARTICLE;
-            }
-        });
-        ViewUtil.notifyDataSetChanged(recyclerView);
-        //文章推荐
-        SheepApp.getInstance().getNetComponent().getApiService().getDetailArticleRecommend(appId)
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        List<Article> newList = baseMessage.getDatas(Article.class);
-                        if (!ListUtil.isEmpty(newList)) {
-                            gameInfoListArrayList.add(new GameInfoList("文章推荐", new AdpGcGameAppArticleRecommend(getContext(), newList)).setSort(SORT_ARTICLE));
-                            ViewUtil.notifyDataSetChanged(recyclerView);
-                        }
-                        refreshOrLoadMoreComplete();
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        if (TestUtil.isDev()) G.showToast(baseMessage);
-                        refreshOrLoadMoreComplete();
-                    }
-                });
-        //活动推荐
-        SheepApp.getInstance().getNetComponent().getApiService().getDetailActivityRecommend(appId)
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        List<Article> newList = baseMessage.getDatas(Article.class);
-                        if (!ListUtil.isEmpty(newList)) {
-                            gameInfoListArrayList.add(new GameInfoList("活动推荐", new AdpGcGameAppActivityRecommend(getContext(), newList)).setSort(SORT_ACTIVITY));
-                            ViewUtil.notifyDataSetChanged(recyclerView);
-                        }
-                        refreshOrLoadMoreComplete();
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        if (TestUtil.isDev()) G.showToast(baseMessage);
-                        refreshOrLoadMoreComplete();
-                    }
-                });
-    }
-
-    @Override
-    public void loadMoreData() {
-        setNoMore(true);
-        refreshOrLoadMoreComplete();
-    }
-
-    //礼包推荐
-    public static final int SORT_GIFT = 1;
-    //文章推荐
-    public static final int SORT_ARTICLE = 2;
-    //活动推荐
-    public static final int SORT_ACTIVITY = 3;
-}

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyGift.java

@@ -64,6 +64,7 @@ public class FgtMyGift extends BaseListFragment2<GiftBagApp> implements Action1<
         }
     }
 
+
     @Override
     protected Class<GiftBagApp> getTClass() {
         return GiftBagApp.class;

+ 2 - 8
app/src/main/java/com/sheep/jiuyan/samllsheep/utils/SpUtils.java

@@ -1,7 +1,5 @@
 package com.sheep.jiuyan.samllsheep.utils;
 
-import static com.sheep.gamegroup.model.api.BaseMessageConverter.uint8ToHex;
-
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.text.TextUtils;
@@ -11,10 +9,6 @@ import com.sheep.gamegroup.greendao.download.SdkLoginUser;
 import com.sheep.gamegroup.model.api.BaseMessageConverter;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 
-import org.xxtea.XXTEA;
-
-import go.kfzssafe.Kfzssafe;
-
 /**
  * Created by kemllor on 2017/12/21.
  */
@@ -24,7 +18,6 @@ public class SpUtils {
     public static String SKIP_LOGIN_FLAG = "skip_login";
 
 
-
     public static String getToken(Context context) {
         SharedPreferences user = context.getSharedPreferences("user", Context.MODE_MULTI_PROCESS);
         return user.getString("wx_openId", "");
@@ -150,7 +143,7 @@ public class SpUtils {
         if (TextUtils.isEmpty(p)) {
             return "";
         } else {
-            return  BaseMessageConverter.decrypt(p);
+            return BaseMessageConverter.decrypt(p);
 //            return Kfzssafe.xDecodeS2S(p);
         }
     }
@@ -249,4 +242,5 @@ public class SpUtils {
         SharedPreferences user = context.getSharedPreferences("qqgame", Context.MODE_MULTI_PROCESS);
         user.edit().clear().apply();
     }
+
 }

+ 139 - 0
app/src/main/res/drawable/qr_code_bg.xml

@@ -0,0 +1,139 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:aapt="http://schemas.android.com/aapt"
+    android:width="178dp"
+    android:height="178dp"
+    android:viewportWidth="178"
+    android:viewportHeight="178">
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M30.05,1.66H16.66C8.36,1.66 1.63,8.39 1.63,16.69V32.24"
+        android:strokeWidth="2.1555"
+        android:strokeLineCap="round">
+        <aapt:attr name="android:strokeColor">
+            <gradient
+                android:endX="18.27"
+                android:endY="18.1"
+                android:startX="3.78"
+                android:startY="5.97"
+                android:type="linear">
+                <item
+                    android:color="#FF2194FF"
+                    android:offset="0" />
+                <item
+                    android:color="#002194FF"
+                    android:offset="1" />
+            </gradient>
+        </aapt:attr>
+    </path>
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M30.05,176.66H16.66C8.36,176.66 1.63,169.93 1.63,161.63V146.07"
+        android:strokeWidth="2.1555"
+        android:strokeLineCap="round">
+        <aapt:attr name="android:strokeColor">
+            <gradient
+                android:endX="18.27"
+                android:endY="160.22"
+                android:startX="3.78"
+                android:startY="172.34"
+                android:type="linear">
+                <item
+                    android:color="#FF2194FF"
+                    android:offset="0" />
+                <item
+                    android:color="#002194FF"
+                    android:offset="1" />
+            </gradient>
+        </aapt:attr>
+    </path>
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M1.63,45.57V89.49V133.41"
+        android:strokeWidth="2.1555"
+        android:strokeLineCap="round">
+        <aapt:attr name="android:strokeColor">
+            <gradient
+                android:endX="1.63"
+                android:endY="133.14"
+                android:startX="1.63"
+                android:startY="44.77"
+                android:type="linear">
+                <item
+                    android:color="#002194FF"
+                    android:offset="0" />
+                <item
+                    android:color="#FF2194FF"
+                    android:offset="0.51" />
+                <item
+                    android:color="#002194FF"
+                    android:offset="1" />
+            </gradient>
+        </aapt:attr>
+    </path>
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M148.2,1.66H161.6C169.9,1.66 176.63,8.39 176.63,16.69V32.24"
+        android:strokeWidth="2.1555"
+        android:strokeLineCap="round">
+        <aapt:attr name="android:strokeColor">
+            <gradient
+                android:endX="159.99"
+                android:endY="18.1"
+                android:startX="174.47"
+                android:startY="5.97"
+                android:type="linear">
+                <item
+                    android:color="#FF2194FF"
+                    android:offset="0" />
+                <item
+                    android:color="#002194FF"
+                    android:offset="1" />
+            </gradient>
+        </aapt:attr>
+    </path>
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M148.2,176.66H161.6C169.9,176.66 176.63,169.93 176.63,161.63V146.07"
+        android:strokeWidth="2.1555"
+        android:strokeLineCap="round">
+        <aapt:attr name="android:strokeColor">
+            <gradient
+                android:endX="159.99"
+                android:endY="160.22"
+                android:startX="174.47"
+                android:startY="172.34"
+                android:type="linear">
+                <item
+                    android:color="#FF2194FF"
+                    android:offset="0" />
+                <item
+                    android:color="#002194FF"
+                    android:offset="1" />
+            </gradient>
+        </aapt:attr>
+    </path>
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M176.63,45.57V89.49V133.41"
+        android:strokeWidth="2.1555"
+        android:strokeLineCap="round">
+        <aapt:attr name="android:strokeColor">
+            <gradient
+                android:endX="176.63"
+                android:endY="133.14"
+                android:startX="176.63"
+                android:startY="44.77"
+                android:type="linear">
+                <item
+                    android:color="#002194FF"
+                    android:offset="0" />
+                <item
+                    android:color="#FF2194FF"
+                    android:offset="0.51" />
+                <item
+                    android:color="#002194FF"
+                    android:offset="1" />
+            </gradient>
+        </aapt:attr>
+    </path>
+</vector>

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

@@ -165,7 +165,7 @@
                         android:id="@+id/about_us_customer_wechat_qr"
                         android:layout_width="250dp"
                         android:layout_height="250dp"
-                        android:src="@mipmap/icon"
+                        tools:src="@mipmap/icon"
                         app:layout_constraintEnd_toEndOf="parent"
                         app:layout_constraintStart_toStartOf="parent"
                         app:layout_constraintTop_toTopOf="parent" />

+ 66 - 0
app/src/main/res/layout/dialog_lianxikefu.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:paddingStart="24dp"
+    android:paddingTop="32dp"
+    android:paddingEnd="24dp"
+    android:paddingBottom="32dp">
+
+    <ImageView
+        android:id="@+id/ivCode"
+        android:layout_width="175dp"
+        android:layout_height="175dp"
+        android:layout_marginStart="28dp"
+        android:layout_marginEnd="28dp"
+        android:background="@drawable/qr_code_bg"
+        android:padding="8dp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:src="@drawable/logo" />
+
+    <TextView
+        android:id="@+id/textView2"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="12dp"
+        android:gravity="center"
+        android:text="使用微信扫码,添加官方客服"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/ivCode" />
+
+    <Button
+        android:id="@+id/btnClose"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="12dp"
+        android:backgroundTint="#F2F3F5"
+        android:elevation="0dp"
+        android:text="关闭"
+        android:textColor="@color/text66"
+        android:textSize="16sp"
+        app:layout_constraintEnd_toStartOf="@+id/btnSave"
+        app:layout_constraintHorizontal_weight="1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/textView2" />
+
+    <Button
+        android:id="@+id/btnSave"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="12dp"
+        android:backgroundTint="#3E70FF"
+        android:elevation="0dp"
+        android:text="保存到相册"
+        android:textColor="@color/white"
+        android:textSize="16sp"
+        app:layout_constraintBottom_toBottomOf="@+id/btnClose"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintHorizontal_weight="2"
+        app:layout_constraintStart_toEndOf="@+id/btnClose"
+        app:layout_constraintTop_toTopOf="@+id/btnClose" />
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 3 - 16
app/src/main/res/layout/item_download_welfare.xml

@@ -17,34 +17,21 @@
 
     <TextView
         android:id="@+id/tvTitle"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="8dp"
+        android:layout_marginEnd="8dp"
         android:ellipsize="middle"
         android:gravity="start"
         android:textColor="@color/text33"
         android:textSize="16sp"
         app:layout_constrainedWidth="true"
-        app:layout_constraintEnd_toStartOf="@+id/arrow"
-        app:layout_constraintHorizontal_bias="0"
+        app:layout_constraintEnd_toStartOf="@+id/btn"
         app:layout_constraintHorizontal_chainStyle="packed"
         app:layout_constraintStart_toEndOf="@+id/icon"
         app:layout_constraintTop_toTopOf="@+id/icon"
         tools:text="游戏名称" />
 
-    <ImageView
-        android:id="@+id/arrow"
-        android:layout_width="12dp"
-        android:layout_height="12dp"
-        android:layout_marginEnd="8dp"
-        android:src="@drawable/round_arrow_forward_ios_24"
-        android:tint="@color/text33"
-        app:layout_constraintBottom_toBottomOf="@+id/tvTitle"
-        app:layout_constraintEnd_toStartOf="@+id/btn"
-        app:layout_constraintHorizontal_chainStyle="packed"
-        app:layout_constraintStart_toEndOf="@+id/tvTitle"
-        app:layout_constraintTop_toTopOf="@+id/tvTitle" />
-
     <TextView
         android:id="@+id/tvContent"
         android:layout_width="0dp"

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

@@ -39,7 +39,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="12dp"
-                android:text="登录/注册"
+                android:hint="登录/注册"
                 android:textColor="#000000"
                 app:layout_constraintEnd_toEndOf="@+id/ivAvatar"
                 app:layout_constraintStart_toStartOf="@+id/ivAvatar"

+ 251 - 131
app/src/main/res/layout/play_game_vertical_list_item.xml

@@ -1,139 +1,259 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<!--<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"-->
+<!--    xmlns:app="http://schemas.android.com/apk/res-auto"-->
+<!--    android:layout_width="match_parent"-->
+<!--    android:layout_height="wrap_content"-->
+<!--    android:orientation="vertical">-->
+
+<!--    <androidx.constraintlayout.widget.ConstraintLayout-->
+<!--        android:layout_width="match_parent"-->
+<!--        android:layout_height="wrap_content"-->
+<!--        android:layout_marginStart="12dp"-->
+<!--        android:layout_marginTop="@dimen/content_padding_10"-->
+<!--        android:layout_marginEnd="12dp">-->
+
+<!--        <ImageView-->
+<!--            android:id="@+id/item_icon_iv"-->
+<!--            android:layout_width="64dp"-->
+<!--            android:layout_height="64dp"-->
+<!--            android:src="@drawable/icon_lj"-->
+<!--            app:layout_constraintStart_toStartOf="parent"-->
+<!--            app:layout_constraintTop_toTopOf="parent" />-->
+
+
+<!--        <TextView-->
+<!--            android:id="@+id/end_of_time_tv"-->
+<!--            android:layout_width="0dp"-->
+<!--            android:layout_height="wrap_content"-->
+<!--            android:layout_marginStart="@dimen/content_padding_4"-->
+<!--            android:layout_marginTop="55dp"-->
+<!--            android:layout_marginEnd="@dimen/content_padding_4"-->
+<!--            android:background="@drawable/shape_ash_stroke_white_solid_rectangle"-->
+<!--            android:gravity="center"-->
+<!--            android:lines="1"-->
+<!--            android:textColor="#989898"-->
+<!--            android:textSize="12sp"-->
+<!--            android:visibility="gone"-->
+<!--            app:layout_constraintEnd_toEndOf="@+id/item_icon_iv"-->
+<!--            app:layout_constraintStart_toStartOf="@+id/item_icon_iv"-->
+<!--            app:layout_constraintTop_toTopOf="parent" />-->
+
+<!--        <LinearLayout-->
+<!--            android:layout_width="0dp"-->
+<!--            android:layout_height="70dp"-->
+<!--            android:layout_marginStart="@dimen/content_padding"-->
+<!--            android:orientation="vertical"-->
+<!--            app:layout_constraintBottom_toBottomOf="parent"-->
+<!--            app:layout_constraintEnd_toStartOf="@id/detail_task_tv_center"-->
+<!--            app:layout_constraintStart_toEndOf="@id/item_icon_iv"-->
+<!--            app:layout_constraintTop_toTopOf="parent">-->
+
+<!--            <TextView-->
+<!--                android:id="@+id/item_name_tv"-->
+<!--                android:layout_width="match_parent"-->
+<!--                android:layout_height="wrap_content"-->
+<!--                android:ellipsize="middle"-->
+<!--                android:gravity="start"-->
+<!--                android:maxLines="2"-->
+<!--                android:text=""-->
+<!--                android:textColor="#444444"-->
+<!--                android:textSize="14sp" />-->
+
+<!--            <View-->
+<!--                android:layout_width="match_parent"-->
+<!--                android:layout_height="0dp"-->
+<!--                android:layout_weight="3" />-->
+
+<!--            <LinearLayout-->
+<!--                android:layout_width="match_parent"-->
+<!--                android:layout_height="wrap_content"-->
+<!--                android:layout_marginTop="@dimen/content_padding_2"-->
+<!--                android:layout_marginEnd="@dimen/content_padding_8"-->
+<!--                android:orientation="horizontal">-->
+
+<!--                <TextView-->
+<!--                    android:id="@+id/item_date_tv"-->
+<!--                    android:layout_width="0dp"-->
+<!--                    android:layout_height="wrap_content"-->
+<!--                    android:layout_weight="1"-->
+<!--                    android:lines="1"-->
+<!--                    android:text=""-->
+<!--                    android:textColor="#cc8e8e8e"-->
+<!--                    android:textSize="10sp" />-->
+
+<!--                <ImageView-->
+<!--                    android:id="@+id/item_date_question_img"-->
+<!--                    android:layout_width="15dp"-->
+<!--                    android:layout_height="15dp"-->
+<!--                    android:src="@mipmap/task_game_qustion_icon"-->
+<!--                    android:visibility="gone"-->
+<!--                    app:layout_constraintEnd_toEndOf="parent"-->
+<!--                    app:layout_constraintStart_toEndOf="@+id/item_date_tv" />-->
+<!--            </LinearLayout>-->
+
+<!--            <View-->
+<!--                android:layout_width="match_parent"-->
+<!--                android:layout_height="0dp"-->
+<!--                android:layout_weight="1" />-->
+
+<!--            <LinearLayout-->
+<!--                android:id="@+id/ll_game_tag"-->
+<!--                android:layout_width="match_parent"-->
+<!--                android:layout_height="wrap_content"-->
+<!--                android:gravity="center_vertical"-->
+<!--                android:orientation="horizontal" />-->
+
+
+<!--        </LinearLayout>-->
+
+<!--        <TextView-->
+<!--            android:id="@+id/detail_task_tv_center"-->
+<!--            style="@style/style_button_find"-->
+<!--            android:layout_centerInParent="true"-->
+<!--            android:text="@string/task_cancel"-->
+<!--            android:visibility="visible"-->
+<!--            app:layout_constraintBottom_toTopOf="@id/detail_task_tv_center2"-->
+<!--            app:layout_constraintEnd_toEndOf="parent"-->
+<!--            app:layout_constraintTop_toTopOf="parent" />-->
+
+<!--        <TextView-->
+<!--            android:id="@+id/detail_task_tv_center2"-->
+<!--            style="@style/style_vip_td_tv2"-->
+<!--            android:layout_centerInParent="true"-->
+<!--            android:layout_marginTop="16dp"-->
+<!--            android:visibility="gone"-->
+<!--            app:layout_constraintBottom_toBottomOf="@id/item_icon_iv"-->
+<!--            app:layout_constraintEnd_toEndOf="parent"-->
+<!--            app:layout_constraintTop_toBottomOf="@id/detail_task_tv_center" />-->
+
+<!--    </androidx.constraintlayout.widget.ConstraintLayout>-->
+
+<!--    <View-->
+<!--        android:layout_width="match_parent"-->
+<!--        android:layout_height="@dimen/content_padding_10" />-->
+
+<!--    <View-->
+<!--        android:id="@+id/line_tv"-->
+<!--        android:layout_width="match_parent"-->
+<!--        android:layout_height="0.5dp"-->
+<!--        android:layout_marginStart="12dp"-->
+<!--        android:layout_marginEnd="12dp"-->
+<!--        android:background="@color/gray_F0F0F0" />-->
+<!--</LinearLayout>-->
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical">
+    xmlns:tools="http://schemas.android.com/tools"
+    android:paddingBottom="16dp">
+
+<ImageView
+    android:id="@+id/gc_game_app_detail_icon"
+    android:layout_width="78dp"
+    android:layout_height="78dp"
+    android:layout_marginStart="16dp"
+    android:layout_marginTop="16dp"
+    android:layout_marginBottom="20dp"
+    android:src="@drawable/icon_lj"
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toTopOf="parent" />
+
+<TextView
+    android:id="@+id/gc_game_app_detail_score_tv"
+    tools:text="10.0"
+    android:layout_width="0dp"
+    android:layout_height="wrap_content"
+    android:layout_marginTop="6dp"
+    android:drawableStart="@drawable/star_full"
+    android:drawablePadding="2dp"
+    android:textColor="#F39D1D"
+    android:textSize="14sp"
+    app:layout_constraintStart_toStartOf="@+id/gc_game_app_detail_name"
+    app:layout_constraintTop_toBottomOf="@+id/gc_game_app_detail_name" />
+
+<TextView
+    android:id="@+id/gc_game_app_detail_name"
+    tools:text="游戏标题"
+    android:layout_width="0dp"
+    android:layout_height="wrap_content"
+    android:layout_marginStart="10dp"
+    android:layout_marginEnd="16dp"
+    android:gravity="center_vertical"
+    android:textColor="#ff333333"
+    android:textSize="20sp"
+    android:textStyle="bold"
+    app:layout_constraintEnd_toEndOf="parent"
+    app:layout_constraintStart_toEndOf="@id/gc_game_app_detail_icon"
+    app:layout_constraintTop_toTopOf="@id/gc_game_app_detail_icon" />
+
+<androidx.recyclerview.widget.RecyclerView
+    android:id="@+id/gc_game_app_detail_tag_list"
+    tools:itemCount="1"
+    tools:listitem="@layout/item_tag"
+    android:layout_width="0dp"
+    android:layout_height="wrap_content"
+    android:layout_marginTop="6dp"
+    android:orientation="horizontal"
+    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
+    app:layout_constraintEnd_toEndOf="@+id/gc_game_app_detail_name"
+    app:layout_constraintStart_toStartOf="@id/gc_game_app_detail_name"
+    app:layout_constraintTop_toBottomOf="@+id/gc_game_app_detail_score_tv" />
+
+<TextView
+    android:id="@+id/gc_game_app_detail_info_tv"
+    tools:text="游戏类型 游玩人数"
+    android:layout_width="0dp"
+    android:layout_height="wrap_content"
+    android:layout_marginStart="8dp"
+    android:lineSpacingExtra="5dp"
+    android:textColor="#ff999999"
+    android:textSize="12sp"
+    app:layout_constraintBottom_toBottomOf="@+id/gc_game_app_detail_score_tv"
+    app:layout_constraintEnd_toEndOf="@+id/gc_game_app_detail_name"
+    app:layout_constraintStart_toEndOf="@+id/gc_game_app_detail_score_tv"
+    app:layout_constraintTop_toTopOf="@+id/gc_game_app_detail_score_tv" />
+
+<!--                    <TextView-->
+<!--                        android:id="@+id/gc_game_app_detail_bt1"-->
+<!--                        android:layout_width="44dp"-->
+<!--                        android:layout_height="17dp"-->
+<!--                        android:layout_marginTop="6dp"-->
+<!--                        android:background="@drawable/selector_button_stroke_main"-->
+<!--                        android:gravity="center"-->
+<!--                        android:onClick="onClickFollowTv"-->
+<!--                        android:text="关注"-->
+<!--                        android:textColor="@color/selector_color_stoke_main_btn"-->
+<!--                        android:textSize="10sp"-->
+<!--                        app:layout_constraintLeft_toLeftOf="@+id/gc_game_app_detail_icon"-->
+<!--                        app:layout_constraintRight_toRightOf="@+id/gc_game_app_detail_icon"-->
+<!--                        app:layout_constraintTop_toBottomOf="@+id/gc_game_app_detail_icon" />-->
+
+<LinearLayout
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_marginEnd="12dp"
+    android:orientation="horizontal"
+    app:layout_constraintBottom_toBottomOf="@id/gc_game_app_detail_icon"
+    app:layout_constraintEnd_toEndOf="parent">
 
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="12dp"
+    <TextView
+        android:id="@+id/gc_game_app_detail_bt4"
+        style="@style/style_activity_td_tv"
+        android:layout_width="66dp"
+        android:layout_height="24dp"
         android:layout_marginStart="12dp"
-        android:layout_marginTop="@dimen/content_padding_10">
-
-        <ImageView
-            android:id="@+id/item_icon_iv"
-            android:layout_width="70dp"
-            android:layout_height="70dp"
-            android:src="@drawable/icon_lj"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-
-        <TextView
-            android:id="@+id/end_of_time_tv"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_marginEnd="@dimen/content_padding_4"
-            android:layout_marginStart="@dimen/content_padding_4"
-            android:layout_marginTop="55dp"
-            android:background="@drawable/shape_ash_stroke_white_solid_rectangle"
-            android:gravity="center"
-            android:lines="1"
-            android:textColor="#989898"
-            android:textSize="12sp"
-            android:visibility="gone"
-            app:layout_constraintEnd_toEndOf="@+id/item_icon_iv"
-            app:layout_constraintStart_toStartOf="@+id/item_icon_iv"
-            app:layout_constraintTop_toTopOf="parent" />
-
-        <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="70dp"
-            android:layout_marginStart="@dimen/content_padding"
-            android:orientation="vertical"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toStartOf="@id/detail_task_tv_center"
-            app:layout_constraintStart_toEndOf="@id/item_icon_iv">
-
-            <TextView
-                android:id="@+id/item_name_tv"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:ellipsize="middle"
-                android:gravity="start"
-                android:maxLines="2"
-                android:text=""
-                android:textColor="#444444"
-                android:textSize="14sp" />
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="3" />
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginEnd="@dimen/content_padding_8"
-                android:layout_marginTop="@dimen/content_padding_2"
-                android:orientation="horizontal">
-
-                <TextView
-                    android:id="@+id/item_date_tv"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:lines="1"
-                    android:text=""
-                    android:textColor="#cc8e8e8e"
-                    android:textSize="10sp" />
-
-                <ImageView
-                    android:id="@+id/item_date_question_img"
-                    android:layout_width="15dp"
-                    android:layout_height="15dp"
-                    android:src="@mipmap/task_game_qustion_icon"
-                    android:visibility="gone"
-                    app:layout_constraintEnd_toEndOf="parent"
-                    app:layout_constraintStart_toEndOf="@+id/item_date_tv" />
-            </LinearLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="1" />
-
-            <LinearLayout
-                android:id="@+id/ll_game_tag"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"/>
-
-
-        </LinearLayout>
-
-        <TextView
-            android:id="@+id/detail_task_tv_center"
-            style="@style/style_button_find"
-            android:layout_centerInParent="true"
-            android:text="@string/task_cancel"
-            android:visibility="visible"
-            app:layout_constraintBottom_toTopOf="@id/detail_task_tv_center2"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-        <TextView
-            android:id="@+id/detail_task_tv_center2"
-            style="@style/style_vip_td_tv2"
-            android:layout_centerInParent="true"
-            android:visibility="gone"
-            android:layout_marginTop="16dp"
-            app:layout_constraintBottom_toBottomOf="@id/item_icon_iv"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/detail_task_tv_center" />
-
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/content_padding_10"/>
-    <View
-        android:id="@+id/line_tv"
-        android:layout_width="match_parent"
-        android:layout_height="0.5dp"
-        android:layout_marginEnd="12dp"
+        android:textSize="13sp"
+        android:visibility="gone" />
+
+    <TextView
+        android:id="@+id/gc_game_app_detail_bt3"
+        style="@style/style_vip_td_tv"
+        android:layout_width="66dp"
+        android:layout_height="24dp"
         android:layout_marginStart="12dp"
-        android:background="@color/gray_F0F0F0" />
+        android:textSize="13sp"
+        android:visibility="gone" />
 </LinearLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>