Browse Source

修改配置

csx 5 years ago
parent
commit
0276e698f4
3 changed files with 4 additions and 30 deletions
  1. 0 29
      conf/app.conf
  2. 3 0
      controllers/admin_api_controllers/login_api_controller.go
  3. 1 1
      routers/router.go

+ 0 - 29
conf/app.conf View File

79
 
79
 
80
 
80
 
81
 
81
 
82
-niprocart =  63
83
-jms = 58
84
-fistula_needle_set = 65
85
-fistula_needle_set_16 = 64
86
-hemoperfusion = 55
87
-dialyser_sterilised = 12
88
-filtryzer = 53
89
-dialyzers = 8
90
-injector = 81
91
-bloodlines = 42
92
-tubingHemodialysis = 30
93
-package = 82
94
-aliquid = 83
95
-
96
-
97
 
82
 
98
 [dev]
83
 [dev]
99
 httpdomain = http://api.xt.test.sgjyun.com
84
 httpdomain = http://api.xt.test.sgjyun.com
130
 redisdb = 0
115
 redisdb = 0
131
 
116
 
132
 
117
 
133
-
134
-niprocart =  83
135
-jms = 80
136
-fistula_needle_set = 81
137
-fistula_needle_set_16 = 82
138
-hemoperfusion = 85
139
-dialyser_sterilised = 84
140
-filtryzer = 79
141
-dialyzers = 10000
142
-injector = 10001
143
-bloodlines = 10002
144
-tubingHemodialysis = 10003
145
-package = 10004
146
-aliquid = 10005

+ 3 - 0
controllers/admin_api_controllers/login_api_controller.go View File

3
 import (
3
 import (
4
 	"XT_Admin_Api/enums"
4
 	"XT_Admin_Api/enums"
5
 	"XT_Admin_Api/service"
5
 	"XT_Admin_Api/service"
6
+	"fmt"
6
 )
7
 )
7
 
8
 
8
 type LoginAPIController struct {
9
 type LoginAPIController struct {
26
 		return
27
 		return
27
 	}
28
 	}
28
 
29
 
30
+	fmt.Println(admin)
31
+
29
 	this.SetSession("admin_info", &AdminInfo{
32
 	this.SetSession("admin_info", &AdminInfo{
30
 		Admin: admin,
33
 		Admin: admin,
31
 	})
34
 	})

+ 1 - 1
routers/router.go View File

9
 func init() {
9
 func init() {
10
 	beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
10
 	beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
11
 		// AllowAllOrigins:  true,
11
 		// AllowAllOrigins:  true,
12
-		AllowOrigins:     []string{"https://xt.kuyicloud.com", "http://localhost:9528", "http://xt.test.shengws.com","https://xt.test.shengws.com", "http://xt.test.sgjyun.com","https://xt.test.sgjyun.com", "http://localhost:8081", "http://localhost:8082", "https://pad.kuyicloud.com", "http://pad.kuyicloud.com", "http://pad.test.sgjyun.com","https://pad.test.sgjyun.com", "http://admin.xt.test.sgjyun.com", "http://admin.xt.kuyicloud.com"},
12
+		AllowOrigins:     []string{"https://xt.kuyicloud.com", "http://localhost:9527", "http://xt.test.shengws.com","https://xt.test.shengws.com", "http://xt.test.sgjyun.com","https://xt.test.sgjyun.com", "http://localhost:8081", "http://localhost:8082", "https://pad.kuyicloud.com", "http://pad.kuyicloud.com", "http://pad.test.sgjyun.com","https://pad.test.sgjyun.com", "http://admin.xt.test.sgjyun.com", "http://admin.xt.kuyicloud.com"},
13
 		AllowMethods:     []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
13
 		AllowMethods:     []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
14
 		AllowHeaders:     []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
14
 		AllowHeaders:     []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
15
 		ExposeHeaders:    []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
15
 		ExposeHeaders:    []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},