mirror of
https://gitee.com/zhangsken/aliyunpan.git
synced 2026-10-16 02:23:49 +08:00
fix login get ip error issue
This commit is contained in:
@@ -4,17 +4,17 @@ import (
|
|||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/tickstep/aliyunpan/internal/global"
|
|
||||||
"github.com/tickstep/aliyunpan/internal/utils"
|
|
||||||
"github.com/tickstep/library-go/crypto"
|
|
||||||
"github.com/tickstep/library-go/getip"
|
|
||||||
"github.com/tickstep/library-go/logger"
|
|
||||||
"github.com/tickstep/library-go/requester"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
"regexp"
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/tickstep/aliyunpan/internal/global"
|
||||||
|
"github.com/tickstep/aliyunpan/internal/utils"
|
||||||
|
"github.com/tickstep/library-go/crypto"
|
||||||
|
"github.com/tickstep/library-go/logger"
|
||||||
|
"github.com/tickstep/library-go/requester"
|
||||||
)
|
)
|
||||||
|
|
||||||
type LoginHelper struct {
|
type LoginHelper struct {
|
||||||
@@ -87,7 +87,7 @@ func (h *LoginHelper) GetQRCodeLoginUrl(keyStr string) (*QRCodeUrlResult, error)
|
|||||||
keyStr = utils.GetUniqueKeyStr()
|
keyStr = utils.GetUniqueKeyStr()
|
||||||
}
|
}
|
||||||
fullUrl := strings.Builder{}
|
fullUrl := strings.Builder{}
|
||||||
ipAddr, err := getip.IPInfoFromTechainBaidu()
|
ipAddr, err := utils.GetPublicIP()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ipAddr = "127.0.0.1"
|
ipAddr = "127.0.0.1"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user