|
|
@@ -122,7 +122,7 @@ class DeliveryController extends BaseController
|
|
|
{
|
|
|
$fengnaioAuth = new \common\components\delivery\platform\fengniao\Auth();
|
|
|
$mainId = $this->mainId;
|
|
|
- $redirectUrl = Yii::$app->params['ghsHost'] . '/delivery/fengniao-auth-callback' . '?mainId=' . $mainId;
|
|
|
+ $redirectUrl = Yii::$app->params['ghsHost'] . '/delivery/fengniao-auth-callback' . '?main_id=' . $mainId;
|
|
|
$authUrl = $fengnaioAuth->generateAuthUrl($redirectUrl);
|
|
|
|
|
|
util::success(['url'=>$authUrl]);
|
|
|
@@ -795,11 +795,12 @@ class DeliveryController extends BaseController
|
|
|
// 保存授权信息到数据库
|
|
|
$data = [
|
|
|
'mainId' => $mainId,
|
|
|
+ 'merchantId' => $merchantId,
|
|
|
'shopId' => '',
|
|
|
'accessToken' => $result['access_token'],
|
|
|
'refreshToken' => $result['refresh_token'],
|
|
|
'expiresAt' => $result['expire_in'] + time(),
|
|
|
- 'authType' => 'all_store',
|
|
|
+ 'authType' => $scope,
|
|
|
'platform' => 'fengniao'
|
|
|
];
|
|
|
DeliveryAuthTokenClass::add($data);
|