'CzWjvVY5F.dUqT65Knj81qh_eU2wI3SokO', 'adminUrl' => $adminUrl, 'frontUrl' => $frontUrl, 'openUrl' => $openUrl, 'picUrl' => $picUrl, 'wwwUrl' => $wwwUrl, 'mobileUrl' => $mobileUrl, 'miniUrl' => $miniUrl, //平台来源 'ptSource' => [ //商城移动端 'mobile' => 1, //商城小程序 'mini' => 2, //商家后台PC端 'admin' => 3, //商家后台移动端 'back' => 4, //总后台 'pt' => 5, ], //永不过期时间 'neverExpireTime' => 4102416000, //永不过期日期 'neverExpireDate' => '2100-01-01 00:00:00', 'pageSize' => 20, //aliyun oss ak 'accessKeyId'=>'LTAI4GCXNRgt87qnCB8JrGFt', 'accessKeySecret'=>'m5q7aU3wGcoid9wr0yFJ4JqzHMKfks', 'endpoint'=>'oss-cn-hangzhou.aliyuncs.com', //达达相关配置 'dadaAppKey'=>'dadae6c9d6064e69cf4', 'dadaAppSecret'=>'8ed3b159f64021003aa73f7233118fe6', ]; $prefixHttp = 'http://'; $userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : ''; if (strpos($userAgent, 'miniprogram') === true) { $prefixHttp = 'https://'; } $referrer = isset($_SERVER["HTTP_REFERER"]) ? strtolower($_SERVER["HTTP_REFERER"]) : ''; if (strpos($referrer, 'servicewechat.com') === true) { $prefixHttp = 'https://'; } if (strpos($referrer, 'https') === true) { $prefixHttp = 'https://'; } if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { $prefixHttp = 'https://'; } if (getenv('YII_ENV') == 'local') { $config['hdHost'] = $prefixHttp . 'api.shop.huaml.com'; $config['hdDomain'] = $prefixHttp . 'shop.huaml.com'; $config['hdPtHost'] = $prefixHttp . 'api.pt.huaml.com'; $config['hdShortHost'] = 'huaml.com'; $config['hdImgHost'] = $prefixHttp . 'img.huaml.com/'; $config['ghsHost'] = $prefixHttp . 'api.shop.hzghd.com'; $config['ghsDomain'] = $prefixHttp . 'shop.hzghd.com'; $config['ghsPtHost'] = $prefixHttp . 'api.pt.hzghd.com'; $config['ghsShortHost'] = 'hzghd.com'; $config['ghsImgHost'] = $prefixHttp . 'img.hzghd.com/'; $config['mallHost'] = $prefixHttp . 'api.shop.theflorist.cn'; $config['mallDomain'] = $prefixHttp . 'shop.theflorist.cn'; $config['mallPtHost'] = $prefixHttp . 'api.pt.theflorist.cn'; $config['mallShortHost'] = 'theflorist.cn'; $config['mallImgHost'] = $prefixHttp . 'img.theflorist.cn/'; $config['ossBucket'] = 'pic-hhb-cs'; $config['dadaOnline']= false; //正式环境改为true } if (getenv('YII_ENV') == 'test') { $config['hdHost'] = $prefixHttp . 'api.shop.huaml.com'; $config['hdDomain'] = $prefixHttp . 'shop.huaml.com'; $config['hdPtHost'] = $prefixHttp . 'api.pt.huaml.com'; $config['hdShortHost'] = 'huaml.com'; $config['hdImgHost'] = $prefixHttp . 'img.huaml.com/'; $config['ghsHost'] = $prefixHttp . 'api.shop.hzghd.com'; $config['ghsDomain'] = $prefixHttp . 'shop.hzghd.com'; $config['ghsPtHost'] = $prefixHttp . 'api.pt.hzghd.com'; $config['ghsShortHost'] = 'hzghd.com'; $config['ghsImgHost'] = $prefixHttp . 'img.hzghd.com/'; $config['mallHost'] = $prefixHttp . 'api.shop.theflorist.cn'; $config['mallDomain'] = $prefixHttp . 'shop.theflorist.cn'; $config['mallPtHost'] = $prefixHttp . 'api.pt.theflorist.cn'; $config['mallShortHost'] = 'theflorist.cn'; $config['mallImgHost'] = $prefixHttp . 'img.theflorist.cn/'; $config['ossBucket'] = 'pic-hhb-cs'; $config['dadaOnline']= false; //正式环境改为true } if (getenv('YII_ENV') == 'dev') { $config['hdHost'] = $prefixHttp . 'api.shop.huaml.com'; $config['hdDomain'] = $prefixHttp . 'shop.huaml.com'; $config['hdPtHost'] = $prefixHttp . 'api.pt.huaml.com'; $config['hdShortHost'] = 'huaml.com'; $config['hdImgHost'] = $prefixHttp . 'img.huaml.com/'; $config['ghsHost'] = $prefixHttp . 'api.shop.hzghd.com'; $config['ghsDomain'] = $prefixHttp . 'shop.hzghd.com'; $config['ghsPtHost'] = $prefixHttp . 'api.pt.hzghd.com'; $config['ghsShortHost'] = 'hzghd.com'; $config['ghsImgHost'] = $prefixHttp . 'img.hzghd.com/'; $config['mallHost'] = $prefixHttp . 'api.shop.theflorist.cn'; $config['mallDomain'] = $prefixHttp . 'shop.theflorist.cn'; $config['mallPtHost'] = $prefixHttp . 'api.pt.theflorist.cn'; $config['mallShortHost'] = 'theflorist.cn'; $config['mallImgHost'] = $prefixHttp . 'img.theflorist.cn/'; $config['ossBucket'] = 'pic-hhb-cs'; $config['dadaOnline']= false; //正式环境改为true } if (getenv('YII_ENV') == 'production') { $config['hdHost'] = $prefixHttp . 'api.shop.huahb.com'; $config['hdDomain'] = $prefixHttp . 'shop.huahb.com'; $config['hdPtHost'] = $prefixHttp . 'api.pt.huahb.com'; $config['hdShortHost'] = 'huahb.com'; $config['hdImgHost'] = $prefixHttp . 'img.huahb.com/'; $config['ghsHost'] = $prefixHttp . 'api.shop.huahb.cn'; $config['ghsDomain'] = $prefixHttp . 'shop.huahb.cn'; $config['ghsPtHost'] = $prefixHttp . 'api.pt.huahb.cn'; $config['ghsShortHost'] = 'huahb.cn'; $config['ghsImgHost'] = $prefixHttp . 'img.huahb.cn/'; $config['mallHost'] = $prefixHttp . 'api.shop.zhhinc.com'; $config['mallDomain'] = $prefixHttp . 'shop.zhhinc.com'; $config['mallPtHost'] = $prefixHttp . 'api.pt.zhhinc.com'; $config['mallShortHost'] = 'zhhinc.com'; $config['mallImgHost'] = $prefixHttp . 'img.zhhinc.com/'; $config['ossBucket'] = 'pic-hhb'; $config['dadaOnline']= true; //正式环境改为true } return $config;