admin
2019-11-20 e33752e9f600e6e0cdb9c0119b5ea286be33162c
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ShareController.java
@@ -1079,15 +1079,34 @@
                  data.put("clickUrl", ShareControllerV2.getERCodeContent(goods, taoBaoLink.getTaoToken()));
               data.put("token", TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken()));
               String inviteCode=null;
               UserInfoExtra extra=   userInfoExtraService.getUserInfoExtra(uid);
               if(extra!=null)
                  inviteCode=extra.getInviteCode();
               // 测试
               List<String> commentTexts = new ArrayList<>();
               commentTexts.add("口令1");
               commentTexts.add("口令2口令口令淘口令口令口令淘口令");
               commentTexts.add("口令3");
               commentTexts.add("口令口令淘口令口令口令淘口令口令口令淘口令口令口令淘口令口令口令淘口令口令口令淘口令");
               String  commentTextStr=    configService.get("share_single_goods_comment_text");
               if(!StringUtil.isNullOrEmpty(commentTextStr))
               {
                  JSONArray arr=   JSONArray.fromObject(commentTextStr);
                  for(int i=0;i<arr.size();i++)
                  {
                     if(StringUtil.isNullOrEmpty(inviteCode))
                     {
                        if(arr.optString(i).contains("[邀请码]"))
                        {
                           continue;
                        }
                     }
                     if(StringUtil.isNullOrEmpty(inviteCode))
                        commentTexts.add(arr.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK).replace("[淘口令]", data.optString("token")));
                     else
                        commentTexts.add(arr.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK).replace("[邀请码]", inviteCode).replace("[淘口令]", data.optString("token")));
                  }
               }
               data.put("commentTexts", commentTexts);
               data.put("wxErCode", ShareControllerV2.getERCodeContent(goods, taoBaoLink.getTaoToken()));
            }
         } else if (cid == 4) { // 邀请分享
@@ -1112,7 +1131,7 @@
                  }
               }
               title = title.replace("【邀请码】", inviteCode);
               title = title.replace("【邀请链接】", UserUtil.getInviteShortLink(uid));
               title = title.replace("【邀请链接】", Constant.YINGYONGBAO_LINK);
               data.put("title", title);
            } else { // 有图分享