he2802 3 år sedan
förälder
incheckning
729bea5c1f

+ 1 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/WxLoginService.java

@@ -892,6 +892,7 @@ public class WxLoginService implements IWxLoginService {
         obj.put("page", "pages4/courseTopic/goodsTopic");
         obj.put("scene",String.format("topicId=%s",topicId));
         obj.put("env_version",enCodeVersion);
+//        obj.put("env_version","trial");
         String result = HttpUtils.sendPost(url, obj);
         return result;
     }

+ 7 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseTopicServiceImpl.java

@@ -20,6 +20,7 @@ import com.zhongzheng.modules.goods.domain.Goods;
 import com.zhongzheng.modules.goods.service.IGoodsService;
 import com.zhongzheng.modules.wx.service.IWxLoginService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
@@ -54,6 +55,9 @@ public class CourseTopicServiceImpl extends ServiceImpl<CourseTopicMapper, Cours
     @Autowired
     private IWxLoginService wxLoginService;
 
+    @Value("${liveGotoURL}")
+    private String liveGotoURL;
+
     @Override
     public CourseTopicVo queryById(Long topicId){
         CourseTopic db = this.baseMapper.selectById(topicId);
@@ -74,9 +78,11 @@ public class CourseTopicServiceImpl extends ServiceImpl<CourseTopicMapper, Cours
         lqw.eq( CourseTopic::getStatus, 1);
         List<CourseTopicVo> courseTopicVos = entity2Vo(this.list(lqw));
         courseTopicVos.forEach(item -> {
-            //todo 小程序二维码和PC链接
+            //小程序二维码和PC链接
             String enCode = wxLoginService.getTopicEnCode(item.getTopicId());
             item.setEnCode(enCode);
+            String url = String.format("%s%s?topicId=%s", liveGotoURL,"goodsTopic",item.getTopicId());
+            item.setEnCodePC(url);
         });
         return courseTopicVos;
     }