master
huanghai 5 years ago
parent 783d397ad5
commit 0e6074f673

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

@ -424,14 +424,25 @@ func logout(context *gin.Context) {
}
//清除cookie
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 {
msg := "获取全局变量defaultIndexUrl失败"
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg})
return
}
globalValue := list[0]["global_value"].(string)
context.Redirect(302, string(globalValue))
context.Redirect(302, globalValue)
return
}

Loading…
Cancel
Save