Explorar o código

回调接口修改

shizhongqi hai 9 meses
pai
achega
34aabce60f
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      app-ghs/controllers/DeliveryController.php

+ 4 - 4
app-ghs/controllers/DeliveryController.php

@@ -15,6 +15,8 @@ use Yii;
  */
 class DeliveryController extends BaseController
 {
+    public $guestAccess = ['callback', 'auth-callback'];
+
     // ------------------ 授权(账号绑定) ---------------------
     //授权
     public function actionMerchantAuth()
@@ -133,8 +135,7 @@ class DeliveryController extends BaseController
             throw new \yii\web\HttpException(500, '保存授权信息失败');
         }
 
-        //return $this->asJson(['return_code' => 0, 'return_msg' => 'OK']);
-        return $this->redirect(['success']);
+        return $this->asJson(['return_code' => 0, 'return_msg' => 'OK']);
     }
 
     /**
@@ -195,7 +196,6 @@ class DeliveryController extends BaseController
             throw new \yii\web\HttpException(500, '保存授权信息失败');
         }
 
-        //return $this->asJson(['return_code' => 0, 'return_msg' => 'OK']);
-        return $this->redirect(['success']);
+        return $this->asJson(['return_code' => 0, 'return_msg' => 'OK']);
     }
 }