62 lines
1.4 KiB
Plaintext
62 lines
1.4 KiB
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: // 个人文件传输
|
|
desc: // 图片,pdf,设计logo等
|
|
author: ""
|
|
email: ""
|
|
)
|
|
|
|
import "basic.api"
|
|
|
|
@server(
|
|
jwt: Auth
|
|
)
|
|
service data-transfer {
|
|
//获取标准logo列表
|
|
@handler GetStandardLogoListHandler
|
|
get /standard-logo/list returns (response);
|
|
//获取二维码设置列表
|
|
@handler GetQrCodeSetListHandler
|
|
get /qrcode-set/list returns (response);
|
|
//生成二维码
|
|
@handler UploadQrcodeHandler
|
|
post /upload/qrcode (UploadQrcodeReq) returns (response);
|
|
//上传logo
|
|
@handler UploadLogoHandler
|
|
post /upload/up-logo (UploadLogoReq) returns (response);
|
|
}
|
|
|
|
//获取标准logo列表
|
|
type GetStandardLogoListRsp {
|
|
Id int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Url string `json:"url"`
|
|
}
|
|
//获取二维码设置列表
|
|
type GetQrCodeSetListRsp {
|
|
Id int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
}
|
|
//生成二维码
|
|
type UploadQrcodeReq {
|
|
Url string `json:"url"`
|
|
QRcodeType int64 `json:"QRcodeType"`
|
|
}
|
|
type UploadQrcodeRsp {
|
|
Link string `json:"link"`
|
|
Data string `json:"d"`
|
|
}
|
|
|
|
//上传logo
|
|
type UploadLogoReq {
|
|
SkuId int64 `form:"skuId"`
|
|
IsRemoveBg bool `form:"is_remove_bg"`
|
|
Proportion int64 `form:"proportion"`
|
|
}
|
|
type UploadLogoRsp {
|
|
NobgUrl string `json:"nobg_url"`
|
|
ThumbnailUrl string `json:"thumbnail_url"`
|
|
IsmaxProportion bool `json:"ismax_proportion"`
|
|
ImgColor []string `json:"img_color"`
|
|
} |