package com.tejia.lijin.app.ui.mine;
|
|
import android.content.SharedPreferences;
|
import android.os.Bundle;
|
import android.view.View;
|
import android.widget.TextView;
|
|
import com.tejia.lijin.app.BasicTextHttpResponseHandler;
|
import com.tejia.lijin.app.R;
|
import com.tejia.lijin.app.ShoppingApi;
|
import com.tejia.lijin.app.ShoppingApplication;
|
import com.tejia.lijin.app.ui.BaseActivity;
|
import com.tejia.lijin.app.util.TopStatusSettings;
|
import com.tejia.lijin.app.util.user.UserUtil;
|
|
import org.apache.http.Header;
|
import org.json.JSONObject;
|
|
/**
|
* Created by weikou2015 on 2018/7/2.
|
* 提现状态
|
*/
|
|
public class WithdrawStatusActivity extends BaseActivity implements View.OnClickListener {
|
|
TextView tv_title, tv_gain_time, tv_withdraw_num, tv_withdraw_account, tv_finish_confirm;
|
|
@Override
|
protected void onCreate(Bundle savedInstanceState) {
|
super.onCreate(savedInstanceState);
|
setContentView(R.layout.activity_withdraw_status);
|
TopStatusSettings.setStatusViewAndDeepColor(this);
|
tv_title = findViewById(R.id.tv_top_bar_middle);
|
tv_gain_time = findViewById(R.id.tv_gain_time);
|
tv_withdraw_num = findViewById(R.id.tv_withdraw_num);
|
tv_withdraw_account = findViewById(R.id.tv_withdraw_account);
|
tv_finish_confirm = findViewById(R.id.tv_finish_confirm);
|
|
tv_title.setText("余额提现");
|
|
findViewById(R.id.tv_top_bar_left).setOnClickListener(this);
|
findViewById(R.id.tv_finish_confirm).setOnClickListener(this);
|
|
getExtractProgress();
|
}
|
|
private void getExtractProgress() {
|
ShoppingApi.getExtractProcess(this, getIntent().getStringExtra("id"), UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() {
|
@Override
|
public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception {
|
if (jsonObject.optString("code").equalsIgnoreCase("0")) {
|
tv_gain_time.setText("预计" + jsonObject.optJSONObject("data").optString("expireTime") + "到账");
|
tv_withdraw_num.setText(jsonObject.optJSONObject("data").optString("money"));
|
tv_withdraw_account.setText(jsonObject.optJSONObject("data").optString("account"));
|
}
|
}
|
});
|
}
|
|
|
@Override
|
public void onClick(View view) {
|
setResult(1);
|
switch (view.getId()) {
|
case R.id.tv_top_bar_left:
|
finish();
|
break;
|
case R.id.tv_finish_confirm:
|
finish();
|
break;
|
}
|
}
|
}
|