Bläddra i källkod

福利与绑定第三方完成50%

zengjiebin 7 år sedan
förälder
incheckning
bb4784395e
42 ändrade filer med 1628 tillägg och 148 borttagningar
  1. 1 1
      app/build.gradle
  2. 4 2
      app/src/main/AndroidManifest.xml
  3. 1 1
      app/src/main/java/com/kfzs/duanduan/fragment/FgtFind.java
  4. 4 0
      app/src/main/java/com/sheep/gamegroup/helper/DownloadHelper.java
  5. 4 0
      app/src/main/java/com/sheep/gamegroup/helper/FindAppHelper.java
  6. 26 0
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  7. 71 7
      app/src/main/java/com/sheep/gamegroup/model/entity/FindApp.java
  8. 175 0
      app/src/main/java/com/sheep/gamegroup/model/entity/GiftBag.java
  9. 33 0
      app/src/main/java/com/sheep/gamegroup/model/entity/GiftBagApp.java
  10. 49 4
      app/src/main/java/com/sheep/gamegroup/model/entity/TaskReleaseEty.java
  11. 33 0
      app/src/main/java/com/sheep/gamegroup/model/entity/UserEntity.java
  12. 0 8
      app/src/main/java/com/sheep/gamegroup/model/entity/Welfare.java
  13. 19 0
      app/src/main/java/com/sheep/gamegroup/util/BinaryUtils.java
  14. 10 0
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  15. 9 0
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  16. 3 1
      app/src/main/java/com/sheep/gamegroup/util/UMConfigUtils.java
  17. 13 7
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  18. 3 2
      app/src/main/java/com/sheep/gamegroup/view/activity/ActBindMobileRegister.java
  19. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActGiftCenter.java
  20. 280 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActModifyThird.java
  21. 0 2
      app/src/main/java/com/sheep/gamegroup/view/activity/ActXiaomiGame.java
  22. 16 1
      app/src/main/java/com/sheep/gamegroup/view/activity/LoginAct.java
  23. 175 18
      app/src/main/java/com/sheep/gamegroup/view/activity/PersonalInfoAct.java
  24. 6 1
      app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java
  25. 174 10
      app/src/main/java/com/sheep/gamegroup/view/adapter/DownloadWelfareAdapter.java
  26. 97 10
      app/src/main/java/com/sheep/gamegroup/view/adapter/GiftCenterAdapter.java
  27. 1 1
      app/src/main/java/com/sheep/gamegroup/view/adapter/TryMakeMoneyAdp.java
  28. 9 3
      app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment.java
  29. 36 5
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtDownloadWelfareList.java
  30. 37 5
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGiftCenter.java
  31. 36 5
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyDownloadWelfareList.java
  32. 38 5
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyGift.java
  33. 69 20
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareCenter.java
  34. 36 5
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareUseRecord.java
  35. 70 0
      app/src/main/res/layout/act_modify_third.xml
  36. 1 6
      app/src/main/res/layout/common_tab_vp.xml
  37. 25 0
      app/src/main/res/layout/fgt_find.xml
  38. 2 12
      app/src/main/res/layout/login_act_layout.xml
  39. 3 2
      app/src/main/res/layout/title.xml
  40. 32 2
      app/src/main/res/layout/xpersion_info_act_layout.xml
  41. 23 0
      app/src/main/res/values/dd_styles.xml
  42. 3 1
      app/src/main/res/values/gamegroup_string.xml

+ 1 - 1
app/build.gradle

