获取sdk主题返回值改成map
This commit is contained in:
parent
526f0ef14b
commit
2994bc6a56
@ -1,7 +1,6 @@
|
|||||||
package game
|
package game
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@ -285,6 +284,5 @@ func TestGetSdkTheme(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Println(sdkTheme.Status, sdkTheme.Code, sdkTheme.Msg)
|
fmt.Println(sdkTheme.Status, sdkTheme.Code, sdkTheme.Msg)
|
||||||
b, _ := json.Marshal(sdkTheme.Data)
|
fmt.Println(sdkTheme.Data)
|
||||||
fmt.Println(string(b))
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -601,51 +601,9 @@ type GetSdkThemeReq struct {
|
|||||||
|
|
||||||
type GetSdkThemeResp struct {
|
type GetSdkThemeResp struct {
|
||||||
*responses.BaseResponse
|
*responses.BaseResponse
|
||||||
Code int `json:"code"`
|
Code int `json:"code"`
|
||||||
Msg string `json:"msg"`
|
Msg string `json:"msg"`
|
||||||
Data SdkTheme `json:"data"`
|
Data map[string]any `json:"data"`
|
||||||
}
|
|
||||||
|
|
||||||
type SdkTheme struct {
|
|
||||||
Theme struct {
|
|
||||||
Colors struct {
|
|
||||||
Theme []string `json:"theme"`
|
|
||||||
Important string `json:"important"`
|
|
||||||
Normal string `json:"normal"`
|
|
||||||
Tips string `json:"tips"`
|
|
||||||
Divider string `json:"divider"`
|
|
||||||
Background string `json:"background"`
|
|
||||||
TextClickable string `json:"text_clickable"`
|
|
||||||
RadioSelected string `json:"radio_selected"`
|
|
||||||
RadioUnselected string `json:"radio_unselected"`
|
|
||||||
ImportantText string `json:"important_text"`
|
|
||||||
TextInput string `json:"text_input"`
|
|
||||||
} `json:"colors"`
|
|
||||||
GradientAngle int `json:"gradient_angle"`
|
|
||||||
ButtonCornerRadius []int `json:"button_corner_radius"`
|
|
||||||
BackgroundCornerRadius []int `json:"background_corner_radius"`
|
|
||||||
BackgroundImg string `json:"background_img"`
|
|
||||||
ButtonSimpleImg string `json:"button_simple_img"`
|
|
||||||
ButtonThemeImg string `json:"button_theme_img"`
|
|
||||||
BackgroundImgGraphic string `json:"background_img_graphic"`
|
|
||||||
BackgroundImgGraphicPosition []int `json:"background_img_graphic_position"`
|
|
||||||
ButtonThemeImgGraphic string `json:"button_theme_img_graphic"`
|
|
||||||
ButtonThemeImgGraphicPosition []int `json:"button_theme_img_graphic_position"`
|
|
||||||
ButtonSimpleImgGraphic string `json:"button_simple_img_graphic"`
|
|
||||||
ButtonSimpleImgGraphicPosition []int `json:"button_simple_img_graphic_position"`
|
|
||||||
} `json:"theme"`
|
|
||||||
Icon struct {
|
|
||||||
MenuCenter string `json:"menu_center"`
|
|
||||||
MenuCs string `json:"menu_cs"`
|
|
||||||
MenuActivity string `json:"menu_activity"`
|
|
||||||
MenuVip string `json:"menu_vip"`
|
|
||||||
FloatDefault string `json:"float_default"`
|
|
||||||
FloatActiveLeft string `json:"float_active_left"`
|
|
||||||
FloatActiveRight string `json:"float_active_right"`
|
|
||||||
FloatInactiveLeft string `json:"float_inactive_left"`
|
|
||||||
FloatInactiveRight string `json:"float_inactive_right"`
|
|
||||||
CommonCs string `json:"common_cs"`
|
|
||||||
} `json:"icon"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreateGetSdkThemeReq(gameId int64, gameVersion string) *GetSdkThemeReq {
|
func CreateGetSdkThemeReq(gameId int64, gameVersion string) *GetSdkThemeReq {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user