修改收益页面刷新,布局

This commit is contained in:
18401019693 2023-11-03 18:00:46 +08:00
parent f78ba226f9
commit 9795d46941

View File

@ -103,8 +103,23 @@ public class MyArnActivity extends AbsOTOActivity {
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
page = 1; OTONetManager.getInstance(mContext).getFriendAppMoneySum(new HttpCallback<FriendAppMoneySumModel>() {
refreshMyArn(); @Override
public void onSuccess(FriendAppMoneySumModel data) {
todayEarnings.setText(data.getToday());
cumulativeIncome.setText(data.getSum());
withdrawalSum.setText(data.getWithdrawalModel().getSum());
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("$ ")
.append(data.getWithdrawalModel().getMoney());
withdrawalMoney.setText(stringBuffer.toString());
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
} }
private void refreshMyArn() { private void refreshMyArn() {
@ -132,24 +147,24 @@ public class MyArnActivity extends AbsOTOActivity {
} }
private void initData() { private void initData() {
OTONetManager.getInstance(mContext).getFriendAppMoneySum(new HttpCallback<FriendAppMoneySumModel>() { // OTONetManager.getInstance(mContext).getFriendAppMoneySum(new HttpCallback<FriendAppMoneySumModel>() {
@Override // @Override
public void onSuccess(FriendAppMoneySumModel data) { // public void onSuccess(FriendAppMoneySumModel data) {
todayEarnings.setText(data.getToday()); // todayEarnings.setText(data.getToday());
cumulativeIncome.setText(data.getSum()); // cumulativeIncome.setText(data.getSum());
withdrawalSum.setText(data.getWithdrawalModel().getSum()); // withdrawalSum.setText(data.getWithdrawalModel().getSum());
StringBuffer stringBuffer = new StringBuffer(); // StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("$ ") // stringBuffer.append("$ ")
.append(data.getWithdrawalModel().getMoney()); // .append(data.getWithdrawalModel().getMoney());
withdrawalMoney.setText(stringBuffer.toString()); // withdrawalMoney.setText(stringBuffer.toString());
} // }
//
@Override // @Override
public void onError(String error) { // public void onError(String error) {
ToastUtil.show(error); // ToastUtil.show(error);
} // }
}); // });
// refreshMyArn(); refreshMyArn();
} }
private void onConversationListLoadMore() { private void onConversationListLoadMore() {