kevin_zhangl 2 лет назад
Родитель
Сommit
5cec13245e

+ 1 - 0
backendApi/config/params.php

@@ -11,6 +11,7 @@ return [
         'v1/site/page-data',
         'v1/site/captcha',
         'v1/site/send-notice',
+        'v1/site/send-notify',
         'v1/ad/sort',
         'v1/demo/payments',
         'v1/demo/ipayments',

+ 1 - 0
backendApi/config/urlManagerRules.php

@@ -18,6 +18,7 @@ return [
             'GET page-data' => 'page-data',
             'GET captcha' => 'captcha',
             'GET send-notice' => 'send-notice',
+            'GET send-notify' => 'send-notify',
         ],
     ],
     [

+ 8 - 0
backendApi/modules/v1/controllers/SiteController.php

@@ -168,4 +168,12 @@ class SiteController extends BaseController
         ];
         return static::notice(['data' => $data['bug监控正常运行,没有发现异常.']]);
     }
+
+    public function actionSendNotify()
+    {
+        $message = Yii::$app->request->get('message', '收到信息了');
+        $data = ['message' => $message];
+
+        return static::notice($data);
+    }
 }

+ 1 - 0
frontendApi/config/params.php

@@ -10,6 +10,7 @@ return [
         'v1/site/page-data',
         'v1/site/captcha',
         'v1/site/send-notice',
+        'v1/site/send-notify',
         'v1/oauth/is-login-verify',
         'v1/oauth/login-by-backend',
         'v1/oauth/no-login-modify-password',

+ 1 - 0
frontendApi/config/urlManagerRules.php

@@ -21,6 +21,7 @@ return [
             'GET captcha' => 'captcha',
             'GET ba-base-info' => 'ba-base-info',
             'GET send-notice' => 'send-notice',
+            'GET send-notify' => 'send-notify',
         ],
     ],
     [

+ 8 - 0
frontendApi/modules/v1/controllers/SiteController.php

@@ -370,4 +370,12 @@ class SiteController extends BaseController
 
         return static::notice(['data' => $data['bug监控正常运行,没有发现异常.']]);
     }
+
+    public function actionSendNotify()
+    {
+        $message = Yii::$app->request->get('message', '收到信息了');
+        $data = ['message' => $message];
+
+        return static::notice($data);
+    }
 }