mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-07-04 21:03:27 +08:00
语言
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user