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