我的修改完成

This commit is contained in:
ningwenqiang 2024-10-31 11:13:39 +08:00
parent e0c9b637df
commit af0cb7babe
2 changed files with 10 additions and 13 deletions

View File

@ -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<List<UserItemBean>> newList = new ArrayList<>();
if (obj != null) {
List<UserItemBean> list1 = JSON.parseArray(obj.getString("user_rights"), UserItemBean.class);
newList.add(list1);
List<UserItemBean> list2 = JSON.parseArray(obj.getString("creation_center"), UserItemBean.class);
newList.add(list2);
List<UserItemBean> list3 = JSON.parseArray(obj.getString("other_functions"), UserItemBean.class);
mYolaUserItemList.add(list1);
mYolaUserItemList.add(list2);
mYolaUserItemList.add(list3);
newList.add(list3);
}
mYolaUserItemList = newList;
}

View File

@ -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<UserItemBean> otherList= list.get(2);
List<UserItemBean> 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<String, String> map_ekv = new HashMap<String, String>();
map_ekv.put("from", "xb");
MobclickAgent.onEvent(mContext, "my_recharge", map_ekv);