Commit 4000046d authored by 章建武's avatar 章建武

dep

parent b2df31b3
......@@ -47,7 +47,7 @@ class VideoController extends Controller
$num = $model->where($where)->count();
$num ++;
$param['num'] = $num;
$param['url'] = 'http://'.$_SERVER['SERVER_NAME'];
$validate_result = $validate->scene('add')->check($param);
if (!$validate_result) {
......
......@@ -152,9 +152,7 @@
'content': {
required: true,
},
'introduce': {
required: true,
}
},
messages: {
......@@ -164,10 +162,6 @@
'username': {
required: "内容不能为空",
},
'mobile': {
required: "简介不能为空",
},
}
});
</script>
......
......@@ -69,7 +69,7 @@
<a title="添加" data-toggle="tooltip" class="btn btn-primary btn-sm " href="{:url('add')}">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-danger btn-sm AjaxButton" data-toggle="tooltip" title="删除选中数据"
<a class="btn btn-danger btn-sm AjaxButton" data-toggle="tooltip" title="删除选中数据"
data-confirm-title="删除确认" data-confirm-content="您确定要删除选中的数据吗?" data-id="checked"
data-url="{:url('del')}">
<i class="fa fa-trash"></i> 删除
......
......@@ -352,6 +352,7 @@ $(function () {
if (typeof (dataData) != 'object') {
dataData = JSON.parse(dataData);
window.location.reload();
}
/*需要确认操作*/
......@@ -360,6 +361,7 @@ $(function () {
var confirmTitle = $(this).data("confirmTitle") || '操作确认';
//提示窗口的内容
var confirmContent = $(this).data("confirmContent") || '您确定要执行此操作吗?';
layer.confirm(confirmContent, {title: confirmTitle, closeBtn: 1, icon: 3}, function () {
//如果为直接访问
if (layerType === 1) {
......@@ -438,6 +440,7 @@ function ajaxRequest(url, method, data, go) {
}
goUrl(go);
window.location.reload();
},
error: function (xhr, type, errorThrown) {
//异常处理;
......@@ -450,6 +453,7 @@ function ajaxRequest(url, method, data, go) {
console.log(data);
layer.close(loadT);
}
window.location.reload();
layer.msg('访问错误,代码' + xhr.status, {icon: 2,scrollbar: false,});
}
}
......
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