|
|
|
@ -22,7 +22,7 @@ type Short struct {
|
|
|
|
|
// @Param topicIc uint true "参与话题id 0=未参与话题"
|
|
|
|
|
// @Param fileId string true "腾讯云视频id"
|
|
|
|
|
// @Param content string true "发布内容"
|
|
|
|
|
func (s *Short) Publish(userId, goodsId, topicId uint, fileId, content string, loginId, token string) error {
|
|
|
|
|
func (s *Short) Publish(userId, goodsId, topicId uint, fileId, content string, loginId, token, deviceType string) error {
|
|
|
|
|
info, err := tencent.Short.GetInfo(fileId)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return errors.New("上传视频错误")
|
|
|
|
@ -41,7 +41,7 @@ func (s *Short) Publish(userId, goodsId, topicId uint, fileId, content string, l
|
|
|
|
|
CoverUrl: fileInfo.BasicInfo.CoverUrl,
|
|
|
|
|
})
|
|
|
|
|
if id > 0 {
|
|
|
|
|
err := (&user.Trend{}).AddTrend(userId, id, user.TREND_TYPE_short, 1, loginId, token)
|
|
|
|
|
err := (&user.Trend{}).AddTrend(userId, id, user.TREND_TYPE_short, 1, loginId, token, deviceType)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Println("视频上传错误, err:", err)
|
|
|
|
|
}
|
|
|
|
|