|
|
@@ -39,14 +39,13 @@ class Auth
|
|
|
*/
|
|
|
public function __construct($mainId)
|
|
|
{
|
|
|
- $isProduction = getenv('YII_ENV') == 'dev'; // TODO 如果是 dev 请修改为 production
|
|
|
+ $isProduction = getenv('YII_ENV') == 'production';
|
|
|
|
|
|
if ($isProduction) {
|
|
|
// 生产环境配置
|
|
|
$this->appKey = 'dadaf2279d901a5ba40';
|
|
|
$this->appSecret = '828a03677a1c00a3a5b3c59209c4433d';
|
|
|
- // TODO
|
|
|
- $this->redirectUri = 'https://api.shop.hzghd.com' . '/delivery/dada-auth-callback?mainId='.$mainId; // TODO Yii::$app->params['ghsHost'].'/delivery/dada-auth-callback?mainId='.$mainId;
|
|
|
+ $this->redirectUri = Yii::$app->params['ghsHost'].'/delivery/dada-auth-callback?mainId='.$mainId; //'https://api.shop.hzghd.com' . '/delivery/dada-auth-callback?mainId='.$mainId;
|
|
|
$this->authorizeUrl = self::AUTHORIZE_URL_PROD;
|
|
|
$this->tokenUrl = self::TOKEN_URL_PROD;
|
|
|
} else {
|