|
@@ -85,7 +85,7 @@ class TicketUploadDataLogic extends BaseLogic |
|
@@ -85,7 +85,7 @@ class TicketUploadDataLogic extends BaseLogic |
|
85
|
* @method :post
|
85
|
* @method :post
|
|
86
|
* @time :2025/9/29 17:18
|
86
|
* @time :2025/9/29 17:18
|
|
87
|
*/
|
87
|
*/
|
|
88
|
- public function cateText($type,$category_id,$is_array = false)
|
88
|
+ public function cateText($type,$category_id = [],$keyword_id = [],$is_array = false)
|
|
89
|
{
|
89
|
{
|
|
90
|
if(empty($category_id)){
|
90
|
if(empty($category_id)){
|
|
91
|
return '';
|
91
|
return '';
|
|
@@ -105,7 +105,7 @@ class TicketUploadDataLogic extends BaseLogic |
|
@@ -105,7 +105,7 @@ class TicketUploadDataLogic extends BaseLogic |
|
105
|
->pluck($filed, 'id')
|
105
|
->pluck($filed, 'id')
|
|
106
|
->toArray();
|
106
|
->toArray();
|
|
107
|
if($type == 1){
|
107
|
if($type == 1){
|
|
108
|
- $keywod_arr = $keywodModel->whereIn('id', (array)$category_id)
|
108
|
+ $keywod_arr = $keywodModel->whereIn('id', (array)$keyword_id)
|
|
109
|
->pluck($filed, 'id')
|
109
|
->pluck($filed, 'id')
|
|
110
|
->toArray();
|
110
|
->toArray();
|
|
111
|
return ['keywod_arr' => $keywod_arr, 'cate_arr' => $cate_arr];
|
111
|
return ['keywod_arr' => $keywod_arr, 'cate_arr' => $cate_arr];
|
|
@@ -131,7 +131,7 @@ class TicketUploadDataLogic extends BaseLogic |
|
@@ -131,7 +131,7 @@ class TicketUploadDataLogic extends BaseLogic |
|
131
|
$this->fail('当前数据不存在或已被删除');
|
131
|
$this->fail('当前数据不存在或已被删除');
|
|
132
|
}
|
132
|
}
|
|
133
|
ProjectServer::useProject($info['project_id']);
|
133
|
ProjectServer::useProject($info['project_id']);
|
|
134
|
- $info['text']['cate_name'] = $this->cateText($info['type'],$info['text']['category_id'] ?? [],true);
|
134
|
+ $info['text']['cate_name'] = $this->cateText($info['type'],$info['text']['category_id'] ?? [],$info['text']['keyword_id'] ?? [],true);
|
|
135
|
$info = $this->getHandleFileImage($info);
|
135
|
$info = $this->getHandleFileImage($info);
|
|
136
|
DB::disconnect('custom_mysql');
|
136
|
DB::disconnect('custom_mysql');
|
|
137
|
return $this->success($info);
|
137
|
return $this->success($info);
|
|
@@ -186,17 +186,18 @@ class TicketUploadDataLogic extends BaseLogic |
|
@@ -186,17 +186,18 @@ class TicketUploadDataLogic extends BaseLogic |
|
186
|
$v['url'] = str_replace_url($v['url']);
|
186
|
$v['url'] = str_replace_url($v['url']);
|
|
187
|
$info['text']['image'][$k] = $v;
|
187
|
$info['text']['image'][$k] = $v;
|
|
188
|
}
|
188
|
}
|
|
|
|
189
|
+ $thumb = Arr::a2s($info['text']['image'][0] ?? []);
|
|
189
|
$info['text']['image'] = Arr::a2s($info['text']['image'] ?? []);
|
190
|
$info['text']['image'] = Arr::a2s($info['text']['image'] ?? []);
|
|
190
|
}else{
|
191
|
}else{
|
|
191
|
- $info['text']['image'] = Arr::a2s([]);
|
192
|
+ $thumb = $info['text']['image'] = Arr::a2s([]);
|
|
192
|
}
|
193
|
}
|
|
193
|
try {
|
194
|
try {
|
|
194
|
$productModel = new Product();
|
195
|
$productModel = new Product();
|
|
195
|
$data = [
|
196
|
$data = [
|
|
196
|
'project_id' => $info['project_id'],
|
197
|
'project_id' => $info['project_id'],
|
|
197
|
'title' => $info['text']['title'],
|
198
|
'title' => $info['text']['title'],
|
|
198
|
- 'thumb'=>json_encode($info['text']['image'][0] ?? [],true),
|
|
|
|
199
|
- 'gallery'=>json_encode($info['text']['image'] ?? [],true),
|
199
|
+ 'thumb'=>$thumb,
|
|
|
|
200
|
+ 'gallery'=>$info['text']['image'] ?? [],
|
|
200
|
'intro'=>$info['text']['remark'],
|
201
|
'intro'=>$info['text']['remark'],
|
|
201
|
'category_id'=>$category_id ?? '',
|
202
|
'category_id'=>$category_id ?? '',
|
|
202
|
'keyword_id'=>$keyword_id ?? '',
|
203
|
'keyword_id'=>$keyword_id ?? '',
|