15954078560 пре 2 година
родитељ
комит
3de775335c
2 измењених фајлова са 18 додато и 6 уклоњено
  1. 12 3
      application/admin/controller/Video.php
  2. 6 3
      application/api/controller/Notify.php

+ 12 - 3
application/admin/controller/Video.php

@@ -185,7 +185,10 @@ class Video extends Backend
                     ];
 
                     $data = json_encode($data, 320);
-                    $rs = httpRequest($url, 'POST', $data);
+                    $header = [
+                        'Content-Type: application/json'
+                    ];
+                    $rs = httpRequest($url, 'POST', $data, $header);
                     if ($rs) {
                         $rs = json_decode($rs, true);
                         if ($rs['code'] == 'A000000') {
@@ -276,7 +279,10 @@ class Video extends Backend
                         ]
                     ];
                     $data = json_encode($data, 320);
-                    $rs = httpRequest($url, 'POST', $data);
+                    $header = [
+                        'Content-Type: application/json'
+                    ];
+                    $rs = httpRequest($url, 'POST', $data, $header);
                     if ($rs) {
                         $rs = json_decode($rs, true);
                         if ($rs['code'] == 'A000000') {
@@ -349,7 +355,10 @@ class Video extends Backend
             ]
         ];
         $data = json_encode($data, 320);
-        $rs = httpRequest($url, 'POST', $data);
+        $header = [
+            'Content-Type: application/json'
+        ];
+        $rs = httpRequest($url, 'POST', $data, $header);
         if (!$rs) {
             Db::rollback();
             $this->error('删除失败');

+ 6 - 3
application/api/controller/Notify.php

@@ -737,9 +737,12 @@ class Notify extends Api
 
         $starttime = date('Ymd000000', time());
         $endtime = date('Ymd235959', time());
-        $url = 'http://'.config('inject_ip').':'.config('inject_port').'/injectResult/v1/queryAdd?cspId=' . config('cspid') . '&startTime='.$starttime.'&endTime='.$endtime;
-//        $url = 'http://jscp.agency.gitv.tv/injectResult/v1/queryAdd?cspId=' . config('cspid') . '&startTime='.$starttime.'&endTime='.$endtime;
-        $rs = httpRequest($url, 'POST', []);
+//        $url = 'http://'.config('inject_ip').':'.config('inject_port').'/injectResult/v1/queryAdd?cspId=' . config('cspid') . '&startTime='.$starttime.'&endTime='.$endtime;
+        $url = 'http://jscp.agency.gitv.tv/injectResult/v1/queryAdd?cspId=' . config('cspid') . '&startTime='.$starttime.'&endTime='.$endtime;
+        $header = [
+            'Content-Type: application/json'
+        ];
+        $rs = httpRequest($url, 'POST', [], $header);
         if (!$rs) {
             echo 'cuo wu1';
             die;