Sfoglia il codice sorgente

引流编辑 pop_type_sub保存问题

liuzejian 1 anno fa
parent
commit
b210822400

+ 1 - 1
modules/Yinliu/Http/Controllers/YinliuManageController.php

@@ -59,7 +59,7 @@ class YinliuManageController extends CatchController
             'link_url' => 'required',
         ]);
 
-        $data = $request->only('focus_type', 'gzh_id', 'pop_type', 'link_type', 'link_url');
+        $data = $request->only('focus_type', 'gzh_id', 'pop_type', 'link_type', 'link_url', 'pop_type_sub');
         if(2 != $data['pop_type']) {
             $data['pop_type_sub'] = 0;
         }

+ 1 - 1
tests/Yinliu/Http/Controllers/YinliuManageControllerTest.php

@@ -14,7 +14,7 @@ class YinliuManageControllerTest extends UsedTestCase
         $res = $this->withHeaders([
             'Authorization' => 'Bearer '. $this->token,
         ])->json('post','http://localhost/api/yinliu/manage/save', [
-            'id' => 1,
+            'id' => 4,
             'focus_type' => 1,
             'gzh_id' => 8,
             'pop_type' => 3,