d
This commit is contained in:
@@ -137,7 +137,7 @@ public class MyAuthorizedFamilyHistory extends BaseActivity<ActivityMyAuthorized
|
||||
map.put("app", "Cas");
|
||||
map.put("class", "FamilyMemberList");
|
||||
if (!TextUtils.isEmpty(homeId)){
|
||||
map.put("home_id",homeId);
|
||||
map.put("user_home_id",homeId);
|
||||
}
|
||||
|
||||
map.put("sign", Md5.md5("Cas" + "FamilyMemberList" + Md5.secret));
|
||||
@@ -247,14 +247,12 @@ public class MyAuthorizedFamilyHistory extends BaseActivity<ActivityMyAuthorized
|
||||
final FamilynumberpermissionBinding homeGridAdapterItemBinding = (FamilynumberpermissionBinding) b;
|
||||
simpleEntities.get(position).setString12(position+1+"");
|
||||
homeGridAdapterItemBinding.setMyentity(simpleEntities.get(position));
|
||||
// homeGridAdapterItemBinding.edit.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View view) {
|
||||
// Intent intet = new Intent(MyAuthorizedFamilyHistory.this, AddAnewFamilyNumberPermissionActivity.class);
|
||||
// intet.putExtra("stringentity", simpleEntities.get(position));
|
||||
// startActivityForResult(intet,1);
|
||||
// }
|
||||
// });
|
||||
homeGridAdapterItemBinding.edit.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
DelFamilyMember(simpleEntities.get(position).getString3());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -276,6 +274,58 @@ public class MyAuthorizedFamilyHistory extends BaseActivity<ActivityMyAuthorized
|
||||
}
|
||||
}
|
||||
|
||||
private void DelFamilyMember(String f_id) {
|
||||
RegisterUser user =
|
||||
Config.getInstance(MyAuthorizedFamilyHistory.this).getUser();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (user != null) {
|
||||
map.put("userid", user.getUserid());
|
||||
} else {
|
||||
map.put("userid", 0 + "");
|
||||
}
|
||||
map.put("app", "Cas");
|
||||
map.put("class", "DelFamilyMember");
|
||||
map.put("f_id", f_id);
|
||||
map.put("sign", Md5.md5("Cas" + "DelFamilyMember" + Md5.secret));
|
||||
DelFamily(ApiConfig.BASE_URL, map, getResources().getString(R.string.loading), 0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void DelFamily(String myurl, Map<String, String> map, String msg, final int requstecode) {
|
||||
mGankLoader = new Loader();
|
||||
Subscription subscription = mGankLoader.getMovie(myurl, map).subscribe(new Action1<Resultcode>() {
|
||||
|
||||
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
progressDialog.dismiss();
|
||||
if (!(resultcode.status == 0)) {
|
||||
setToast( resultcode.msg);
|
||||
}
|
||||
if (resultcode.status == 0) {
|
||||
if (requstecode == 0) {
|
||||
Gson gs = new Gson();
|
||||
ArrayList<LinkedTreeMap> adta = (ArrayList<LinkedTreeMap>) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
progressDialog.dismiss();
|
||||
setToast( getString(R.string.getdatafailure));
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
addSubscription(subscription);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -459,7 +459,7 @@ public class MyPropertyActivity extends BaseActivity<ActivityMyPropertyBinding>
|
||||
}
|
||||
map.put("app", "Cas");
|
||||
map.put("class", "AddFamilyMember");
|
||||
map.put("home_id", homeId);
|
||||
map.put("user_home_id", homeId);
|
||||
map.put("phone", phone);
|
||||
map.put("username", uername);
|
||||
map.put("sign", Md5.md5("Cas" + "AddFamilyMember" + Md5.secret));
|
||||
|
||||
Reference in New Issue
Block a user