master
huanghai 5 years ago
parent 783d397ad5
commit 0e6074f673

@ -1,37 +1,33 @@
[mysql] # mysql1的配置项 [mysql] # mysql1的配置项
#ip = 10.10.14.220 ip = 10.10.14.187
ip = 10.10.6.200 port = 22066
port = 22066 database = base_db_dev
database = base_db_dev #database = base_db
#database = base_db user = root
user = root pwd = DsideaL147258369
pwd = DsideaL147258369
[distribute] #发布功能的配置
[distribute] #发布功能的配置 ip = 10.10.14.187
#ip = 10.10.14.220 port = 22
ip = 10.10.6.200 user = root
port = 26611 pwd = dsideal
user = root remotePath = /usr/local/dsMin/dsSso/
pwd = dsideal localPath = E:\Work\dsMin\dsSso\build
remotePath = /usr/local/dsMin/dsSso/
localPath = E:\Work\dsMin\dsSso\build [redis]
ip = 10.10.14.187
[redis] port = 18890
#ip = 10.10.14.220 db = 0
ip = 10.10.6.200
port = 18890 [kafka]
db = 0 KafkaAddress = 10.10.6.202:9092
KafkaAccessLogTopic = dsAccessLog
[kafka] # ----------------------------------------------------------------------------------------------------
#KafkaAddress = 10.10.14.222:9092
KafkaAddress = 10.10.6.202:9092 [server] #gin服务器的端口
KafkaAccessLogTopic = dsAccessLog port = 8000
# ---------------------------------------------------------------------------------------------------- # 验证码的有效时间,单位:秒
CaptchaExpireTime = 120
[server] #gin服务器的端口
port = 8000 [install_area]
# 验证码的有效时间,单位:秒
CaptchaExpireTime = 120
[install_area]
code = changchun code = changchun

@ -424,14 +424,25 @@ func logout(context *gin.Context) {
} }
//清除cookie //清除cookie
SsoUtil.DeleteSsoCookie(context) SsoUtil.DeleteSsoCookie(context)
//判断来源是内网还是外网是指客户端的IP地址即浏览器的IP
ipStart := strings.Split(context.Request.Host, ".")[0]
isIntranetIP := strings.Index("10,192,172", ipStart)
//外网
var s string
if isIntranetIP < 0 {
s = "defaultIndexWwUrl"
} else { //内网
s = "defaultIndexNwUrl"
}
//跳转回去,系统默认统一的回调首页 //跳转回去,系统默认统一的回调首页
list, err := DaoBaseGlobal.GetGlobalInfoByValue(`defaultIndexUrl`) list, err := DaoBaseGlobal.GetGlobalInfoByValue(s)
if err != nil || len(list) == 0 { if err != nil || len(list) == 0 {
msg := "获取全局变量defaultIndexUrl失败" msg := "获取全局变量defaultIndexUrl失败"
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg}) context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg})
return return
} }
globalValue := list[0]["global_value"].(string) globalValue := list[0]["global_value"].(string)
context.Redirect(302, string(globalValue)) context.Redirect(302, globalValue)
return return
} }

Loading…
Cancel
Save