diff --git a/common/src/main/java/com/yunbao/common/CommonAppConfig.java b/common/src/main/java/com/yunbao/common/CommonAppConfig.java index f664e53ff..9cc556888 100644 --- a/common/src/main/java/com/yunbao/common/CommonAppConfig.java +++ b/common/src/main/java/com/yunbao/common/CommonAppConfig.java @@ -569,22 +569,17 @@ public class CommonAppConfig { } public void setYolatUserItemList(String yola_list) { - if (yola_list == null || yola_list.isEmpty()) { - return; - } - - mYolaUserItemList.clear(); JSONObject obj = JSON.parseObject(yola_list); - + List> newList = new ArrayList<>(); if (obj != null) { List list1 = JSON.parseArray(obj.getString("user_rights"), UserItemBean.class); + newList.add(list1); List list2 = JSON.parseArray(obj.getString("creation_center"), UserItemBean.class); + newList.add(list2); List list3 = JSON.parseArray(obj.getString("other_functions"), UserItemBean.class); - - mYolaUserItemList.add(list1); - mYolaUserItemList.add(list2); - mYolaUserItemList.add(list3); + newList.add(list3); } + mYolaUserItemList = newList; } diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java index 7109c9b05..b02f2a30a 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -166,6 +166,9 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi // img_lv_pic = (ImageView) findViewById(R.id.img_lv_pic); // tv_setting = (TextView) findViewById(R.id.tv_setting); findViewById(R.id.goldCoinImg).setOnClickListener(this); + findViewById(R.id.rechargeImg).setOnClickListener(this); + findViewById(R.id.rechargeTv).setOnClickListener(this); + findViewById(R.id.diamondImg).setOnClickListener(this); findViewById(R.id.goldenBeanImg).setOnClickListener(this); @@ -462,7 +465,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi List otherList= list.get(2); List listNow2 = new ArrayList<>(); - for (UserItemBean userItemBean : createList) { + for (UserItemBean userItemBean : otherList) { if (userItemBean.getId() != 21 && userItemBean.getId() != 13) { listNow2.add(userItemBean); } else if (userItemBean.getId() == 21) { @@ -575,13 +578,12 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi @Override public void onClick(View v) { - int i = v.getId(); if (i == R.id.name ||i==R.id.btn_edit) { mContext.startActivity(new Intent(mContext, EditProfileActivity.class)); } else if (i == R.id.signature) { mContext.startActivity(new Intent(mContext, EditProfileActivity.class)); - } else if (i == R.id.goldCoinImg) { + } else if (i == R.id.goldCoinImg||i==R.id.rechargeImg||i==R.id.rechargeTv) { Map map_ekv = new HashMap(); map_ekv.put("from", "xb"); MobclickAgent.onEvent(mContext, "my_recharge", map_ekv);