🐛 修复返回数据错误
This commit is contained in:
@@ -188,15 +188,15 @@ func (c *ScanController) GetAllowedMM() {
|
||||
LinkID string `json:"linkID" description:"链接"`
|
||||
}
|
||||
|
||||
resData := make(map[string]profitMarginStruct, len(profitMarginList))
|
||||
resData := make([]profitMarginStruct, len(profitMarginList))
|
||||
for _, v := range profitMarginList {
|
||||
resData[strconv.FormatFloat(v.FactLabel, 'f', 0, 64)] = profitMarginStruct{
|
||||
resData = append(resData, profitMarginStruct{
|
||||
FactLabel: v.FactLabel,
|
||||
ShowLabel: v.ShowLabel,
|
||||
PlatformLabel: v.PlatformLabel,
|
||||
IsLinkSingle: v.IsLinkSingle,
|
||||
LinkID: v.LinkID,
|
||||
}
|
||||
})
|
||||
}
|
||||
c.Data["json"] = response.Ok(resData)
|
||||
_ = c.ServeJSON()
|
||||
|
||||
Reference in New Issue
Block a user