|
@@ -8,6 +8,7 @@ import (
|
|
|
"hongze/hongze_yb/models/tables/yb_community_video_play_log"
|
|
|
"hongze/hongze_yb/services/user"
|
|
|
"hongze/hongze_yb/utils"
|
|
|
+ "strings"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -48,6 +49,7 @@ func GetVideoList(pageIndex, pageSize, videoId, varietyTagId int, keywords strin
|
|
|
CreateTime: v.CreateTime.Format(utils.FormatDateTime),
|
|
|
ModifyTime: v.ModifyTime.Format(utils.FormatDateTime),
|
|
|
ChartPermissionName: v.VarietyTagName,
|
|
|
+ TencentId: getSubTencentUrl(v.TencentURL),
|
|
|
}
|
|
|
resp = append(resp, item)
|
|
|
}
|
|
@@ -93,3 +95,15 @@ func SaveVideoPlayLog(userInfo user.UserInfo, videoId, sourceAgent int) (errMsg
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// getSubTencentUrl 获取腾讯视频链接子字符串
|
|
|
+func getSubTencentUrl(tencentUrl string) (sub string) {
|
|
|
+ if tencentUrl != "" {
|
|
|
+ st := strings.LastIndex(tencentUrl, "/")
|
|
|
+ ed := strings.LastIndex(tencentUrl, ".")
|
|
|
+ if st > 0 && ed > st {
|
|
|
+ sub = tencentUrl[st+1 : ed]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|