正在显示
1 个修改的文件
包含
12 行增加
和
2 行删除
| @@ -92,7 +92,17 @@ class Project5CateController extends BaseController | @@ -92,7 +92,17 @@ class Project5CateController extends BaseController | ||
| 92 | if($projectInfo === false){ | 92 | if($projectInfo === false){ |
| 93 | $this->response('当前项目不存在或数据未同步',Code::SYSTEM_ERROR); | 93 | $this->response('当前项目不存在或数据未同步',Code::SYSTEM_ERROR); |
| 94 | } | 94 | } |
| 95 | - $url = $projectInfo['website'].'wp-admin/admin-ajax.php?action=get_products_category'; | ||
| 96 | - $data = http_post($url); | 95 | + $project5CateModel = new Project5Cate(); |
| 96 | + $projectInfo['website'] = 'https://devmark.globalso.com/'; | ||
| 97 | + $action = $project5CateModel->saveCateTypeAction($this->param['type']); | ||
| 98 | + $url = $projectInfo['website'].'wp-admin/admin-ajax.php?action='.$action; | ||
| 99 | + if(empty($action)){ | ||
| 100 | + $this->response('未知请求',Code::SYSTEM_ERROR); | ||
| 101 | + } | ||
| 102 | + $data = http_post($url,json_encode(['name'=>$this->param['name'],'parent'=>$this->param['parent']],true)); | ||
| 103 | + if($data && $data['status'] == 200){ | ||
| 104 | + $this->response('success', ); | ||
| 105 | + } | ||
| 106 | + $this->response('请求失败',Code::SYSTEM_ERROR); | ||
| 97 | } | 107 | } |
| 98 | } | 108 | } |
-
请 注册 或 登录 后发表评论