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

@ -55,7 +55,7 @@ class ScreeningPrice extends Common
// 是否ajax请求
if(!IS_AJAX)
{
$this->error(lang('common_unauthorized_access'));
$this->error('非法访问');
}
// 获取数据
@ -86,7 +86,7 @@ class ScreeningPrice extends Common
$data[$k]['json'] = json_encode($v);
}
}
$msg = empty($data) ? lang('common_not_data_tips') : lang('common_operation_success');
$msg = empty($data) ? '没有相关数据' : '操作成功';
$this->ajaxReturn($msg, 0, $data);
}
@ -120,7 +120,7 @@ class ScreeningPrice extends Common
// 是否ajax请求
if(!IS_AJAX)
{
$this->error(lang('common_unauthorized_access'));
$this->error('非法访问');
}
// id为空则表示是新增
@ -143,9 +143,9 @@ class ScreeningPrice 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 {
@ -164,9 +164,9 @@ class ScreeningPrice 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);
}
}
}
@ -184,7 +184,7 @@ class ScreeningPrice extends Common
{
if(!IS_AJAX)
{
$this->error(lang('common_unauthorized_access'));
$this->error('非法访问');
}
$m = D('ScreeningPrice');
@ -192,9 +192,9 @@ class ScreeningPrice extends Common
{
if($m->delete(I('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);