gome_brand.go 584 Bytes
package gome

import (
	"context"
	"github.com/gogf/gf/encoding/gjson"
)

type brandGome struct {
}

var Brand = brandGome{}

type BrandRes struct {
	*CommonRes
	Data struct {
		*CommonPageRes
		Result []struct {
			Code string `json:"code"`
			Name string `json:"name"`
		} `json:"result"`
	} `json:"data"`
}

//Get 品牌列表
func (brandGome) Get(ctx context.Context, req *CommonPageReq) (res *BrandRes, err error) {
	method := "alemein.basic.get.brand"

	result, err := server.requestApi(ctx, method, req)
	if err != nil {
		return
	}
	_ = gjson.New(result).Scan(&res)
	return
}