Authored by mlge

种草--话题描述非必填项

... ... @@ -82,7 +82,7 @@ public class TopicServiceImpl implements ITopicService {
GrassTopic record = new GrassTopic();
record.setId(req.getId());
record.setTopicName(req.getTopicName());
record.setTopicDesc(req.getTopicDesc());
record.setTopicDesc(req.getTopicDesc() == null ? "" : req.getTopicDesc());
record.setTopicImageUrl(req.getTopicImageUrl());
record.setRelatedGroup(req.getRelatedGroup());
record.setViewModel(req.getViewModel() == null ? 1 : req.getViewModel());
... ...
... ... @@ -15,9 +15,9 @@
<tr style="height: 60px">
<td>
<span style="color:red">*</span><label>话题描述</label> <br>
<span style="color:red"></span><label>话题描述</label> <br>
<textarea id="topicDesc" name="topicDesc" style="width: 380px;" rows="6" placeholder=""
required maxlength="100"></textarea>
maxlength="100"></textarea>
</td>
</tr>
... ... @@ -146,7 +146,10 @@
if (data) {//编辑窗口
$("#topicName").textbox("setValue", data.topicName);
$("#topicDesc").html(data.topicDesc);
if(data.topicDesc != null){
$("#topicDesc").html(data.topicDesc);
}
//图片
$("#imageUpload").imageUpload('setValue', data.topicImageUrl);
debugger
... ...
... ... @@ -431,8 +431,8 @@
//话题描述
var topicDesc = $("#topicDesc").val();
if(topicDesc == null || topicDesc =="" || topicDesc.length > 100){
$.messager.alert("保存失败", "话题描述不能为空,且小于100字", "error");
if(topicDesc != null && topicDesc.length > 100){
$.messager.alert("保存失败", "话题描述须小于100字", "error");
return false;
}
... ...