@@ -132,7 +132,7 @@ dependencies {
     compile 'com.android.support.constraint:constraint-layout:1.0.2'
     testCompile 'junit:junit:4.12'
     compile 'com.google.code.gson:gson:2.8.2'
-    compile('com.jcodecraeer:xrecyclerview:1.5.2') {
+    compile('com.jcodecraeer:xrecyclerview:1.5.9') {
         //    compile 'com.shark:screencapture:1.0.0'
         exclude group: 'com.android.support', module: 'design'
     }

+ 4 - 2
app/src/main/AndroidManifest.xml

@@ -98,8 +98,8 @@
         android:persistent="true"
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
-        <meta-data android:name="design_width_in_dp" android:value="375"/>
-        <meta-data android:name="design_height_in_dp" android:value="667"/>
+        <meta-data android:name="design_width_in_dp" android:value="360"/>
+        <meta-data android:name="design_height_in_dp" android:value="640"/>
         <activity
             android:name=".wxapi.WXEntryActivity"
             android:exported="true"
@@ -591,6 +591,8 @@
             android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.MessageInteractionDetailActivity"
             android:exported="true"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActModifyThird"
+            android:exported="true"/>
 
         <!--start幂动科技-->
 

+ 1 - 1
app/src/main/java/com/kfzs/duanduan/fragment/FgtFind.java

@@ -42,7 +42,7 @@ public class FgtFind extends BaseCompatFragment {
 
     @Override
     protected void initView(Bundle savedInstanceState) {
-        setContentView(R.layout.common_tab_vp);
+        setContentView(R.layout.fgt_find);
         activity = getActivity();
         ButterKnife.bind(this, mContentView);
         initView();

+ 4 - 0
app/src/main/java/com/sheep/gamegroup/helper/DownloadHelper.java

@@ -136,4 +136,8 @@ public class DownloadHelper {
     public void updateState(int status) {
         downLoadType = status;
     }
+
+    public int getDownLoadType() {
+        return downLoadType;
+    }
 }

+ 4 - 0
app/src/main/java/com/sheep/gamegroup/helper/FindAppHelper.java

@@ -31,6 +31,10 @@ import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_APP;
 public class FindAppHelper{
     private DownloadHelper downloadHelper = new DownloadHelper();
 
+    public DownloadHelper getDownloadHelper() {
+        return downloadHelper;
+    }
+
     public void updateState(int status) {
         downloadHelper.updateState(status);
     }

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

@@ -862,6 +862,11 @@ public interface ApiService {
     @GET("app/gift_bag/my_gift_bag")
     Observable<BaseMessage> getMyGiftBagList(@Query("page") int page, @Query("per_page") int per_page);
     /**
+     * 领取礼包
+     */
+    @PUT("app/gift_bag/receive/{id}")
+    Observable<BaseMessage> receiveGiftBag(@Path("id") int id);
+    /**
      * 获取热门福利
      */
     @GET("app/release_task/hot_welfare")
@@ -881,4 +886,25 @@ public interface ApiService {
      */
     @GET("app/game_consumption/voucher_use_log")
     Observable<BaseMessage> getMyWelfareLogList(@Query("page") int page, @Query("per_page") int per_page);
+    /**
+     * 绑定qq或微信
+     */
+    @PUT("app/user/bind_third")
+    Observable<BaseMessage> bindThird(@Body JSONObject jsonObject);
+    /**
+     * 换绑qq或微信
+     */
+    @PUT("app/user/modify_third")
+    Observable<BaseMessage> modifyThird(@Body JSONObject jsonObject);
+    /**
+     * 发送/校验换绑验证码
+     */
+    @POST("app/user/modify_third_sms")
+    Observable<BaseMessage> modifyThirdSms(@Body JSONObject jsonObject);
+    /**
+     * 检查是否需要输入邀请码
+     */
+    @GET("app/auth/need_code")
+    Observable<BaseMessage> needCode(@Query("mobile") String mobile);
+
 }

+ 71 - 7
app/src/main/java/com/sheep/gamegroup/model/entity/FindApp.java

@@ -52,6 +52,23 @@ public class FindApp implements IDownload {
     private int receive_account = 1;//integer($int64)0:未领取账号 1:已领取账号
     private int available_receive = 1;//0:可领取账号 1:不可领取账号
 
+    private String type;
+    private String package_id;
+
+    private int package_type;
+
+    private int download_count_increment;
+
+
+    private int is_recommend;
+
+    private String game_tag;
+
+    private int sort;
+
+    private int IsPlay;
+
+    private int IsHot;
     public int getAvailable_receive() {
         return available_receive;
     }
@@ -199,6 +216,60 @@ public class FindApp implements IDownload {
         this.record = record;
     }
 
+    public void setType(String type){
+        this.type = type;
+    }
+    public String getType(){
+        return this.type;
+    }
+    public void setPackage_id(String package_id){
+        this.package_id = package_id;
+    }
+    public String getPackage_id(){
+        return this.package_id;
+    }
+    public void setPackage_type(int package_type){
+        this.package_type = package_type;
+    }
+    public int getPackage_type(){
+        return this.package_type;
+    }
+    public void setDownload_count_increment(int download_count_increment){
+        this.download_count_increment = download_count_increment;
+    }
+    public int getDownload_count_increment(){
+        return this.download_count_increment;
+    }
+    public void setIs_recommend(int is_recommend){
+        this.is_recommend = is_recommend;
+    }
+    public int getIs_recommend(){
+        return this.is_recommend;
+    }
+    public void setGame_tag(String game_tag){
+        this.game_tag = game_tag;
+    }
+    public String getGame_tag(){
+        return this.game_tag;
+    }
+    public void setSort(int sort){
+        this.sort = sort;
+    }
+    public int getSort(){
+        return this.sort;
+    }
+    public void setIsPlay(int IsPlay){
+        this.IsPlay = IsPlay;
+    }
+    public int getIsPlay(){
+        return this.IsPlay;
+    }
+    public void setIsHot(int IsHot){
+        this.IsHot = IsHot;
+    }
+    public int getIsHot(){
+        return this.IsHot;
+    }
 
 
 
@@ -243,13 +314,6 @@ public class FindApp implements IDownload {
 
 
 
-
-
-
-
-
-
-
     /**
      * 是否可以下载
      * @return

+ 175 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/GiftBag.java

@@ -0,0 +1,175 @@
+package com.sheep.gamegroup.model.entity;
+
+import com.kfzs.duanduan.utils.NumberFormatUtils;
+import com.sheep.gamegroup.util.TimeUtil;
+
+import java.util.Locale;
+
+/**
+ * Created by realicing on 2018/9/4.
+ * realicing@sina.com
+ * AppId	integer($int64)
+ 关联的app_id
+
+ CreatedAt	integer($int64)
+ DeleteStatus	integer($int32)
+ 删除状态(1已删除,2未删除)
+
+ EndTime	integer($int64)
+ 结束时间
+
+ GiftContent	string
+ 礼包内容
+
+ GiftName	string
+ 礼包名称
+
+ Id	integer($int64)
+ Order	integer($int64)
+ 序号,越大越靠前
+
+ StartTime	integer($int64)
+ 开始时间
+
+ Status	integer($int32)
+ 状态(1显示,2不显示)
+
+ Surplus	integer($int64)
+ 剩余数量
+
+ TotalNum	integer($int64)
+ 总量
+
+ UpdatedAt	integer($int64)
+ UseMethod	string
+ 使用方法
+ */
+public class GiftBag {
+    private int Id;
+
+    private String GiftName;
+
+    private int AppId;
+
+    private long StartTime;
+
+    private long EndTime;
+
+    private String GiftContent;
+
+    private String UseMethod;
+
+    private int TotalNum;
+
+    private int Surplus;
+
+    private int Status;
+
+    private int Order;
+
+    private int DeleteStatus;
+
+    private int CreatedAt;
+
+    private int UpdatedAt;
+
+    public void setId(int Id){
+        this.Id = Id;
+    }
+    public int getId(){
+        return this.Id;
+    }
+    public void setGiftName(String GiftName){
+        this.GiftName = GiftName;
+    }
+    public String getGiftName(){
+        return this.GiftName;
+    }
+    public void setAppId(int AppId){
+        this.AppId = AppId;
+    }
+    public int getAppId(){
+        return this.AppId;
+    }
+    public void setStartTime(long StartTime){
+        this.StartTime = StartTime;
+    }
+    public long getStartTime(){
+        return this.StartTime;
+    }
+    public void setEndTime(long EndTime){
+        this.EndTime = EndTime;
+    }
+    public long getEndTime(){
+        return this.EndTime;
+    }
+    public void setGiftContent(String GiftContent){
+        this.GiftContent = GiftContent;
+    }
+    public String getGiftContent(){
+        return this.GiftContent;
+    }
+    public void setUseMethod(String UseMethod){
+        this.UseMethod = UseMethod;
+    }
+    public String getUseMethod(){
+        return this.UseMethod;
+    }
+    public void setTotalNum(int TotalNum){
+        this.TotalNum = TotalNum;
+    }
+    public int getTotalNum(){
+        return this.TotalNum;
+    }
+    public void setSurplus(int Surplus){
+        this.Surplus = Surplus;
+    }
+    public int getSurplus(){
+        return this.Surplus;
+    }
+    public void setStatus(int Status){
+        this.Status = Status;
+    }
+    public int getStatus(){
+        return this.Status;
+    }
+    public void setOrder(int Order){
+        this.Order = Order;
+    }
+    public int getOrder(){
+        return this.Order;
+    }
+    public void setDeleteStatus(int DeleteStatus){
+        this.DeleteStatus = DeleteStatus;
+    }
+    public int getDeleteStatus(){
+        return this.DeleteStatus;
+    }
+    public void setCreatedAt(int CreatedAt){
+        this.CreatedAt = CreatedAt;
+    }
+    public int getCreatedAt(){
+        return this.CreatedAt;
+    }
+    public void setUpdatedAt(int UpdatedAt){
+        this.UpdatedAt = UpdatedAt;
+    }
+    public int getUpdatedAt(){
+        return this.UpdatedAt;
+    }
+
+
+
+
+    /**
+     * 剩余份数
+     * @return
+     */
+    public String getLastNumText() {
+        return String.format(Locale.CHINA, "剩余%d份", Surplus);
+    }
+
+    public String getDateText() {
+        return String.format(Locale.CHINA, "%s—%s", TimeUtil.TimeStamp2Date(StartTime, "yyyy/MM/dd"), TimeUtil.TimeStamp2Date(EndTime, "yyyy/MM/dd"));
+    }
+}

+ 33 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/GiftBagApp.java

@@ -0,0 +1,33 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/9/4.
+ * realicing@sina.com
+ */
+public class GiftBagApp {
+
+    private GiftBag gift_bag;
+
+    private FindApp app;
+
+    private String code;
+
+    public void setGift_bag(GiftBag gift_bag){
+        this.gift_bag = gift_bag;
+    }
+    public GiftBag getGift_bag(){
+        return this.gift_bag;
+    }
+    public void setApp(FindApp app){
+        this.app = app;
+    }
+    public FindApp getApp(){
+        return this.app;
+    }
+    public void setCode(String code){
+        this.code = code;
+    }
+    public String getCode(){
+        return this.code;
+    }
+}

+ 49 - 4
app/src/main/java/com/sheep/gamegroup/model/entity/TaskReleaseEty.java

@@ -4,6 +4,7 @@ import android.text.TextUtils;
 
 import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.sheep.gamegroup.helper.DownloadHelper;
+import com.sheep.gamegroup.util.TimeUtil;
 
 import java.io.Serializable;
 import java.util.Locale;
@@ -22,7 +23,7 @@ public class TaskReleaseEty implements Serializable{
     private int cash_task;// 0,
     private String last_num;// 0,
     private String name;//private String string",
-    private String online_time;// 0,
+    private long online_time;// 0,
     private String online_type;// 0,
     private String release_num;// 0,
     private String remarks;//private String string",
@@ -42,7 +43,8 @@ public class TaskReleaseEty implements Serializable{
     private boolean is_running;
     private String child_task_name;//
     private int demo_time;//试玩时长
-
+    private int gift_ratio;//赠送比例,取值0-100
+    private int user_task_status;//备注:和任务记录状态一样
     public int getDemo_time() {
         return demo_time;
     }
@@ -165,11 +167,11 @@ public class TaskReleaseEty implements Serializable{
         this.name = name;
     }
 
-    public String getOnline_time() {
+    public long getOnline_time() {
         return online_time;
     }
 
-    public void setOnline_time(String online_time) {
+    public void setOnline_time(long online_time) {
         this.online_time = online_time;
     }
 
@@ -254,6 +256,22 @@ public class TaskReleaseEty implements Serializable{
         this.cash_task = cash_task;
     }
 
+    public int getGift_ratio() {
+        return gift_ratio;
+    }
+
+    public void setGift_ratio(int gift_ratio) {
+        this.gift_ratio = gift_ratio;
+    }
+
+    public int getUser_task_status() {
+        return user_task_status;
+    }
+
+    public void setUser_task_status(int user_task_status) {
+        this.user_task_status = user_task_status;
+    }
+
     @Override
     public boolean equals(Object obj) {
         return obj instanceof TaskReleaseEty && ((TaskReleaseEty) obj).getId() == id;
@@ -292,4 +310,31 @@ public class TaskReleaseEty implements Serializable{
     public DownloadHelper getDownloadHelper() {
         return downloadHelper;
     }
+
+    /**
+     * 福利内容
+     * @return
+     */
+    public String getGiftRatioText() {
+        return String.format(Locale.CHINA, "每充500送%d", gift_ratio * 5);
+    }
+    /**
+     * 剩余份数
+     * @return
+     */
+    public String getLastNumText() {
+        return String.format(Locale.CHINA, "剩余%s份", last_num);
+    }
+
+    public String getDateText() {
+        return String.format(Locale.CHINA, "%s—%s", TimeUtil.TimeStamp2Date(online_time, "yyyy/MM/dd"), TimeUtil.TimeStamp2Date(NumberFormatUtils.parseLong(deadline), "yyyy/MM/dd"));
+    }
+
+    /**
+     * 任务是否已经完成,对于游戏任务或者福利来说,就是已经领取奖励
+     * @return
+     */
+    public boolean isTaskFinished() {
+        return user_task_status == 3;
+    }
 }

+ 33 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/UserEntity.java

@@ -2,6 +2,7 @@ package com.sheep.gamegroup.model.entity;
 
 import android.text.TextUtils;
 
+import com.sheep.gamegroup.util.BinaryUtils;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.view.dialog.DialogShare;
@@ -81,6 +82,8 @@ public class UserEntity implements Serializable {
     private int package_cate;
     @Column(name = "create_time_line")
     private int create_time_line;
+    @Column(name = "bind_flag")
+    private int bind_flag;//绑定表示 二进制形式 从低到高 第一位手机号 第二位QQ号 第三位微信
 
     public int getPackage_cate() {
         return package_cate;
@@ -330,6 +333,18 @@ public class UserEntity implements Serializable {
         this.must_bind_mobile = must_bind_mobile;
     }
 
+    public int getBind_flag() {
+        return bind_flag;
+    }
+
+    public void setBind_flag(int bind_flag) {
+        this.bind_flag = bind_flag;
+    }
+
+
+
+
+
 
     public boolean isNewRegistUser() {//新注册用户
         return TextUtils.equals(create_time, last_login_time);
@@ -358,4 +373,22 @@ public class UserEntity implements Serializable {
     public String getShareLink() {//测试服对应的下载地址为http://10.8.230.17:7776/newsheep?id=32778005
         return TestUtil.isSheep() ? getShare_link() : "http://10.8.210.230:8902/share.html?invitation_code=" + getInvitation_code();
     }
+    /**
+     * 是否绑定手机号
+     */
+    public boolean isBindMobile(){
+        return BinaryUtils.is(bind_flag, 1);
+    }
+    /**
+     * 是否绑定QQ号
+     */
+    public boolean isBindQQ(){
+        return BinaryUtils.is(bind_flag, 2);
+    }
+    /**
+     * 是否绑定微信号
+     */
+    public boolean isBindWx(){
+        return BinaryUtils.is(bind_flag, 3);
+    }
 }

+ 0 - 8
app/src/main/java/com/sheep/gamegroup/model/entity/Welfare.java

@@ -1,8 +0,0 @@
-package com.sheep.gamegroup.model.entity;
-
-/**
- * Created by realicing on 2018/8/28.
- * realicing@sina.com
- */
-public class Welfare {
-}

+ 19 - 0
app/src/main/java/com/sheep/gamegroup/util/BinaryUtils.java

@@ -0,0 +1,19 @@
+package com.sheep.gamegroup.util;
+
+/**
+ * 二进制工具
+ * Created by realicing on 2018/9/3.
+ * realicing@sina.com
+ */
+public class BinaryUtils {
+
+    /**
+     * 判断数字number的第bit位是否为1
+     * @param number
+     * @param bit
+     * @return
+     */
+    public static boolean is(int number ,int bit){
+        return ((number >> (bit - 1)) & 1) == 1;
+    }
+}

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

@@ -1102,6 +1102,16 @@ public class CommonUtil {
                     }
                 });
     }
+    public void callActionWithUserInfo(final Action1<UserEntity> action1) {
+        UserEntity userEntity = DataUtil.getInstance().getUserEntity();
+        if(userEntity == null) {
+            updateUserInfo(action1);
+        } else {
+            if(action1 != null){
+                action1.call(userEntity);
+            }
+        }
+    }
 
     /**
      * 判断地址是否为图片

+ 9 - 0
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -36,6 +36,7 @@ import com.sheep.gamegroup.model.entity.XianWanEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.view.activity.ActAudit;
 import com.sheep.gamegroup.view.activity.ActBindMobileRegister;
+import com.sheep.gamegroup.view.activity.ActModifyThird;
 import com.sheep.gamegroup.view.activity.ActCreditCardTaskList;
 import com.sheep.gamegroup.view.activity.ActCreditCardWeb;
 import com.sheep.gamegroup.view.activity.ActDownloadWelfareList;
@@ -1520,4 +1521,12 @@ public class Jump2View {
         activity.startActivity(intent);
         GAME_MY_WELFARE.onEvent();
     }
+    /**
+     * 进入验证手机号
+     */
+    public void goBindThird(final Activity activity, @ActModifyThird.THIRD_TYPE final String type) {
+        Intent intent = new Intent(activity, ActModifyThird.class);
+        intent.putExtra("type", type);
+        activity.startActivity(intent);
+    }
 }

+ 3 - 1
app/src/main/java/com/sheep/gamegroup/util/UMConfigUtils.java

@@ -126,7 +126,7 @@ public class UMConfigUtils {
         QR_SAVE("保存二维码至手机"),//5093
         QR_COPY("复制二维码链接"),//5094
         LINK_SHARE("分享链接"),//5095
-        BIND_WX("绑定微信"),//5096
+        BIND_TX_WX("绑定提现微信"),//5096
         BIND_PHONE("绑定手机号"),//5097
         SHARE_TO_WX("分享到微信"),//5098
         SHARE_TO_QQ("分享到QQ"),//5099
@@ -157,6 +157,8 @@ public class UMConfigUtils {
         GAME_DOWNLOAD_WELFARE_LIST("下载福利列表"),
         GAME_GIFT_CENTER("礼包中心"),
         GAME_MY_WELFARE("我的福利"),
+        BIND_QQ("绑定QQ"),
+        BIND_WX("绑定微信"),
         ;
         private String tag;
 

+ 13 - 7
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -62,10 +62,12 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.Container;
 import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.GameAccountEntity;
+import com.sheep.gamegroup.model.entity.GiftBag;
+import com.sheep.gamegroup.model.entity.GiftBagApp;
 import com.sheep.gamegroup.model.entity.HomeListEntity;
 import com.sheep.gamegroup.model.entity.PayEntity;
 import com.sheep.gamegroup.model.entity.RobTask;
-import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.entity.TaskReleaseEty;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.glide.RoundedCornersTransformation;
 import com.sheep.gamegroup.view.activity.PersonalInfoAct;
@@ -82,6 +84,7 @@ import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 
 import org.afinal.simplecache.ACache;
@@ -604,9 +607,9 @@ public class ViewUtil {
      * 领取福利成功的对话框
      *
      * @param activity
-     * @param welfare
+     * @param item
      */
-    public static void shareGetWelfareDialog(final Activity activity, final Welfare welfare) {
+    public static void shareGetWelfareDialog(final Activity activity, final GiftBagApp item) {
         View dialog_parent = View.inflate(activity, R.layout.dialog_parent, null);
         final AlertDialog dialog = new AlertDialog.Builder(activity, R.style.MyDialogActivityTheme)
                 .setView(dialog_parent)
@@ -625,12 +628,14 @@ public class ViewUtil {
         final TextView get_welfare_code_tv = view.findViewById(R.id.get_welfare_code_tv);
         TextView get_welfare_copy_tv = view.findViewById(R.id.get_welfare_copy_tv);
         TextView get_welfare_content_tv = view.findViewById(R.id.get_welfare_content_tv);
-        //TODO 设置内容与兑换码
-
+        // 设置内容与兑换码
+        get_welfare_content_tv.setText(String.format(Locale.CHINA, "礼包内容:%s", item.getGift_bag().getGiftContent()));
+        get_welfare_code_tv.setText(String.format(Locale.CHINA, "兑换码:%s", item.getCode()));
         get_welfare_copy_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                StringUtils.CopyText(get_welfare_code_tv.getText().toString());
+                StringUtils.CopyText(item.getCode());
+                G.showToast("复制兑换码成功");
             }
         });
 
@@ -638,7 +643,8 @@ public class ViewUtil {
             @Override
             public void onClick(View v) {
                 dialog.dismiss();
-                //TODO 启动游戏
+                //启动游戏
+                PackageUtil.startApp(activity, item.getApp().getPackage_names());
             }
         });
         dialog_btn_left.setOnClickListener(new View.OnClickListener() {

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

@@ -26,6 +26,8 @@ import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
+import java.util.Locale;
+
 import butterknife.BindView;
 import rx.android.schedulers.AndroidSchedulers;
 import rx.schedulers.Schedulers;
@@ -80,8 +82,7 @@ public class ActBindMobileRegister extends BaseActivity {
 
             @Override
             public void onTimerTick(long millisUntilFinished, int countTime) {
-                String textStr = countTime + " s";
-                bind_mobile_register_code_tv.setText(textStr);
+                bind_mobile_register_code_tv.setText(String.format(Locale.CHINA, "%d s", countTime));
             }
 
             @Override

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/ActGiftCenter.java

@@ -25,7 +25,7 @@ public class ActGiftCenter extends BaseActivity {
     @Override
     public void initView() {
         TitleBarUtils.getInstance()
-                .setTitle(this, "下载福利列表")
+                .setTitle(this, "礼包中心")
                 .setTitleFinish(this);
 
         FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();

+ 280 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActModifyThird.java

@@ -0,0 +1,280 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.content.Intent;
+import android.support.annotation.StringDef;
+import android.support.v7.widget.AppCompatEditText;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.UserEntity;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.SelfCountDownTimer;
+import com.sheep.gamegroup.util.StringUtils;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+import com.umeng.socialize.UMAuthListener;
+import com.umeng.socialize.UMShareAPI;
+import com.umeng.socialize.bean.SHARE_MEDIA;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Locale;
+import java.util.Map;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+/**
+ * 验证手机号后绑定第三方账号QQ或者微信
+ * Created by realicing on 2018/9/3.
+ * realicing@sina.com
+ */
+public class ActModifyThird extends BaseActivity {
+    public static final String THIRD_TYPE_QQ = "modifyqzone";
+    public static final String THIRD_TYPE_WX = "modifywechat";
+    @BindView(R.id.modify_third_mobile_et)
+    AppCompatEditText modifyThirdMobileEt;
+    @BindView(R.id.modify_third_code_btn)
+    TextView modifyThirdCodeBtn;
+    @BindView(R.id.modify_third_code_et)
+    AppCompatEditText modifyThirdCodeEt;
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.act_modify_third;
+    }
+
+    @Override
+    public void initView() {
+        TitleBarUtils.getInstance()
+                .setTitle(this, "验证手机号")
+                .setTitleFinish(this);
+    }
+
+    private SelfCountDownTimer selfCountDownTimer;
+    @Override
+    public void initListener() {
+        selfCountDownTimer = new SelfCountDownTimer(60 * 1000, 1000, SelfCountDownTimer.FULL_SECOND) {
+            @Override
+            public void onTimerRest() {
+                modifyThirdCodeBtn.setText(getString(R.string.get_captcha));
+                modifyThirdCodeBtn.setEnabled(true);
+            }
+
+            @Override
+            public void onTimerTick(long millisUntilFinished, int countTime) {
+                modifyThirdCodeBtn.setText(String.format(Locale.CHINA, "%d s", countTime));
+            }
+
+            @Override
+            public void onTimerFinish() {
+                selfCountDownTimer.reset(SelfCountDownTimer.FULL_SECOND);
+            }
+        };
+    }
+
+    private String genre;
+
+
+    @StringDef({THIRD_TYPE_QQ, THIRD_TYPE_WX})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface THIRD_TYPE {
+    }
+    @Override
+    public void initData() {
+        genre = getIntent().getStringExtra("type");
+    }
+    @OnClick({R.id.modify_third_code_btn, R.id.modify_third_commit})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.modify_third_code_btn:
+                getCaptcha(view);
+                break;
+            case R.id.modify_third_commit:
+                toCommit(view);
+                break;
+        }
+    }
+    private String mMobile;
+    /**
+     * 获取验证码
+     * captcha	string
+     genre	string
+     enum:modifyqzone,modifywechat
+     mobile	string
+     step	string
+     enum:first,second
+     * @param view
+     */
+    public void getCaptcha(View view) {
+        modifyThirdCodeBtn.setEnabled(false);
+        //检查手机号
+        final String mobile = modifyThirdMobileEt.getText().toString().trim();
+        if(!StringUtils.isMobile(mobile)){
+            G.showToast("请填写正确的手机号!");
+            return;
+        }
+        //提交数据获取验证码
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("genre", genre);
+        jsonObject.put("mobile", mobile);
+        jsonObject.put("step", "first");
+        SheepApp.getInstance().getNetComponent().getApiService().modifyThirdSms(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        mMobile = mobile;
+                        G.showToast("验证码已经发送");
+                        modifyThirdCodeEt.requestFocus();
+                        selfCountDownTimer.start();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                        modifyThirdCodeBtn.setEnabled(true);
+                    }
+                });
+    }
+    /**
+     * 检验验证码
+     * @param view
+     */
+    public void toCommit(View view) {
+        final String captcha = modifyThirdCodeEt.getText().toString().trim();
+        if(TextUtils.isEmpty(captcha)){
+            G.showToast("请输入验证码");
+            return;
+        }
+        //提交数据获取验证码
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("captcha", captcha);
+        jsonObject.put("genre", genre);
+        jsonObject.put("mobile", mMobile);
+        jsonObject.put("step", "first");
+        SheepApp.getInstance().getNetComponent().getApiService().modifyThirdSms(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+                });
+
+    }
+
+    private void modifyQQ() {
+        UMShareAPI.get(this).doOauthVerify(this, SHARE_MEDIA.QQ, new UMAuthListener() {
+            @Override
+            public void onStart(SHARE_MEDIA platform) {
+                showProgress();
+            }
+
+            @Override
+            public void onComplete(SHARE_MEDIA platform, int action, Map<String, String> data) {
+                modifyThird("qzone", data.get("access_token"), data.get("openid"));
+            }
+
+            @Override
+            public void onError(SHARE_MEDIA platform, int action, Throwable t) {
+                G.showToast("QQ授权失败  请检查网络是否正常");
+                hideProgress();
+            }
+
+            @Override
+            public void onCancel(SHARE_MEDIA platform, int action) {
+                G.showToast("您取消了QQ授权");
+                hideProgress();
+            }
+        });
+    }
+    private void modifyWX() {
+        UMShareAPI.get(this).doOauthVerify(this, SHARE_MEDIA.WEIXIN, new UMAuthListener() {
+            @Override
+            public void onStart(SHARE_MEDIA platform) {
+                showProgress();
+            }
+
+            @Override
+            public void onComplete(SHARE_MEDIA platform, int action, Map<String, String> data) {
+                modifyThird("wechat", data.get("access_token"), data.get("openid"));
+            }
+
+            @Override
+            public void onError(SHARE_MEDIA platform, int action, Throwable t) {
+                G.showToast("微信授权失败  请检查网络是否正常");
+                hideProgress();
+            }
+
+            @Override
+            public void onCancel(SHARE_MEDIA platform, int action) {
+                G.showToast("您取消了微信授权");
+                hideProgress();
+            }
+        });
+    }
+
+    /**
+     * aaccess_token	string
+     authorization_code	string
+     open_id	string
+     platform	string
+            qzone, wechat
+     s_from	string
+            sheep, web_sheep
+     */
+    private void modifyThird(String platform, String access_token, String openid) {
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("access_token", access_token);
+        jsonObject.put("authorization_code", "");
+        jsonObject.put("open_id", openid);
+        jsonObject.put("platform", platform);
+        jsonObject.put("s_from", "sheep");
+        SheepApp.getInstance().getNetComponent().getApiService().modifyThird(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        hideProgress();
+                        G.showToast(baseMessage);
+                        CommonUtil.getInstance().updateUserInfo(null);
+                        finish();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        hideProgress();
+                        G.showToast(baseMessage);
+                    }
+                });
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        try {
+            UMShareAPI.get(this).onActivityResult(requestCode, resultCode, data);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

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

@@ -70,8 +70,6 @@ public class ActXiaomiGame extends BaseActivity {
     public void initView() {
         activity = this;
         EventBus.getDefault().register(this);
-        Aria.download(this).register();
-
         TitleBarUtils.getInstance()
                 .setTitleFinish(activity)
                 .setTitle(activity, "小米游戏中心")

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

@@ -139,7 +139,22 @@ public class LoginAct extends BaseUMActivity implements LoginContract.View {
     private void checkAccountScope(Editable editable) {
         String mobile = editable.toString();
         if(StringUtils.isMobile(mobile)){//是手机号才检查
-            //TODO 调用接口检查账号中的邀请码
+            //调用接口检查账号中的邀请码
+            SheepApp.getInstance().getNetComponent().getApiService().needCode(mobile)
+                            .subscribeOn(Schedulers.io())
+                            .observeOn(AndroidSchedulers.mainThread())
+                            .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                                @Override
+                                public void onNext(BaseMessage baseMessage) {
+                                    loginEtScope.setVisibility(baseMessage.getData(Boolean.class) ? View.VISIBLE : View.GONE);
+                                }
+
+                                @Override
+                                public void onError(BaseMessage baseMessage) {
+                                }
+                            });
+        } else {
+            loginEtScope.setVisibility(View.VISIBLE);
         }
 
     }

+ 175 - 18
app/src/main/java/com/sheep/gamegroup/view/activity/PersonalInfoAct.java

@@ -9,6 +9,7 @@ import android.widget.PopupWindow;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSONObject;
+import com.google.gson.JsonObject;
 import com.sheep.gamegroup.absBase.AbsChooseImageActivity;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.UserEntity;
@@ -23,6 +24,11 @@ import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+import com.umeng.socialize.UMAuthListener;
+import com.umeng.socialize.UMShareAPI;
+import com.umeng.socialize.bean.SHARE_MEDIA;
+
+import java.util.Map;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
@@ -32,6 +38,8 @@ import rx.functions.Action1;
 import rx.schedulers.Schedulers;
 
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.BIND_PHONE;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.BIND_QQ;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.BIND_TX_WX;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.BIND_WX;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_INFO_AVATAR;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_INFO_NAME;
@@ -57,6 +65,16 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
     TextView tvSex;
     @BindView(R.id.tv_birthday)
     TextView tvBirthday;
+    @BindView(R.id.personal_info_phone)
+    TextView personal_info_phone;
+    @BindView(R.id.personal_info_bind_tx_wx)
+    TextView personal_info_bind_tx_wx;
+    @BindView(R.id.personal_info_bind_qq)
+    TextView personal_info_bind_qq;
+    @BindView(R.id.personal_info_bind_wx)
+    TextView personal_info_bind_wx;
+    @BindView(R.id.personal_info_authentication)
+    TextView personal_info_authentication;
 
 
     @Override
@@ -82,12 +100,6 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
 
     }
 
-    @BindView(R.id.personal_info_phone)
-    TextView personal_info_phone;
-    @BindView(R.id.personal_info_wx)
-    TextView personal_info_wx;
-    @BindView(R.id.personal_info_authentication)
-    TextView personal_info_authentication;
 
     @Override
     public void initData() {
@@ -158,7 +170,9 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
                 });
     }
 
-    @OnClick({R.id.personal_info_avatar_container, R.id.personal_info_name_container, R.id.personal_info_qr_container, R.id.personal_info_phone_container, R.id.personal_info_wx_container,
+    @OnClick({R.id.personal_info_avatar_container, R.id.personal_info_name_container, R.id.personal_info_qr_container,
+            R.id.personal_info_phone_container, R.id.personal_info_bind_tx_wx_container,
+            R.id.personal_info_bind_qq_container, R.id.personal_info_bind_wx_container,
             R.id.personal_info_authentication_container, R.id.llayout_sex, R.id.llayout_birthday})
 
     public void onClick(View view) {
@@ -196,14 +210,53 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
                 Jump2View.getInstance().goBindPhone(activity, null);
                 BIND_PHONE.onEvent();
                 break;
-            case R.id.personal_info_wx_container:  ////跳转到微信
-                if (userEntity == null) {
-                    G.showToast(R.string.loading_data);
-                } else if (TextUtils.isEmpty(userEntity.getWx_openid())) {
-                    Jump2View.getInstance().goNoBindWx(activity, ChangeWxOrTelAct.TYPE_NORMAL);
-                } else {
-                    G.showToast("您已经绑定微信");
-                }
+            case R.id.personal_info_bind_tx_wx_container:  //跳转到绑定提现微信号的界面
+                CommonUtil.getInstance().callActionWithUserInfo(new Action1<UserEntity>() {
+                    @Override
+                    public void call(UserEntity userEntity) {
+                        if(userEntity == null){
+                            G.showToast(R.string.error_data);
+                        } else if (TextUtils.isEmpty(userEntity.getWx_openid())) {
+                            Jump2View.getInstance().goNoBindWx(activity, ChangeWxOrTelAct.TYPE_NORMAL);
+                        } else {
+                            G.showToast("您已经绑定微信");
+                        }
+                    }
+                });
+                BIND_TX_WX.onEvent();
+                break;
+            case R.id.personal_info_bind_qq_container:  //跳转到验证手机号并绑定qq的界面
+                CommonUtil.getInstance().callActionWithUserInfo(new Action1<UserEntity>() {
+                    @Override
+                    public void call(UserEntity userEntity) {
+                        if(userEntity == null){
+                            G.showToast(R.string.error_data);
+                        } else if(!userEntity.isBindMobile()){
+                            G.showToast("请先绑定手机号");
+                        } else if(!userEntity.isBindQQ()){
+                            bindQQ();
+                        } else {
+                            Jump2View.getInstance().goBindThird(activity, ActModifyThird.THIRD_TYPE_QQ);
+                        }
+                    }
+                });
+                BIND_QQ.onEvent();
+                break;
+            case R.id.personal_info_bind_wx_container:  //跳转到验证手机号并绑定微信的界面
+                CommonUtil.getInstance().callActionWithUserInfo(new Action1<UserEntity>() {
+                    @Override
+                    public void call(UserEntity userEntity) {
+                        if(userEntity == null){
+                            G.showToast(R.string.error_data);
+                        } else if(!userEntity.isBindMobile()){
+                            G.showToast("请先绑定手机号");
+                        } else if(!userEntity.isBindWx()){
+                            bindWX();
+                        } else {
+                            Jump2View.getInstance().goBindThird(activity, ActModifyThird.THIRD_TYPE_WX);
+                        }
+                    }
+                });
                 BIND_WX.onEvent();
                 break;
             case R.id.personal_info_authentication_container: ////跳转授权
@@ -212,6 +265,99 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
         }
     }
 
+    private void bindQQ() {
+        UMShareAPI.get(this).doOauthVerify(this, SHARE_MEDIA.QQ, new UMAuthListener() {
+            @Override
+            public void onStart(SHARE_MEDIA platform) {
+                showProgress();
+            }
+
+            @Override
+            public void onComplete(SHARE_MEDIA platform, int action, Map<String, String> data) {
+                bindThird("qzone", data.get("access_token"), data.get("openid"));
+            }
+
+            @Override
+            public void onError(SHARE_MEDIA platform, int action, Throwable t) {
+                G.showToast("QQ授权失败  请检查网络是否正常");
+                hideProgress();
+            }
+
+            @Override
+            public void onCancel(SHARE_MEDIA platform, int action) {
+                G.showToast("您取消了QQ授权");
+                hideProgress();
+            }
+        });
+    }
+    private void bindWX() {
+        UMShareAPI.get(this).doOauthVerify(this, SHARE_MEDIA.WEIXIN, new UMAuthListener() {
+            @Override
+            public void onStart(SHARE_MEDIA platform) {
+                showProgress();
+            }
+
+            @Override
+            public void onComplete(SHARE_MEDIA platform, int action, Map<String, String> data) {
+                bindThird("wechat", data.get("access_token"), data.get("openid"));
+            }
+
+            @Override
+            public void onError(SHARE_MEDIA platform, int action, Throwable t) {
+                G.showToast("微信授权失败  请检查网络是否正常");
+                hideProgress();
+            }
+
+            @Override
+            public void onCancel(SHARE_MEDIA platform, int action) {
+                G.showToast("您取消了微信授权");
+                hideProgress();
+            }
+        });
+    }
+
+    /**
+     * access_token	string
+     open_id	string
+     platform	string
+            qzone, wechat
+     s_from	string
+            sheep, web_sheep
+     * @param access_token
+     * @param openid
+     */
+    private void bindThird(String platform, String access_token, String openid) {
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("access_token", access_token);
+        jsonObject.put("open_id", openid);
+        jsonObject.put("platform", platform);
+        jsonObject.put("s_from", "sheep");
+        SheepApp.getInstance().getNetComponent().getApiService().bindThird(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        hideProgress();
+                        CommonUtil.getInstance().updateUserInfo(new Action1<UserEntity>() {
+                            @Override
+                            public void call(UserEntity result) {
+                                if(result != null){
+                                    userEntity = result;
+                                    loadUserInfo();
+                                }
+                            }
+                        });
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        hideProgress();
+                        G.showToast(baseMessage);
+                    }
+                });
+    }
+
     @Override
     protected void onNotGetImage(String msg) {
         G.showToast(msg);
@@ -290,13 +436,15 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
 
         if (TextUtils.isEmpty(userEntity.getWx_nickname())) {
             if (TextUtils.isEmpty(userEntity.getWx_openid())) {
-                personal_info_wx.setText("未绑定");
+                personal_info_bind_tx_wx.setText("未绑定");
             } else {
-                personal_info_wx.setText("");
+                personal_info_bind_tx_wx.setText("");
             }
         } else {
-            personal_info_wx.setText(userEntity.getWx_nickname());
+            personal_info_bind_tx_wx.setText(userEntity.getWx_nickname());
         }
+        personal_info_bind_qq.setText(userEntity.isBindQQ() ? "去修改" : "去绑定");
+        personal_info_bind_wx.setText(userEntity.isBindWx() ? "去修改" : "去绑定");
 
         boolean isId_number = TextUtils.isEmpty(userEntity.getId_number());
         boolean isRoalName = TextUtils.isEmpty(userEntity.getReal_name());
@@ -309,4 +457,13 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
         }
     }
 
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        try {
+            UMShareAPI.get(this).onActivityResult(requestCode, resultCode, data);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
 }

+ 6 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java

@@ -31,6 +31,7 @@ import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.RxjavaCountDownTimer;
 import com.sheep.gamegroup.util.SysAppUtil;
+import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 
@@ -190,7 +191,11 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
     public void initView() {
         activity = this;
         GlideImageLoader.setImage(login_bg_img, "http://cdngame.kuaifazs.com/login_bg_img.png");
-        mHandler.sendEmptyMessageDelayed(1, 500);
+        if(BuildConfig.DEBUG){
+            Jump2View.getInstance().goHomePageView(activity, null);
+        } else {
+            mHandler.sendEmptyMessageDelayed(1, 500);
+        }
     }
 
     @Override

+ 174 - 10
app/src/main/java/com/sheep/gamegroup/view/adapter/DownloadWelfareAdapter.java

@@ -2,39 +2,203 @@ package com.sheep.gamegroup.view.adapter;
 
 import android.app.Activity;
 import android.content.Context;
+import android.text.Html;
 import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
 
-import com.sheep.gamegroup.model.entity.Welfare;
+import com.alibaba.fastjson.JSONObject;
+import com.jcodecraeer.xrecyclerview.XRecyclerView;
+import com.kfzs.duanduan.services.DownloadTaskService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.TaskEty;
+import com.sheep.gamegroup.model.entity.TaskReleaseEty;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DeviceUtil;
+import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
 
 import java.util.List;
+import java.util.Locale;
+
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+import static com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp.PUBLIC_TAG_PREFIX_TEXTVIEW_LIST;
 
 /**
  * Created by realicing on 2018/8/28.
  * realicing@sina.com
  */
-public class DownloadWelfareAdapter extends AdbCommonRecycler<Welfare> implements View.OnClickListener{
-
-    public DownloadWelfareAdapter(Context context, List<Welfare> list) {
+public class DownloadWelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
+    private Action1<Integer> action1;
+    public DownloadWelfareAdapter(Context context, List<TaskReleaseEty> list, Action1<Integer> action1) {
         super(context, list);
+        this.action1 = action1;
     }
-
+    public static final int TO_REFRESH = 1;
     @Override
     public int getViewIdByType(int type) {
         return R.layout.item_download_welfare;
     }
 
     @Override
-    public void convert(ViewHolder holder, Welfare welfareCenter) {
-        holder.itemView.setOnClickListener(this);
+    public void convert(ViewHolder holder, final TaskReleaseEty item) {
+        ImageView item_download_welfare_iv = (ImageView)holder.getView(R.id.item_download_welfare_iv);
+        ImageView item_download_welfare_iv2 = (ImageView)holder.getView(R.id.item_download_welfare_iv2);
+        TextView item_download_welfare_name_tv = (TextView)holder.getView(R.id.item_download_welfare_name_tv);
+        TextView item_download_welfare_money = (TextView)holder.getView(R.id.item_download_welfare_money);
+        TextView item_download_welfare_num_tv = (TextView)holder.getView(R.id.item_download_welfare_num_tv);
+        TextView item_download_welfare_num_tv1 = (TextView)holder.getView(R.id.item_download_welfare_num_tv1);
+        TextView item_download_welfare_date_tv = (TextView)holder.getView(R.id.item_download_welfare_date_tv);
+        TextView item_download_welfare_btn_bottom = (TextView)holder.getView(R.id.item_download_welfare_btn_bottom);
+        TextView item_download_welfare_btn_top = (TextView)holder.getView(R.id.item_download_welfare_btn_top);
         View item_download_welfare_line = holder.getView(R.id.item_download_welfare_line);
         item_download_welfare_line.setVisibility(holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
+        if(item == null){
+            ViewUtil.setDefaultText(item_download_welfare_name_tv);
+            ViewUtil.setDefaultText(item_download_welfare_num_tv);
+            ViewUtil.setDefaultText(item_download_welfare_num_tv1);
+            ViewUtil.setDefaultText(item_download_welfare_date_tv);
+            ViewUtil.setDefaultText(item_download_welfare_money);
+            item_download_welfare_iv2.setVisibility(View.GONE);
+        } else if(context instanceof Activity){
+            final TaskEty itemTask = item.getTask();
+            if(itemTask == null){
+                return;
+            }
+            GlideImageLoader.setGameImage(item_download_welfare_iv, itemTask.getIcon());
+            ViewUtil.setText(item_download_welfare_name_tv, item.getName());
+            item_download_welfare_money.setText(Html.fromHtml(String.format(Locale.CHINA, "<font size='1'>¥</font>%s", item.getBonusText())));
+            ViewUtil.setText(item_download_welfare_num_tv, item.getGiftRatioText());
+            ViewUtil.setText(item_download_welfare_num_tv1, item.getLastNumText());
+            ViewUtil.setText(item_download_welfare_date_tv, item.getDateText());
+            item_download_welfare_iv2.setVisibility(item.isTaskFinished()? View.VISIBLE : View.INVISIBLE);
+
+            item_download_welfare_btn_bottom.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + itemTask.getDownload_link());
+            switch (item.getUser_task_status()){//1,已接受任务 2,正在进行中,3完成任务,4放弃任务,5任务失败,6审核失败,7提交审核,8任务已下线,9至少完成了一个任务了
+                case 0:
+                    item_download_welfare_money.setVisibility(View.VISIBLE);
+                    item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
+                    item_download_welfare_btn_bottom.setEnabled(true);
+                    item_download_welfare_btn_bottom.setText("下载领取");
+                    item_download_welfare_btn_bottom.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            acceptedTask(item.getId());
+                        }
+                    });
+                    break;
+                case 1:
+                case 2:
+                    item_download_welfare_money.setVisibility(View.VISIBLE);
+                    item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
+                    item_download_welfare_btn_bottom.setEnabled(true);
+                    item.getDownloadHelper().updateDownloadTaskView((Activity) context, itemTask, item_download_welfare_btn_bottom);
+                    if(item.getDownloadHelper().getDownLoadType() == DownloadTaskService.STATUS_INSTALLED){//已经安装的话
+                        item_download_welfare_btn_bottom.setText("领取奖励");
+                        item_download_welfare_btn_bottom.setOnClickListener(new View.OnClickListener() {
+                            @Override
+                            public void onClick(View view) {
+                                if (itemTask.isGameReservationCantDownload()) {
+                                    CommonUtil.getInstance().reservationGameTask(context, item, new Action1<Integer>() {
+                                        @Override
+                                        public void call(Integer integer) {
+                                            if(action1 != null)
+                                                action1.call(TO_REFRESH);
+                                        }
+                                    });
+                                } else {
+                                    acceptedReceiveAward(item);
+                                }
+                            }
+                        });
+                    }
+                    break;
+                case 3:
+                    item_download_welfare_money.setVisibility(View.INVISIBLE);
+                    item_download_welfare_btn_top.setVisibility(View.VISIBLE);
+                    item.getDownloadHelper().updateDownloadTaskView((Activity) context, itemTask, item_download_welfare_btn_bottom);
+                    if(item.getDownloadHelper().getDownLoadType() == DownloadTaskService.STATUS_INSTALLED) {//已经安装的话
+                        item_download_welfare_btn_bottom.setText("启动");
+                    }
+                    item_download_welfare_btn_top.setText("充值");
+                    item_download_welfare_btn_top.setEnabled(true);
+                    item_download_welfare_btn_top.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            if (itemTask.getThird_task_id() != null) {
+                                ViewUtil.showGamePayAccount((Activity) context, itemTask.getThird_task_id(), item.getName());
+                            }
+                        }
+                    });
+                    break;
+                default:
+                    item_download_welfare_money.setVisibility(View.VISIBLE);
+                    item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
+                    item_download_welfare_btn_bottom.setText("已经下线");
+                    item_download_welfare_btn_bottom.setEnabled(false);
+                    break;
+            }
+        }
     }
 
-    @Override
-    public void onClick(View view) {
-        ViewUtil.shareGetWelfareDialog((Activity) context, null);
+    /**
+     * 领取任务
+     */
+    private void acceptedTask(int release_task_id) {
+        JSONObject object = new JSONObject();
+        object.put("device_id", DeviceUtil.getDeviceId(SheepApp.getInstance()));
+        object.put("release_task_id", release_task_id);
+        SheepApp.getInstance()
+                .getNetComponent()
+                .getApiService()
+                .acceptedTask(object)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {//领取任务成功
+                        G.showToast(baseMessage);
+                        if(action1 != null)
+                            action1.call(TO_REFRESH);
+                    }
+                });
+    }
+    /**
+     * 领取奖励
+     */
+    private void acceptedReceiveAward(TaskReleaseEty item) {
+        SheepApp.getInstance()
+                .getNetComponent()
+                .getApiService()
+                .receive_award(item.getAccepted_task_id())
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        //这里领取了奖励,要刷新用户信息
+                        CommonUtil.getInstance().updateUserInfo(null);
+                        if(action1 != null)
+                            action1.call(TO_REFRESH);
+                    }
+                });
     }
 }

+ 97 - 10
app/src/main/java/com/sheep/gamegroup/view/adapter/GiftCenterAdapter.java

@@ -1,25 +1,45 @@
 package com.sheep.gamegroup.view.adapter;
 
+import android.app.Activity;
 import android.content.Context;
+import android.text.TextUtils;
 import android.view.Gravity;
 import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
 
+import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.DialogConfig;
-import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.entity.FindApp;
+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.GlideImageLoader;
 import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
 
 import java.util.List;
+import java.util.Locale;
+
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+import static com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter.TO_REFRESH;
 
 /**
  * Created by realicing on 2018/8/28.
  * realicing@sina.com
  */
-public class GiftCenterAdapter extends AdbCommonRecycler<Welfare> implements View.OnClickListener {
+public class GiftCenterAdapter extends AdbCommonRecycler<GiftBagApp> {
 
-    public GiftCenterAdapter(Context context, List<Welfare> list) {
+    private Action1<Integer> action1;
+    public GiftCenterAdapter(Context context, List<GiftBagApp> list, Action1<Integer> action1) {
         super(context, list);
+        this.action1 = action1;
     }
 
     @Override
@@ -28,14 +48,81 @@ public class GiftCenterAdapter extends AdbCommonRecycler<Welfare> implements Vie
     }
 
     @Override
-    public void convert(ViewHolder holder, Welfare welfareCenter) {
-        holder.itemView.setOnClickListener(this);
+    public void convert(ViewHolder holder, final GiftBagApp item) {
+        ImageView item_download_welfare_iv = (ImageView)holder.getView(R.id.item_download_welfare_iv);
+        ImageView item_download_welfare_iv2 = (ImageView)holder.getView(R.id.item_download_welfare_iv2);
+        TextView item_download_welfare_name_tv = (TextView)holder.getView(R.id.item_download_welfare_name_tv);
+        TextView item_download_welfare_money = (TextView)holder.getView(R.id.item_download_welfare_money);
+        TextView item_download_welfare_num_tv = (TextView)holder.getView(R.id.item_download_welfare_num_tv);
+        TextView item_download_welfare_num_tv1 = (TextView)holder.getView(R.id.item_download_welfare_num_tv1);
+        TextView item_download_welfare_date_tv = (TextView)holder.getView(R.id.item_download_welfare_date_tv);
+        TextView item_download_welfare_btn_bottom = (TextView)holder.getView(R.id.item_download_welfare_btn_bottom);
+        TextView item_download_welfare_btn_top = (TextView)holder.getView(R.id.item_download_welfare_btn_top);
+        TextView item_download_welfare_btn_center = (TextView)holder.getView(R.id.item_download_welfare_btn_center);
+        View item_download_welfare_line = holder.getView(R.id.item_download_welfare_line);
+        item_download_welfare_line.setVisibility(holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
+        item_download_welfare_money.setVisibility(View.GONE);
+        item_download_welfare_btn_bottom.setVisibility(View.GONE);
+        item_download_welfare_btn_top.setVisibility(View.GONE);
+        item_download_welfare_num_tv1.setVisibility(View.GONE);
+        item_download_welfare_iv2.setVisibility(View.GONE);
+        item_download_welfare_btn_center.setVisibility(View.VISIBLE);
+        if(item == null){
+            ViewUtil.setDefaultText(item_download_welfare_name_tv);
+            ViewUtil.setDefaultText(item_download_welfare_num_tv);
+            ViewUtil.setDefaultText(item_download_welfare_date_tv);
+            item_download_welfare_iv2.setVisibility(View.GONE);
+        } else if(context instanceof Activity){
+            final FindApp itemApp = item.getApp();
+            final GiftBag itemGiftBag = item.getGift_bag();
+            if(itemApp == null || itemGiftBag == null){
+                return;
+            }
+            GlideImageLoader.setGameImage(item_download_welfare_iv, itemApp.getIcon());
+            ViewUtil.setText(item_download_welfare_name_tv, itemApp.getName());
+            ViewUtil.setText(item_download_welfare_num_tv, itemGiftBag.getLastNumText());
+            ViewUtil.setText(item_download_welfare_date_tv, itemGiftBag.getDateText());
+            if(TextUtils.isEmpty(item.getCode())){//没有code,就视为没有领取礼包
+                item_download_welfare_btn_center.setText("领取");
+                item_download_welfare_btn_center.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        onClickItem(item);
+                    }
+                });
+            } else {
+                item_download_welfare_btn_center.setText("去使用");
+                item_download_welfare_btn_center.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        ViewUtil.showMsgDialog(context, new DialogConfig().setTitle("礼包使用说明").setBtnLeftText("我知道了")
+                                .setMsgGravity(Gravity.START)
+                                .setMsg(String.format(Locale.CHINA, "礼包内容:\n%s\n\n使用方式:\n启动游戏---设置---激活兑换", itemGiftBag.getGiftContent())));
+                    }
+                });
+
+            }
+        }
     }
 
