|
|
@@ -1386,17 +1386,19 @@ class wxUtil
|
|
|
public static function getExperienceQrCode($merchant, $page, $isOpen = 0)
|
|
|
{
|
|
|
$accessToken = self::getMiniProgramAccessToken($merchant, $isOpen);
|
|
|
- $path = urlencode($page);
|
|
|
- $url = "https://api.weixin.qq.com/wxa/get_qrcode?access_token={$accessToken}&path=" . $path;
|
|
|
- $curl = new curl\Curl();
|
|
|
- $result = $curl->get($url);
|
|
|
- $file = dirUtil::getImgDir() . 'retail/miniExperience/' . $merchant['id'] . '.jpg';
|
|
|
- file_put_contents($file, $result);
|
|
|
+
|
|
|
$sjId = $merchant['id'] ?? 0;
|
|
|
$middle = $sjId . '_' . $isOpen;
|
|
|
if (getenv('YII_ENV', 'local') == 'production') {
|
|
|
$middle .= '_production';
|
|
|
}
|
|
|
+
|
|
|
+ $path = urlencode($page);
|
|
|
+ $url = "https://api.weixin.qq.com/wxa/get_qrcode?access_token={$accessToken}&path=" . $path;
|
|
|
+ $curl = new curl\Curl();
|
|
|
+ $result = $curl->get($url);
|
|
|
+ $file = dirUtil::getImgDir() . 'retail/miniExperience/' . $middle . '.jpg';
|
|
|
+ file_put_contents($file, $result);
|
|
|
$obj = 'retail/miniExperience/' . $middle . '.jpg';
|
|
|
//上传oss
|
|
|
oss::uploadImage($obj, $file);
|