|
@@ -41,6 +41,7 @@ type ArticleControllerMobile struct {
|
|
|
// @Description 获取报告详情接口
|
|
|
// @Param ArticleId query int true "报告ID"
|
|
|
// @Param IsSendWx query int false "是否是通过微信模版进来的 1是,其它否"
|
|
|
+// @Param InviteShareCode query string false "销售账号邀请码"
|
|
|
// @Success 200 {object} models.ArticleDetailResp
|
|
|
// @router /detail [get]
|
|
|
func (this *ArticleController) Detail() {
|
|
@@ -65,6 +66,7 @@ func (this *ArticleController) Detail() {
|
|
|
br.ErrMsg = "文章不存在,文章ID错误"
|
|
|
return
|
|
|
}
|
|
|
+ inviteShareCode := this.GetString("InviteShareCode")
|
|
|
detail := new(models.ArticleDetail)
|
|
|
//detailInit := new(models.ArticleDetail) // 初始化的文章信息,用来处理body 内容回显
|
|
|
hasPermission := 0
|
|
@@ -83,7 +85,10 @@ func (this *ArticleController) Detail() {
|
|
|
br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ //记录分享来源
|
|
|
+ if inviteShareCode != "" {
|
|
|
+ go services.AddCygxUserAdminShareHistory(user, utils.CYGX_OBJ_ARTICLE, detail.Title, inviteShareCode, articleId)
|
|
|
+ }
|
|
|
detail.PublishDate = utils.TimeRemoveHms2(detail.PublishDate)
|
|
|
detail.Body = html.UnescapeString(detail.Body)
|
|
|
detail.Body = strings.Replace(detail.Body, "<p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"https://www.froala.com/wysiwyg-editor?pb=1\" title=\"Froala Editor\">Froala Editor</a></p>", "", -1)
|