优化
This commit is contained in:
		
							parent
							
								
									e7daf261fd
								
							
						
					
					
						commit
						10c9cdc7ad
					
				@ -28,6 +28,7 @@ type CdnNoticeInfo struct {
 | 
				
			|||||||
	Content   string
 | 
						Content   string
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
type CdnServerNoticeInfo struct {
 | 
					type CdnServerNoticeInfo struct {
 | 
				
			||||||
 | 
						AliApiAddr    string
 | 
				
			||||||
	ServerList    []*CdnServerInfo
 | 
						ServerList    []*CdnServerInfo
 | 
				
			||||||
	NoticeVersion string
 | 
						NoticeVersion string
 | 
				
			||||||
	NoticeList    []*CdnNoticeInfo
 | 
						NoticeList    []*CdnNoticeInfo
 | 
				
			||||||
@ -35,7 +36,10 @@ type CdnServerNoticeInfo struct {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// todo 根据项目获取不同的cdn推送内容
 | 
					// todo 根据项目获取不同的cdn推送内容
 | 
				
			||||||
func genCdnServerListContent(projectEt *entity.Project, serverList, noticeList []*entity.CommonResource) (string, error) {
 | 
					func genCdnServerListContent(projectEt *entity.Project, serverList, noticeList []*entity.CommonResource) (string, error) {
 | 
				
			||||||
	info := &CdnServerNoticeInfo{}
 | 
						info := &CdnServerNoticeInfo{
 | 
				
			||||||
 | 
							AliApiAddr: projectEt.GetApiAddr(),
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	hook, _ := projects.GetProjectResourceHook(projectEt, consts.ResourcesName_Server).(projects.IServerInfoHook)
 | 
						hook, _ := projects.GetProjectResourceHook(projectEt, consts.ResourcesName_Server).(projects.IServerInfoHook)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for _, server := range serverList {
 | 
						for _, server := range serverList {
 | 
				
			||||||
@ -168,5 +172,7 @@ Data.loginResult = {
 | 
				
			|||||||
    Content2 = "服务器正在维护中",
 | 
					    Content2 = "服务器正在维护中",
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Data.rolePort = "http://{{.AliApiAddr}}/getAccountRoles?account=165_%s"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
return Data
 | 
					return Data
 | 
				
			||||||
`
 | 
					`
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										14
									
								
								readme.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								readme.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					## 项目简介
 | 
				
			||||||
 | 
					这是天堂世界旧版本gm后台,目前(2025年08月26日)还用于天堂世界国服,未来国服停止运营就废弃,使用新版gm后台。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 打包
 | 
				
			||||||
 | 
					### 前端打包
 | 
				
			||||||
 | 
					前端代码在ui目录,执行`npm run build`会把生成前端页面打包到`../admin/ui`目录,编译后端时会
 | 
				
			||||||
 | 
					利用golang embed功能自动把静态页面打到可执行程序内,不需要单独发布前端了。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 后端打包
 | 
				
			||||||
 | 
					在`admin/cmd/all_in_one`目录,执行`build.sh`代码会将后端打包成docker镜像推送到harbor
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 部署
 | 
				
			||||||
 | 
					经过以上步骤会生成docker镜像,远程到线上gm部署服务器`ubuntu@162.14.102.73:/data/bi_and_admin/udniugm`,
 | 
				
			||||||
 | 
					执行`./run.sh`即可拉取最新镜像并重启版本。
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user