联系官方销售客服
1835022288
028-61286886
在测试小程序问答回帖时,总出现“评论内容不能为空”求助!
我的API接口是:
// 提交评论 postCommentUrl: function(id) { return CMS_API + '&s=wenda&m=post&c=comment&api_auth_code=' + wx.getStorageSync('member_auth') + '&api_auth_uid=' + wx.getStorageSync('member_uid') + '&id=' + id; },
我的前端代码是:
<div class="comment-input"> <input v-model="newComment" placeholder="请输入评论内容" class="input-box" /> <button @tap="submitComment" class="submit-btn">提交</button> </div> </div>
JS部分:
// 提交评论 submitComment() { var self = this; if (self.newComment.trim() === "") { wx.showToast({ title: "评论内容不能为空", icon: "none", }); return; }