记得上下班打卡 | git大法好,push需谨慎

Commit 24a1231f authored by dongchun's avatar dongchun

修改搜索词重复问题

parent eb8cdef0
...@@ -162,13 +162,16 @@ ...@@ -162,13 +162,16 @@
</div> </div>
<div class="gitPic"> <div class="gitPic">
<img id="viewImg" src="" alt="" style="max-height:150px;margin-top: 12px;margin-left: 12px;"> <img id="viewImg" src="" alt="" style="max-height:150px;margin-top: 12px;margin-left: 12px;">
<div class="ibox-content" style="border: none;padding-bottom: 0;"> <div class="ibox-content" style="border: none;padding-bottom: 0;display:flex;align-items:center;">
<em style="color:red;margin-right:12px">*</em>
<div class="form-group"> <div class="form-group">
<div class="file-loading"> <div class="file-loading">
<input id="fileinput" type="file" name="file" data-browse-on-zone-click="true" data-theme="fas"> <input id="fileinput" type="file" name="file" data-browse-on-zone-click="true" data-theme="fas">
</div> </div>
</div> </div>
<p style="margin-left:12px;">图片尺寸为54PX,比例为1:1</p>
</div> </div>
</div> </div>
<div class="bottomBtn"> <div class="bottomBtn">
<a src="javascript:;" class="layui-layer-btn0 paddings" onclick="yes(1,2)">确定</a> <a src="javascript:;" class="layui-layer-btn0 paddings" onclick="yes(1,2)">确定</a>
...@@ -313,7 +316,7 @@ ...@@ -313,7 +316,7 @@
name = $("#threeIpt").val(); name = $("#threeIpt").val();
catePid = $("#secondTypeSelect").val(); catePid = $("#secondTypeSelect").val();
} }
if (!name) { if (!name || !$("#viewImg").attr('src')) {
return layer.msg('请将必填项填写完整!') return layer.msg('请将必填项填写完整!')
} }
let data = { let data = {
...@@ -328,9 +331,14 @@ ...@@ -328,9 +331,14 @@
url: '/goblin/category/addSave', url: '/goblin/category/addSave',
data, data,
success: function (res) { success: function (res) {
$("pull-right button[type=refresh]").click(); console.log(res, '121212')
closeModal (); if (res.code == 0) {
refreshItem(); $("pull-right button[type=refresh]").click();
closeModal ();
refreshItem();
} else {
layer.msg(res.msg)
}
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment