This commit is contained in:
devil_gong
2018-12-18 11:10:53 +08:00
parent 9e44b316b7
commit baf80871ab
147 changed files with 1236 additions and 1538 deletions

View File

@ -56,7 +56,7 @@ class Express extends Common
// 是否ajax请求
if(!IS_AJAX)
{
$this->error(lang('common_unauthorized_access'));
$this->error('非法访问');
}
// 获取数据
@ -74,7 +74,7 @@ class Express extends Common
$v['json'] = json_encode($v);
}
}
$msg = empty($data) ? lang('common_not_data_tips') : lang('common_operation_success');
$msg = empty($data) ? '没有相关数据' : '操作成功';
$this->ajaxReturn($msg, 0, $data);
}
@ -90,7 +90,7 @@ class Express extends Common
// 是否ajax请求
if(!IS_AJAX)
{
$this->error(lang('common_unauthorized_access'));
$this->error('非法访问');
}
// 图片
@ -114,9 +114,9 @@ class Express extends Common
// 写入数据库
if($m->add())
{
$this->ajaxReturn(lang('common_operation_add_success'));
$this->ajaxReturn('新增成功');
} else {
$this->ajaxReturn(lang('common_operation_add_error'), -100);
$this->ajaxReturn('新增失败', -100);
}
}
} else {
@ -133,9 +133,9 @@ class Express extends Common
// 更新数据库
if($m->where(array('id'=>I('id')))->save())
{
$this->ajaxReturn(lang('common_operation_edit_success'));
$this->ajaxReturn('编辑成功');
} else {
$this->ajaxReturn(lang('common_operation_edit_error'), -100);
$this->ajaxReturn('编辑失败或数据未改变', -100);
}
}
}
@ -153,7 +153,7 @@ class Express extends Common
{
if(!IS_AJAX)
{
$this->error(lang('common_unauthorized_access'));
$this->error('非法访问');
}
$m = D('Express');
@ -164,9 +164,9 @@ class Express extends Common
// 删除
if($m->delete($id))
{
$this->ajaxReturn(lang('common_operation_delete_success'));
$this->ajaxReturn('删除成功');
} else {
$this->ajaxReturn(lang('common_operation_delete_error'), -100);
$this->ajaxReturn('删除失败或资源不存在', -100);
}
} else {
$this->ajaxReturn($m->getError(), -1);