Commit ef6120c25aea23c786cb2f02fb2dba227611981a

Authored by 周伟鹏
1 parent 0d3de2e7

修改抽帧图片域名

src/main/java/com/cnlive/shenhe/controller/VideosController.java
... ... @@ -16,6 +16,7 @@ import com.github.pagehelper.PageInfo;
16 16 import org.slf4j.Logger;
17 17 import org.slf4j.LoggerFactory;
18 18 import org.springframework.beans.factory.annotation.Autowired;
  19 +import org.springframework.beans.factory.annotation.Value;
19 20 import org.springframework.stereotype.Controller;
20 21 import org.springframework.ui.Model;
21 22 import org.springframework.web.bind.annotation.GetMapping;
... ... @@ -37,6 +38,11 @@ public class VideosController {
37 38 @Autowired
38 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 144 ShyVideos detailsContent = videosService.getDetailsContent(id);
139 145 Object images = JSON.parse(detailsContent.getVideo_imgs());
140 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 154 model.addAttribute("images", images);
144 155 model.addAttribute("avsampleImgs", avsampleImgs);
145 156 model.addAttribute("video", detailsContent);
... ...