|
|
@@ -30,9 +30,9 @@ Class AuthService{
|
|
|
public function huolalaAuth($mainId)
|
|
|
{
|
|
|
$huoLalaAuth = new \common\components\delivery\platform\huolala\Auth();
|
|
|
- // $apiHost = Yii::$app->params['ghsHost'];
|
|
|
- // TODO 暂时修改为测试环境
|
|
|
$apiHost = Yii::$app->params['ghsHost'];
|
|
|
+ // TODO 暂时修改为测试环境
|
|
|
+ //$apiHost = 'https://api.shop.hzghd.com';
|
|
|
$redirectUrl = $apiHost . '/delivery/huolala-auth-callback' . '?mainId=' . $mainId;
|
|
|
$authUrl = $huoLalaAuth->generateAuthUrl($redirectUrl);
|
|
|
|
|
|
@@ -43,24 +43,21 @@ Class AuthService{
|
|
|
public function fengniaoAuth($mainId)
|
|
|
{
|
|
|
$fengnaioAuth = new \common\components\delivery\platform\fengniao\Auth();
|
|
|
- // $apiHost = Yii::$app->params['ghsHost'];
|
|
|
- // TODO 暂时修改为测试环境
|
|
|
$apiHost = Yii::$app->params['ghsHost'];
|
|
|
+ // TODO 暂时修改为测试环境
|
|
|
+ //$apiHost = 'https://api.shop.hzghd.com';
|
|
|
$redirectUrl = $apiHost . '/delivery/fengniao-auth-callback' . '?main_id=' . $mainId;
|
|
|
$authUrl = $fengnaioAuth->generateAuthUrl($redirectUrl);
|
|
|
|
|
|
util::success(['url'=>$authUrl]);
|
|
|
}
|
|
|
|
|
|
- public function dadaAuth($mainId)
|
|
|
+ public function dadaAuth($mainId, $shopId)
|
|
|
{
|
|
|
- $dadaAuth = new \common\components\delivery\platform\dada\Auth();
|
|
|
+ $dadaAuth = new \common\components\delivery\platform\dada\Auth($mainId);
|
|
|
$ticket = $dadaAuth->getTicket();
|
|
|
-
|
|
|
- $redirectUrl = Yii::$app->params['ghsHost'] . '/delivery/dada-auth-callback' . '?mainId=' . $mainId;
|
|
|
- $shopNumber = '40d8391f9b05477b';
|
|
|
$state = 'huidiao_biaoshi';
|
|
|
- $authUrl = $dadaAuth->generateAuthUrl($ticket, $state, $shopNumber);
|
|
|
+ $authUrl = $dadaAuth->generateAuthUrl($ticket, $state, $shopId);
|
|
|
//header('Location: ' . $authUrl);
|
|
|
util::success(['url'=>$authUrl]);
|
|
|
}
|