Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-group
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-group
Commits
86bd19b1
Commit
86bd19b1
authored
Jun 14, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:反转svga
parent
bc9fd55e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
43 deletions
+46
-43
micData.go
domain/model/group_m/micData.go
+41
-39
headwear.go
domain/model/res_m/headwear.go
+5
-4
No files found.
domain/model/group_m/micData.go
View file @
86bd19b1
...
...
@@ -42,25 +42,24 @@ type MicContent struct {
Timestamp
int64
`json:"timestamp"`
//用户
User
*
MicUserData
`json:"user"`
//mic位置特效svga
MicEffect
string
`json:"micEffect"`
//头饰里面的小头像
HeadwearIcon
string
`json:"headwearIcon"`
}
type
MicUserData
struct
{
Id
uint64
`json:"id,omitempty"`
ExternalId
string
`json:"externalId"`
Avatar
string
`json:"avatar"`
Nick
string
`json:"nick"`
Sex
uint8
`json:"sex"`
Code
string
`json:"code"`
IsVip
bool
`json:"isVip"`
NobleLeave
uint16
`json:"noble"`
// 当前的贵族等级
HeadwearPicUrl
string
`json:"headwearPicUrl"`
HeadwearEffectUrl
string
`json:"headwearEffectUrl"`
SvipLevel
int
`json:"svipLevel"`
Svip
rpc
.
CvSvip
`json:"svip"`
Id
uint64
`json:"id,omitempty"`
ExternalId
string
`json:"externalId"`
Avatar
string
`json:"avatar"`
Nick
string
`json:"nick"`
Sex
uint8
`json:"sex"`
Code
string
`json:"code"`
IsVip
bool
`json:"isVip"`
NobleLeave
uint16
`json:"noble"`
// 当前的贵族等级
HeadwearPicUrl
string
`json:"headwearPicUrl"`
HeadwearEffectUrl
string
`json:"headwearEffectUrl"`
HeadwearReverseEffectUrl
string
`json:"headwearReverseEffectUrl"`
// 反转svga效果
SvipLevel
int
`json:"svipLevel"`
Svip
rpc
.
CvSvip
`json:"svip"`
MicEffect
string
`json:"micEffect"`
//mic位置特效svga
HeadwearIcon
string
`json:"headwearIcon"`
//头饰里面的小头像
}
type
MicNumChangeContent
struct
{
...
...
@@ -405,19 +404,19 @@ func getMicIContent(model *domain.Model, groupId string, i int) (MicContent, err
headwearIcon
=
cpUser
.
Avatar
}
micEffect
=
"https://image.whoisamy.shop/hilo/resource/svga/mic_effect_cp.svga"
micUserData
.
MicEffect
=
micEffect
micUserData
.
HeadwearIcon
=
headwearIcon
}
return
MicContent
{
GroupId
:
txGroupId
,
I
:
mic
.
I
,
Lock
:
mic
.
Lock
,
Forbid
:
micUser
.
Forbid
,
MicForbid
:
mic
.
MicForbid
,
ExternalId
:
micUser
.
ExternalId
,
AgoraId
:
uint32
(
micUser
.
UserId
),
Timestamp
:
time
.
Now
()
.
UnixNano
(),
User
:
micUserData
,
MicEffect
:
micEffect
,
HeadwearIcon
:
headwearIcon
,
GroupId
:
txGroupId
,
I
:
mic
.
I
,
Lock
:
mic
.
Lock
,
Forbid
:
micUser
.
Forbid
,
MicForbid
:
mic
.
MicForbid
,
ExternalId
:
micUser
.
ExternalId
,
AgoraId
:
uint32
(
micUser
.
UserId
),
Timestamp
:
time
.
Now
()
.
UnixNano
(),
User
:
micUserData
,
},
nil
}
...
...
@@ -467,23 +466,26 @@ func getMicUserDatas(model *domain.Model, userIds []uint64) (map[uint64]*MicUser
}
var
headwearPicUrl
string
var
headwearEffectUrl
string
var
reverseHeadwearEffectUrl
string
if
headwearUser
,
flag
:=
headwearMap
[
id
];
flag
{
headwearPicUrl
=
resHeadwearMap
[
headwearUser
.
HeadwearId
]
.
PicUrl
headwearEffectUrl
=
resHeadwearMap
[
headwearUser
.
HeadwearId
]
.
EffectUrl
reverseHeadwearEffectUrl
=
resHeadwearMap
[
headwearUser
.
HeadwearId
]
.
ReverseEffectUrl
}
micUserDataMap
[
id
]
=
&
MicUserData
{
Id
:
user
.
ID
,
ExternalId
:
user
.
ExternalId
,
Avatar
:
user
.
Avatar
,
Nick
:
user
.
Nick
,
Sex
:
user
.
Sex
,
Code
:
user
.
Code
,
IsVip
:
vipFlag
,
NobleLeave
:
nobleMap
[
id
],
HeadwearPicUrl
:
headwearPicUrl
,
HeadwearEffectUrl
:
headwearEffectUrl
,
SvipLevel
:
svips
[
id
]
.
SvipLevel
,
Svip
:
rpc
.
CopySimpleSvip
(
svips
[
id
]),
Id
:
user
.
ID
,
ExternalId
:
user
.
ExternalId
,
Avatar
:
user
.
Avatar
,
Nick
:
user
.
Nick
,
Sex
:
user
.
Sex
,
Code
:
user
.
Code
,
IsVip
:
vipFlag
,
NobleLeave
:
nobleMap
[
id
],
HeadwearPicUrl
:
headwearPicUrl
,
HeadwearEffectUrl
:
headwearEffectUrl
,
HeadwearReverseEffectUrl
:
reverseHeadwearEffectUrl
,
SvipLevel
:
svips
[
id
]
.
SvipLevel
,
Svip
:
rpc
.
CopySimpleSvip
(
svips
[
id
]),
}
}
return
micUserDataMap
,
nil
...
...
domain/model/res_m/headwear.go
View file @
86bd19b1
...
...
@@ -10,10 +10,11 @@ import (
type
ResHeadwear
struct
{
mysql
.
Entity
*
domain
.
Model
`gorm:"-"`
Name
mysql
.
Str
PicUrl
mysql
.
Str
EffectUrl
mysql
.
Str
*
domain
.
Model
`gorm:"-"`
Name
mysql
.
Str
PicUrl
mysql
.
Str
EffectUrl
mysql
.
Str
ReverseEffectUrl
mysql
.
Str
}
func
GetResHeadwearById
(
model
*
domain
.
Model
,
id
mysql
.
ID
)
(
*
ResHeadwear
,
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment