2023-05-31 03:38:17 +00:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
info (
|
|
|
|
title: // TODO: add title
|
|
|
|
desc: // TODO: add description
|
|
|
|
author: ""
|
|
|
|
email: ""
|
|
|
|
)
|
2023-06-01 07:32:28 +00:00
|
|
|
import "basic.api"
|
2023-06-05 03:27:01 +00:00
|
|
|
|
|
|
|
service product {
|
|
|
|
//获取产品列表
|
|
|
|
@handler GetProductListHandler
|
|
|
|
get /product/list(GetProductListReq) returns (response);
|
|
|
|
//获取产品详情信息
|
|
|
|
@handler GetProductInfoHandler
|
|
|
|
get /product/info(GetProductInfoReq) returns (response);
|
|
|
|
}
|
|
|
|
|
|
|
|
//获取产品列表
|
2023-06-01 07:32:28 +00:00
|
|
|
type GetProductListReq {
|
2023-05-31 03:38:17 +00:00
|
|
|
// TODO: add members here and delete this comment
|
2023-06-02 11:24:58 +00:00
|
|
|
Cid int64 `form:"cid"`
|
2023-06-01 07:32:28 +00:00
|
|
|
Size uint32 `form:"size"`
|
|
|
|
Page uint32 `form:"page"`
|
|
|
|
IsDemo uint32 `form:"is_demo" , options=0|1"`
|
2023-05-31 03:38:17 +00:00
|
|
|
}
|
2023-06-02 11:24:58 +00:00
|
|
|
type GetProductListRsp {
|
|
|
|
Ob Ob `json:"ob"`
|
|
|
|
TypeName string `json:"typeName"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
|
|
|
type Ob {
|
|
|
|
Items []Items `json:"items"`
|
|
|
|
Links Links `json:"_links"`
|
|
|
|
Meta Meta `json:"_meta"`
|
|
|
|
}
|
|
|
|
type Meta {
|
|
|
|
TotalCount int32 `json:"totalCount"`
|
|
|
|
PageCount int32 `json:"pageCount"`
|
|
|
|
CurrentPage int32 `json:"currentPage"`
|
|
|
|
PerPage int32 `json:"perPage"`
|
|
|
|
}
|
|
|
|
type Links {
|
|
|
|
Self HrefUrl `json:"self"`
|
|
|
|
First HrefUrl `json:"first"`
|
|
|
|
Last HrefUrl `json:"last"`
|
|
|
|
Next HrefUrl `json:"next"`
|
|
|
|
}
|
|
|
|
type HrefUrl {
|
|
|
|
Href string `json:"href"`
|
|
|
|
}
|
|
|
|
type Items {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
Intro string `json:"intro"`
|
|
|
|
CoverImg string `json:"cover_img"`
|
|
|
|
IsEnv uint32 `json:"isEnv"`
|
|
|
|
IsMicro uint32 `json:"isMicro"`
|
|
|
|
SizeNum uint32 `json:"sizeNum"`
|
|
|
|
MiniPrice float64 `json:"miniPrice"`
|
|
|
|
CoverDefault string `json:"coverDefault"`
|
|
|
|
}
|
2023-06-05 03:27:01 +00:00
|
|
|
//获取产品详情
|
|
|
|
type GetProductInfoReq {
|
|
|
|
Pid string `json:"pid"` //sn
|
|
|
|
Size uint32 `json:"size"` //图片尺寸
|
|
|
|
ClientNo string `json:"clientNo"` //页面标识
|
|
|
|
HaveCloudRendering bool `json:"haveCloudRendering"` //是否显示云渲染开关
|
|
|
|
}
|
|
|
|
type GetProductInfoRsp {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Type int32 `json:"type"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
IsEnv uint32 `json:"isEnv"`
|
|
|
|
IsMicro uint32 `json:"isMicro"`
|
|
|
|
Materials []Materials `json:"materials"`
|
|
|
|
Sizes []Sizes `json:"sizes"`
|
|
|
|
TypeName string `json:"typeName"`
|
|
|
|
Templates Templates `json:"templates"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Materials {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
}
|
|
|
|
type Sizes {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Title SizeTitle `json:"title"`
|
|
|
|
Capacity string `json:"capacity"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
}
|
|
|
|
type SizeTitle {
|
|
|
|
Cm string `json:"cm"`
|
|
|
|
Inth string `json:"inth"`
|
|
|
|
}
|
|
|
|
type Templates {
|
|
|
|
Ob484 []Ob484 `json:"4_84"`
|
|
|
|
}
|
|
|
|
type Ob484 {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
TemplateData TemplateData `json:"templateData"`
|
|
|
|
}
|
|
|
|
type TemplateData {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
Material string `json:"material"`
|
|
|
|
MaterialList []Material `json:"materialList"`
|
|
|
|
}
|
|
|
|
type Material {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Tag string `json:"tag"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Text string `json:"text"`
|
|
|
|
Fill string `json:"fill"`
|
|
|
|
FontSize int `json:"fontSize"`
|
|
|
|
FontFamily string `json:"fontFamily"`
|
|
|
|
IfBr bool `json:"ifBr"`
|
|
|
|
IfShow bool `json:"ifShow"`
|
|
|
|
IfGroup bool `json:"ifGroup"`
|
|
|
|
MaxNum int `json:"maxNum"`
|
|
|
|
Rotation int `json:"rotation"`
|
|
|
|
Align string `json:"align"`
|
|
|
|
VerticalAlign string `json:"verticalAlign"`
|
|
|
|
Material string `json:"material"`
|
|
|
|
QRcodeType string `json:"qRcodeType"`
|
|
|
|
Width int `json:"width"`
|
|
|
|
Height int `json:"height"`
|
|
|
|
X int `json:"x"`
|
|
|
|
Y int `json:"y"`
|
|
|
|
Opacity int `json:"opacity"`
|
|
|
|
OptionalColor []OptionalColor `json:"optionalColor"`
|
|
|
|
ZIndex int `json:"zIndex"`
|
|
|
|
SvgPath string `json:"svgPath"`
|
|
|
|
Follow Follow `json:"follow"`
|
|
|
|
Group []string `json:"group"`
|
|
|
|
CameraStand CameraStand `json:"cameraStand"`
|
|
|
|
}
|
|
|
|
type CameraStand {
|
|
|
|
X int `json:"x"`
|
|
|
|
Y int `json:"y"`
|
|
|
|
Z int `json:"z"`
|
|
|
|
}
|
|
|
|
type Follow {
|
|
|
|
Fill string `json:"fill"`
|
|
|
|
IfShow string `json:"ifShow"`
|
|
|
|
Content string `json:"content"`
|
|
|
|
}
|
|
|
|
type OptionalColor {
|
|
|
|
Color string `json:"color"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Default string `json:"default"`
|
2023-05-31 03:38:17 +00:00
|
|
|
}
|