wjc
2023-06-07 07ccc78892b26dabc976363c874c177230f9bbcb
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
74
75
76
package com.hdl.photovoltaic.other;
 
 
/**
 * 登陆界面的逻辑
 */
public class HdlAccountLogic {
 
    private static volatile HdlAccountLogic sHdlAccountLogic;
 
    public static synchronized HdlAccountLogic getInstance() {
        if (sHdlAccountLogic == null) {
            synchronized (HdlAccountLogic.class) {
                if (sHdlAccountLogic == null) {
                    sHdlAccountLogic = new HdlAccountLogic();
                }
            }
 
        }
        return sHdlAccountLogic;
    }
 
 
    /**
     * 初始化账号的Url区域地址(可能状态码:Sucess  NotAccount  NotNetWork)
     *
     * @param i_account
     * @return
     */
    private void InitAccoutRegionInfo(String i_account) {
//        String regionUrl = this.GetAccoutRegionInfo(i_account);
//
//
//        if (regionUrl == null) {
//            return AccountStatu.NotNetWork;
//        }
//        if (regionUrl == string.Empty) {
//            return AccountStatu.NotAccount;
//        }
//
//        return AccountStatu.Sucess;
    }
 
    /**
     * 获取账号所在区域
     *
     * @param account
     * @param callBack
     * @return https://nearest.hdlcontrol.com/smart-footstone/region/regionByUserAccount
     */
//    public Disposable regionByAccount(String account, IRegionByAccountCallBack callBack) {
//        String requestUrl = HDLLinkPMSdk.getInitUrl() + HttpApi.POST_RegionByUserAccount;
//        return HxHttp.builder()
//                .url(requestUrl)
//                .params("account", account)
//                .build()
//                .post()
//                .subscribeWith(new HDLResponse<HDLUserRegionBean>() {
//                    @Override
//                    public void onResponse(HDLUserRegionBean response) {
//                        if (callBack != null) {
//                            callBack.onSuccess(response);
//                        }
//                    }
//
//                    @Override
//                    public void onFailure(HDLException e) {
//                        HDLExceptionSubmitUtils.submit(requestUrl, account, e);
//                        if (callBack != null) {
//                            callBack.onFailure(e);
//                        }
//                    }
//                });
 
//    }
}