Commit ef6120c25aea23c786cb2f02fb2dba227611981a
1 parent
0d3de2e7
修改抽帧图片域名
Showing
1 changed file
with
13 additions
and
2 deletions
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| @@ -16,6 +16,7 @@ import com.github.pagehelper.PageInfo; | @@ -16,6 +16,7 @@ import com.github.pagehelper.PageInfo; | ||
| 16 | import org.slf4j.Logger; | 16 | import org.slf4j.Logger; |
| 17 | import org.slf4j.LoggerFactory; | 17 | import org.slf4j.LoggerFactory; |
| 18 | import org.springframework.beans.factory.annotation.Autowired; | 18 | import org.springframework.beans.factory.annotation.Autowired; |
| 19 | +import org.springframework.beans.factory.annotation.Value; | ||
| 19 | import org.springframework.stereotype.Controller; | 20 | import org.springframework.stereotype.Controller; |
| 20 | import org.springframework.ui.Model; | 21 | import org.springframework.ui.Model; |
| 21 | import org.springframework.web.bind.annotation.GetMapping; | 22 | import org.springframework.web.bind.annotation.GetMapping; |
| @@ -37,6 +38,11 @@ public class VideosController { | @@ -37,6 +38,11 @@ public class VideosController { | ||
| 37 | @Autowired | 38 | @Autowired |
| 38 | UsersServiceImpl usersService; | 39 | UsersServiceImpl usersService; |
| 39 | 40 | ||
| 41 | + @Value("${qn_domain}") | ||
| 42 | + String qn_domain; | ||
| 43 | + | ||
| 44 | + @Value("${ks_domain}") | ||
| 45 | + String ks_domain; | ||
| 40 | 46 | ||
| 41 | /** | 47 | /** |
| 42 | * 审核信息返回接口 | 48 | * 审核信息返回接口 |
| @@ -138,8 +144,13 @@ public class VideosController { | @@ -138,8 +144,13 @@ public class VideosController { | ||
| 138 | ShyVideos detailsContent = videosService.getDetailsContent(id); | 144 | ShyVideos detailsContent = videosService.getDetailsContent(id); |
| 139 | Object images = JSON.parse(detailsContent.getVideo_imgs()); | 145 | Object images = JSON.parse(detailsContent.getVideo_imgs()); |
| 140 | Object avsampleImgs = JSON.parse(detailsContent.getAvsample_imgs()); | 146 | Object avsampleImgs = JSON.parse(detailsContent.getAvsample_imgs()); |
| 141 | - String url = detailsContent.getVideo_url().replace("http://", ""); | ||
| 142 | - String yuming = "http://" + url.substring(0, url.indexOf("/") + 1); | 147 | + String yuming = ""; |
| 148 | + Integer plat = detailsContent.getPlat(); | ||
| 149 | + if(plat==CommonConst.QINIU_PLAT){ | ||
| 150 | + yuming = qn_domain+"/"; | ||
| 151 | + }else if(plat==CommonConst.KS_PLAT){ | ||
| 152 | + yuming = ks_domain+"/"; | ||
| 153 | + } | ||
| 143 | model.addAttribute("images", images); | 154 | model.addAttribute("images", images); |
| 144 | model.addAttribute("avsampleImgs", avsampleImgs); | 155 | model.addAttribute("avsampleImgs", avsampleImgs); |
| 145 | model.addAttribute("video", detailsContent); | 156 | model.addAttribute("video", detailsContent); |