Compare commits
No commits in common. "c573defa3bd222a8b1a1a284d9e9f1a2ee89195e" and "5a672d72c4e91ba98d2e23a5bb15325387667ad8" have entirely different histories.
c573defa3b
...
5a672d72c4
@ -4,11 +4,10 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/pkg/common"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"gopkg.in/ini.v1"
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -109,16 +108,15 @@ type Redis struct {
|
||||
}
|
||||
|
||||
type System struct {
|
||||
Mode string
|
||||
AppMode string
|
||||
Version string
|
||||
HttpPort string
|
||||
Host string
|
||||
RedirectUri string
|
||||
Domain string
|
||||
ErpHost string
|
||||
FieeHost string
|
||||
AuthRedirectUrl string
|
||||
Mode string
|
||||
AppMode string
|
||||
Version string
|
||||
HttpPort string
|
||||
Host string
|
||||
RedirectUri string
|
||||
Domain string
|
||||
ErpHost string
|
||||
FieeHost string
|
||||
}
|
||||
type Oss struct {
|
||||
AccessKeyId string
|
||||
|
||||
@ -6,8 +6,6 @@ Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
ErpHost = "http://114.218.158.24:9020"
|
||||
FieeHost = "http://114.218.158.24:9020"
|
||||
AuthRedirectUrl = "http://172.16.100.99:9028/media_account"
|
||||
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
|
||||
@ -6,7 +6,6 @@ Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
ErpHost = "https://erpapi.fontree.cn"
|
||||
FieeHost = "https://erpapi.fiee.com"
|
||||
AuthRedirectUrl = "https://erp.fiee.com/media_account"
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
|
||||
@ -6,7 +6,6 @@ Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
ErpHost = "http://114.218.158.24:9020"
|
||||
FieeHost = "https://saas-test.szjixun.cn"
|
||||
AuthRedirectUrl = "http://172.16.100.99:9028/media_account"
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
|
||||
@ -3,7 +3,6 @@ package cast
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/cast"
|
||||
@ -11,7 +10,6 @@ import (
|
||||
"fonchain-fiee/pkg/e"
|
||||
modelCast "fonchain-fiee/pkg/model/cast"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
||||
@ -214,19 +212,15 @@ func OAuth2Callback(ctx *gin.Context) {
|
||||
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
|
||||
return
|
||||
}
|
||||
_, err := service.CastProvider.OAuthCodeToToken(ctx, req)
|
||||
resp, err := service.CastProvider.OAuthCodeToToken(ctx, req)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
|
||||
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
// TODO 跳转到前端页面
|
||||
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=1"))
|
||||
//service.Success(ctx, map[string]interface{}{
|
||||
// "req": req,
|
||||
// "resp": resp,
|
||||
//})
|
||||
|
||||
service.Success(ctx, map[string]interface{}{
|
||||
"req": req,
|
||||
"resp": resp,
|
||||
})
|
||||
return
|
||||
}
|
||||
func RefreshToken(ctx *gin.Context) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user