优化
This commit is contained in:
parent
6386740199
commit
037950a599
@ -11,10 +11,14 @@ import (
|
|||||||
|
|
||||||
type AccountService struct {
|
type AccountService struct {
|
||||||
projectRepo repo.IProjectRepo
|
projectRepo repo.IProjectRepo
|
||||||
|
accountRepo repo.IAccountRepo
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewAccountService(db *gorm.DB) *AccountService {
|
func NewAccountService(db *gorm.DB) *AccountService {
|
||||||
return &AccountService{projectRepo: repo.NewProjectRepo(db)}
|
return &AccountService{
|
||||||
|
projectRepo: repo.NewProjectRepo(db),
|
||||||
|
accountRepo: repo.NewAccountRepo(db),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (svc *AccountService) GetAccountDetail(projectId int, account string) (*dto.GetAccountDetailRsp, error) {
|
func (svc *AccountService) GetAccountDetail(projectId int, account string) (*dto.GetAccountDetailRsp, error) {
|
||||||
@ -33,3 +37,31 @@ func (svc *AccountService) GetAccountDetail(projectId int, account string) (*dto
|
|||||||
result, err := hook.GetDetail(projectEt, account)
|
result, err := hook.GetDetail(projectEt, account)
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (svc *AccountService) GetRoleDetail(projectId int, req *dto.GetRoleDetailReq) (*dto.GetRoleDetailRsp, error) {
|
||||||
|
_, projectEt, find, err := svc.projectRepo.GetById(projectId)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !find {
|
||||||
|
return nil, errcode.New(errcode.ServerError, "not found project %v db data", projectId)
|
||||||
|
}
|
||||||
|
hook, ok := projects.GetProjectResourceHook(projectEt, consts.ResourcesName_Role).(projects.IGetRoleDetailHook)
|
||||||
|
if !ok {
|
||||||
|
return nil, errcode.New(errcode.ServerError, "not found hook for project:%v", projectId)
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := hook.GetDetail(projectEt, req)
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (svc *AccountService) GetWhiteListAll(projectId int) ([]*dto.WhiteListInfo, error) {
|
||||||
|
_, projectEt, find, err := svc.projectRepo.GetById(projectId)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !find {
|
||||||
|
return nil, errcode.New(errcode.ServerError, "not found project %v db data", projectId)
|
||||||
|
}
|
||||||
|
return svc.accountRepo.GetWhiteListAll(projectEt)
|
||||||
|
}
|
||||||
|
@ -36,7 +36,7 @@ func (svc *CommonResourceService) initCommonResourcesRepo(db *gorm.DB) {
|
|||||||
serverRepo.GlobalBtns = []*ResourceBtnInfo{
|
serverRepo.GlobalBtns = []*ResourceBtnInfo{
|
||||||
{&api.ResourceBtnInfo{Key: consts.BtnKeyGlobal_Server_DownAll, Name: "一键停服", BtnColorType: "info"}, svc.handleServerUpOrDown},
|
{&api.ResourceBtnInfo{Key: consts.BtnKeyGlobal_Server_DownAll, Name: "一键停服", BtnColorType: "info"}, svc.handleServerUpOrDown},
|
||||||
{&api.ResourceBtnInfo{Key: consts.BtnKeyGlobal_Server_UpAll, Name: "一键起服", BtnColorType: "warning"}, svc.handleServerUpOrDown},
|
{&api.ResourceBtnInfo{Key: consts.BtnKeyGlobal_Server_UpAll, Name: "一键起服", BtnColorType: "warning"}, svc.handleServerUpOrDown},
|
||||||
{&api.ResourceBtnInfo{Key: consts.BtnKeyGlobal_Server_ExportCdn, Name: "预览导出cdn", BtnColorType: "default"}, svc.handleServerPrepareShowExportCdn},
|
{&api.ResourceBtnInfo{Key: consts.BtnKeyGlobal_Server_ShowExportCdn, Name: "预览导出cdn", BtnColorType: "default"}, svc.handleServerPrepareShowExportCdn},
|
||||||
{&api.ResourceBtnInfo{Key: consts.BtnKeyGlobal_Server_ExportCdn, Name: "一键导出cdn", BtnColorType: "danger"}, svc.handleServerExportCdn},
|
{&api.ResourceBtnInfo{Key: consts.BtnKeyGlobal_Server_ExportCdn, Name: "一键导出cdn", BtnColorType: "danger"}, svc.handleServerExportCdn},
|
||||||
}
|
}
|
||||||
serverRepo.RowBtns = []*ResourceBtnInfo{
|
serverRepo.RowBtns = []*ResourceBtnInfo{
|
||||||
@ -60,7 +60,7 @@ func (svc *CommonResourceService) initCommonResourcesRepo(db *gorm.DB) {
|
|||||||
r(consts.ResourcesName_Account, "账号列表", repo.NewCommonResourceRepo(db, &model.Account{}), ShowMethod_Get) // 账号管理不需要在后台读写数据,都是通过项目api拉
|
r(consts.ResourcesName_Account, "账号列表", repo.NewCommonResourceRepo(db, &model.Account{}), ShowMethod_Get) // 账号管理不需要在后台读写数据,都是通过项目api拉
|
||||||
r(consts.ResourcesName_SupportAccount, "扶持账号", repo.NewCommonResourceRepo(db, &model.SupportAccount{}), ShowMethod_Get|ShowMethod_Post|ShowMethod_Delete) // 扶持账号,只是标记哪些账号是扶持好
|
r(consts.ResourcesName_SupportAccount, "扶持账号", repo.NewCommonResourceRepo(db, &model.SupportAccount{}), ShowMethod_Get|ShowMethod_Post|ShowMethod_Delete) // 扶持账号,只是标记哪些账号是扶持好
|
||||||
r(consts.ResourcesName_Role, "角色列表", repo.NewCommonResourceRepo(db, &model.Role{}), ShowMethod_Get) // 角色管理不需要在后台读写数据,都是通过项目api拉
|
r(consts.ResourcesName_Role, "角色列表", repo.NewCommonResourceRepo(db, &model.Role{}), ShowMethod_Get) // 角色管理不需要在后台读写数据,都是通过项目api拉
|
||||||
r(consts.ResourcesName_WhiteList, "白名单", repo.NewCommonResourceRepo(db, &model.WhiteList{}), ShowMethod_Get|ShowMethod_Post|ShowMethod_Delete)
|
r(consts.ResourcesName_WhiteList, "白名单", repo.NewCommonResourceRepo(db, &model.WhiteList{}), ShowMethod_Get|ShowMethod_Post|ShowMethod_Put|ShowMethod_Delete)
|
||||||
r(consts.ResourcesName_Ban, "封禁管理", repo.NewCommonResourceRepo(db, &model.Ban{}), ShowMethod_Get|ShowMethod_Post|ShowMethod_Put|ShowMethod_Delete)
|
r(consts.ResourcesName_Ban, "封禁管理", repo.NewCommonResourceRepo(db, &model.Ban{}), ShowMethod_Get|ShowMethod_Post|ShowMethod_Put|ShowMethod_Delete)
|
||||||
r(consts.ResourcesName_MailRole, "个人邮件", repo.NewCommonResourceRepo(db, &model.RoleMail{}), ShowMethod_Get|ShowMethod_Post) // 个人邮件发放就没法撤回?
|
r(consts.ResourcesName_MailRole, "个人邮件", repo.NewCommonResourceRepo(db, &model.RoleMail{}), ShowMethod_Get|ShowMethod_Post) // 个人邮件发放就没法撤回?
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import (
|
|||||||
"admin/apps/game/model"
|
"admin/apps/game/model"
|
||||||
"admin/internal/errcode"
|
"admin/internal/errcode"
|
||||||
dto2 "admin/internal/model/dto"
|
dto2 "admin/internal/model/dto"
|
||||||
|
"admin/lib/cdn"
|
||||||
"admin/lib/dfs"
|
"admin/lib/dfs"
|
||||||
"admin/lib/xlog"
|
"admin/lib/xlog"
|
||||||
"bytes"
|
"bytes"
|
||||||
@ -32,12 +33,16 @@ func (svc *CommonResourceService) handleServerExportCdn(projectEt *entity.Projec
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
content, err := genCdnServerListContent(serverList, noticeList)
|
content, err := genCdnServerListContent(projectEt, serverList, noticeList)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
cosClient := dfs.NewDfsCos("AKIDqZ6SbXGsX6UffS4VnskRvEQXWLzQ2Xpu", "BDBlGajfQ2ShjZCbnv581jEZiy3vZ4MR", "ttsj-1359624709", "ap-chengdu")
|
secretId := "AKIDqZ6SbXGsX6UffS4VnskRvEQXWLzQ2Xpu"
|
||||||
|
secretKey := "BDBlGajfQ2ShjZCbnv581jEZiy3vZ4MR"
|
||||||
|
region := projectEt.Po.DfsRegion
|
||||||
|
|
||||||
|
cosClient := dfs.NewDfsCos(secretId, secretKey, projectEt.Po.DfsBucket, region)
|
||||||
|
|
||||||
opFilePathList := []string{
|
opFilePathList := []string{
|
||||||
"Default_Update/AndroidTest/REMAIN-ServerList.bytes",
|
"Default_Update/AndroidTest/REMAIN-ServerList.bytes",
|
||||||
@ -49,7 +54,7 @@ func (svc *CommonResourceService) handleServerExportCdn(projectEt *entity.Projec
|
|||||||
xlog.Errorf("get dfs file %v content error:%v", opFile, err)
|
xlog.Errorf("get dfs file %v content error:%v", opFile, err)
|
||||||
return nil, errcode.New(errcode.DBError, "get obj %v error:%v", opFile, err)
|
return nil, errcode.New(errcode.DBError, "get obj %v error:%v", opFile, err)
|
||||||
}
|
}
|
||||||
xlog.Infof("prepare write dfs server list file %v content:%v", opFile, oldFileContent)
|
xlog.Infof("prepare write dfs server list file %v content:%v", opFile, string(oldFileContent))
|
||||||
}
|
}
|
||||||
|
|
||||||
xlog.Infof("new dfs server list file content:%v", content)
|
xlog.Infof("new dfs server list file content:%v", content)
|
||||||
@ -62,6 +67,13 @@ func (svc *CommonResourceService) handleServerExportCdn(projectEt *entity.Projec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time.Sleep(2 * time.Second)
|
||||||
|
|
||||||
|
err = cdn.PurgeTxCdnPath(secretId, secretKey, region, projectEt.Po.CdnPath)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errcode.New(errcode.DBError, "purge cdn path:%v error:%v", projectEt.Po.CdnPath)
|
||||||
|
}
|
||||||
|
|
||||||
return &dto2.CommonRowsSelectionRsp{
|
return &dto2.CommonRowsSelectionRsp{
|
||||||
Msg: "推送服务器列表文件到分布式存储成功!",
|
Msg: "推送服务器列表文件到分布式存储成功!",
|
||||||
NeedRefresh: false,
|
NeedRefresh: false,
|
||||||
@ -79,7 +91,7 @@ func (svc *CommonResourceService) handleServerPrepareShowExportCdn(projectEt *en
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
content, err := genCdnServerListContent(serverList, noticeList)
|
content, err := genCdnServerListContent(projectEt, serverList, noticeList)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package projects
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"admin/apps/game/domain/entity"
|
"admin/apps/game/domain/entity"
|
||||||
|
"admin/apps/game/model"
|
||||||
dto2 "admin/internal/model/dto"
|
dto2 "admin/internal/model/dto"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -31,7 +32,15 @@ type IGetAccountDetailHook interface {
|
|||||||
GetDetail(projectInfo *entity.Project, account string) (*dto2.GetAccountDetailRsp, error)
|
GetDetail(projectInfo *entity.Project, account string) (*dto2.GetAccountDetailRsp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type IGetAllValueChoicesHook interface {
|
type IGetRoleDetailHook interface {
|
||||||
|
GetDetail(projectInfo *entity.Project, params *dto2.GetRoleDetailReq) (*dto2.GetRoleDetailRsp, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type IGetAllValueChoiceHook interface {
|
||||||
// 获取所有道具,可以用于前端页面做下拉选择等
|
// 获取所有道具,可以用于前端页面做下拉选择等
|
||||||
GetItems(projectInfo *entity.Project) ([]*dto2.CommonDtoFieldChoice, error)
|
GetItems(projectInfo *entity.Project) ([]*dto2.CommonDtoFieldChoice, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IServerInfoHook interface {
|
||||||
|
IsServerDownStatus(projectInfo *entity.Project, serverInfo *model.Server) bool
|
||||||
|
}
|
||||||
|
@ -25,7 +25,7 @@ var projectsResourceHookMgr = map[string]map[string]any{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 注册各个项目所有增删改字段可选项的钩子
|
// 注册各个项目所有增删改字段可选项的钩子
|
||||||
var projectsValueChoicesGetHook = map[string]IGetAllValueChoicesHook{
|
var projectsValueChoicesGetHook = map[string]IGetAllValueChoiceHook{
|
||||||
consts.RegisteredProjectId_shenmodalu: &smdl.Items{},
|
consts.RegisteredProjectId_shenmodalu: &smdl.Items{},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ func GetProjectResourceHook(project *entity.Project, resource string) any {
|
|||||||
return projectResourceHooks[resource]
|
return projectResourceHooks[resource]
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetProjectValueChoicesGetHook(projectId string) IGetAllValueChoicesHook {
|
func GetProjectValueChoicesGetHook(projectId string) IGetAllValueChoiceHook {
|
||||||
if debugDisableAllHook {
|
if debugDisableAllHook {
|
||||||
return &debugItemsHook{}
|
return &debugItemsHook{}
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,9 @@ func (hook *MailGlobalHook) Create(projectInfo *entity.Project, resource string,
|
|||||||
}
|
}
|
||||||
if mailInfo.CreateRoleTimeBefore.Valid {
|
if mailInfo.CreateRoleTimeBefore.Valid {
|
||||||
params.Add("createrole", mailInfo.CreateRoleTimeBefore.Time.Format(time.DateTime))
|
params.Add("createrole", mailInfo.CreateRoleTimeBefore.Time.Format(time.DateTime))
|
||||||
|
} else {
|
||||||
|
// 神魔大陆游戏内默认会用当前时间做条件,这里给个冗余时间
|
||||||
|
params.Add("createrole", time.Now().Add(time.Hour*24*365*30).Format(time.DateTime))
|
||||||
}
|
}
|
||||||
if mailInfo.TotalPayMoney > 0 {
|
if mailInfo.TotalPayMoney > 0 {
|
||||||
params.Add("cash", strconv.Itoa(mailInfo.TotalPayMoney))
|
params.Add("cash", strconv.Itoa(mailInfo.TotalPayMoney))
|
||||||
|
@ -23,6 +23,11 @@ type Role struct {
|
|||||||
Profession string `json:"profession"`
|
Profession string `json:"profession"`
|
||||||
LatestLoginTime int64 `json:"latestLoginAt"`
|
LatestLoginTime int64 `json:"latestLoginAt"`
|
||||||
CreateTime int64 `json:"createAt"`
|
CreateTime int64 `json:"createAt"`
|
||||||
|
Items []struct {
|
||||||
|
ID int64 `json:"item_id"`
|
||||||
|
Name string `json:"item_name"`
|
||||||
|
Num int64 `json:"num"`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type RoleHook struct {
|
type RoleHook struct {
|
||||||
@ -101,3 +106,66 @@ func (hook *RoleHook) List(projectInfo *entity.Project, resource string, params
|
|||||||
|
|
||||||
return totalCount, fields, rows, nil
|
return totalCount, fields, rows, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (hook *RoleHook) GetDetail(projectInfo *entity.Project, params *dto2.GetRoleDetailReq) (*dto2.GetRoleDetailRsp, error) {
|
||||||
|
alisrvAddr := projectInfo.GetApiAddr()
|
||||||
|
if alisrvAddr == "" {
|
||||||
|
return nil, errcode.New(errcode.ServerError, "项目%v没有配置api服务器地址", projectInfo.Po.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
type RspData struct {
|
||||||
|
State struct {
|
||||||
|
Code int `json:"code"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
} `json:"state"`
|
||||||
|
Data []*Role `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
body := &url.Values{}
|
||||||
|
|
||||||
|
body.Set("roleId", params.RoleId)
|
||||||
|
body.Set("serverid", params.ServerConfId)
|
||||||
|
body.Set("offset", "0")
|
||||||
|
body.Set("count", "1")
|
||||||
|
|
||||||
|
rsp := &RspData{}
|
||||||
|
err := httpclient.Request(alisrvAddr+"/rolelist", "get", body, rsp)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(rsp.Data) <= 0 {
|
||||||
|
return nil, errcode.New(errcode.ServerError, "找不到服务器%v的角色信息:%v", params.ServerConfId, params.RoleId)
|
||||||
|
}
|
||||||
|
|
||||||
|
detailRsp := &dto2.GetRoleDetailRsp{
|
||||||
|
RoleInfo: &dto2.RoleDetailInfo{
|
||||||
|
ServerId: rsp.Data[0].ServerConfId,
|
||||||
|
Name: rsp.Data[0].Name,
|
||||||
|
RoleId: rsp.Data[0].RoleId,
|
||||||
|
Level: rsp.Data[0].Level,
|
||||||
|
Items: make([]*dto2.ItemInfo, 0),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for _, item := range rsp.Data[0].Items {
|
||||||
|
|
||||||
|
find := false
|
||||||
|
for _, v := range detailRsp.RoleInfo.Items {
|
||||||
|
if v.ItemID == int(item.ID) {
|
||||||
|
v.ItemNum += item.Num
|
||||||
|
find = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !find {
|
||||||
|
itemInfo := &dto2.ItemInfo{
|
||||||
|
ItemID: int(item.ID),
|
||||||
|
ItemNum: item.Num,
|
||||||
|
Desc: item.Name,
|
||||||
|
}
|
||||||
|
|
||||||
|
detailRsp.RoleInfo.Items = append(detailRsp.RoleInfo.Items, itemInfo)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return detailRsp, nil
|
||||||
|
}
|
||||||
|
@ -145,6 +145,20 @@ func (hook *ServerHook) RowsSelection(projectInfo *entity.Project, resource stri
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (hook *ServerHook) IsServerDownStatus(projectInfo *entity.Project, serverInfo *model.Server) bool {
|
||||||
|
serverList, err := getAllRunningServers(projectInfo)
|
||||||
|
if err != nil {
|
||||||
|
xlog.Warnf("project %v getAllRunningServers error:%v", projectInfo.Po.Name, err)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
for _, s := range serverList {
|
||||||
|
if s.ServerId == serverInfo.ServerConfID {
|
||||||
|
return s.IsServerDown
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
// getAllRunningServers 获取本地配置的服务器列表和远程获取的运行中服务器列表求个交集
|
// getAllRunningServers 获取本地配置的服务器列表和远程获取的运行中服务器列表求个交集
|
||||||
func getAllRunningServers(projectEt *entity.Project) (internal.ServerInfoList, error) {
|
func getAllRunningServers(projectEt *entity.Project) (internal.ServerInfoList, error) {
|
||||||
alisrvAddr := projectEt.GetApiAddr()
|
alisrvAddr := projectEt.GetApiAddr()
|
||||||
|
@ -27,7 +27,7 @@ func (hook *SupportAccountHook) Create(projectInfo *entity.Project, resource str
|
|||||||
params.Add("type", "support")
|
params.Add("type", "support")
|
||||||
params.Add("value", info.Account)
|
params.Add("value", info.Account)
|
||||||
params.Add("op", "add")
|
params.Add("op", "add")
|
||||||
params.Add("server", info.ServerConfID)
|
//params.Add("server", info.ServerConfID)
|
||||||
|
|
||||||
rsp := make(map[string]any)
|
rsp := make(map[string]any)
|
||||||
err := httpclient.Request(alisrvAddr+"/gm", "get", params, &rsp)
|
err := httpclient.Request(alisrvAddr+"/gm", "get", params, &rsp)
|
||||||
@ -52,7 +52,7 @@ func (hook *SupportAccountHook) Delete(projectInfo *entity.Project, resource str
|
|||||||
params.Add("type", "support")
|
params.Add("type", "support")
|
||||||
params.Add("value", info.Account)
|
params.Add("value", info.Account)
|
||||||
params.Add("op", "remove")
|
params.Add("op", "remove")
|
||||||
params.Add("server", info.ServerConfID)
|
//params.Add("server", info.ServerConfID)
|
||||||
|
|
||||||
rsp := make(map[string]any)
|
rsp := make(map[string]any)
|
||||||
err := httpclient.Request(alisrvAddr+"/gm", "get", params, &rsp)
|
err := httpclient.Request(alisrvAddr+"/gm", "get", params, &rsp)
|
||||||
|
@ -27,29 +27,17 @@ func (hook *WhitelistHook) Create(projectInfo *entity.Project, resource string,
|
|||||||
params.Add("value", whiteInfo.Value)
|
params.Add("value", whiteInfo.Value)
|
||||||
params.Add("op", "add")
|
params.Add("op", "add")
|
||||||
|
|
||||||
if len(whiteInfo.ServerConfID) == 0 {
|
// 所有区服
|
||||||
// 所有区服
|
serverList, err := getAllRunningServers(projectInfo)
|
||||||
serverList, err := getAllRunningServers(projectInfo)
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
for _, v := range serverList {
|
||||||
|
params.Set("server", v.ServerId)
|
||||||
|
rsp := make(map[string]any)
|
||||||
|
err := httpclient.Request(alisrvAddr+"/gm", "get", params, &rsp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return errcode.New(errcode.ServerError, "发送新增白名单请求:%+v错误:%v", whiteInfo, err)
|
||||||
}
|
|
||||||
for _, v := range serverList {
|
|
||||||
params.Set("server", v.ServerId)
|
|
||||||
rsp := make(map[string]any)
|
|
||||||
err := httpclient.Request(alisrvAddr+"/gm", "get", params, &rsp)
|
|
||||||
if err != nil {
|
|
||||||
return errcode.New(errcode.ServerError, "发送新增白名单请求:%+v错误:%v", whiteInfo, err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 指定区服
|
|
||||||
for _, v := range whiteInfo.ServerConfID {
|
|
||||||
params.Set("server", v)
|
|
||||||
rsp := make(map[string]any)
|
|
||||||
err := httpclient.Request(alisrvAddr+"/gm", "get", params, &rsp)
|
|
||||||
if err != nil {
|
|
||||||
return errcode.New(errcode.ServerError, "发送新增白名单请求:%+v错误:%v", whiteInfo, err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,29 +59,17 @@ func (hook *WhitelistHook) Delete(projectInfo *entity.Project, resource string,
|
|||||||
params.Add("value", whiteInfo.Value)
|
params.Add("value", whiteInfo.Value)
|
||||||
params.Add("op", "remove")
|
params.Add("op", "remove")
|
||||||
|
|
||||||
if len(whiteInfo.ServerConfID) == 0 {
|
// 所有区服
|
||||||
// 所有区服
|
serverList, err := getAllRunningServers(projectInfo)
|
||||||
serverList, err := getAllRunningServers(projectInfo)
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
for _, v := range serverList {
|
||||||
|
params.Set("server", v.ServerId)
|
||||||
|
rsp := make(map[string]any)
|
||||||
|
err := httpclient.Request(alisrvAddr+"/gm", "get", params, &rsp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return errcode.New(errcode.ServerError, "发送新增白名单请求:%+v错误:%v", whiteInfo, err)
|
||||||
}
|
|
||||||
for _, v := range serverList {
|
|
||||||
params.Set("server", v.ServerId)
|
|
||||||
rsp := make(map[string]any)
|
|
||||||
err := httpclient.Request(alisrvAddr+"/gm", "get", params, &rsp)
|
|
||||||
if err != nil {
|
|
||||||
return errcode.New(errcode.ServerError, "发送新增白名单请求:%+v错误:%v", whiteInfo, err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 指定区服
|
|
||||||
for _, v := range whiteInfo.ServerConfID {
|
|
||||||
params.Set("server", v)
|
|
||||||
rsp := make(map[string]any)
|
|
||||||
err := httpclient.Request(alisrvAddr+"/gm", "get", params, &rsp)
|
|
||||||
if err != nil {
|
|
||||||
return errcode.New(errcode.ServerError, "发送新增白名单请求:%+v错误:%v", whiteInfo, err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
37
admin/apps/game/domain/repo/account.go
Normal file
37
admin/apps/game/domain/repo/account.go
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
package repo
|
||||||
|
|
||||||
|
import (
|
||||||
|
"admin/apps/game/domain/entity"
|
||||||
|
"admin/apps/game/model"
|
||||||
|
"admin/internal/errcode"
|
||||||
|
"admin/internal/model/dto"
|
||||||
|
"gorm.io/gorm"
|
||||||
|
)
|
||||||
|
|
||||||
|
type IAccountRepo interface {
|
||||||
|
GetWhiteListAll(projectEt *entity.Project) ([]*dto.WhiteListInfo, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type accountRepoImpl struct {
|
||||||
|
db *gorm.DB
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewAccountRepo(db *gorm.DB) IAccountRepo {
|
||||||
|
return &accountRepoImpl{db: db}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (impl *accountRepoImpl) GetWhiteListAll(projectEt *entity.Project) ([]*dto.WhiteListInfo, error) {
|
||||||
|
list := make([]*model.WhiteList, 0)
|
||||||
|
err := impl.db.Where("project_id = ?", projectEt.Po.ID).Find(&list).Error
|
||||||
|
if err != nil {
|
||||||
|
return nil, errcode.New(errcode.DBError, "list project %v whitelist error:%v", projectEt.Po.ID, err)
|
||||||
|
}
|
||||||
|
retAccountList := make([]*dto.WhiteListInfo, 0, len(list))
|
||||||
|
for _, a := range list {
|
||||||
|
retAccountList = append(retAccountList, &dto.WhiteListInfo{
|
||||||
|
WType: a.WType,
|
||||||
|
Value: a.Value,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return retAccountList, nil
|
||||||
|
}
|
@ -2,9 +2,12 @@ package domain
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"admin/apps/game/domain/entity"
|
"admin/apps/game/domain/entity"
|
||||||
|
"admin/apps/game/domain/projects"
|
||||||
"admin/apps/game/model"
|
"admin/apps/game/model"
|
||||||
|
"admin/internal/consts"
|
||||||
"admin/internal/errcode"
|
"admin/internal/errcode"
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
@ -29,10 +32,17 @@ type CdnServerNoticeInfo struct {
|
|||||||
NoticeList []*CdnNoticeInfo
|
NoticeList []*CdnNoticeInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
func genCdnServerListContent(serverList, noticeList []*entity.CommonResource) (string, error) {
|
func genCdnServerListContent(projectEt *entity.Project, serverList, noticeList []*entity.CommonResource) (string, error) {
|
||||||
info := &CdnServerNoticeInfo{}
|
info := &CdnServerNoticeInfo{}
|
||||||
|
hook, _ := projects.GetProjectResourceHook(projectEt, consts.ResourcesName_Server).(projects.IServerInfoHook)
|
||||||
|
|
||||||
for _, server := range serverList {
|
for _, server := range serverList {
|
||||||
serverDbInfo := server.Po.(*model.Server)
|
serverDbInfo := server.Po.(*model.Server)
|
||||||
|
|
||||||
|
if hook != nil {
|
||||||
|
serverDbInfo.IsServerDown = hook.IsServerDownStatus(projectEt, serverDbInfo)
|
||||||
|
}
|
||||||
|
|
||||||
serverInfo := &CdnServerInfo{}
|
serverInfo := &CdnServerInfo{}
|
||||||
serverInfo.Properties[0].Key = "id"
|
serverInfo.Properties[0].Key = "id"
|
||||||
serverInfo.Properties[0].Value = serverDbInfo.ServerConfID
|
serverInfo.Properties[0].Value = serverDbInfo.ServerConfID
|
||||||
@ -58,7 +68,7 @@ func genCdnServerListContent(serverList, noticeList []*entity.CommonResource) (s
|
|||||||
serverInfo.Properties[4].Value = "0"
|
serverInfo.Properties[4].Value = "0"
|
||||||
|
|
||||||
serverInfo.Properties[5].Key = "status"
|
serverInfo.Properties[5].Key = "status"
|
||||||
serverInfo.Properties[5].Value = "0"
|
serverInfo.Properties[5].Value = fmt.Sprintf("%v", getCdnServerStatus(serverDbInfo))
|
||||||
|
|
||||||
serverInfo.Properties[6].Key = "area"
|
serverInfo.Properties[6].Key = "area"
|
||||||
serverInfo.Properties[6].Value = "1区"
|
serverInfo.Properties[6].Value = "1区"
|
||||||
@ -99,6 +109,21 @@ func genCdnServerListContent(serverList, noticeList []*entity.CommonResource) (s
|
|||||||
return bytesBuffer.String(), nil
|
return bytesBuffer.String(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getCdnServerStatus(server *model.Server) int {
|
||||||
|
if server.IsServerDown {
|
||||||
|
return consts.CdnServerStatus_Maintain
|
||||||
|
}
|
||||||
|
switch server.ServerStatus {
|
||||||
|
case consts.ServerStatus_Normal:
|
||||||
|
return consts.CdnServerStatus_Normal
|
||||||
|
case consts.ServerStatus_Busy:
|
||||||
|
return consts.CdnServerStatus_Busy
|
||||||
|
case consts.ServerStatus_Full:
|
||||||
|
return consts.CdnServerStatus_Full
|
||||||
|
}
|
||||||
|
return consts.CdnServerStatus_Maintain
|
||||||
|
}
|
||||||
|
|
||||||
var cdnServerListContentTemplate = `
|
var cdnServerListContentTemplate = `
|
||||||
local Data = {}
|
local Data = {}
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ func init() {
|
|||||||
|
|
||||||
type GenAccount struct {
|
type GenAccount struct {
|
||||||
ID int `gorm:"primarykey" readonly:"true"`
|
ID int `gorm:"primarykey" readonly:"true"`
|
||||||
ProjectId int `gorm:"uniqueIndex:idx_account"`
|
ProjectId int `gorm:"index"`
|
||||||
ServerConfID string `gorm:"type:varchar(200);uniqueIndex:idx_account;index:idx_server" name:"区服id" required:"true" choices:"GetChoiceServers" where:"eq"`
|
ServerConfID string `gorm:"type:varchar(200);index:idx_server" name:"区服id" required:"true" choices:"GetChoiceServers" where:"eq"`
|
||||||
AccountNum int `name:"账号数量" readonly:"true"`
|
AccountNum int `name:"账号数量" readonly:"true"`
|
||||||
AccountList string `gorm:"type:longtext" name:"账号列表" type:"randAccount" desc:"用逗号标记多个" required:"true" big_column:"true"`
|
AccountList string `gorm:"type:longtext" name:"账号列表" type:"randAccount" desc:"用逗号标记多个" required:"true" big_column:"true"`
|
||||||
|
|
||||||
|
@ -26,6 +26,9 @@ type Project struct {
|
|||||||
// 为空就代表command_list实现在各个逻辑服,由本后台系统在执行指令时聚合、分发指令
|
// 为空就代表command_list实现在各个逻辑服,由本后台系统在执行指令时聚合、分发指令
|
||||||
// 调用各个逻辑服执行,本后台执行指令需要根据逻辑服数量调用;
|
// 调用各个逻辑服执行,本后台执行指令需要根据逻辑服数量调用;
|
||||||
ApiAddr string `name:"游戏api地址" desc:"api服务器地址,例如神魔大陆就是alisrv服务器地址,用于后台调用gm"`
|
ApiAddr string `name:"游戏api地址" desc:"api服务器地址,例如神魔大陆就是alisrv服务器地址,用于后台调用gm"`
|
||||||
|
DfsBucket string `name:"分布式存储桶名" desc:"上传服务器列表分布式存储的桶名"`
|
||||||
|
DfsRegion string `name:"分布式存储区域" desc:"上传服务器列表分布式存储的桶区域例如ap-chengdu"`
|
||||||
|
CdnPath string `name:"cdn地址" desc:"拉取服务器列表文件的cdn"`
|
||||||
SortWeight int `name:"菜单排序" desc:"越大越靠前"`
|
SortWeight int `name:"菜单排序" desc:"越大越靠前"`
|
||||||
CreatedAt time.Time `readonly:"true"`
|
CreatedAt time.Time `readonly:"true"`
|
||||||
UpdatedAt time.Time `readonly:"true"`
|
UpdatedAt time.Time `readonly:"true"`
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"admin/internal/consts"
|
||||||
"admin/internal/db"
|
"admin/internal/db"
|
||||||
"admin/internal/global"
|
"admin/internal/global"
|
||||||
"admin/internal/model/dto"
|
"admin/internal/model/dto"
|
||||||
@ -23,6 +24,7 @@ type Server struct {
|
|||||||
TotalRoleCount int `name:"总角色数" desc:"" readonly:"true" uneditable:"true"`
|
TotalRoleCount int `name:"总角色数" desc:"" readonly:"true" uneditable:"true"`
|
||||||
TotalAccountCount int `name:"总账号数" desc:"" readonly:"true" uneditable:"true"`
|
TotalAccountCount int `name:"总账号数" desc:"" readonly:"true" uneditable:"true"`
|
||||||
IsServerDown bool `name:"停服维护中" desc:"" readonly:"true" uneditable:"true" type:"tagStatus" choices:"GetServerDownStatusChoices"`
|
IsServerDown bool `name:"停服维护中" desc:"" readonly:"true" uneditable:"true" type:"tagStatus" choices:"GetServerDownStatusChoices"`
|
||||||
|
ServerStatus string `gorm:"varchar(20);default:normal" name:"服务器逻辑状态" desc:"爆满、繁忙、流畅" type:"tagStatus" choices:"GetServerStatusChoices"`
|
||||||
// command_list接口服务器地址,为空代表由由项目统一提供command_list.
|
// command_list接口服务器地址,为空代表由由项目统一提供command_list.
|
||||||
// 取决于每个项目改造难度:
|
// 取决于每个项目改造难度:
|
||||||
// 为空就代表项目要实现一个自己统一对外暴露的gm调用服务对内聚合、分发指令执行,本后台执行指令只调用一次;
|
// 为空就代表项目要实现一个自己统一对外暴露的gm调用服务对内聚合、分发指令执行,本后台执行指令只调用一次;
|
||||||
@ -61,7 +63,15 @@ func (m *Server) GetRunningStatusChoices(project *Project) []*dto.CommonDtoField
|
|||||||
|
|
||||||
func (m *Server) GetServerDownStatusChoices(project *Project) []*dto.CommonDtoFieldChoice {
|
func (m *Server) GetServerDownStatusChoices(project *Project) []*dto.CommonDtoFieldChoice {
|
||||||
return []*dto.CommonDtoFieldChoice{
|
return []*dto.CommonDtoFieldChoice{
|
||||||
{Desc: "否", Value: false, Type: 3}, // type: 0:plain 1:primary 2:success 3:info 4:warning 5:danger
|
{Desc: "否", Value: false, Type: 2}, // type: 0:plain 1:primary 2:success 3:info 4:warning 5:danger
|
||||||
{Desc: "是", Value: true, Type: 2},
|
{Desc: "是", Value: true, Type: 3},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Server) GetServerStatusChoices(project *Project) []*dto.CommonDtoFieldChoice {
|
||||||
|
return []*dto.CommonDtoFieldChoice{
|
||||||
|
{Desc: "流畅", Value: consts.ServerStatus_Normal, Type: 2}, // type: 0:plain 1:primary 2:success 3:info 4:warning 5:danger
|
||||||
|
{Desc: "繁忙", Value: consts.ServerStatus_Busy, Type: 4},
|
||||||
|
{Desc: "爆满", Value: consts.ServerStatus_Full, Type: 5},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,10 +11,10 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type SupportAccount struct {
|
type SupportAccount struct {
|
||||||
ID int `gorm:"primarykey" readonly:"true"`
|
ID int `gorm:"primarykey" readonly:"true"`
|
||||||
ProjectId int `gorm:"uniqueIndex:idx_account"`
|
ProjectId int `gorm:"uniqueIndex:idx_account"`
|
||||||
ServerConfID string `gorm:"type:varchar(200);uniqueIndex:idx_account;index:idx_server" name:"区服id" required:"true" choices:"GetChoiceServers" where:"eq"`
|
//ServerConfID string `gorm:"type:varchar(200);uniqueIndex:idx_account;index:idx_server" name:"区服id" required:"true" choices:"GetChoiceServers" where:"eq"`
|
||||||
Account string `gorm:"type:varchar(200);uniqueIndex:idx_account;" name:"账号" desc:"用逗号标记多个" required:"true"`
|
Account string `gorm:"type:varchar(200);uniqueIndex:idx_account;" name:"账号" desc:"用逗号标记多个" required:"true"`
|
||||||
|
|
||||||
CreatedAt time.Time `readonly:"true" where:"range"`
|
CreatedAt time.Time `readonly:"true" where:"range"`
|
||||||
UpdatedAt time.Time `readonly:"true"`
|
UpdatedAt time.Time `readonly:"true"`
|
||||||
|
@ -11,11 +11,11 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type WhiteList struct {
|
type WhiteList struct {
|
||||||
ID int `gorm:"primarykey" readonly:"true"`
|
ID int `gorm:"primarykey" readonly:"true"`
|
||||||
ProjectId int `gorm:"uniqueIndex:idx_whitelist"`
|
ProjectId int `gorm:"index"`
|
||||||
ServerConfID []string `gorm:"type:json;serializer:json" type:"[]string" name:"区服id" desc:"不选就是默认所有区服" choices:"GetChoiceServers" multi_choice:"true" where:"eq"`
|
//ServerConfID []string `gorm:"type:json;serializer:json" type:"[]string" name:"区服id" desc:"不选就是默认所有区服" choices:"GetChoiceServers" multi_choice:"true" where:"eq"`
|
||||||
WType string `name:"白名单类型" desc:"账号或者ip" required:"true" choices:"GetWhitelistTypeChoices"`
|
WType string `name:"白名单类型" desc:"账号或者ip" required:"true" choices:"GetWhitelistTypeChoices"`
|
||||||
Value string `gorm:"type:varchar(128);uniqueIndex:idx_whitelist" name:"账号或者ip等值" required:"true"`
|
Value string `gorm:"type:varchar(128);uniqueIndex:idx_whitelist" name:"账号或者ip等值" required:"true" uneditable:"true"`
|
||||||
|
|
||||||
CreatedAt time.Time `readonly:"true" where:"range"`
|
CreatedAt time.Time `readonly:"true" where:"range"`
|
||||||
UpdatedAt time.Time `readonly:"true"`
|
UpdatedAt time.Time `readonly:"true"`
|
||||||
|
@ -2,7 +2,9 @@ package server
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"admin/internal/context"
|
"admin/internal/context"
|
||||||
|
"admin/internal/errcode"
|
||||||
"admin/internal/model/dto"
|
"admin/internal/model/dto"
|
||||||
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (ctl *controller) GetAccountDetail(ctx *context.WebContext, params *dto.GetAccountDetailReq, rsp *dto.GetAccountDetailRsp) error {
|
func (ctl *controller) GetAccountDetail(ctx *context.WebContext, params *dto.GetAccountDetailReq, rsp *dto.GetAccountDetailRsp) error {
|
||||||
@ -14,3 +16,27 @@ func (ctl *controller) GetAccountDetail(ctx *context.WebContext, params *dto.Get
|
|||||||
*rsp = *result
|
*rsp = *result
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ctl *controller) GetRoleDetail(ctx *context.WebContext, params *dto.GetRoleDetailReq, rsp *dto.GetRoleDetailRsp) error {
|
||||||
|
projectId := getCtxURIProjectId(ctx)
|
||||||
|
result, err := ctl.svc.GetRoleDetail(projectId, params)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*rsp = *result
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ctl *controller) GetWhiteListAll(ctx *context.WebContext, params *dto.NilReq, rsp *dto.GetWhiteListAllRsp) error {
|
||||||
|
projectIdStr := ctx.GinCtx().Query("project_id")
|
||||||
|
projectId, err := strconv.Atoi(projectIdStr)
|
||||||
|
if err != nil {
|
||||||
|
return errcode.New(errcode.ParamsInvalid, "not found valid project id in url params:%v", projectIdStr)
|
||||||
|
}
|
||||||
|
accountList, err := ctl.svc.GetWhiteListAll(projectId)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*rsp = dto.GetWhiteListAllRsp{List: accountList}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
@ -41,9 +41,12 @@ func (srv *Server) Route(engine *web.Engine, sdkEngine *web.Engine) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// 礼包码特殊接口
|
// 特殊接口
|
||||||
accountGroup := projectGroup.Group("/:projectId/account/special", "")
|
accountGroup := projectGroup.Group("/:projectId/account/special", "")
|
||||||
accountGroup.Get("/detail", "账号详情查看", consts.WebPathPermit_Write, srv.ctl.GetAccountDetail)
|
accountGroup.Get("/detail", "账号详情查看", consts.WebPathPermit_Write, srv.ctl.GetAccountDetail)
|
||||||
|
|
||||||
|
roleGroup := projectGroup.Group("/:projectId/role/special", "")
|
||||||
|
roleGroup.Get("/detail", "角色详情查看", consts.WebPathPermit_Write, srv.ctl.GetRoleDetail)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,6 +55,7 @@ func (srv *Server) Route(engine *web.Engine, sdkEngine *web.Engine) {
|
|||||||
sdkGroup := sdkEngine.Group("/api", "")
|
sdkGroup := sdkEngine.Group("/api", "")
|
||||||
{
|
{
|
||||||
sdkGroup.Get("/cdkey/use", "使用奖励码", consts.WebPathPermit_Write, srv.ctl.CDKeyUse)
|
sdkGroup.Get("/cdkey/use", "使用奖励码", consts.WebPathPermit_Write, srv.ctl.CDKeyUse)
|
||||||
|
sdkGroup.Get("/whitelist/all", "拉取白名单账号列表", consts.WebPathPermit_Write, srv.ctl.GetWhiteListAll)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,3 +7,11 @@ import (
|
|||||||
func (svc *Service) GetAccountDetail(projectId int, params *dto.GetAccountDetailReq) (*dto.GetAccountDetailRsp, error) {
|
func (svc *Service) GetAccountDetail(projectId int, params *dto.GetAccountDetailReq) (*dto.GetAccountDetailRsp, error) {
|
||||||
return svc.accountSvc.GetAccountDetail(projectId, params.Account)
|
return svc.accountSvc.GetAccountDetail(projectId, params.Account)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (svc *Service) GetRoleDetail(projectId int, params *dto.GetRoleDetailReq) (*dto.GetRoleDetailRsp, error) {
|
||||||
|
return svc.accountSvc.GetRoleDetail(projectId, params)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (svc *Service) GetWhiteListAll(projectId int) ([]*dto.WhiteListInfo, error) {
|
||||||
|
return svc.accountSvc.GetWhiteListAll(projectId)
|
||||||
|
}
|
||||||
|
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
app="admin"
|
app="admin"
|
||||||
img_prefix="harbor.devops.u.niu/mid-platform"
|
img_prefix="harbor.gamegold.net.cn/mid-platform"
|
||||||
img_tag="2.0.1"
|
img_tag="2.0.1"
|
||||||
|
|
||||||
go build -tags netgo -ldflags "-s -w" -trimpath -buildvcs=false -o $app
|
go build -tags netgo -ldflags "-s -w" -trimpath -buildvcs=false -o $app
|
||||||
|
@ -99,6 +99,8 @@ require (
|
|||||||
github.com/soheilhy/cmux v0.1.5 // indirect
|
github.com/soheilhy/cmux v0.1.5 // indirect
|
||||||
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect
|
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect
|
||||||
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect
|
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect
|
||||||
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn v1.0.1200 // indirect
|
||||||
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1201 // indirect
|
||||||
github.com/tinylib/msgp v1.2.5 // indirect
|
github.com/tinylib/msgp v1.2.5 // indirect
|
||||||
github.com/tjfoc/gmsm v1.4.1 // indirect
|
github.com/tjfoc/gmsm v1.4.1 // indirect
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||||
|
@ -570,7 +570,12 @@ github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 h1:89CEmDvlq/F7S
|
|||||||
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU=
|
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU=
|
||||||
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b h1:fj5tQ8acgNUr6O8LEplsxDhUIe2573iLkJc+PqnzZTI=
|
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b h1:fj5tQ8acgNUr6O8LEplsxDhUIe2573iLkJc+PqnzZTI=
|
||||||
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4=
|
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4=
|
||||||
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn v1.0.1200 h1:b+8Uq05lkw8qDL6s2CqqA15ihEqRcKZIydpbTCz6Bfw=
|
||||||
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn v1.0.1200/go.mod h1:qnnYRvEAFcWxktIrZ/GTquI0KhAuYwDveXs+UGFl6r8=
|
||||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
|
||||||
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1200/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
|
||||||
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1201 h1:ldpEIw5ZezwuhZZYXM0EsY55qDT/MNQzX2agDdZ468w=
|
||||||
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1201/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
|
||||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0=
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0=
|
||||||
github.com/tencentyun/cos-go-sdk-v5 v0.7.66 h1:O4O6EsozBoDjxWbltr3iULgkI7WPj/BFNlYTXDuE64E=
|
github.com/tencentyun/cos-go-sdk-v5 v0.7.66 h1:O4O6EsozBoDjxWbltr3iULgkI7WPj/BFNlYTXDuE64E=
|
||||||
github.com/tencentyun/cos-go-sdk-v5 v0.7.66/go.mod h1:8+hG+mQMuRP/OIS9d83syAvXvrMj9HhkND6Q1fLghw0=
|
github.com/tencentyun/cos-go-sdk-v5 v0.7.66/go.mod h1:8+hG+mQMuRP/OIS9d83syAvXvrMj9HhkND6Q1fLghw0=
|
||||||
|
@ -61,6 +61,7 @@ const (
|
|||||||
const (
|
const (
|
||||||
BtnKeyGlobal_Server_DownAll = "server:down:all" // 一键维护
|
BtnKeyGlobal_Server_DownAll = "server:down:all" // 一键维护
|
||||||
BtnKeyGlobal_Server_UpAll = "server:up:all" // 一键维护结束
|
BtnKeyGlobal_Server_UpAll = "server:up:all" // 一键维护结束
|
||||||
|
BtnKeyGlobal_Server_ShowExportCdn = "server:show:export:cdn" // 一键导出cdn
|
||||||
BtnKeyGlobal_Server_ExportCdn = "server:export:cdn" // 一键导出cdn
|
BtnKeyGlobal_Server_ExportCdn = "server:export:cdn" // 一键导出cdn
|
||||||
BtnKeyGlobal_Notice_DisableAll = "notice:disable:all" // 一键禁用
|
BtnKeyGlobal_Notice_DisableAll = "notice:disable:all" // 一键禁用
|
||||||
BtnKeyGlobal_Notice_EnableAll = "notice:enable:all" // 一键启用
|
BtnKeyGlobal_Notice_EnableAll = "notice:enable:all" // 一键启用
|
||||||
@ -78,3 +79,16 @@ const (
|
|||||||
const (
|
const (
|
||||||
CDKeyBatchMaxKeyNum = 1000000 // 奖励码一批最大数量,不然运营想补加码,算法又要一开始定好数量
|
CDKeyBatchMaxKeyNum = 1000000 // 奖励码一批最大数量,不然运营想补加码,算法又要一开始定好数量
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
ServerStatus_Normal = "normal"
|
||||||
|
ServerStatus_Busy = "busy"
|
||||||
|
ServerStatus_Full = "full"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
CdnServerStatus_Normal = 2
|
||||||
|
CdnServerStatus_Busy = 1
|
||||||
|
CdnServerStatus_Full = 0
|
||||||
|
CdnServerStatus_Maintain = 3
|
||||||
|
)
|
||||||
|
@ -116,6 +116,14 @@ type AccountDetailInfo struct {
|
|||||||
RoleList []*AccountDetailRoleInfo `json:"role_list"`
|
RoleList []*AccountDetailRoleInfo `json:"role_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RoleDetailInfo struct {
|
||||||
|
ServerId string `json:"server_id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
RoleId string `json:"role_id"`
|
||||||
|
Level int `json:"level"`
|
||||||
|
Items []*ItemInfo `json:"items"`
|
||||||
|
}
|
||||||
|
|
||||||
type UserInfo struct {
|
type UserInfo struct {
|
||||||
UserId int `json:"user_id"`
|
UserId int `json:"user_id"`
|
||||||
NickName string `json:"nick_name"`
|
NickName string `json:"nick_name"`
|
||||||
@ -139,3 +147,8 @@ type UserOpHistoryInfo struct {
|
|||||||
CreatedAt string `json:"createdAt"`
|
CreatedAt string `json:"createdAt"`
|
||||||
DetailInfo string `json:"detailInfo"`
|
DetailInfo string `json:"detailInfo"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type WhiteListInfo struct {
|
||||||
|
WType string `json:"w_type"`
|
||||||
|
Value string `json:"value"`
|
||||||
|
}
|
||||||
|
@ -122,3 +122,16 @@ type GetAccountDetailReq struct {
|
|||||||
type GetAccountDetailRsp struct {
|
type GetAccountDetailRsp struct {
|
||||||
AccountInfo *AccountDetailInfo `json:"account_info"`
|
AccountInfo *AccountDetailInfo `json:"account_info"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetWhiteListAllRsp struct {
|
||||||
|
List []*WhiteListInfo `json:"list"` // type value
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetRoleDetailReq struct {
|
||||||
|
ServerConfId string
|
||||||
|
RoleId string
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetRoleDetailRsp struct {
|
||||||
|
RoleInfo *RoleDetailInfo `json:"role_info"`
|
||||||
|
}
|
||||||
|
30
admin/lib/cdn/tencent.go
Normal file
30
admin/lib/cdn/tencent.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package cdn
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
v20180606 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn/v20180606"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func PurgeTxCdnPath(secretId, secretKey, region, path string) error {
|
||||||
|
|
||||||
|
c, err := v20180606.NewClientWithSecretId(secretId, secretKey, region)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("NewClientWithSecretId error:%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx, cf := context.WithTimeout(context.Background(), time.Second*10)
|
||||||
|
defer cf()
|
||||||
|
|
||||||
|
flush := "flush"
|
||||||
|
req := v20180606.NewPurgePathCacheRequest()
|
||||||
|
req.Paths = []*string{
|
||||||
|
&path,
|
||||||
|
}
|
||||||
|
req.FlushType = &flush
|
||||||
|
|
||||||
|
_, err = c.PurgePathCacheWithContext(ctx, req)
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
10
admin/lib/cdn/tencent_test.go
Normal file
10
admin/lib/cdn/tencent_test.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package cdn
|
||||||
|
|
||||||
|
import "testing"
|
||||||
|
|
||||||
|
func TestTx(t *testing.T) {
|
||||||
|
err := PurgeTxCdnPath("https://cdn.ttsj.gamegold.net.cn")
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
@ -6,10 +6,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestDfs(t *testing.T) {
|
func TestDfs(t *testing.T) {
|
||||||
c := newCos()
|
secretId := "AKIDqZ6SbXGsX6UffS4VnskRvEQXWLzQ2Xpu"
|
||||||
data, err := c.GetObj("Default_Update/AndroidTest/REMAIN-ServerList.bytes")
|
secretKey := "BDBlGajfQ2ShjZCbnv581jEZiy3vZ4MR"
|
||||||
|
region := "ap-chengdu"
|
||||||
|
|
||||||
|
cosClient := NewDfsCos(secretId, secretKey, "tools-1359624709", region)
|
||||||
|
err := cosClient.PutObj("/test", []byte("hello"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
log.Printf("file content:%v", string(data))
|
log.Printf("file content put ok")
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Vite App</title>
|
<title>Vite App</title>
|
||||||
<script type="module" crossorigin src="/static/js/index-C3w7fvZ6.js"></script>
|
<script type="module" crossorigin src="/static/js/index-LJvZJS40.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/static/js/vendor-CF1QNs3T.js">
|
<link rel="modulepreload" crossorigin href="/static/js/vendor-CF1QNs3T.js">
|
||||||
<link rel="stylesheet" crossorigin href="/static/css/vendor-DnLjZ1mj.css">
|
<link rel="stylesheet" crossorigin href="/static/css/vendor-DnLjZ1mj.css">
|
||||||
<link rel="stylesheet" crossorigin href="/static/css/index-BqAGgcXq.css">
|
<link rel="stylesheet" crossorigin href="/static/css/index-BqAGgcXq.css">
|
||||||
|
1
admin/ui/static/static/js/Login-CFsi5IIB.js
Normal file
1
admin/ui/static/static/js/Login-CFsi5IIB.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{r as e,ab as a,a as s,o,d as r,b as l,w as n,a0 as t,a3 as u,ac as d,W as i,v as p,$ as c,a9 as m,I as v}from"./vendor-CF1QNs3T.js";import{_ as f,u as _,r as g}from"./index-LJvZJS40.js";const y={class:"login-box"},h={class:m({container:!0,animate__animated:!0,animate__flipInX:!0})},w={class:"form-container sign-in-container"},b=f({__name:"Login",setup(m){e(void 0);const{proxy:f}=a(),b=e({user:"",password:""}),V={user:[{required:!0,trigger:"blur",message:"请输入您的账号"}],password:[{required:!0,trigger:"blur",message:"请输入您的密码"}]},x=e=>{e&&f.$refs.ruleFormRef.validate((e=>{if(!e)return console.log("error submit!"),!1;_().login(b.value.user,b.value.password).then((()=>{console.log("登录成功,推送首页。。"),g.push({path:"/welcome"})}),(e=>{})).catch((()=>{v.error("login response error")}))}))};return(e,a)=>{const m=u,v=t,f=i,_=c;return o(),s("div",y,[r("div",h,[r("div",w,[l(_,{ref:"ruleFormRef",model:b.value,"status-icon":"",rules:V,class:"form"},{default:n((()=>[l(v,{class:"form-item",prop:"username"},{default:n((()=>[l(m,{modelValue:b.value.user,"onUpdate:modelValue":a[0]||(a[0]=e=>b.value.user=e),placeholder:"用户名",autocomplete:"off",onKeyup:a[1]||(a[1]=d((e=>x(b.value)),["enter"]))},null,8,["modelValue"])])),_:1}),l(v,{class:"form-item",prop:"password"},{default:n((()=>[l(m,{modelValue:b.value.password,"onUpdate:modelValue":a[2]||(a[2]=e=>b.value.password=e),placeholder:"密码",type:"password",autocomplete:"off",onKeyup:a[3]||(a[3]=d((e=>x(b.value)),["enter"]))},null,8,["modelValue"])])),_:1}),l(f,{class:"theme-button",type:"primary",onClick:a[4]||(a[4]=e=>x(b.value)),onKeydown:a[5]||(a[5]=d((e=>{var a;13!==a.keyCode&&100!==a.keyCode||x(b.value)}),["enter"]))},{default:n((()=>a[6]||(a[6]=[p("登 陆 ")]))),_:1})])),_:1},8,["model"])]),a[7]||(a[7]=r("div",{class:"overlay_container"},[r("div",{class:"overlay"},[r("div",{class:"overlay_panel overlay_right_container"},[r("h2",{class:"container-title"},"hello friend!"),r("p",null,"输入您的个人信息,以便使用后台管理系统")])])],-1))])])}}},[["__scopeId","data-v-68d4afe9"]]);export{b as default};
|
2
admin/ui/static/static/js/analyseIndex-B5krW9C6.js
Normal file
2
admin/ui/static/static/js/analyseIndex-B5krW9C6.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/index-BnmEv7wz.js","static/js/index-LJvZJS40.js","static/js/vendor-CF1QNs3T.js","static/css/vendor-DnLjZ1mj.css","static/css/index-BqAGgcXq.css","static/css/index-DCz6qoKM.css","static/js/index-BFrqYHVS.js","static/css/index-BPoLGm0d.css"])))=>i.map(i=>d[i]);
|
||||||
|
import{b as s}from"./index-LJvZJS40.js";import{c as a,o as e,w as t,b as n,u as r,ad as o,D as _}from"./vendor-CF1QNs3T.js";const i={__name:"analyseIndex",setup(i){const d=o((()=>s((()=>import("./index-BnmEv7wz.js")),__vite__mapDeps([0,1,2,3,4,5])))),c=o((()=>s((()=>import("./index-BFrqYHVS.js")),__vite__mapDeps([6,2,3,1,4,7]))));return(s,o)=>{const i=_;return e(),a(i,{class:"bi_container",direction:"vertical"},{default:t((()=>[n(r(d)),n(r(c))])),_:1})}}};export{i as default};
|
2
admin/ui/static/static/js/analyseMainContent-Cz5woqW6.js
Normal file
2
admin/ui/static/static/js/analyseMainContent-Cz5woqW6.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/analyseMainContentLeft-BBFFb3Wu.js","static/js/index-LJvZJS40.js","static/js/vendor-CF1QNs3T.js","static/css/vendor-DnLjZ1mj.css","static/css/index-BqAGgcXq.css","static/css/analyseMainContentLeft-CKg7AoA4.css","static/js/analyseMainContentRight-XU-9vgup.js","static/css/analyseMainContentRight-DqjIe2oH.css"])))=>i.map(i=>d[i]);
|
||||||
|
import{_ as n,b as a}from"./index-LJvZJS40.js";import{c as e,o,w as s,b as t,u as l,am as f,ad as i,an as m}from"./vendor-CF1QNs3T.js";const u=n({__name:"analyseMainContent",props:{analyseCustomInfo:{analyseName:"",leftPaneInfo:{paneComponent:null},rightPaneInfo:{paneComponent:null}}},setup(n){const u=n;console.log("custom info:",u.analyseCustomInfo);const _=i((()=>a((()=>import("./analyseMainContentLeft-BBFFb3Wu.js")),__vite__mapDeps([0,1,2,3,4,5])))),p=i((()=>a((()=>import("./analyseMainContentRight-XU-9vgup.js")),__vite__mapDeps([6,1,2,3,4,7]))));return(a,i)=>(o(),e(l(m),null,{default:s((()=>[t(l(f),{size:"25","min-size":"20","max-size":"40"},{default:s((()=>[t(l(_),{paneInfo:n.analyseCustomInfo.leftPaneInfo},null,8,["paneInfo"])])),_:1}),t(l(f),{size:"75","min-size":"60","max-size":"80"},{default:s((()=>[t(l(p),{paneInfo:n.analyseCustomInfo.rightPaneInfo},null,8,["paneInfo"])])),_:1})])),_:1}))}},[["__scopeId","data-v-5ab4c275"]]);export{u as default};
|
@ -0,0 +1 @@
|
|||||||
|
import{_ as n}from"./index-LJvZJS40.js";import{a,o as e,c as o,B as s}from"./vendor-CF1QNs3T.js";const t={class:"contentPane"},p=n({__name:"analyseMainContentLeft",props:{paneInfo:{paneComponent:null}},setup:n=>(p,d)=>(e(),a("div",t,[(e(),o(s(n.paneInfo.paneComponent)))]))},[["__scopeId","data-v-5e99bb1d"]]);export{p as default};
|
@ -0,0 +1,2 @@
|
|||||||
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/analyseMainContentRightToolbar-D7pcVtwD.js","static/js/vendor-CF1QNs3T.js","static/css/vendor-DnLjZ1mj.css","static/js/index-LJvZJS40.js","static/css/index-BqAGgcXq.css","static/css/analyseMainContentRightToolbar-CCLHpzDP.css","static/js/analyseMainContentRightResult-BgtTye4g.js","static/css/analyseMainContentRightResult-DBbfxKRW.css"])))=>i.map(i=>d[i]);
|
||||||
|
import{_ as a,b as s}from"./index-LJvZJS40.js";import{a as t,o as n,d as o,b as e,u as r,ad as l}from"./vendor-CF1QNs3T.js";const _={class:"result"},i={class:"resultToolbar"},d={class:"resultContent"},p=a({__name:"analyseMainContentRight",props:{paneInfo:{paneComponent:null}},setup(a){const p=l((()=>s((()=>import("./analyseMainContentRightToolbar-D7pcVtwD.js")),__vite__mapDeps([0,1,2,3,4,5])))),u=l((()=>s((()=>import("./analyseMainContentRightResult-BgtTye4g.js")),__vite__mapDeps([6,1,2,3,4,7]))));return(a,s)=>(n(),t("div",_,[o("div",i,[e(r(p))]),o("div",d,[e(r(u))])]))}},[["__scopeId","data-v-c93e8dd8"]]);export{p as default};
|
@ -0,0 +1 @@
|
|||||||
|
import{r as a,T as e,aw as t,a as l,o as s,d as n,b as d,aa as i,w as r,aj as u,ax as f,W as o,v as c,a7 as y,X as p,Y as _,t as x,F as m,ay as g}from"./vendor-CF1QNs3T.js";import{_ as h}from"./index-LJvZJS40.js";const w={class:"clearfix",style:{width:"100%","text-align":"center",display:"flex","align-items":"center","justify-content":"center"}},v={style:{width:"100%",height:"1px",display:"flex","align-items":"center","justify-content":"center"}},b={href:"#"},A={href:"#"},j={href:"#"},P={href:"#"},z={href:"#"},R=h({__name:"analyseMainContentRightResult",setup(h){const R=a(null);let E=null;const L=a([{metric:"APP关闭.总次数",stageAcc:"426",day20250530:"49",day20250531:"70",day20250601:"61",day20250602:"78"},{metric:"APP打开.总次数",stageAcc:"401",day20250530:"45",day20250531:"63",day20250601:"45",day20250602:"32"}]),k=()=>{null==E||E.resize()};return e((()=>{(()=>{if(R.value){E=g(R.value);const a={title:{text:"事件分析图"},tooltip:{},legend:{data:["销量"]},xAxis:{data:["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]},yAxis:{},series:[{name:"销量",type:"bar",data:[5,20,36,10,10,20]}]};E.setOption(a)}})(),window.addEventListener("resize",k)})),t((()=>{window.removeEventListener("resize",k),null==E||E.dispose()})),(a,e)=>{const t=i,g=o,h=f,E=u,k=y,C=_,F=p;return s(),l(m,null,[n("div",w,[n("div",{ref_key:"chartRef",ref:R,style:{width:"100%",height:"400px",margin:"10px 0 0 10px"}},null,512)]),n("div",v,[d(t,{style:{width:"90%"},"content-position":"center"})]),d(k,{style:{"margin-top":"10px","margin-bottom":"10px","margin-left":"10px"}},{default:r((()=>[d(E,{span:6},{default:r((()=>[d(h,null,{default:r((()=>[d(g,null,{default:r((()=>e[0]||(e[0]=[c("合并")]))),_:1}),d(g,null,{default:r((()=>e[1]||(e[1]=[c("平铺")]))),_:1})])),_:1})])),_:1}),d(E,{span:10,offset:8},{default:r((()=>[d(h,{style:{float:"right","margin-right":"20px"}},{default:r((()=>[d(g,null,{default:r((()=>e[2]||(e[2]=[c("按日期")]))),_:1}),d(g,null,{default:r((()=>e[3]||(e[3]=[c("阶段汇总配置")]))),_:1}),d(g,null,{default:r((()=>e[4]||(e[4]=[c("导出")]))),_:1})])),_:1})])),_:1})])),_:1}),d(k,null,{default:r((()=>[d(F,{data:L.value},{default:r((()=>[d(C,{prop:"metric",label:"指标"}),d(C,{label:"阶段汇总"},{default:r((a=>[n("a",b,x(a.row.stageAcc),1)])),_:1}),d(C,{label:"2025-05-30(五)"},{default:r((a=>[n("a",A,x(a.row.day20250530),1)])),_:1}),d(C,{label:"2025-05-31(六)"},{default:r((a=>[n("a",j,x(a.row.day20250531),1)])),_:1}),d(C,{label:"2025-06-01(日)"},{default:r((a=>[n("a",P,x(a.row.day20250601),1)])),_:1}),d(C,{label:"2025-06-02(一)"},{default:r((a=>[n("a",z,x(a.row.day20250602),1)])),_:1})])),_:1},8,["data"])])),_:1})],64)}}},[["__scopeId","data-v-b8b97447"]]);export{R as default};
|
@ -0,0 +1 @@
|
|||||||
|
import{r as e,aq as a,T as l,a as t,o as s,b as n,a4 as d,l as o,w as r,d as u,t as c,ar as p,a7 as i,v,W as m,p as f,as as g,at as _,au as b,av as x,c as h,aj as y,F as T,z as k,u as C,E as P,B as V}from"./vendor-CF1QNs3T.js";import{_ as w}from"./index-LJvZJS40.js";function D(){const e=new Date;return e.setHours(0,0,0,0),e}const j={class:"timeRangePicker"},E={__name:"dateDayRanger",setup(o){const r=e("过去7天"),u=D();u.setTime(u.getTime()-6048e5);const c=D(),p=e([u,c]);a((()=>{console.log(`选择日期范围:${r.value[0]} 到 ${r.value[1]}`)})),l((()=>{}));const i=[{text:"昨日",value:()=>{const e=D(),a=D();return e.setTime(e.getTime()-864e5),[e,a]}},{text:"今日",value:()=>[D(),D()]},{text:"过去7天",value:()=>[u,c]},{text:"本月",value:()=>{const e=D(),a=D();return e.setDate(1),[e,a]}}];return(e,a)=>{const l=d;return s(),t("div",j,[n(l,{teleported:!1,modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=e=>r.value=e),type:"daterange","range-separator":"到","start-placeholder":"Start date","end-placeholder":"End date",shortcuts:i,"default-time":p.value},null,8,["modelValue","default-time"])])}}},I={class:"dateDaySelect clearfix"},R=["title"],S={style:{"margin-right":"10px"}},B={class:"timePickerPane"},U=w({__name:"dateDaySelect",setup(a){const l=e("按天"),d=[{label:"按天",value:"按天"},{label:"按分钟",value:"按分钟",children:[{label:"1分钟",value:"1分钟"},{label:"5分钟",value:"5分钟"},{label:"10分钟",value:"10分钟"}]},{label:"按小时",value:"按小时"},{label:"按周",value:"按周"},{label:"按月",value:"按月"},{label:"按季度",value:"按季度"},{label:"按年",value:"按年"},{label:"合计",value:"合计"}],_=e("今日"),b=()=>{};return(e,a)=>{const x=p,h=o("Calendar"),y=f,T=m,k=i,C=g;return s(),t("div",I,[n(x,{popperClass:"cascaderPopper",modelValue:l.value,"onUpdate:modelValue":a[0]||(a[0]=e=>l.value=e),options:d,"show-all-levels":!1,props:{expandTrigger:"hover",emitPath:!1}},{default:r((({data:e})=>[u("span",{title:e.label},c(e.value),9,R)])),_:1},8,["modelValue"]),n(C,{placement:"bottom-start",trigger:"click",width:800,onClick:b,"popper-style":"box-shadow: rgb(14 18 22 / 35%) 0px 10px 38px -10px, rgb(14 18 22 / 20%) 0px 10px 20px -15px; padding: 0px;"},{reference:r((()=>[n(T,{style:{"margin-left":"10px"}},{default:r((()=>[u("p",S,c(_.value),1),n(y,{class:"el-icon--right"},{default:r((()=>[n(h)])),_:1})])),_:1})])),default:r((()=>[u("div",B,[n(k,null,{default:r((()=>a[1]||(a[1]=[v("日期范围")]))),_:1}),n(k,null,{default:r((()=>[n(E)])),_:1})])])),_:1})])}}},[["__scopeId","data-v-65ce36af"]]),$=w({__name:"analyseMainContentRightToolbar",setup(a){const l=e([{comp:_,desc:"趋势图",selected:!0},{comp:b,desc:"上升图",selected:!1},{comp:x,desc:"饼图",selected:!1}]);return(e,a)=>{const d=y,o=m,u=P,c=i;return s(),h(c,{gutter:20,align:"middle",class:"toolbarPane"},{default:r((()=>[n(d,{span:6},{default:r((()=>[n(U,{style:{"margin-left":"10px"}})])),_:1}),n(d,{span:6,offset:12},{default:r((()=>[n(c,{style:{height:"100%"},align:"middle",justify:"end"},{default:r((()=>[(s(!0),t(T,null,k(C(l),((e,a)=>(s(),h(u,{placement:"top",effect:"light",content:e.desc},{default:r((()=>[n(o,{disabled:e.selected,class:"chartBtn",onClick:a=>(e=>{l.value.forEach((a=>{a.selected=a.desc===e.desc}))})(e)},{default:r((()=>[(s(),h(V(e.comp),{class:"chartIcon"}))])),_:2},1032,["disabled","onClick"])])),_:2},1032,["content"])))),256))])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-584d9183"]]);export{$ as default};
|
1
admin/ui/static/static/js/analyseMainHeader-DRszmijl.js
Normal file
1
admin/ui/static/static/js/analyseMainHeader-DRszmijl.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{l as a,a as s,o as l,b as n,w as e,d as t,p as o,aj as d,al as r,n as p,W as f,v as u,F as i}from"./vendor-CF1QNs3T.js";import{_ as c}from"./index-LJvZJS40.js";const _={class:"headerAnalyseDesc"},b={class:"headerAnalyseToolbar",style:{display:"flex",float:"right"}},h={class:"toolbarSpan"},S={class:"toolbarSpan"},g={class:"toolbarSpan"},m={class:"toolbarSpan"},v={class:"toolbarSpan"};const y=c({},[["render",function(c,y){const x=a("Warning"),j=o,w=d,z=r,A=f,D=p,T=a("Refresh"),W=a("Download");return l(),s(i,null,[n(w,{span:6},{default:e((()=>[t("div",_,[y[0]||(y[0]=t("p",{style:{"margin-right":"6px","font-weight":"bold"}},"事件分析",-1)),n(j,{size:"20"},{default:e((()=>[n(x)])),_:1})])])),_:1}),n(w,{span:10,offset:8},{default:e((()=>[t("div",b,[y[3]||(y[3]=t("span",{class:"toolbarSpan"},[t("p",null,"近似计算")],-1)),t("span",h,[n(z)]),t("span",S,[n(D,null,{default:e((()=>[n(A,null,{default:e((()=>y[1]||(y[1]=[u(" UTC +8 ")]))),_:1})])),_:1})]),t("span",g,[n(A,null,{default:e((()=>[n(j,{size:"20"},{default:e((()=>[n(T)])),_:1})])),_:1})]),t("span",m,[n(A,null,{default:e((()=>[n(j,{size:"20"},{default:e((()=>[n(W)])),_:1})])),_:1})]),t("span",v,[n(A,null,{default:e((()=>y[2]||(y[2]=[u("已存报表")]))),_:1})])])])),_:1})],64)}],["__scopeId","data-v-1b836963"]]);export{y as default};
|
2
admin/ui/static/static/js/analyseMainIndex-DNGjbsxa.js
Normal file
2
admin/ui/static/static/js/analyseMainIndex-DNGjbsxa.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/analyseMainHeader-DRszmijl.js","static/js/vendor-CF1QNs3T.js","static/css/vendor-DnLjZ1mj.css","static/js/index-LJvZJS40.js","static/css/index-BqAGgcXq.css","static/css/analyseMainHeader-R7amk0nh.css","static/js/analyseMainContent-Cz5woqW6.js","static/css/analyseMainContent-BvJwrdRn.css"])))=>i.map(i=>d[i]);
|
||||||
|
import{_ as a,b as n}from"./index-LJvZJS40.js";import{a as s,o as e,b as o,w as t,u as l,ad as _,a7 as r}from"./vendor-CF1QNs3T.js";const m={class:"analyseMain"},p=a({__name:"analyseMainIndex",props:{analyseCustomInfo:{analyseName:"",leftPaneInfo:{paneComponent:null},rightPaneInfo:{paneComponent:null}}},setup(a){const p=_((()=>n((()=>import("./analyseMainHeader-DRszmijl.js")),__vite__mapDeps([0,1,2,3,4,5])))),u=_((()=>n((()=>import("./analyseMainContent-Cz5woqW6.js")),__vite__mapDeps([6,3,1,2,4,7]))));return(n,_)=>{const i=r;return e(),s("div",m,[o(i,{class:"analyseMainHeader"},{default:t((()=>[o(l(p))])),_:1}),o(i,{class:"analyseMainContent"},{default:t((()=>[o(l(u),{analyseCustomInfo:a.analyseCustomInfo},null,8,["analyseCustomInfo"])])),_:1})])}}},[["__scopeId","data-v-33346a41"]]);export{p as default};
|
@ -0,0 +1 @@
|
|||||||
|
import{a,o as e,d as s,b as r,w as i,c as t,B as o,ai as d,v as n,W as l}from"./vendor-CF1QNs3T.js";import{_ as c}from"./index-LJvZJS40.js";const p={class:"editorContainer .clearfix"},f={class:"editorOperationArea"},u={class:"editorFinishArea"},_={class:"editorFinishBtns"},v=c({__name:"analyseMetricEditorLayout",props:{editorAreaInfo:{editorPane:null}},setup:c=>(v,m)=>{const y=d,A=l;return e(),a("div",p,[s("div",f,[r(y,null,{default:i((()=>[(e(),t(o(c.editorAreaInfo.editorPane)))])),_:1})]),s("div",u,[s("div",_,[r(A,{size:"large"},{default:i((()=>m[0]||(m[0]=[n(" 保存 ")]))),_:1}),r(A,{type:"primary",size:"large"},{default:i((()=>m[1]||(m[1]=[n(" 计算 ")]))),_:1})])])])}},[["__scopeId","data-v-94c97751"]]);export{v as default};
|
1
admin/ui/static/static/js/character-B16Mipwf.js
Normal file
1
admin/ui/static/static/js/character-B16Mipwf.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{t as e}from"./tableUser-nC1otqvh.js";import{u as r,L as t}from"./index-LJvZJS40.js";import{a as s,o as a,c as o,B as c}from"./vendor-CF1QNs3T.js";import"./resource-CwHDajD6.js";import"./empty-DQx4BvVj.js";const m={__name:"character",setup(m){let u={meta:{desc:"character",resource:"character",resource_url:"/resource/character",methods:{get:!0,post:!0,put:!0,delete:!0}}};return"admin"!==r().userInfo.character&&(u.meta.methods={}),t.setCache("resource",u),(r,t)=>(a(),s("div",null,[(a(),o(c(e)))]))}};export{m as default};
|
1
admin/ui/static/static/js/dashboardIndex-itBpbuca.js
Normal file
1
admin/ui/static/static/js/dashboardIndex-itBpbuca.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as r}from"./index-LJvZJS40.js";import"./vendor-CF1QNs3T.js";const e=r({},[["render",function(r,e){return" 看板界面 "}]]);export{e as default};
|
1
admin/ui/static/static/js/empty-DQx4BvVj.js
Normal file
1
admin/ui/static/static/js/empty-DQx4BvVj.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{c as o,o as r,ah as s}from"./vendor-CF1QNs3T.js";import{_ as n}from"./index-LJvZJS40.js";const e=n({},[["render",function(n,e){const t=s;return r(),o(t,{description:"没有权限!请联系管理员添加权限!"})}]]);export{e};
|
2
admin/ui/static/static/js/event-BiZpcwTq.js
Normal file
2
admin/ui/static/static/js/event-BiZpcwTq.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/analyseMetricEditorLayout-DCNiBhQR.js","static/js/vendor-CF1QNs3T.js","static/css/vendor-DnLjZ1mj.css","static/js/index-LJvZJS40.js","static/css/index-BqAGgcXq.css","static/css/analyseMetricEditorLayout-C535QVBW.css","static/js/index-Be23xJVe.js","static/css/index-B3tO-Skr.css","static/js/analyseMainIndex-DNGjbsxa.js","static/css/analyseMainIndex-tuhwk4Nv.css"])))=>i.map(i=>d[i]);
|
||||||
|
import{b as e}from"./index-LJvZJS40.js";import{r as n,c as a,o as t,ad as o,B as s,u as r}from"./vendor-CF1QNs3T.js";const _={__name:"analyseMetricEditorEvent",setup(_){const i=o((()=>e((()=>import("./analyseMetricEditorLayout-DCNiBhQR.js")),__vite__mapDeps([0,1,2,3,4,5])))),m={editorPane:o((()=>e((()=>import("./index-Be23xJVe.js")),__vite__mapDeps([6,3,1,2,4,7]))))};return n(""),(e,n)=>(t(),a(s(r(i)),{editorAreaInfo:m}))}},i={__name:"event",setup(n){const s=o((()=>e((()=>import("./analyseMainIndex-DNGjbsxa.js")),__vite__mapDeps([8,3,1,2,4,9])))),i={analyseName:"事件分析",leftPaneInfo:{paneComponent:_},rightPaneInfo:{paneComponent:_}};return(e,n)=>(t(),a(r(s),{analyseCustomInfo:i}))}};export{i as default};
|
1
admin/ui/static/static/js/groupBySelect-C3Kw75yP.js
Normal file
1
admin/ui/static/static/js/groupBySelect-C3Kw75yP.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{r as e,l as a,c as l,o as t,w as o,b as r,u as p,a8 as s,a7 as u}from"./vendor-CF1QNs3T.js";import{_ as n}from"./index-LJvZJS40.js";const m=n({__name:"groupBySelect",setup(n){const m=e([{label:"用户属性",options:[{value:"account_id",label:"游戏账号",meta:{propertyType:2}},{value:"role_id",label:"角色id",meta:{propertyType:2}},{value:"role_name",label:"角色名",meta:{propertyType:2}}]},{label:"事件属性",options:[{value:"item_id",label:"道具id",meta:{propertyType:2}},{value:"item_name",label:"道具名",meta:{propertyType:2}},{value:"cur_num",label:"cur_num",meta:{propertyType:2}}]}]),i=e("");return(e,n)=>{const y=a("a-select"),c=u;return t(),l(c,{class:"groupByOneArea"},{default:o((()=>[r(y,{showArrow:"",value:p(i),"onUpdate:value":n[0]||(n[0]=e=>s(i)?i.value=e:null),options:p(m),onChange:n[1]||(n[1]=()=>{}),style:{width:"100px",margin:"0"}},null,8,["value","options"])])),_:1})}}},[["__scopeId","data-v-5cb43c01"]]);export{m as default};
|
1
admin/ui/static/static/js/history-Byfnc3nD.js
Normal file
1
admin/ui/static/static/js/history-Byfnc3nD.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{r as e,T as a,a as l,o as t,c as o,u,B as n,F as s,U as p,w as r,b as d,V as i,a7 as v,a3 as m,a8 as c,W as g,v as h,C as y,d as f,X as V,Y as b,Z as x,D as w,a9 as I}from"./vendor-CF1QNs3T.js";import{_ as k,u as _,a as C}from"./index-LJvZJS40.js";import{e as U}from"./empty-DQx4BvVj.js";const z={class:"table-content"},j={class:"table"},D={class:"pagination-container"},R=k({__name:"history",props:{rowInfo:{},disableConditionInput:!0},setup(k){const R=k;let S=!0;!1===R.disableConditionInput&&(S=!1);const T="admin"===_().userInfo.character,A=e(T),B=e(1),F=e(20),G=e(R.userId);R.rowInfo&&void 0!==R.rowInfo.ID&&(G.value=R.rowInfo.ID);const K=e(""),N=e(""),P=e(""),W=e(""),X=e(!1),Y=[20,50,100],Z=e(0),q=e([]),E=()=>{C(B.value,F.value,G.value,K.value,N.value,P.value,W.value).then((e=>{q.value=e.data.list,Z.value=e.data.totalCount,X.value=!0}),(e=>{}))};a((()=>{E()}));const H=()=>{G.value="",K.value="",N.value="",P.value="",W.value=""},J=e=>{Z.value<=0||F.value*B.value>Z.value&&q.value.length>=Z.value||E()},L=e=>{E()};return(e,a)=>{const k=m,_=g,C=v,R=i,T=b,M=V,O=x,Q=y,$=w;return t(),l("div",{class:I(u(S)?"app-content1":"app-content")},[u(A)?(t(),l(s,{key:1},[u(X)?(t(),o($,{key:0},{default:r((()=>[d(R,{style:{"margin-bottom":"10px"}},{default:r((()=>[d(C,null,{default:r((()=>[!1===u(S)?(t(),o(k,{key:0,modelValue:u(G),"onUpdate:modelValue":a[0]||(a[0]=e=>c(G)?G.value=e:null),placeholder:"用户id",style:{width:"150px","margin-right":"10px"}},null,8,["modelValue"])):p("",!0),!1===u(S)?(t(),o(k,{key:1,modelValue:u(K),"onUpdate:modelValue":a[1]||(a[1]=e=>c(K)?K.value=e:null),placeholder:"操作资源类型",style:{width:"150px","margin-right":"10px"}},null,8,["modelValue"])):p("",!0),!1===u(S)?(t(),o(k,{key:2,modelValue:u(N),"onUpdate:modelValue":a[2]||(a[2]=e=>c(N)?N.value=e:null),placeholder:"操作资源组",style:{width:"150px","margin-right":"10px"}},null,8,["modelValue"])):p("",!0),!1===u(S)?(t(),o(k,{key:3,modelValue:u(P),"onUpdate:modelValue":a[3]||(a[3]=e=>c(P)?P.value=e:null),placeholder:"操作对象",style:{width:"150px","margin-right":"10px"}},null,8,["modelValue"])):p("",!0),!1===u(S)?(t(),o(k,{key:4,modelValue:u(W),"onUpdate:modelValue":a[4]||(a[4]=e=>c(W)?W.value=e:null),placeholder:"操作方法",style:{width:"150px","margin-right":"10px"}},null,8,["modelValue"])):p("",!0),!1===u(S)?(t(),o(_,{key:5,onClick:E,type:"primary",style:{"margin-right":"10px"}},{default:r((()=>a[7]||(a[7]=[h("条件搜索 ")]))),_:1})):p("",!0),!1===u(S)?(t(),o(_,{key:6,onClick:H},{default:r((()=>a[8]||(a[8]=[h("清空条件")]))),_:1})):p("",!0)])),_:1})])),_:1}),d(Q,null,{default:r((()=>[f("div",z,[f("div",j,[d(M,{data:u(q),style:{width:"100%"},"table-layout":"auto",stripe:"","tooltip-effect":"light"},{default:r((()=>[d(T,{prop:"userId",label:"用户id"}),d(T,{prop:"userName",label:"用户名"}),d(T,{prop:"opResourceType",label:"操作资源类型"}),d(T,{prop:"opResourceGroup",label:"操作资源组"}),d(T,{prop:"opResourceKey",label:"操作对象"}),d(T,{prop:"method",label:"操作方法"}),d(T,{prop:"createdAt",label:"创建时间"}),d(T,{prop:"detailInfo",label:"详情数据","show-overflow-tooltip":""})])),_:1},8,["data"])]),f("div",D,[d(O,{"current-page":u(B),"onUpdate:currentPage":a[5]||(a[5]=e=>c(B)?B.value=e:null),"page-size":u(F),"onUpdate:pageSize":a[6]||(a[6]=e=>c(F)?F.value=e:null),"page-sizes":Y,layout:"total, sizes, prev, pager, next, jumper",total:u(Z),onSizeChange:J,onCurrentChange:L},null,8,["current-page","page-size","total"])])])])),_:1})])),_:1})):p("",!0)],64)):(t(),o(n(U),{key:0}))],2)}}},[["__scopeId","data-v-926d7759"]]);export{R as t};
|
1
admin/ui/static/static/js/history-DrEUg83C.js
Normal file
1
admin/ui/static/static/js/history-DrEUg83C.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{t as s}from"./history-Byfnc3nD.js";import{c as o,o as t,B as i}from"./vendor-CF1QNs3T.js";import"./index-LJvZJS40.js";import"./empty-DQx4BvVj.js";const r={__name:"history",setup:r=>(r,a)=>(t(),o(i(s),{disableConditionInput:false}))};export{r as default};
|
1
admin/ui/static/static/js/horizonMenu-BItxjCKh.js
Normal file
1
admin/ui/static/static/js/horizonMenu-BItxjCKh.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{i as a,c as e,o as s,w as n,a as o,F as t,z as l,u as r,y as d,A as i,v as u,t as c,d as h,x as p}from"./vendor-CF1QNs3T.js";import{L as m}from"./index-LJvZJS40.js";const f={__name:"horizonMenu",setup(f){const x=a(),_=m.getCache("resource");console.log("analyse route info:",_);return(a,m)=>{const f=i,v=d,g=p;return s(),e(g,{mode:"horizontal"},{default:n((()=>[(s(!0),o(t,null,l(r(_).children,(a=>(s(),e(v,{index:a.path},{title:n((()=>[h("span",null,c(a.meta.desc),1)])),default:n((()=>[(s(!0),o(t,null,l(a.children,(a=>(s(),e(f,{key:a.path,index:a.path,onClick:e=>{return s=a,console.log("点击资源:",s),void x.push({path:s.path});var s}},{default:n((()=>[u(c(a.meta.desc),1)])),_:2},1032,["index","onClick"])))),128))])),_:2},1032,["index"])))),256))])),_:1})}}};export{f as default};
|
1
admin/ui/static/static/js/index-BFrqYHVS.js
Normal file
1
admin/ui/static/static/js/index-BFrqYHVS.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{i as s,j as a,l as e,c as t,o as i,w as o,C as r}from"./vendor-CF1QNs3T.js";import{_ as l}from"./index-LJvZJS40.js";const n=l({__name:"index",setup:l=>(s(),a(),(s,a)=>{const l=e("router-view"),n=r;return i(),t(n,{class:"bi_main"},{default:o((()=>[(i(),t(l,{key:s.$route.fullPath,style:{display:"inline-block",height:"100%",width:"100%"}}))])),_:1})})},[["__scopeId","data-v-cf4b133f"]]);export{n as default};
|
2
admin/ui/static/static/js/index-Be23xJVe.js
Normal file
2
admin/ui/static/static/js/index-Be23xJVe.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/metricSelect-BKGZ1mr6.js","static/js/vendor-CF1QNs3T.js","static/css/vendor-DnLjZ1mj.css","static/js/index-LJvZJS40.js","static/css/index-BqAGgcXq.css","static/css/metricSelect-NSGkGZUF.css","static/js/groupBySelect-C3Kw75yP.js","static/css/groupBySelect-CFOi4zHL.css","static/js/propertiesConditionFilter-D6dFkcQq.js"])))=>i.map(i=>d[i]);
|
||||||
|
import{_ as e,b as a}from"./index-LJvZJS40.js";import{r as t,T as l,l as s,a as i,o as n,d as o,b as r,w as d,aj as p,a7 as u,W as _,p as f,u as y,ak as m,F as c,z as h,c as g,ad as T}from"./vendor-CF1QNs3T.js";const v={class:"editorAreaOuter"},x={class:"editorAreaInner"},b=e({__name:"index",setup(e){const b=T((()=>a((()=>import("./metricSelect-BKGZ1mr6.js")),__vite__mapDeps([0,1,2,3,4,5])))),j=T((()=>a((()=>import("./groupBySelect-C3Kw75yP.js")),__vite__mapDeps([6,1,2,3,4,7])))),B=T((()=>a((()=>import("./propertiesConditionFilter-D6dFkcQq.js")),__vite__mapDeps([8,3,1,2,4])))),D={userProperties:[{name:"account_id",alias:"账户id",propertyType:2},{name:"account_name",alias:"账户名",propertyType:2},{name:"role_id",alias:"角色id",propertyType:2},{name:"server_id",alias:"服务器id",propertyType:2},{name:"currency_coin",alias:"金币数",propertyType:1}],eventDescList:[{name:"role_login",alias:"角色登录",fields:[{name:"sign_day",alias:"签到天数",propertyType:1}]},{name:"item_change",alias:"item_change",fields:[{name:"item_id",alias:"item_id",propertyType:1},{name:"item_name",alias:"item_name",propertyType:2},{name:"num_before",alias:"num_before",propertyType:1},{name:"num_after",alias:"num_after",propertyType:1},{name:"delta",alias:"delta",propertyType:1}]},{name:"role_logout",alias:"角色登出",fields:[{name:"online_duration",alias:"在线时长",propertyType:1}]}]},R=t(0),w=t([]),A=()=>{const e=R.value+1;R.value+=e,w.value.push(e)},k=e=>{w.value.splice(w.value.indexOf(e),1)},E=t(null),z=()=>{E.value&&E.value.onAddNode()},I=t(0),O=t([]),P=()=>{const e=I.value+1;I.value+=e,O.value.push(e)};return l((()=>{A()})),(e,a)=>{const t=p,l=s("Plus"),T=f,R=_,I=u;return n(),i("div",v,[o("div",x,[r(I,{style:{height:"40px"},align:"middle"},{default:d((()=>[r(t,{span:6},{default:d((()=>a[0]||(a[0]=[o("span",{style:{"font-weight":"bold"}}," 分析指标 ",-1)]))),_:1}),r(t,{span:10,offset:8},{default:d((()=>[r(I,{justify:"end"},{default:d((()=>[r(R,{class:"editorTopRightToolBarBtn",onClick:A},{default:d((()=>[r(T,{size:20},{default:d((()=>[r(l)])),_:1})])),_:1}),r(R,{class:"editorTopRightToolBarBtn"},{default:d((()=>[r(y(m),{style:{"font-size":"20px"}})])),_:1})])),_:1})])),_:1})])),_:1}),r(I,{style:{width:"100%","min-height":"70px"}},{default:d((()=>[(n(!0),i(c,null,h(w.value,((e,a)=>(n(),g(y(b),{key:e,index:e,canDelete:w.value.length>1,onDeleteMetricSelect:k,eventAllData:D},null,8,["index","canDelete"])))),128))])),_:1}),r(I,{style:{height:"30px"}}),r(I,{style:{height:"40px"},align:"middle"},{default:d((()=>[r(t,{span:6},{default:d((()=>a[1]||(a[1]=[o("span",{style:{"font-weight":"bold"}}," 全局筛选 ",-1)]))),_:1}),r(t,{span:10,offset:8},{default:d((()=>[r(I,{justify:"end"},{default:d((()=>[r(R,{class:"editorTopRightToolBarBtn",onClick:z},{default:d((()=>[r(T,{size:20},{default:d((()=>[r(l)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),r(I,{style:{width:"200%","min-height":"0px"}},{default:d((()=>[r(y(B),{ref_key:"globalFilterSelectRef",ref:E},null,512)])),_:1}),r(I,{style:{height:"1px"}}),r(I,{style:{height:"40px"},align:"middle"},{default:d((()=>[r(t,{span:6},{default:d((()=>a[2]||(a[2]=[o("span",{style:{"font-weight":"bold"}}," 分组项 ",-1)]))),_:1}),r(t,{span:10,offset:8},{default:d((()=>[r(I,{justify:"end"},{default:d((()=>[r(R,{class:"editorTopRightToolBarBtn",onClick:P},{default:d((()=>[r(T,{size:20},{default:d((()=>[r(l)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),r(I,{style:{width:"100%","min-height":"70px"}},{default:d((()=>[(n(!0),i(c,null,h(O.value,((e,a)=>(n(),g(y(j))))),256))])),_:1})])])}}},[["__scopeId","data-v-4d718c2b"]]);export{b as default};
|
2
admin/ui/static/static/js/index-BnmEv7wz.js
Normal file
2
admin/ui/static/static/js/index-BnmEv7wz.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/horizonMenu-BItxjCKh.js","static/js/vendor-CF1QNs3T.js","static/css/vendor-DnLjZ1mj.css","static/js/index-LJvZJS40.js","static/css/index-BqAGgcXq.css"])))=>i.map(i=>d[i]);
|
||||||
|
import{_ as s,b as a}from"./index-LJvZJS40.js";import{i as o,c as e,o as r,w as t,b as _,u as n,ad as d,V as i}from"./vendor-CF1QNs3T.js";const c=s({__name:"index",setup(s){o();const c=d((()=>a((()=>import("./horizonMenu-BItxjCKh.js")),__vite__mapDeps([0,1,2,3,4]))));return(s,a)=>{const o=i;return r(),e(o,{class:"bi_header"},{default:t((()=>[_(n(c))])),_:1})}}},[["__scopeId","data-v-cd726624"]]);export{c as default};
|
2
admin/ui/static/static/js/index-LJvZJS40.js
Normal file
2
admin/ui/static/static/js/index-LJvZJS40.js
Normal file
File diff suppressed because one or more lines are too long
1
admin/ui/static/static/js/metricSelect-BKGZ1mr6.js
Normal file
1
admin/ui/static/static/js/metricSelect-BKGZ1mr6.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{r as e,k as l,l as a,a as t,o as i,b as o,w as n,a7 as s,W as u,p as r,d as p}from"./vendor-CF1QNs3T.js";import{_ as d}from"./index-LJvZJS40.js";const v={class:"editorOperationArea"},c=d({__name:"metricSelect",props:{index:0,canDelete:!0,onDeleteMetricSelect:null,eventAllData:{}},setup(d){const c=d.eventAllData,f=e(""),h=e([]);c.eventDescList.forEach((e=>{let l={value:e.name,label:e.name};void 0!==e.alias&&""!==e.alias&&(l.label=e.alias),h.value.push(l)})),f.value=h.value[0].label;const g=e({}),b={label:"预置指标",options:[{value:"totalCount",label:"总次数",opList:[]},{value:"triggerUserCount",label:"触发用户数",opList:[]},{value:"userAvgCount",label:"人均次数",opList:[]}]},y=["总和","均值","人均值","中位数","最大值","最小值","去重数","方差","标准差","99分位数","95分位数","90分位数","85分位数","80分位数","75分位数","70分位数","60分位数","50分位数","40分位数","30分位数","20分位数","10分位数","5分位数"],m=["totalCount","avg","avgPerUser","median","max","min","distinct","variance","standardDeviation","99qualtile","95qualtile","90qualtile","85qualtile","80qualtile","75qualtile","70qualtile","60qualtile","50qualtile","40qualtile","30qualtile","20qualtile","10qualtile","5qualtile"],w=[],x=[{value:"distinct",label:"去重数"}];for(let e=0;e<y.length;e++)w.push({value:m[e],label:y[e]});const q=e(""),_=e(!0),D=l((()=>{const e=c.eventDescList.find(((e,l)=>e.alias===f.value));if(!e)return[b];g.value=e;let l={label:"用户属性",options:[]},a={label:"事件属性",options:[]};return e.fields.forEach((e=>{let l=[];1===e.propertyType?l=w:2===e.propertyType&&(l=x),a.options.push({value:e.name,label:e.alias,opList:l})})),c.userProperties.forEach((e=>{let a=[];1===e.propertyType?a=w:2===e.propertyType&&(a=x),l.options.push({value:e.name,label:e.alias,opList:a})})),[b,a,l]})),C=e(""),L=l((()=>{let e=[];return D.value.find(((l,a)=>{const t=l.options.find(((e,l)=>e.value===q.value));return!!t&&(e=t.opList,!0)})),C.value="",_.value=0===e.length,e})),A=e=>{},T=(e,l)=>l.value.filter((l=>l.options&&l.options.length>0?l.options.filter((l=>l.includes(e))):l.label.includes(e)));return f.value,(e,l)=>{const c=a("Delete"),g=r,b=u,y=a("a-space"),m=s,w=a("a-select");return i(),t("div",v,[o(m,null,{default:n((()=>[o(m,null,{default:n((()=>[o(m,{justify:"end",style:{width:"100%"}},{default:n((()=>[o(y,{align:"end",style:{float:"right"}},{default:n((()=>[o(b,{class:"editorTopRightToolBarBtn",disabled:!d.canDelete,onClick:l[0]||(l[0]=e=>d.onDeleteMetricSelect(d.index))},{default:n((()=>[o(g,{size:20},{default:n((()=>[o(c)])),_:1})])),_:1},8,["disabled"])])),_:1})])),_:1}),o(y,{size:5},{default:n((()=>[o(w,{showArrow:"","show-search":!0,value:f.value,"onUpdate:value":l[1]||(l[1]=e=>f.value=e),options:h.value,onChange:A,"filter-option":T,style:{width:"100px",margin:"0"}},null,8,["value","options"]),l[6]||(l[6]=p("div",{style:{"background-color":"#202241","border-radius":"5px",width:"25px",height:"25px",display:"flex","justify-content":"center","align-items":"center"}},[p("p",{style:{color:"white",margin:"0"}},"的")],-1)),o(w,{showArrow:"","show-search":"",value:q.value,"onUpdate:value":l[2]||(l[2]=e=>q.value=e),options:D.value,"filter-option":T,onChange:l[3]||(l[3]=()=>{}),style:{width:"100px",margin:"0"}},null,8,["value","options"]),l[7]||(l[7]=p("div",{style:{height:"100%",display:"inline-flex","flex-direction":"column","justify-content":"end"}},[p("p",{style:{color:"black","font-weight":"bold","font-size":"20px",margin:"0"}},"·")],-1)),o(w,{showArrow:"",disabled:_.value,value:C.value,"onUpdate:value":l[4]||(l[4]=e=>C.value=e),"filter-option":T,options:L.value,onChange:l[5]||(l[5]=()=>{}),style:{width:"100px",margin:"0"}},null,8,["disabled","value","options"])])),_:1})])),_:1})])),_:1})])}}},[["__scopeId","data-v-f344ede9"]]);export{c as default};
|
1
admin/ui/static/static/js/project-DHbvE_2q.js
Normal file
1
admin/ui/static/static/js/project-DHbvE_2q.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{t as e}from"./table-B_RcUSc7.js";import{L as s,u as r,c as t}from"./index-LJvZJS40.js";import{i as a,a as o,o as m,c,B as p}from"./vendor-CF1QNs3T.js";import"./resource-CwHDajD6.js";import"./empty-DQx4BvVj.js";const i={__name:"project",setup(i){s.setCache("project",{}),a();let n=t;return"admin"!==r().userInfo.character&&(n.meta.methods={}),s.setCache("resource",n),(s,r)=>(m(),o("div",null,[(m(),c(p(e)))]))}};export{i as default};
|
1
admin/ui/static/static/js/project_op-Bo06iiVY.js
Normal file
1
admin/ui/static/static/js/project_op-Bo06iiVY.js
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@
|
|||||||
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/propertyConditionType-BoDxZPbF.js","static/js/vendor-CF1QNs3T.js","static/css/vendor-DnLjZ1mj.css","static/js/index-LJvZJS40.js","static/css/index-BqAGgcXq.css","static/css/propertyConditionType-NSBzD7rw.css","static/js/propertyConditionFilter-Bb4wHoPL.js","static/css/propertyConditionFilter-CwW-c0Ha.css"])))=>i.map(i=>d[i]);
|
||||||
|
import{b as e}from"./index-LJvZJS40.js";import{S as n,r,c as i,o as d,ad as l,u as o,ao as t}from"./vendor-CF1QNs3T.js";const p={__name:"propertiesConditionFilter",setup(p,{expose:s}){const c=l((()=>e((()=>import("./propertyConditionType-BoDxZPbF.js")),__vite__mapDeps([0,1,2,3,4,5])))),h=l((()=>e((()=>import("./propertyConditionFilter-Bb4wHoPL.js")),__vite__mapDeps([6,1,2,3,4,7])))),u=n({}),a=(e,n)=>{const r=JSON.parse(JSON.stringify(e));n.nodeType=r.nodeType,n.id=r.id,n.children=r.children,n.propertyInfo=r.propertyInfo},f=e=>{if(null===e)return null;if(""!==e.nodeType){if(0===e.children.length)return null;let n=0;for(;!(n>=e.children.length);){let r=e.children[n],i=f(r);null!==i?(e.children[n]=i,n++):e.children.splice(n,1)}1===e.children.length&&a(e.children[0],e)}return e},y=r(0),T=()=>(y.value+=1,y.value),_=e=>{if(null!==e)return e.id=T(),""!==e.nodeType&&e.children.forEach(((n,r)=>{e.children[r]=_(n)})),e},m=(e,n,r,i,d)=>{if(n.id===i)return d(e,n,r),!0;if(""===n.nodeType)return!1;for(let l=0;l<n.children.length;l++){const e=n.children[l];if(m(l,e,n,i,d))return!0}return!1},N=()=>({nodeType:"",id:T(),propertyInfo:{name:"",alias:"",cond:"",value1:"",value2:""},children:[]}),S=e=>{m(0,u,null,e,((e,n,r)=>{if(null===r){const e=JSON.parse(JSON.stringify(n));u.nodeType="and",u.id=e.id,u.children=[t(e),N()]}else r.children.push(N())})),f(u),_(u)};s({onAddNode:()=>{if(void 0===u.nodeType){const e=N();a(e,u)}else""===u.nodeType?S(u.id):u.children.push(N());f(u),_(u)}});const v={showComp:h,onSplitNode:e=>{m(0,u,null,e,((e,n,r)=>{if(null===r){const e=JSON.parse(JSON.stringify(n));u.nodeType="and",u.id=e.id,u.children=[t(e),N()]}else r.children[e]={nodeType:"and",id:T(),children:[n,N()]}})),f(u),_(u)},onAddBrother:S,onDeleteNode:e=>{m(0,u,null,e,((e,n,r)=>{null===r?(u.nodeType=void 0,u.children=[],u.id=void 0):r.children.splice(e,1)})),f(u),_(u)}};return(e,n)=>(d(),i(o(c),{node:o(u),propertyShowHandlerInfo:v},null,8,["node"]))}};export{p as default};
|
@ -0,0 +1 @@
|
|||||||
|
import{r as e,l,a as o,o as t,b as a,w as n,F as r,z as p,u as s,c as u,a8 as i,E as d,W as c,ap as f,p as v}from"./vendor-CF1QNs3T.js";import{_ as m}from"./index-LJvZJS40.js";const y=m({__name:"propertyConditionFilter",props:{propertyHandlerInfo:{propertyInfo:{},onSplitNode:null,onAddBrother:null,onDeleteNode:null}},setup(m){const y=e([{label:"用户属性",options:[{value:"account_id",label:"游戏账号",meta:{propertyType:2}},{value:"role_id",label:"角色id",meta:{propertyType:2}},{value:"role_name",label:"角色名",meta:{propertyType:2}}]},{label:"事件属性",options:[{value:"item_id",label:"道具id",meta:{propertyType:2}},{value:"item_name",label:"道具名",meta:{propertyType:2}},{value:"cur_num",label:"cur_num",meta:{propertyType:2}}]}]),h=[["等于","不等于","小于","小于等于","大于","大于等于","有值","无值","区间"],["eq","ne","st","se","gt","ge","valued","valueless","range"]],_=[["等于","不等于","包括","不包括","有值","无值","正则匹配","正则不匹配"],["eq","ne","contain","exclusive","regmatch","regnotmatch"]],b=e([]),g=e([]);h[0].forEach(((e,l)=>{b.value.push({value:h[1][l],label:h[0][l]})})),_[0].forEach(((e,l)=>{g.value.push({value:_[1][l],label:_[0][l]})}));const w=(e,l)=>l.value.filter((l=>l.options&&l.options.length>0?l.options.filter((l=>l.includes(e))):l.label.includes(e))),I=e(""),T=e(""),x=e([]),C=(e,l)=>{console.log("select value:",e,l)};return(e,h)=>{const _=l("a-select-option"),g=l("a-select-opt-group"),H=l("a-select"),A=c,B=d,z=l("CirclePlus"),N=v,k=l("Delete"),D=l("a-space");return t(),o("div",null,[a(H,{showArrow:"","show-search":"",value:s(I),"onUpdate:value":h[0]||(h[0]=e=>i(I)?I.value=e:null),options:s(y),"filter-option":w,onSelect:C,style:{width:"100px",margin:"0"}},{default:n((()=>[(t(!0),o(r,null,p(s(y),(e=>(t(),u(g,{label:e.label},{default:n((()=>[(t(!0),o(r,null,p(e.options,(e=>(t(),u(_,{value:e,label:e.label},null,8,["value","label"])))),256))])),_:2},1032,["label"])))),256))])),_:1},8,["value","options"]),a(H,{showArrow:"",value:s(T),"onUpdate:value":h[1]||(h[1]=e=>i(T)?T.value=e:null),options:s(b),onChange:h[2]||(h[2]=()=>{}),style:{width:"70px",margin:"0"}},null,8,["value","options"]),a(H,{showArrow:"","show-search":"",mode:"multiple",value:s(x),"onUpdate:value":h[3]||(h[3]=e=>i(x)?x.value=e:null),options:s(b),onChange:h[4]||(h[4]=()=>{}),style:{width:"80px",margin:"0 5px 0 0"}},null,8,["value","options"]),a(D,{size:2},{default:n((()=>[a(B,{effect:"light",content:"裂变",placement:"top"},{default:n((()=>[a(A,{class:"filterToolBtn",onClick:h[5]||(h[5]=e=>m.propertyHandlerInfo.onSplitNode(m.propertyHandlerInfo.propertyInfo.id))},{default:n((()=>[a(s(f),{style:{transform:"rotate(90deg)"}})])),_:1})])),_:1}),a(B,{effect:"light",content:"增加平行节点",placement:"top"},{default:n((()=>[a(A,{class:"filterToolBtn",onClick:h[6]||(h[6]=e=>m.propertyHandlerInfo.onAddBrother(m.propertyHandlerInfo.propertyInfo.id))},{default:n((()=>[a(N,{size:16},{default:n((()=>[a(z)])),_:1})])),_:1})])),_:1}),a(B,{effect:"light",content:"删除",placement:"top"},{default:n((()=>[a(A,{class:"filterToolBtn",onClick:h[7]||(h[7]=e=>m.propertyHandlerInfo.onDeleteNode(m.propertyHandlerInfo.propertyInfo.id))},{default:n((()=>[a(N,{size:16},{default:n((()=>[a(k)])),_:1})])),_:1})])),_:1})])),_:1})])}}},[["__scopeId","data-v-57807f7e"]]);export{y as default};
|
@ -0,0 +1 @@
|
|||||||
|
import{l as e,c as o,U as n,o as d,w as r,d as a,b as l,W as p,a as t,F as s,z as y,a7 as i,B as f}from"./vendor-CF1QNs3T.js";import{_ as c}from"./index-LJvZJS40.js";const h={class:"andOrArea"},u={key:0},I={key:1},w={style:{display:"inline-flex","flex-direction":"column"}},v={key:0,style:{width:"100%",height:"5px"}},H=c({__name:"propertyConditionType",props:{node:{},propertyShowHandlerInfo:{}},setup(c){const H=c;return(S,T)=>{const _=p,m=e("PropertyConditionType",!0),k=i;return void 0!==c.node.nodeType&&""!==c.node.nodeType?(d(),o(k,{key:0,class:"treeNodeArea"},{default:r((()=>[a("div",h,[T[1]||(T[1]=a("div",{class:"andOrWrapLine"},null,-1)),l(_,{class:"andOrBtn",onClick:T[0]||(T[0]=e=>{var o;"and"===(o=c.node).nodeType?o.nodeType="or":o.nodeType="and"})},{default:r((()=>["and"===c.node.nodeType?(d(),t("p",u,"与")):"or"===c.node.nodeType?(d(),t("p",I,"或")):n("",!0)])),_:1}),T[2]||(T[2]=a("div",{class:"andOrWrapLine"},null,-1))]),a("div",w,[(d(!0),t(s,null,y(c.node.children,((e,o)=>(d(),t(s,null,[l(m,{node:e,propertyShowHandlerInfo:c.propertyShowHandlerInfo},null,8,["node","propertyShowHandlerInfo"]),o!==c.node.children.length-1?(d(),t("div",v)):n("",!0)],64)))),256))])])),_:1})):void 0!==c.node.nodeType?(d(),o(k,{key:1,class:"selectNodeArea"},{default:r((()=>[(d(),o(f(c.propertyShowHandlerInfo.showComp),{style:{float:"right"},propertyHandlerInfo:{propertyInfo:c.node,onSplitNode:H.propertyShowHandlerInfo.onSplitNode,onAddBrother:H.propertyShowHandlerInfo.onAddBrother,onDeleteNode:H.propertyShowHandlerInfo.onDeleteNode}},null,8,["propertyHandlerInfo"]))])),_:1})):n("",!0)}}},[["__scopeId","data-v-ac96b3b4"]]);export{H as default};
|
1
admin/ui/static/static/js/resource-CwHDajD6.js
Normal file
1
admin/ui/static/static/js/resource-CwHDajD6.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{s as t}from"./index-LJvZJS40.js";function r(r,e){return t({url:r,method:"get",params:e})}function e(r,e){return t({url:r,method:"post",data:{dto:e}})}function o(r,e){return t({url:r,method:"put",data:{dto:e}})}function n(r,e){return t({url:r,method:"delete",data:e})}function u(r,e){return t({url:r+"/selection",method:"post",data:e})}function a(r){return t({url:"/project/"+r.toString()+"/items",method:"get"})}export{n as a,e as b,o as c,a as d,u as e,r};
|
1
admin/ui/static/static/js/retention-kwEr-emb.js
Normal file
1
admin/ui/static/static/js/retention-kwEr-emb.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as r}from"./index-LJvZJS40.js";import"./vendor-CF1QNs3T.js";const e=r({},[["render",function(r,e){return" 留存分析 "}]]);export{e as default};
|
1
admin/ui/static/static/js/table-B_RcUSc7.js
Normal file
1
admin/ui/static/static/js/table-B_RcUSc7.js
Normal file
File diff suppressed because one or more lines are too long
1
admin/ui/static/static/js/tableUser-nC1otqvh.js
Normal file
1
admin/ui/static/static/js/tableUser-nC1otqvh.js
Normal file
File diff suppressed because one or more lines are too long
1
admin/ui/static/static/js/user-DvMo7-Er.js
Normal file
1
admin/ui/static/static/js/user-DvMo7-Er.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{t as e}from"./tableUser-nC1otqvh.js";import{u as s,L as r}from"./index-LJvZJS40.js";import{t}from"./history-Byfnc3nD.js";import{a as o,o as a,c as m,B as u}from"./vendor-CF1QNs3T.js";import"./resource-CwHDajD6.js";import"./empty-DQx4BvVj.js";const c={__name:"user",setup(c){let n={meta:{desc:"user",resource:"user",resource_url:"/resource/user",methods:{get:!0,post:!0,put:!0,delete:!0}}};"admin"!==s().userInfo.character&&(n.meta.methods={}),r.setCache("resource",n);const i=[];return i.push({key:"user:exec:history",name:"执行记录",btn_color_type:"info",btn_type:1,btn_callback_component:t}),(s,r)=>(a(),o("div",null,[(a(),m(u(e),{rowClickDialogBtns:i}))]))}};export{c as default};
|
1
admin/ui/static/static/js/welcome-FNYN-xCd.js
Normal file
1
admin/ui/static/static/js/welcome-FNYN-xCd.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{a as s,o as a,d as e,b as n,v as t,t as o,u as r,aa as p,F as l}from"./vendor-CF1QNs3T.js";import{u}from"./index-LJvZJS40.js";const f={style:{"font-size":"40px"}},i={style:{color:"darkslategrey","font-size":"50px"}},m={__name:"welcome",setup(m){const c=u().userInfo;return(u,m)=>{const d=p;return a(),s(l,null,[e("span",f,[m[0]||(m[0]=t("亲爱的")),e("span",i,o(r(c).nick_name),1),m[1]||(m[1]=t("!欢迎使用本公司后台管理系统!"))]),n(d),m[2]||(m[2]=e("span",{style:{"font-size":"40px"}},"硬盘有价,数据无价,操作不规范,亲人两行泪。",-1))],64)}}};export{m as default};
|
BIN
admin/uniugm.db
BIN
admin/uniugm.db
Binary file not shown.
@ -7,4 +7,12 @@ export function accountGetDetail(baseUrl, params) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: params,
|
params: params,
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function roleGetDetail(baseUrl, params) {
|
||||||
|
return request({
|
||||||
|
url: baseUrl + '/special/detail',
|
||||||
|
method: 'get',
|
||||||
|
params: params,
|
||||||
|
})
|
||||||
}
|
}
|
62
ui/src/components/game/roleDetail.vue
Normal file
62
ui/src/components/game/roleDetail.vue
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<script setup>
|
||||||
|
|
||||||
|
import roleDetailItems from '@/components/game/roleDetailItems.vue';
|
||||||
|
import {roleGetDetail} from "@/api/account.js";
|
||||||
|
import LocalCache from "@/stores/localCache.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
rowInfo: {},
|
||||||
|
fieldsDescInfo: {},
|
||||||
|
})
|
||||||
|
|
||||||
|
const cachedResource = LocalCache.getCache("resource");
|
||||||
|
const resource_url = cachedResource.meta.resource_url;
|
||||||
|
|
||||||
|
const activeName = ref('detail')
|
||||||
|
|
||||||
|
console.log("进入角色详情:", props.rowInfo)
|
||||||
|
|
||||||
|
const roleId = props.rowInfo.RoleId
|
||||||
|
const serverId = props.rowInfo.ServerConfId
|
||||||
|
|
||||||
|
let loadAccountOk = ref(false)
|
||||||
|
let roleInfo = {}
|
||||||
|
|
||||||
|
roleGetDetail(resource_url, props.rowInfo).then((res) => {
|
||||||
|
console.log("获取角色详情返回:", res.data)
|
||||||
|
roleInfo = res.data.role_info
|
||||||
|
loadAccountOk.value = true
|
||||||
|
}, (err) => {
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleClick = (tab, event) => {
|
||||||
|
// console.log("tab info:", tab)
|
||||||
|
switch (tab.props.name) {
|
||||||
|
case 'detail':
|
||||||
|
console.log("点击了账号详情")
|
||||||
|
break
|
||||||
|
case 'order':
|
||||||
|
console.log("点击了充值订单记录")
|
||||||
|
break
|
||||||
|
case 'currency':
|
||||||
|
console.log("点击了货币记录")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="loadAccountOk">
|
||||||
|
<el-tab-pane label="道具列表" name="detail">
|
||||||
|
<roleDetailItems :items="roleInfo.items"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<!-- <el-tab-pane label="货币记录" name="currency" v-if="accountInfo !== null">货币记录子页面</el-tab-pane>-->
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
19
ui/src/components/game/roleDetailItems.vue
Normal file
19
ui/src/components/game/roleDetailItems.vue
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<script setup>
|
||||||
|
const props = defineProps({
|
||||||
|
items: {},
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-table :data="items" style="width: 100%" max-height="500px" table-layout="auto" border :show-header="true">
|
||||||
|
<el-table-column prop="item_id" label="道具id"/>
|
||||||
|
<el-table-column prop="desc" label="道具名"/>
|
||||||
|
<el-table-column prop="item_num" label="道具数量"/>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -3,6 +3,7 @@
|
|||||||
import tableView from "@/components/restful/table.vue";
|
import tableView from "@/components/restful/table.vue";
|
||||||
import LocalCache from "@/stores/localCache.js";
|
import LocalCache from "@/stores/localCache.js";
|
||||||
import userDetail from "@/components/game/userDetail.vue";
|
import userDetail from "@/components/game/userDetail.vue";
|
||||||
|
import roleDetail from "@/components/game/roleDetail.vue";
|
||||||
import cdkeyDetail from "@/components/game/cdkeyDetail.vue";
|
import cdkeyDetail from "@/components/game/cdkeyDetail.vue";
|
||||||
import cdkeyUsedHistory from "@/components/game/cdkeyUsedHistory.vue";
|
import cdkeyUsedHistory from "@/components/game/cdkeyUsedHistory.vue";
|
||||||
import router from '@/router/index.js'
|
import router from '@/router/index.js'
|
||||||
@ -60,6 +61,12 @@ switch (cachedResource.meta.resource) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
rowClickDialogBtns.push({
|
rowClickDialogBtns.push({
|
||||||
|
key: "role:detail",
|
||||||
|
name: "角色详情",
|
||||||
|
btn_color_type: "primary",
|
||||||
|
btn_type: 1,
|
||||||
|
btn_callback_component: roleDetail,
|
||||||
|
},{
|
||||||
key: "account:detail",
|
key: "account:detail",
|
||||||
name: "封禁",
|
name: "封禁",
|
||||||
btn_color_type: "info",
|
btn_color_type: "info",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user