|
@@ -118,8 +118,9 @@ return
|
|
|
|
|
|
type returnDetail struct {
|
|
|
*stdlib.DocInfo
|
|
|
- DocMemberPrice int64 `json:"docMemberPrice"`
|
|
|
- DocMemberDiscount int64 `json:"docMemberDiscount"`
|
|
|
+ DocMemberPrice int64 `json:"docMemberPrice"`
|
|
|
+ DocMemberDiscount int64 `json:"docMemberDiscount"`
|
|
|
+ ImgId string `json:"imgId"`
|
|
|
}
|
|
|
|
|
|
func GetDocDetail(userId, docId string, isBuyDetail bool) (*returnDetail, bool, bool, error) {
|
|
@@ -141,6 +142,7 @@ func GetDocDetail(userId, docId string, isBuyDetail bool) (*returnDetail, bool,
|
|
|
return nil, false, false, fmt.Errorf("查询文档异常")
|
|
|
}
|
|
|
detail := resp.DocDeail
|
|
|
+ imgId := detail.PreviewImgId
|
|
|
if detail.Source == public.SourceDd {
|
|
|
priceConfig := config.JyDocsAppConfig.Price[detail.Source][detail.ProductType]
|
|
|
// 豆丁的预览图和价格需要重新计算
|
|
@@ -153,6 +155,7 @@ func GetDocDetail(userId, docId string, isBuyDetail bool) (*returnDetail, bool,
|
|
|
rs := returnDetail{
|
|
|
DocInfo: detail,
|
|
|
DocMemberDiscount: config.JyDocsAppConfig.DocMember.Discount,
|
|
|
+ ImgId: imgId,
|
|
|
}
|
|
|
// 会员免费
|
|
|
if detail.ProductType == public.ProductTypeMemberFree {
|