去掉SkuName的ElmImgHashCode与ImgWeimob
This commit is contained in:
@@ -51,6 +51,14 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
type UploadResTokenInfo struct {
|
||||
Token string `json:"token,omitempty"`
|
||||
Expires uint64 `json:"expires,omitempty"`
|
||||
FileName string `json:"fileName,omitempty"`
|
||||
Hit bool `json:"hit,omitempty"`
|
||||
Img string `json:"img,omitempty"`
|
||||
}
|
||||
|
||||
func InitServiceInfo(version string, buildTime time.Time, gitCommit string) {
|
||||
buildTimeStr := ""
|
||||
if !utils.IsTimeZero(buildTime) {
|
||||
@@ -100,7 +108,7 @@ func GetServiceInfo(ctx *jxcontext.Context) interface{} {
|
||||
return serviceInfo
|
||||
}
|
||||
|
||||
func GetQiniuUploadToken(ctx *jxcontext.Context, suffix, hashCode string) (upTokenInfo map[string]interface{}, err error) {
|
||||
func GetQiniuUploadToken(ctx *jxcontext.Context, suffix, hashCode string) (upTokenInfo *UploadResTokenInfo, err error) {
|
||||
imgURL := ""
|
||||
if hashCode != "" {
|
||||
imgURL, _ = GetDataResource(ctx, hashCode)
|
||||
@@ -110,12 +118,12 @@ func GetQiniuUploadToken(ctx *jxcontext.Context, suffix, hashCode string) (upTok
|
||||
Scope: globals.QiniuBucket,
|
||||
Expires: qiniuTokenExpires,
|
||||
}
|
||||
upTokenInfo = map[string]interface{}{
|
||||
"token": putPolicy.UploadToken(api.QiniuAPI),
|
||||
"expires": putPolicy.Expires,
|
||||
"fileName": jxutils.GenPicFileName(suffix),
|
||||
"hit": imgURL != "",
|
||||
"img": imgURL,
|
||||
upTokenInfo = &UploadResTokenInfo{
|
||||
Token: putPolicy.UploadToken(api.QiniuAPI),
|
||||
Expires: putPolicy.Expires,
|
||||
FileName: jxutils.GenPicFileName(suffix),
|
||||
Hit: imgURL != "",
|
||||
Img: imgURL,
|
||||
}
|
||||
return upTokenInfo, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user