|
@@ -48,7 +48,7 @@ func NewJlzf() *Jlzf {
|
|
|
debug := utils.GetEnvInfo("DEBUG")
|
|
|
AuthUrl := "https://jl.smartcost.com.cn"
|
|
|
if debug == "qa" {
|
|
|
- AuthUrl = "http://192.168.1.43:7002"
|
|
|
+ AuthUrl = "http://192.168.1.76:7002"
|
|
|
} else if debug == "uat" {
|
|
|
AuthUrl = "http://jluat.smartcost.com.cn"
|
|
|
}
|
|
@@ -155,7 +155,7 @@ func (j *Jlzf) LoginValid(loginData viewmodels.Login) error {
|
|
|
)
|
|
|
|
|
|
// 1.生成请求数据
|
|
|
- expirationTime := time.Now().Add(9000 * time.Second)
|
|
|
+ expirationTime := time.Now().Add(3 * time.Second)
|
|
|
claimsData := jwt.MapClaims{
|
|
|
"data": map[string]string{"code": loginData.Code, "account": loginData.Account, "password": loginData.Password},
|
|
|
"exp": expirationTime.Unix(),
|
|
@@ -166,7 +166,7 @@ func (j *Jlzf) LoginValid(loginData viewmodels.Login) error {
|
|
|
return errors.New("生成请求token错误")
|
|
|
}
|
|
|
|
|
|
- // 1-2.发送请求 验证计量密码接口
|
|
|
+ // 1-2.发送请求 验证计量密码接口
|
|
|
if resultByte, err = utils.PullData("GET", j.AuthUrl+"/management/account/valid?auth="+tokenString, ""); err != nil {
|
|
|
return errors.New(fmt.Sprintf("计量错误,err= %s", err))
|
|
|
}
|