Browse Source

提交:直播分享接口修改

yangdamao 3 years ago
parent
commit
f29e319fa7

+ 1 - 1
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -116,7 +116,7 @@ wx:
 certificate:
     host: http://192.168.1.38:8000/
 
-liveGotoURL: http://120.79.166.78:19014/living-room/
+liveGotoURL: http://120.79.166.78:19014/
 
 officialPush:
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 1
zhongzheng-admin/src/main/resources/application-pre.yml

@@ -117,7 +117,7 @@ wx:
 certificate:
     host: http://192.168.1.38:8000/
 
-liveGotoURL: http://120.79.166.78:19010/living-room/
+liveGotoURL: http://120.79.166.78:19010/
 
 officialPush:
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 1
zhongzheng-admin/src/main/resources/application-prod.yml

@@ -116,7 +116,7 @@ wx:
 certificate:
     host: https://m.xyyxt.net/
 
-liveGotoURL: https://web.xyyxt.net/living-room/
+liveGotoURL: https://web.xyyxt.net/
 
 officialPush:
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan

+ 9 - 5
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionWatchPerServiceImpl.java

@@ -49,20 +49,24 @@ public class CourseSectionWatchPerServiceImpl extends ServiceImpl<CourseSectionW
     @Override
     public CourseSectionWatchPerVo getSectionWatchPer(SectionWatchPerBo bo) {
         CourseSectionWatchPerVo vo = new CourseSectionWatchPerVo();
+        //获取课程节信息
+        CourseSection section = courseSectionService.getById(bo.getSectionId());
+        String url = "";
         //生成微信小程序码
         switch (bo.getSectionType()){
-            case 2://直播
+            case 2://直播 living-room/
+                String live = "living-room/";
                 vo.setEnCode(wxLoginService.getLiveEnCode(bo));
+                url = String.format("%s%s%s?a=1&cid=%s&gid=%s&sid=%s", liveGotoURL,live,section.getLiveUrl(), bo.getCourseId(), bo.getGoodsId(), bo.getSectionId());
                 break;
-            case 3://回放
+            case 3://回放 my-live-detail/
+                String detail = "my-live-detail/";
                 vo.setEnCode(wxLoginService.getBackEnCode(bo));
+                url = String.format("%s%s%s?a=1&cid=%s&gid=%s&sid=%s", liveGotoURL,detail,bo.getGoodsId(), bo.getCourseId(), bo.getGoodsId(), bo.getSectionId());
                 break;
             default:
                 throw new CustomException("课程节类型不正确,请检查");
         }
-        //获取课程节信息
-        CourseSection section = courseSectionService.getById(bo.getSectionId());
-        String url = String.format("%s%s?a=1&cid=%s&gid=%s&sid=%s", liveGotoURL,section.getLiveUrl(), bo.getCourseId(), bo.getGoodsId(), bo.getSectionId());
         vo.setEnCodePC(url);
         CourseSectionWatchPer watchPer = getOne(new LambdaQueryWrapper<CourseSectionWatchPer>()
                 .eq(ObjectUtils.isNotNull(bo.getCourseId()), CourseSectionWatchPer::getCourseId, bo.getCourseId())