|
|
@@ -37,6 +37,7 @@ import com.sheep.gamegroup.alipay.PayResult;
|
|
|
import com.sheep.gamegroup.model.api.BaseMessageConverter;
|
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
import com.sheep.gamegroup.model.entity.DialogConfig;
|
|
|
+import com.sheep.gamegroup.model.entity.FindApp;
|
|
|
import com.sheep.gamegroup.model.entity.GameAccountEntity;
|
|
|
import com.sheep.gamegroup.model.entity.HomeListEntity;
|
|
|
import com.sheep.gamegroup.model.entity.RequestParameEty;
|
|
|
@@ -450,6 +451,9 @@ public class CommonUtil {
|
|
|
case 14://幂动科技
|
|
|
Jump2View.getInstance().goMiDong((Activity) context, null);
|
|
|
break;
|
|
|
+ case 15://小米游戏列表
|
|
|
+ Jump2View.getInstance().goXiaomiGameList((Activity) context, null);
|
|
|
+ break;
|
|
|
default:
|
|
|
G.showToast(R.string.coming_soon);
|
|
|
break;
|
|
|
@@ -1490,7 +1494,7 @@ public class CommonUtil {
|
|
|
/**
|
|
|
* 小米游戏账号领取
|
|
|
*/
|
|
|
- public void xiaomiRevieceAcctoun(TextView find_information_game_task_top, final XiaomiGameEntity items, final Activity activity){
|
|
|
+ public void xiaomiRevieceAcctoun(TextView find_information_game_task_top, final Object items, final Activity activity){
|
|
|
XIAOMI_GAME_RECEIVE.onEvent();
|
|
|
find_information_game_task_top.setText("取福利号");
|
|
|
find_information_game_task_top.setOnClickListener(new View.OnClickListener() {
|
|
|
@@ -1498,7 +1502,13 @@ public class CommonUtil {
|
|
|
public void onClick(View v) {
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
- jsonObject.put("id", items.getId());
|
|
|
+ if(items instanceof XiaomiGameEntity){
|
|
|
+
|
|
|
+ jsonObject.put("id", ((XiaomiGameEntity)items).getId());
|
|
|
+ }else if(items instanceof FindApp){
|
|
|
+ jsonObject.put("id", ((FindApp)items).getId());
|
|
|
+ }
|
|
|
+
|
|
|
ViewUtil.newInstance().showProgress((Activity) activity);
|
|
|
SheepApp.getInstance()
|
|
|
.getNetComponent()
|
|
|
@@ -1519,6 +1529,8 @@ public class CommonUtil {
|
|
|
G.showToast(baseMessage.getMsg());
|
|
|
ViewUtil.newInstance().hideProgress(activity);
|
|
|
String text = String.format(activity.getResources().getString(R.string.get_xiaomi_game_success_dialog),"小米账号","等带服务器开发");
|
|
|
+ final JSONObject jsonObject1 = JSONObject.parseObject(JSONObject.toJSONString(baseMessage.getData()));
|
|
|
+
|
|
|
ViewUtil.showMsgDialog(activity,
|
|
|
text,
|
|
|
"恭喜你获得福利号",
|
|
|
@@ -1534,17 +1546,18 @@ public class CommonUtil {
|
|
|
intent.setData(uri);
|
|
|
activity.sendBroadcast(intent); // 发送广播通知相册
|
|
|
} else {
|
|
|
- ViewUtil.sysSaveImage((View) v.getParent().getParent(), "小绵羊-小米", "小绵羊-小米账号");
|
|
|
+ if(jsonObject1 != null)
|
|
|
+ ViewUtil.sysSaveImage((View) v.getParent().getParent(), jsonObject1.getString("account")+"", jsonObject1.getString("password")+"");
|
|
|
}
|
|
|
G.showToast("已保存");
|
|
|
- EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.REFRESH_MING_DONG));
|
|
|
+ EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.REFRESH_XIAOMI_GAME_LIST));
|
|
|
}
|
|
|
},
|
|
|
new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
|
|
|
- EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.REFRESH_MING_DONG));
|
|
|
+ EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.REFRESH_XIAOMI_GAME_LIST));
|
|
|
}
|
|
|
});
|
|
|
|