mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-07-06 13:43:02 +08:00
附件组件优化
This commit is contained in:
@ -210,6 +210,7 @@ class Ueditor extends Common
|
||||
if(isset($data['state']) && $data['state'] == 'SUCCESS')
|
||||
{
|
||||
$data['type'] = $attachment_type;
|
||||
$data['path_type'] = empty($this->data_request['path_type']) ? 'other' : $this->data_request['path_type'];
|
||||
$ret = ResourcesService::AttachmentAdd($data);
|
||||
if($ret['code'] == 0)
|
||||
{
|
||||
@ -266,11 +267,17 @@ class Ueditor extends Common
|
||||
'm' => $start,
|
||||
'n' => $size,
|
||||
'where' => [
|
||||
'type' => substr($this->current_action, 4),
|
||||
'path_type' => input('path_type', 'other'),
|
||||
['type', '=', substr($this->current_action, 4)],
|
||||
['path_type', '=', empty($this->data_request['path_type']) ? 'other' : $this->data_request['path_type']]
|
||||
],
|
||||
];
|
||||
|
||||
// 搜索关键字
|
||||
if(!empty($this->data_request['keywords']))
|
||||
{
|
||||
$params['where'][] = ['original', 'like', '%'.$this->data_request['keywords'].'%'];
|
||||
}
|
||||
|
||||
// 数据初始化
|
||||
$data = array(
|
||||
'state' => "没有相关数据",
|
||||
@ -330,6 +337,7 @@ class Ueditor extends Common
|
||||
if(isset($data['state']) && $data['state'] == 'SUCCESS')
|
||||
{
|
||||
$data['type'] = 'remote';
|
||||
$data['path_type'] = empty($this->data_request['path_type']) ? 'other' : $this->data_request['path_type'];
|
||||
$ret = ResourcesService::AttachmentAdd($data);
|
||||
if($ret['code'] != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user