This commit is contained in:
laodaming
2023-07-05 16:03:16 +08:00
parent c6005983f8
commit 6337371cd1
9 changed files with 395 additions and 18 deletions

View File

@@ -28,6 +28,9 @@ service product {
//获取产品信息
@handler GetProductInfoHandler
get /product/info(GetProductInfoReq) returns (response);
//保存设计信息
@handler SaveDesignHandler
post /product/save-design(SaveDesignReq) returns (response);
}
//获取产品列表
@@ -162,4 +165,65 @@ type SizeTitle {
type MaterialItem {
Id int64 `json:"id"`
Title string `json:"title"`
}
//保存设计信息
type SaveDesignReq {
Data string `json:"data"` //加密信息
}
type SaveDesignRsp {
Sn string `json:"sn"`
}
//保存设计信息(解密结构体)
type SaveDesignReqRealStruct {
ProductId int64 `json:"product_id"`
SizeId int64 `json:"size_id"`
OptionalId int64 `json:"optional_id"`
TemplateId int64 `json:"template_id"`
Sn string `json:"sn"`
Data DesignData `json:"data"`
Cover string `json:"cover"`
PageGuid string `json:"pageGuid"`
}
type DesignData {
MainColor ColorFill `json:"MainColor"`
SecondaryColor ColorFill `json:"SecondaryColor"`
Logo DesignLogo `json:"Logo"`
Slogan DesignSlogan `json:"Slogan"`
QRcode DesignQRcode `json:"QRcode"`
Website DesignWebsite `json:"Website"`
Phone DesignPhone `json:"Phone"`
Address DesignAddress `json:"Address"`
}
type DesignAddress {
Text string `json:"text"`
IfShow bool `json:"ifShow"`
}
type DesignPhone {
Text string `json:"text"`
IfShow bool `json:"ifShow"`
}
type DesignWebsite {
Text string `json:"text"`
IfShow bool `json:"ifShow"`
}
type DesignQRcode {
Text string `json:"text"`
SvgPath string `json:"svgPath"`
IfShow bool `json:"ifShow"`
}
type DesignSlogan {
Text string `json:"text"`
IfShow bool `json:"ifShow"`
}
type DesignLogo {
Material string `json:"material"`
MaterialName string `json:"materialName"`
MaterialTime string `json:"materialTime"`
Fill string `json:"fill"`
FillName string `json:"fill_name"`
Colors []string `json:"colors"`
}
type ColorFill {
Fill string `json:"fill"`
}