正在显示
3 个修改的文件
包含
21 行增加
和
1 行删除
| @@ -120,4 +120,15 @@ class Common | @@ -120,4 +120,15 @@ class Common | ||
| 120 | } | 120 | } |
| 121 | return true; | 121 | return true; |
| 122 | } | 122 | } |
| 123 | + | ||
| 124 | + /** | ||
| 125 | + * @name :(多维数组去重)array_deduplication | ||
| 126 | + * @author :lyh | ||
| 127 | + * @method :post | ||
| 128 | + * @time :2023/5/9 10:47 | ||
| 129 | + */ | ||
| 130 | + public static function array_deduplication($arr){ | ||
| 131 | + $uniqueArray = array_map('json_decode', array_unique(array_map('json_encode', $arr))); | ||
| 132 | + return $uniqueArray; | ||
| 133 | + } | ||
| 123 | } | 134 | } |
| @@ -53,5 +53,13 @@ class AyrReleaseLogic extends BaseLogic | @@ -53,5 +53,13 @@ class AyrReleaseLogic extends BaseLogic | ||
| 53 | return $this->success(); | 53 | return $this->success(); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | - public function post_ | 56 | + /** |
| 57 | + * @name :(发布到youtube)post_youtube | ||
| 58 | + * @author :lyh | ||
| 59 | + * @method :post | ||
| 60 | + * @time :2023/5/9 10:22 | ||
| 61 | + */ | ||
| 62 | + public function post_youtube(){ | ||
| 63 | + return $this->success(); | ||
| 64 | + } | ||
| 57 | } | 65 | } |
| @@ -39,6 +39,7 @@ class WebSettingServiceLogic extends BaseLogic | @@ -39,6 +39,7 @@ class WebSettingServiceLogic extends BaseLogic | ||
| 39 | //删除以前的数据 | 39 | //删除以前的数据 |
| 40 | $this->model->del(['project_id'=>$this->user['project_id']]); | 40 | $this->model->del(['project_id'=>$this->user['project_id']]); |
| 41 | foreach ($this->param['data'] as $k => $v){ | 41 | foreach ($this->param['data'] as $k => $v){ |
| 42 | + //查询数据是否在数组中存在 | ||
| 42 | $v['project_id'] = $this->user['project_id']; | 43 | $v['project_id'] = $this->user['project_id']; |
| 43 | $this->param['data'][$k] = $v; | 44 | $this->param['data'][$k] = $v; |
| 44 | } | 45 | } |
-
请 注册 或 登录 后发表评论