Skip to content

Commit

Permalink
修复一些bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wuceyang committed Feb 13, 2017
1 parent e03f14e commit 0fd6a35
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/C/Admin/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function publish(Request $req, Response $resp){

$content = new mContent();

if(!$content->addContent($title, $type, $image, $video, $date, $ishot, $text, $this->userinfo['ID'])){
if(!$content->addContent($title, $type, $image, $video, $date, $ishot == 'on' ? 1 : 0, $text, $this->userinfo['ID'])){

return $this->error("文章录入失败", "javascript:history.back()");
}
Expand Down
4 changes: 2 additions & 2 deletions app/V/admin/actor_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<button class="layui-btn layui-btn-normal" data-max="1" id="addnewbtn" data-bucket="image"><i class="layui-icon">&#xe642;</i> 图片添加</button>
</span>
<div class="layui-form-item">
<form action="/admin/actor/index" method="get">
<form class="layui-form" action="/admin/actor/index" method="get">
<div class="layui-inline">
<label class="layui-form-label" style="width: 40px;">性别:</label>
<div class="layui-input-inline" style="width: 80px;">
<div class="layui-input-inline" style="width: 100px;">
<select name="gender" class="layui-input" lay-verify="">
<option value="">选择性别</option>
<loop $gender $k $v />
Expand Down
2 changes: 1 addition & 1 deletion app/V/admin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ <h1 class="star-text-h1">网星传媒后台管理系统</h1>
if(beforeRequest && $.isFunction(beforeRequest)){

if(!beforeRequest.call(dataform)){

console.log(1);
return false;
}
}
Expand Down
23 changes: 11 additions & 12 deletions app/V/admin/content_add.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
<script type="text/javascript" src="<=__RESPATH__/>/plugin/qiniu/pupload/pupload.cs.js"></script>
<script type="text/javascript">

var uploaded = true;

layui.use(['jquery', 'layer', 'upload', 'form','layedit', 'laydate'], function(){

var $ = layui.jquery, layer = layui.layer, form = layui.form(), editor = layui.layedit;
Expand Down Expand Up @@ -187,18 +189,6 @@
var qiniu = new QiniuJsSDK();

qiniu.uploader(upParams);

$('#upform').on('submit', function(){

if(!uploaded){

layer.alert('文件还未上传完成,请稍后提交', {icon: 5});

return false;
}

return true;
})
})

$('.star-imagepath').delegate('.star-imagepreview', 'click', function(){
Expand Down Expand Up @@ -248,6 +238,15 @@
ele.val(content);

$('.star-editor',this).append(ele);

if(!uploaded){

layer.alert('文件还未上传完成,请稍后提交', {icon: 5});

return false;
}

return true;
}
})
</script>>
Expand Down

0 comments on commit 0fd6a35

Please sign in to comment.