feat(socialCircle): 新增视频号内容支持
- 在社区活动功能中添加视频号内容支持
- 新增视频号类型选择和相关字段
- 实现视频号内容的展示和隐藏逻辑
- 更新列表页面,增加来源列显示内容类型
| | |
| | | `state` int(11) DEFAULT '0' COMMENT '状态 0-未开启 1-已开启', |
| | | `hot_state` int(11) DEFAULT '0' COMMENT '是否推荐到首页 0-不推荐 1-推荐', |
| | | `order_cnt` int(11) DEFAULT '0' COMMENT '排序', |
| | | `is_normal` int(11) DEFAULT '1' COMMENT '1:普通社区内容 2:视频号内容', |
| | | `finder_user_name` varchar(128) DEFAULT NULL COMMENT '视频号 id,以“sph”开头的id,可在视频号助手获取', |
| | | `feed_id` varchar(512) DEFAULT NULL COMMENT '视频 feedId', |
| | | */ |
| | | private Long memberId; |
| | | @TableField(exist = false) |
| | |
| | | private Integer state; |
| | | private Integer hotState; |
| | | private Integer orderCnt; |
| | | //1:普通社区内容 2:视频号内容 |
| | | private Integer isNormal; |
| | | private String finderUserName; |
| | | private String feedId; |
| | | } |
| | |
| | | happySocialCircle.setContent(dto.getContent()); |
| | | happySocialCircle.setIndexFile(dto.getIndexFile()); |
| | | happySocialCircle.setOrderCnt(dto.getOrderCnt()); |
| | | happySocialCircle.setIsNormal(dto.getIsNormal()); |
| | | if("2".equals(dto.getIsNormal())){ |
| | | happySocialCircle.setFinderUserName(dto.getFinderUserName()); |
| | | happySocialCircle.setFeedId(dto.getFeedId()); |
| | | } |
| | | |
| | | this.baseMapper.updateById(happySocialCircle); |
| | | return new FebsResponse().success().message("操作成功"); |
| | |
| | | |
| | | @ApiModelProperty(value = "转发数") |
| | | private Integer sendCnt; |
| | | @ApiModelProperty(value = "1:普通社区内容 2:视频号内容") |
| | | private Integer isNormal; |
| | | @ApiModelProperty(value = "视频号finderUserName") |
| | | private String finderUserName; |
| | | @ApiModelProperty(value = "视频号feedId") |
| | | private String feedId; |
| | | |
| | | } |
| | |
| | | <select id="selectListInPage" resultType="cc.mrbird.febs.mall.vo.activity.ApiScInfoVo"> |
| | | select |
| | | a.id, |
| | | a.is_normal, |
| | | a.finder_user_name, |
| | | a.feed_id, |
| | | b.avatar, |
| | | b.name as memberName, |
| | | a.name as name, |
| | |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-row layui-col-space10 layui-form-item"> |
| | | <div class="layui-col-lg6"> |
| | | <label class="layui-form-label febs-form-item-require">来源:</label> |
| | | <div class="layui-input-block"> |
| | | <select name="isNormal" class="goods-type" lay-filter="goods-type-select"> |
| | | <option value="1">普通社区内容</option> |
| | | <option value="2">视频号内容</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <blockquote class="layui-elem-quote blue-border febs-hide tc-set">视频号信息</blockquote> |
| | | <div class="layui-form-item febs-hide tc-set"> |
| | | <div class="layui-col-lg6"> |
| | | <label class="layui-form-label">视频号 id:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="finderUserName" placeholder="请输入" autocomplete="off" class="layui-input"> |
| | | <div class="layui-form-mid layui-word-aux">视频号 id,以“sph”开头的id,可在视频号助手获取。</div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-lg6"> |
| | | <label class="layui-form-label">视频 feedId:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="feedId" placeholder="请输入" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <blockquote class="layui-elem-quote blue-border">基础信息</blockquote> |
| | | <div class="layui-row layui-col-space10 layui-form-item"> |
| | | <div class="layui-col-lg6"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="layui-row layui-col-space10 layui-form-item"> |
| | | <div class="layui-col-lg6"> |
| | | <label class="layui-form-label febs-form-item-require">封面:</label> |
| | |
| | | return false; |
| | | }); |
| | | |
| | | form.on('select(goods-type-select)', function(data){ |
| | | $('.tc-set').each(function() { |
| | | if (data.value == 2) { |
| | | $(this).show(); |
| | | } else { |
| | | $(this).hide(); |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | }); |
| | | </script> |
| | |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-row layui-col-space10 layui-form-item"> |
| | | <div class="layui-col-lg6"> |
| | | <label class="layui-form-label febs-form-item-require">来源:</label> |
| | | <div class="layui-input-block"> |
| | | <select name="isNormal" class="goods-type" lay-filter="goods-type-select"> |
| | | <option value="1">普通社区内容</option> |
| | | <option value="2">视频号内容</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <blockquote class="layui-elem-quote blue-border febs-hide tc-set">视频号信息</blockquote> |
| | | <div class="layui-form-item febs-hide tc-set"> |
| | | <div class="layui-col-lg6"> |
| | | <label class="layui-form-label">视频号 id:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="finderUserName" placeholder="请输入" autocomplete="off" class="layui-input"> |
| | | <div class="layui-form-mid layui-word-aux">视频号 id,以“sph”开头的id,可在视频号助手获取。</div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-lg6"> |
| | | <label class="layui-form-label">视频 feedId:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="feedId" placeholder="请输入" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <blockquote class="layui-elem-quote blue-border">基础信息</blockquote> |
| | | <!-- 隐藏的 ID 项 --> |
| | | <div class="layui-form-item febs-hide"> |
| | |
| | | "orderCnt": activity.orderCnt, |
| | | "hotState": activity.hotState, |
| | | "indexFile": activity.indexFile, |
| | | "isNormal": activity.isNormal, |
| | | "finderUserName": activity.finderUserName, |
| | | "feedId": activity.feedId, |
| | | }); |
| | | var arr = []; |
| | | arr.push(activity.categoryId); |
| | |
| | | }) |
| | | return false; |
| | | }); |
| | | |
| | | form.on('select(goods-type-select)', function(data){ |
| | | $('.tc-set').each(function() { |
| | | if (data.value == 2) { |
| | | $(this).show(); |
| | | } else { |
| | | $(this).hide(); |
| | | } |
| | | }) |
| | | }); |
| | | }); |
| | | </script> |
| | |
| | | <input type="checkbox" value={{d.id}} lay-text="展示|隐藏" lay-skin="switch" lay-filter="scStateSwitch"> |
| | | {{# } }} |
| | | </script> |
| | | <script type="text/html" id="socialTypeFormat"> |
| | | {{# if(d.isNormal == 1) { }} |
| | | <span>普通社区内容</span> |
| | | {{# }else if(d.isNormal == 2) { }} |
| | | <span>视频号内容</span> |
| | | {{# } else { }} |
| | | <span>-</span> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="scToolbar"> |
| | | <div class="layui-btn-container"> |
| | |
| | | |
| | | {type: 'numbers', title: '', width: 80}, |
| | | {title: '操作', toolbar: '#activityOption', minWidth: 200, align: 'center'}, |
| | | {templet:"#socialTypeFormat", title: '来源', minWidth: 140,align:'left'}, |
| | | {field: 'name', title: '标题', minWidth: 150,align:'left'}, |
| | | {field: 'memberName', title: '发布人', minWidth: 150,align:'left'}, |
| | | {field: 'categoryName', title: '分类', minWidth: 150,align:'left'}, |
| | | {field: 'state', title: '状态', templet: '#scStateSwitch', minWidth: 130,align:'center'} |
| | | {field: 'state', title: '状态', templet: '#scStateSwitch', minWidth: 130,align:'center'}, |
| | | ]] |
| | | }); |
| | | } |