admin
2021-05-14 1b4b3fed2569ac21ad6feb0a3a2c051175e7c36e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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;
        }
    }
}