-    @Override
-    public void onClick(View view) {
-        ViewUtil.showMsgDialog(context, new DialogConfig().setTitle("礼包使用说明").setBtnLeftText("我知道了")
-                .setMsgGravity(Gravity.START)//.setMsgLayoutWidth()
-                .setMsg("礼包内容:\n元宝X1000、钻石X2000、符文X20\n\n使用方式:\n启动游戏---设置---激活兑换"));
+    private void onClickItem(final GiftBagApp item) {
+        SheepApp.getInstance().getNetComponent().getApiService().receiveGiftBag(item.getGift_bag().getId())
+                        .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.setCode(code);
+                                if(action1 != null)
+                                    action1.call(TO_REFRESH);
+                                ViewUtil.shareGetWelfareDialog((Activity) context, item);
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                G.showToast(baseMessage);
+                            }
+                        });
     }
 }

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

@@ -581,7 +581,7 @@ public class TryMakeMoneyAdp extends AdpCommonRecy<RecyleObj> {
                 if (isBegin == 1 || type == 2) {//即将开始
                     viewHolder.itemView.setEnabled(false);
                     ((TextView) viewHolder.itemView.findViewById(R.id.item_date_tv)).setText(
-                            "开始时间:" + TimeUtil.getDate(TimeUtil.FORMAT_DD, Long.valueOf(taskReleaseEty.getOnline_time())) + "");
+                            "开始时间:" + TimeUtil.getDate(TimeUtil.FORMAT_DD, taskReleaseEty.getOnline_time()) + "");
                 } else {
                     if (!taskReleaseEty.getDeadline().equals("永久")) {
                         ((TextView) viewHolder.itemView.findViewById(R.id.item_date_tv)).setText(

+ 9 - 3
app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment.java

@@ -47,7 +47,7 @@ public abstract class BaseListFragment<T> extends BaseFragment {
         activity = getActivity();
         initView();
         initListener();
-        initData();
+        view_list.refresh();
 
     }
     @BindView(R.id.title)
@@ -95,7 +95,6 @@ public abstract class BaseListFragment<T> extends BaseFragment {
         //先尝试获取缓存数据
         List<T> newList = DataUtil.getInstance().getCacheList(urlKey, getTClass());
         loadList(newList);
-        empty_view.setVisibility(View.INVISIBLE);
         SysAppUtil.checkNet(new Action1<Integer>() {
             @Override
             public void call(Integer result) {
@@ -129,6 +128,7 @@ public abstract class BaseListFragment<T> extends BaseFragment {
     }
 
     public void refreshData(){
+        empty_view.setVisibility(View.INVISIBLE);
         list.clear();
         view_list.getAdapter().notifyDataSetChanged();
         page = 1;
@@ -140,7 +140,8 @@ public abstract class BaseListFragment<T> extends BaseFragment {
     }
     protected void notifyDataSetChanged(){
         CommonUtil.getInstance().updateEmptyView(empty_view, list.isEmpty());
-        bottomLine.setVisibility(list.isEmpty() ? View.INVISIBLE : View.VISIBLE);
+        if(bottomLine != null)
+            bottomLine.setVisibility(list.isEmpty() ? View.INVISIBLE : View.VISIBLE);
         if(page == 1){
             view_list.refreshComplete();
         } else {
@@ -161,6 +162,11 @@ public abstract class BaseListFragment<T> extends BaseFragment {
     public void onDestroyView() {
         super.onDestroyView();
         unbinder.unbind();
+        // any time,when you finish your activity or fragment,call this below
+        if(view_list != null){
+            view_list.destroy(); // this will totally release XR's memory
+            view_list = null;
+        }
     }
     protected abstract RecyclerView.Adapter getAdapter();
     protected abstract String getKey(int page, int per_page);

+ 36 - 5
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtDownloadWelfareList.java

@@ -1,24 +1,55 @@
 package com.sheep.gamegroup.view.fragment;
 
+import android.os.Bundle;
+import android.support.annotation.Nullable;
 import android.support.v7.widget.RecyclerView;
 
+import com.kfzs.duanduan.event.BigEvent;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.entity.TaskReleaseEty;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
 
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+
 import java.util.Locale;
 
 import rx.Observable;
+import rx.functions.Action1;
 
 /**
  * Created by realicing on 2018/9/3.
  * realicing@sina.com
  */
-public class FgtDownloadWelfareList extends BaseListFragment<Welfare> {
+public class FgtDownloadWelfareList extends BaseListFragment<TaskReleaseEty> implements Action1<Integer> {
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        EventBus.getDefault().register(this);
+    }
+
+    @Override
+    public void call(Integer integer) {
+        switch (integer){
+            case DownloadWelfareAdapter.TO_REFRESH:
+                refreshData();
+                break;
+        }
+    }
+    @Subscribe
+    public void onEventMainThread(BigEvent event) {
+        CommonUtil.getInstance().setEventResultViewStatus(event, view_list);
+    }
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        EventBus.getDefault().unregister(this);
+    }
     @Override
     protected RecyclerView.Adapter getAdapter() {
-        return new DownloadWelfareAdapter(activity, list);
+        return new DownloadWelfareAdapter(activity, list, this);
     }
 
     @Override
@@ -32,7 +63,7 @@ public class FgtDownloadWelfareList extends BaseListFragment<Welfare> {
     }
 
     @Override
-    protected Class<Welfare> getTClass() {
-        return Welfare.class;
+    protected Class<TaskReleaseEty> getTClass() {
+        return TaskReleaseEty.class;
     }
 }

+ 37 - 5
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGiftCenter.java

@@ -1,24 +1,56 @@
 package com.sheep.gamegroup.view.fragment;
 
+import android.os.Bundle;
+import android.support.annotation.Nullable;
 import android.support.v7.widget.RecyclerView;
 
+import com.kfzs.duanduan.event.BigEvent;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.entity.GiftBagApp;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
+import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
+
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
 
 import java.util.Locale;
 
 import rx.Observable;
+import rx.functions.Action1;
 
 /**
  * Created by realicing on 2018/9/3.
  * realicing@sina.com
  */
-public class FgtGiftCenter extends BaseListFragment<Welfare> {
+public class FgtGiftCenter extends BaseListFragment<GiftBagApp> implements Action1<Integer> {
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        EventBus.getDefault().register(this);
+    }
+
+    @Override
+    public void call(Integer integer) {
+        switch (integer){
+            case DownloadWelfareAdapter.TO_REFRESH:
+                refreshData();
+                break;
+        }
+    }
+    @Subscribe
+    public void onEventMainThread(BigEvent event) {
+        CommonUtil.getInstance().setEventResultViewStatus(event, view_list);
+    }
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        EventBus.getDefault().unregister(this);
+    }
     @Override
     protected RecyclerView.Adapter getAdapter() {
-        return new DownloadWelfareAdapter(activity, list);
+        return new GiftCenterAdapter(activity, list, this);
     }
 
     @Override
@@ -32,7 +64,7 @@ public class FgtGiftCenter extends BaseListFragment<Welfare> {
     }
 
     @Override
-    protected Class<Welfare> getTClass() {
-        return Welfare.class;
+    protected Class<GiftBagApp> getTClass() {
+        return GiftBagApp.class;
     }
 }

+ 36 - 5
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyDownloadWelfareList.java

@@ -1,25 +1,56 @@
 package com.sheep.gamegroup.view.fragment;
 
+import android.os.Bundle;
+import android.support.annotation.Nullable;
 import android.support.v7.widget.RecyclerView;
 
+import com.kfzs.duanduan.event.BigEvent;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.entity.TaskReleaseEty;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
 
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+
 import java.util.Locale;
 
 import rx.Observable;
+import rx.functions.Action1;
 
 /**
  * 我的福利--下载福利
  * Created by realicing on 2018/8/28.
  * realicing@sina.com
  */
-public class FgtMyDownloadWelfareList extends BaseListFragment<Welfare> {
+public class FgtMyDownloadWelfareList extends BaseListFragment<TaskReleaseEty> implements Action1<Integer> {
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        EventBus.getDefault().register(this);
+    }
+
+    @Override
+    public void call(Integer integer) {
+        switch (integer){
+            case DownloadWelfareAdapter.TO_REFRESH:
+                refreshData();
+                break;
+        }
+    }
+    @Subscribe
+    public void onEventMainThread(BigEvent event) {
+        CommonUtil.getInstance().setEventResultViewStatus(event, view_list);
+    }
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        EventBus.getDefault().unregister(this);
+    }
     @Override
     protected RecyclerView.Adapter getAdapter() {
-        return new DownloadWelfareAdapter(activity, list);
+        return new DownloadWelfareAdapter(activity, list, this);
     }
 
     @Override
@@ -33,7 +64,7 @@ public class FgtMyDownloadWelfareList extends BaseListFragment<Welfare> {
     }
 
     @Override
-    protected Class<Welfare> getTClass() {
-        return Welfare.class;
+    protected Class<TaskReleaseEty> getTClass() {
+        return TaskReleaseEty.class;
     }
 }

+ 38 - 5
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyGift.java

@@ -1,25 +1,57 @@
 package com.sheep.gamegroup.view.fragment;
 
+import android.os.Bundle;
+import android.support.annotation.Nullable;
 import android.support.v7.widget.RecyclerView;
 
+import com.kfzs.duanduan.event.BigEvent;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.entity.GiftBagApp;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
+import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
+
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
 
 import java.util.Locale;
 
 import rx.Observable;
+import rx.functions.Action1;
 
 /**
  * 我的福利--我的礼包
  * Created by realicing on 2018/8/28.
  * realicing@sina.com
  */
-public class FgtMyGift extends BaseListFragment<Welfare> {
+public class FgtMyGift extends BaseListFragment<GiftBagApp> implements Action1<Integer> {
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        EventBus.getDefault().register(this);
+    }
+
+    @Override
+    public void call(Integer integer) {
+        switch (integer){
+            case DownloadWelfareAdapter.TO_REFRESH:
+                refreshData();
+                break;
+        }
+    }
+    @Subscribe
+    public void onEventMainThread(BigEvent event) {
+        CommonUtil.getInstance().setEventResultViewStatus(event, view_list);
+    }
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        EventBus.getDefault().unregister(this);
+    }
     @Override
     protected RecyclerView.Adapter getAdapter() {
-        return new DownloadWelfareAdapter(activity, list);
+        return new GiftCenterAdapter(activity, list, this);
     }
 
     @Override
@@ -33,7 +65,8 @@ public class FgtMyGift extends BaseListFragment<Welfare> {
     }
 
     @Override
-    protected Class<Welfare> getTClass() {
-        return Welfare.class;
+    protected Class<GiftBagApp> getTClass() {
+        return GiftBagApp.class;
     }
+
 }

+ 69 - 20
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareCenter.java

@@ -3,21 +3,28 @@ package com.sheep.gamegroup.view.fragment;
 import android.app.Activity;
 import android.content.Context;
 import android.os.Bundle;
+import android.support.annotation.Nullable;
 import android.support.v4.widget.SwipeRefreshLayout;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
+import com.kfzs.duanduan.event.BigEvent;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.entity.GiftBagApp;
+import com.sheep.gamegroup.model.entity.TaskReleaseEty;
 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.ListUtil;
 import com.sheep.gamegroup.util.ViewHolder;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
 import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
 import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
@@ -25,6 +32,9 @@ import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
 
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -33,13 +43,14 @@ import butterknife.ButterKnife;
 import butterknife.OnClick;
 import butterknife.Unbinder;
 import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
 import rx.schedulers.Schedulers;
 
 /**
  * Created by realicing on 2018/8/28.
  * realicing@sina.com
  */
-public class FgtWelfareCenter extends BaseFragment {
+public class FgtWelfareCenter extends BaseFragment{
     @BindView(R.id.refresh)
     SwipeRefreshLayout refresh;
     @BindView(R.id.wc_hot_welfare_list)
@@ -62,9 +73,9 @@ public class FgtWelfareCenter extends BaseFragment {
     public int getLayoutId() {
         return R.layout.fgt_welfare_center;
     }
-    private List<Welfare> hotWelfareList = ListUtil.emptyList();
-    private List<Welfare> downloadWelfareList = ListUtil.emptyList();
-    private List<Welfare> giftCenterList = ListUtil.emptyList();
+    private List<TaskReleaseEty> hotWelfareList = ListUtil.emptyList();
+    private List<TaskReleaseEty> downloadWelfareList = ListUtil.emptyList();
+    private List<GiftBagApp> giftCenterList = ListUtil.emptyList();
     private Activity activity;
     @Override
     public void onViewCreated() {
@@ -75,22 +86,23 @@ public class FgtWelfareCenter extends BaseFragment {
         wcHotWelfareList.setHasFixedSize(true);
         wcHotWelfareList.setNestedScrollingEnabled(false);
         wcHotWelfareList.setLayoutManager(hotLayoutManager);
-        wcHotWelfareList.setAdapter(new AdbCommonRecycler<Welfare>(context, hotWelfareList) {
+        wcHotWelfareList.setAdapter(new AdbCommonRecycler<TaskReleaseEty>(context, hotWelfareList) {
             @Override
             public int getViewIdByType(int type) {
                 return R.layout.item_hot_welfare;
             }
 
             @Override
-            public void convert(ViewHolder holder, Welfare welfareCenter) {
-//                ImageView item_hot_welfare_iv = holder.getView(R.id.item_hot_welfare_iv);
-//                TextView item_hot_welfare_tv = holder.getView(R.id.item_hot_welfare_tv);
-//                if(welfareCenter == null){
-//                    ViewUtil.setDefaultText(item_hot_welfare_tv);
-//                } else {
-//                    //TODO 加载数据
-//                    ViewUtil.setText(item_hot_welfare_tv);
-//                }
+            public void convert(ViewHolder holder, TaskReleaseEty item) {
+                ImageView item_hot_welfare_iv = holder.getView(R.id.item_hot_welfare_iv);
+                TextView item_hot_welfare_tv = holder.getView(R.id.item_hot_welfare_tv);
+                if(item == null){
+                    ViewUtil.setDefaultText(item_hot_welfare_tv);
+                } else {
+                    if(item.getTask() != null)
+                        GlideImageLoader.setGameImage(item_hot_welfare_iv, item.getTask().getIcon());
+                    ViewUtil.setText(item_hot_welfare_tv, item.getName());
+                }
             }
         });
         //下载福利
@@ -98,13 +110,33 @@ public class FgtWelfareCenter extends BaseFragment {
         wcDownloadWelfareList.setHasFixedSize(true);
         wcDownloadWelfareList.setNestedScrollingEnabled(false);
         wcDownloadWelfareList.setLayoutManager(downloadLayoutManager);
-        wcDownloadWelfareList.setAdapter(new DownloadWelfareAdapter(activity, downloadWelfareList));
+        wcDownloadWelfareList.setAdapter(new DownloadWelfareAdapter(activity, downloadWelfareList, new Action1<Integer>() {
+            @Override
+            public void call(Integer integer) {
+                switch (integer){
+                    case DownloadWelfareAdapter.TO_REFRESH:
+                        refreshDownloadWelfare = true;
+                        refreshData();
+                        break;
+                }
+            }
+        }));
         //礼包中心
         LinearLayoutManager layoutManager = new LinearLayoutManager(context);
         wcGiftCenterList.setHasFixedSize(true);
         wcGiftCenterList.setNestedScrollingEnabled(false);
         wcGiftCenterList.setLayoutManager(layoutManager);
-        wcGiftCenterList.setAdapter(new GiftCenterAdapter(activity, giftCenterList));
+        wcGiftCenterList.setAdapter(new GiftCenterAdapter(activity, giftCenterList, new Action1<Integer>() {
+            @Override
+            public void call(Integer integer) {
+                switch (integer){
+                    case DownloadWelfareAdapter.TO_REFRESH:
+                        refreshGiftCenter = true;
+                        refreshData();
+                        break;
+                }
+            }
+        }));
         refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
             @Override
             public void onRefresh() {
@@ -139,7 +171,7 @@ public class FgtWelfareCenter extends BaseFragment {
                         @Override
                         public void onNext(BaseMessage baseMessage) {
                             refreshHotWelfare = false;
-                            ArrayList<Welfare> newList = baseMessage.getDataList(Welfare.class);
+                            ArrayList<TaskReleaseEty> newList = baseMessage.getDataList(TaskReleaseEty.class);
                             hotWelfareList.clear();
                             ListUtil.addAll(hotWelfareList, newList);
                             wcHotWelfareList.getAdapter().notifyDataSetChanged();
@@ -164,7 +196,7 @@ public class FgtWelfareCenter extends BaseFragment {
                         @Override
                         public void onNext(BaseMessage baseMessage) {
                             refreshDownloadWelfare = false;
-                            ArrayList<Welfare> newList = baseMessage.getDataList(Welfare.class);
+                            ArrayList<TaskReleaseEty> newList = baseMessage.getDataList(TaskReleaseEty.class);
                             downloadWelfareList.clear();
                             ListUtil.addAll(downloadWelfareList, newList);
                             wcDownloadWelfareList.getAdapter().notifyDataSetChanged();
@@ -189,7 +221,7 @@ public class FgtWelfareCenter extends BaseFragment {
                         @Override
                         public void onNext(BaseMessage baseMessage) {
                             refreshGiftCenter = false;
-                            ArrayList<Welfare> newList = baseMessage.getDataList(Welfare.class);
+                            ArrayList<GiftBagApp> newList = baseMessage.getDataList(GiftBagApp.class);
                             giftCenterList.clear();
                             ListUtil.addAll(giftCenterList, newList);
                             wcGiftCenterList.getAdapter().notifyDataSetChanged();
@@ -226,6 +258,7 @@ public class FgtWelfareCenter extends BaseFragment {
         unbinder.unbind();
     }
 
+
     @OnClick({R.id.wc_all_welfare, R.id.wc_all_gift})
     public void onViewClicked(View view) {
         switch (view.getId()) {
@@ -237,4 +270,20 @@ public class FgtWelfareCenter extends BaseFragment {
                 break;
         }
     }
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        EventBus.getDefault().register(this);
+    }
+
+    @Subscribe
+    public void onEventMainThread(BigEvent event) {
+        CommonUtil.getInstance().setEventResultViewStatus(event, wcDownloadWelfareList);
+    }
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        EventBus.getDefault().unregister(this);
+    }
 }

+ 36 - 5
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareUseRecord.java

@@ -1,25 +1,56 @@
 package com.sheep.gamegroup.view.fragment;
 
+import android.os.Bundle;
+import android.support.annotation.Nullable;
 import android.support.v7.widget.RecyclerView;
 
+import com.kfzs.duanduan.event.BigEvent;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.entity.TaskReleaseEty;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
 
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+
 import java.util.Locale;
 
 import rx.Observable;
+import rx.functions.Action1;
 
 /**
  * 我的福利--使用记录
  * Created by realicing on 2018/8/28.
  * realicing@sina.com
  */
-public class FgtWelfareUseRecord extends BaseListFragment<Welfare> {
+public class FgtWelfareUseRecord extends BaseListFragment<TaskReleaseEty> implements Action1<Integer> {
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        EventBus.getDefault().register(this);
+    }
+
+    @Override
+    public void call(Integer integer) {
+        switch (integer){
+            case DownloadWelfareAdapter.TO_REFRESH:
+                refreshData();
+                break;
+        }
+    }
+    @Subscribe
+    public void onEventMainThread(BigEvent event) {
+        CommonUtil.getInstance().setEventResultViewStatus(event, view_list);
+    }
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        EventBus.getDefault().unregister(this);
+    }
     @Override
     protected RecyclerView.Adapter getAdapter() {
-        return new DownloadWelfareAdapter(activity, list);
+        return new DownloadWelfareAdapter(activity, list, this);
     }
 
     @Override
@@ -33,7 +64,7 @@ public class FgtWelfareUseRecord extends BaseListFragment<Welfare> {
     }
 
     @Override
-    protected Class<Welfare> getTClass() {
-        return Welfare.class;
+    protected Class<TaskReleaseEty> getTClass() {
+        return TaskReleaseEty.class;
     }
 }

+ 70 - 0
app/src/main/res/layout/act_modify_third.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white"
+    android:orientation="vertical">
+    <include layout="@layout/title" />
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="#F5F5F5"
+        android:paddingBottom="20dp"
+        android:paddingEnd="17dp"
+        android:paddingStart="17dp"
+        android:paddingTop="20dp"
+        android:text="为了保证你的帐号安全,换绑手机时需要先验证你的手机号码,为了确保您的信息安全,本功能将会向你关联手机号码自动发送一条验证码(该条短信资费由本公司承担)。您收到后应根据验证码短信内容填写,系统校验成功才能修改。"
+        android:textColor="@color/black_666666"
+        android:textSize="12sp" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="20dp"
+        android:layout_marginBottom="5dp"
+        android:gravity="center"
+        android:orientation="horizontal">
+
+        <android.support.v7.widget.AppCompatEditText
+            android:id="@+id/modify_third_mobile_et"
+            style="@style/style_modify_third_et"
+            android:hint="手机号"
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:inputType="phone"
+            android:maxLength="11" />
+        <TextView
+            android:id="@+id/modify_third_code_btn"
+            style="@style/style_code_btn"
+            android:layout_marginEnd="@dimen/content_padding_16"/>
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginEnd="@dimen/content_padding_16"
+        android:layout_marginStart="@dimen/content_padding_16"
+        android:background="#ffcccccc" />
+
+    <android.support.v7.widget.AppCompatEditText
+        android:id="@+id/modify_third_code_et"
+        style="@style/style_modify_third_et"
+        android:hint="验证码"
+        android:layout_marginTop="35dp"
+        android:layout_marginBottom="5dp"
+        android:inputType="number"
+        android:maxLength="6" />
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginEnd="@dimen/content_padding_16"
+        android:layout_marginStart="@dimen/content_padding_16"
+        android:layout_marginBottom="56dp"
+        android:background="#ffcccccc" />
+
+    <TextView
+        android:id="@+id/modify_third_commit"
+        style="@style/style_button"
+        android:text="提交"/>
+</LinearLayout>

+ 1 - 6
app/src/main/res/layout/common_tab_vp.xml

@@ -2,14 +2,9 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/bg_gray"
+    android:background="@color/white"
     android:orientation="vertical">
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_marginTop="24dp" />
-
     <include layout="@layout/title" />
 
     <android.support.design.widget.TabLayout

+ 25 - 0
app/src/main/res/layout/fgt_find.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/bg_gray"
+    android:orientation="vertical">
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_marginTop="24dp" />
+
+    <include layout="@layout/title" />
+
+    <android.support.design.widget.TabLayout
+        android:id="@+id/indicator"
+        style="@style/style_tab"
+        android:layout_marginTop="7dp" />
+
+    <android.support.v4.view.ViewPager
+        android:id="@+id/pager"
+        android:layout_width="match_parent"
+        android:layout_height="0dip"
+        android:layout_weight="1" />
+</LinearLayout>

+ 2 - 12
app/src/main/res/layout/login_act_layout.xml

@@ -52,17 +52,7 @@
 
                 <TextView
                     android:id="@+id/login_btn_code"
-                    android:layout_width="wrap_content"
-                    android:layout_height="30dp"
-                    android:layout_gravity="center|center_vertical"
-                    android:layout_marginStart="5dp"
-                    android:paddingStart="11dp"
-                    android:paddingEnd="11dp"
-                    android:gravity="center"
-                    android:textSize="12sp"
-                    android:text="@string/get_captcha"
-                    android:textColor="@color/white"
-                    android:background="@drawable/shape_blue_solid_rectangle_15"/>
+                    style="@style/style_code_btn"/>
 
             </LinearLayout>
 
@@ -75,7 +65,7 @@
                 style="@style/style_login_et"
                 android:hint="请输入邀请码(非必填)"
                 android:inputType="number"
-                android:maxLength="6"
+                android:maxLength="10"
                 android:gravity="center"/>
         </LinearLayout>
         <View

+ 3 - 2
app/src/main/res/layout/title.xml

@@ -76,7 +76,7 @@
         android:id="@+id/ibtn_baseactivity_right"
         android:layout_width="?attr/actionBarSize"
         android:layout_height="match_parent"
-        android:layout_alignParentRight="true"
+        android:layout_alignParentEnd="true"
         android:layout_centerVertical="true"
         android:background="@color/translate"
         android:gravity="center"
@@ -90,7 +90,8 @@
         android:background="@color/translate"
         android:gravity="center"
         android:minWidth="?attr/actionBarSize"
-        android:layout_toLeftOf="@+id/ibtn_baseactivity_right"
+        android:layout_alignParentEnd="true"
+        android:layout_marginEnd="?attr/actionBarSize"
         android:visibility="gone"/>
 
     <TextView

+ 32 - 2
app/src/main/res/layout/xpersion_info_act_layout.xml

@@ -161,11 +161,41 @@
                 style="@style/style_item_end_next" />
         </LinearLayout>
 
+        <View style="@style/style_item_line_3_0" />
+
+        <LinearLayout
+            android:id="@+id/personal_info_bind_tx_wx_container"
+            style="@style/style_item_container">
+
+            <TextView
+                style="@style/style_item_label"
+                android:text="@string/bind_tx_wx" />
+
+
+            <TextView
+                android:id="@+id/personal_info_bind_tx_wx"
+                style="@style/style_item_end_next" />
+        </LinearLayout>
 
         <View style="@style/style_item_line_3_0" />
 
         <LinearLayout
-            android:id="@+id/personal_info_wx_container"
+            android:id="@+id/personal_info_bind_qq_container"
+            style="@style/style_item_container">
+
+            <TextView
+                style="@style/style_item_label"
+                android:text="@string/bind_qq" />
+
+
+            <TextView
+                android:id="@+id/personal_info_bind_qq"
+                style="@style/style_item_end_next" />
+        </LinearLayout>
+        <View style="@style/style_item_line_3_0" />
+
+        <LinearLayout
+            android:id="@+id/personal_info_bind_wx_container"
             style="@style/style_item_container">
 
             <TextView
@@ -174,7 +204,7 @@
 
 
             <TextView
-                android:id="@+id/personal_info_wx"
+                android:id="@+id/personal_info_bind_wx"
                 style="@style/style_item_end_next" />
         </LinearLayout>
 

+ 23 - 0
app/src/main/res/values/dd_styles.xml

@@ -480,4 +480,27 @@
         <item name="android:textColor">#666666</item>
         <item name="android:textSize">12sp</item>
     </style>
+    <style name="style_modify_third_et">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">@dimen/edt_heigh_default</item>
+        <item name="android:layout_marginStart">16dp</item>
+        <item name="android:layout_marginEnd">16dp</item>
+        <item name="android:background">@color/transparent</item>
+        <item name="android:textColor">@color/black</item>
+        <item name="android:textColorHint">#CCCCCC</item>
+        <item name="android:textSize">15sp</item>
+    </style>
+    <style name="style_code_btn">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">30dp</item>
+        <item name="android:layout_gravity">center|center_vertical</item>
+        <item name="android:layout_marginStart">5dp</item>
+        <item name="android:paddingStart">11dp</item>
+        <item name="android:paddingEnd">11dp</item>
+        <item name="android:gravity">center</item>
+        <item name="android:textSize">12sp</item>
+        <item name="android:text">@string/get_captcha</item>
+        <item name="android:textColor">@color/white</item>
+        <item name="android:background">@drawable/shape_blue_solid_rectangle_15</item>
+    </style>
 </resources>

+ 3 - 1
app/src/main/res/values/gamegroup_string.xml

@@ -17,7 +17,9 @@
     <string name="ask_task_hint">*好友完成任务后,我获得20%提成奖励</string>
 
     <string name="phone">手机号</string>
-    <string name="bind_wx">提现绑定微信号</string>
+    <string name="bind_qq">绑定QQ号</string>
+    <string name="bind_wx">绑定微信号</string>
+    <string name="bind_tx_wx">提现微信号</string>
     <string name="auther">实名认证</string>
 
     <string name="header">头像</string>