mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-07-04 21:03:27 +08:00
语言
This commit is contained in:
@ -204,7 +204,7 @@ class AppSlide extends Common
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(lang('common_unauthorized_access'));
|
||||
$this->error('非法访问');
|
||||
}
|
||||
|
||||
// 图片
|
||||
@ -249,9 +249,9 @@ class AppSlide 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 {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
@ -286,9 +286,9 @@ class AppSlide 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);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
@ -307,7 +307,7 @@ class AppSlide extends Common
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(lang('common_unauthorized_access'));
|
||||
$this->error('非法访问');
|
||||
}
|
||||
|
||||
// 参数处理
|
||||
@ -323,7 +323,7 @@ class AppSlide extends Common
|
||||
$data = $m->find($id);
|
||||
if(empty($data))
|
||||
{
|
||||
$this->ajaxReturn(lang('common_data_no_exist_error'), -2);
|
||||
$this->ajaxReturn('资源不存在或已被删除', -2);
|
||||
}
|
||||
if($data['is_enable'] == 1)
|
||||
{
|
||||
@ -333,12 +333,12 @@ class AppSlide extends Common
|
||||
// 删除
|
||||
if($m->where(array('id'=>$id))->delete() !== false)
|
||||
{
|
||||
$this->ajaxReturn(lang('common_operation_delete_success'));
|
||||
$this->ajaxReturn('删除成功');
|
||||
} else {
|
||||
$this->ajaxReturn(lang('common_operation_delete_error'), -100);
|
||||
$this->ajaxReturn('删除失败或资源不存在', -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn(lang('common_param_error'), -1);
|
||||
$this->ajaxReturn('参数错误', -1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -354,15 +354,15 @@ class AppSlide extends Common
|
||||
// 参数
|
||||
if(empty($_POST['id']) || !isset($_POST['state']))
|
||||
{
|
||||
$this->ajaxReturn(lang('common_param_error'), -1);
|
||||
$this->ajaxReturn('参数错误', -1);
|
||||
}
|
||||
|
||||
// 数据更新
|
||||
if(db('AppSlide')->where(array('id'=>I('id')))->save(array('is_enable'=>I('state'))))
|
||||
{
|
||||
$this->ajaxReturn(lang('common_operation_edit_success'));
|
||||
$this->ajaxReturn('编辑成功');
|
||||
} else {
|
||||
$this->ajaxReturn(lang('common_operation_edit_error'), -100);
|
||||
$this->ajaxReturn('编辑失败或数据未改变', -100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user