|
@@ -108,6 +108,18 @@ class Project5CateController extends BaseController |
|
@@ -108,6 +108,18 @@ class Project5CateController extends BaseController |
|
108
|
if ($response->successful()) {
|
108
|
if ($response->successful()) {
|
|
109
|
$result = $response->json(); // 获取 JSON 响应体
|
109
|
$result = $response->json(); // 获取 JSON 响应体
|
|
110
|
if($result && $result['status'] == 200){
|
110
|
if($result && $result['status'] == 200){
|
|
|
|
111
|
+ //todo::更新分类数据
|
|
|
|
112
|
+ $action1 = $project5CateModel->getCateTypeAction($this->param['type']);
|
|
|
|
113
|
+ $url1 = $projectInfo['website'].'wp-admin/admin-ajax.php?action='.$action1;
|
|
|
|
114
|
+ $data = http_get($url1);
|
|
|
|
115
|
+ if($data && $data['status'] == 200){
|
|
|
|
116
|
+ $resultData = $data['data'];
|
|
|
|
117
|
+ $saveData = [
|
|
|
|
118
|
+ 'text'=>json_encode($data['data']),
|
|
|
|
119
|
+ ];
|
|
|
|
120
|
+ $project5CateModel->edit($saveData,['project_id' => $projectInfo['post_id'],'type'=>$this->param['type']]);
|
|
|
|
121
|
+ $this->response('success', Code::SUCCESS,$resultData);
|
|
|
|
122
|
+ }
|
|
111
|
$this->response('success');
|
123
|
$this->response('success');
|
|
112
|
}
|
124
|
}
|
|
113
|
}
|
125
|
}
|