|
@@ -1,5 +1,6 @@
|
|
|
package com.sheep.gamegroup.view.adapter;
|
|
package com.sheep.gamegroup.view.adapter;
|
|
|
|
|
|
|
|
|
|
+import android.app.Activity;
|
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.support.v7.widget.StaggeredGridLayoutManager;
|
|
import android.support.v7.widget.StaggeredGridLayoutManager;
|
|
@@ -15,8 +16,11 @@ import com.sheep.gamegroup.model.entity.RecyleType;
|
|
|
import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
|
|
import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
|
|
|
import com.sheep.gamegroup.model.entity.TaskEty;
|
|
import com.sheep.gamegroup.model.entity.TaskEty;
|
|
|
import com.sheep.gamegroup.model.entity.TaskReleaseEty;
|
|
import com.sheep.gamegroup.model.entity.TaskReleaseEty;
|
|
|
|
|
+import com.sheep.gamegroup.model.entity.WXOnHookAccount;
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.gamegroup.util.ViewHolder;
|
|
import com.sheep.gamegroup.util.ViewHolder;
|
|
|
|
|
+import com.sheep.gamegroup.view.dialog.DialogAccountAbnormal;
|
|
|
|
|
+import com.sheep.jiuyan.samllsheep.BuildConfig;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
|
|
|
|
@@ -27,7 +31,6 @@ import java.util.List;
|
|
|
* realicing@sina.com
|
|
* realicing@sina.com
|
|
|
*/
|
|
*/
|
|
|
public class LieMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
|
|
public class LieMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
|
|
|
- private final static int TAG_ID_TEMP = R.id.view_tag_1;
|
|
|
|
|
|
|
|
|
|
public LieMakeMoneyAdp(Context context) {
|
|
public LieMakeMoneyAdp(Context context) {
|
|
|
super(context);
|
|
super(context);
|
|
@@ -69,10 +72,10 @@ public class LieMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
|
|
|
bindAbnormalOnHook(holder, recyleObj.getDataObjT());
|
|
bindAbnormalOnHook(holder, recyleObj.getDataObjT());
|
|
|
break;
|
|
break;
|
|
|
case NORMAL_ON_HOOK:
|
|
case NORMAL_ON_HOOK:
|
|
|
- bindAbnormalOnHook(holder, recyleObj.getDataObjT());
|
|
|
|
|
|
|
+ bindNormalOnHook(holder, recyleObj.getDataObjT());
|
|
|
break;
|
|
break;
|
|
|
case PROCESS_ON_HOOK:
|
|
case PROCESS_ON_HOOK:
|
|
|
- bindAbnormalOnHook(holder, recyleObj.getDataObjT());
|
|
|
|
|
|
|
+ bindProcessOnHook(holder, recyleObj.getDataObjT());
|
|
|
break;
|
|
break;
|
|
|
case PROMPT_ON_HOOK:
|
|
case PROMPT_ON_HOOK:
|
|
|
bindPromptOnHook(holder, recyleObj.getDataObjT());
|
|
bindPromptOnHook(holder, recyleObj.getDataObjT());
|
|
@@ -80,7 +83,55 @@ public class LieMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void bindAbnormalOnHook(ViewHolder holder, Object dataObjT) {
|
|
|
|
|
|
|
+ private void bindProcessOnHook(ViewHolder holder, WXOnHookAccount dataObjT) {
|
|
|
|
|
+ TextView weixin_name_tv = holder.getView(R.id.weixin_name_tv);
|
|
|
|
|
+ TextView customer_service_name_tv = holder.getView(R.id.customer_service_name_tv);
|
|
|
|
|
+ weixin_name_tv.setText(dataObjT.getAccount());
|
|
|
|
|
+ customer_service_name_tv.setOnClickListener(view -> {
|
|
|
|
|
+ G.showToast("请联系客服:"+dataObjT.getCustomer_service());
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void bindNormalOnHook(ViewHolder holder, WXOnHookAccount dataObjT) {
|
|
|
|
|
+ TextView weixin_name_tv = holder.getView(R.id.weixin_name_tv);
|
|
|
|
|
+ TextView earnings_money_tv = holder.getView(R.id.earnings_money_tv);
|
|
|
|
|
+ weixin_name_tv.setText(dataObjT.getAccount());
|
|
|
|
|
+ earnings_money_tv.setText(dataObjT.getMoney());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void bindAbnormalOnHook(ViewHolder holder, WXOnHookAccount dataObjT) {
|
|
|
|
|
+ TextView weixin_name_tv = holder.getView(R.id.weixin_name_tv);
|
|
|
|
|
+ TextView wx_is_open_tv = holder.getView(R.id.wx_is_open_tv);
|
|
|
|
|
+ TextView earnings_name_tv = holder.getView(R.id.earnings_name_tv);
|
|
|
|
|
+ weixin_name_tv.setText(dataObjT.getAccount());
|
|
|
|
|
+ switch (dataObjT.getStatus()) {
|
|
|
|
|
+ case 2://需要用户验证码
|
|
|
|
|
+ earnings_name_tv.setText("需要用户验证码");
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 3://用户已经验证等待脚本验证
|
|
|
|
|
+ earnings_name_tv.setText("等待服务器验证");
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 4://被封
|
|
|
|
|
+ earnings_name_tv.setText("账号被封");
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 5://用户已经解封等待脚本验证
|
|
|
|
|
+ earnings_name_tv.setText("等待验证");
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 6://账号异常
|
|
|
|
|
+ earnings_name_tv.setText("账号异常");
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 7://验证码超时
|
|
|
|
|
+ earnings_name_tv.setText("验证码超时");
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ earnings_name_tv.setText("账号异常");
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ wx_is_open_tv.setText(dataObjT.getRemarks());
|
|
|
|
|
+ //TODO 各种状态用户可以进行不同的操作
|
|
|
|
|
+ wx_is_open_tv.setOnClickListener(view -> {
|
|
|
|
|
+ G.showToast("请联系客服:"+dataObjT.getCustomer_service());
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -98,8 +149,12 @@ public class LieMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
|
|
|
View ll = holder.getView(R.id.lie_make_operation_ll);
|
|
View ll = holder.getView(R.id.lie_make_operation_ll);
|
|
|
ll.setVisibility(hasData ? View.VISIBLE : View.GONE);
|
|
ll.setVisibility(hasData ? View.VISIBLE : View.GONE);
|
|
|
ll.findViewById(R.id.account_abnormal_tv).setOnClickListener(view -> {
|
|
ll.findViewById(R.id.account_abnormal_tv).setOnClickListener(view -> {
|
|
|
- //TODO 账号解封
|
|
|
|
|
- G.showToast("该功能正在建设中");
|
|
|
|
|
|
|
+// // 点击账号异常,弹出账号异常对话框
|
|
|
|
|
+// G.showToast("该功能正在建设中");
|
|
|
|
|
+ if(context instanceof Activity)
|
|
|
|
|
+ DialogAccountAbnormal.showDialog((Activity) context);
|
|
|
|
|
+ else if(BuildConfig.DEBUG)
|
|
|
|
|
+ G.showToast("传入的context不是activity,无法弹出对话框");
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|