shish 5 vuotta sitten
vanhempi
commit
b78d22c1a4
2 muutettua tiedostoa jossa 12 lisäystä ja 10 poistoa
  1. 8 6
      common/components/wxUtil.php
  2. 4 4
      common/config/params.php

+ 8 - 6
common/components/wxUtil.php

@@ -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);

+ 4 - 4
common/config/params.php

@@ -50,9 +50,9 @@ $config = [
     'dadaAppSecret' => '8ed3b159f64021003aa73f7233118fe6',
 
     //百度语音配置
-    'baiduAipAppId'=>'24236063',
-    'baiduAipAppKey'=>'WLp9xP7GG1FFSz6UNGaNeuSv',
-    'baiduAipAppSecret'=>'7gxpGeWzI2dpBVWbe8ffb11lvbtGfLOC',
+    'baiduAipAppId' => '24236063',
+    'baiduAipAppKey' => 'WLp9xP7GG1FFSz6UNGaNeuSv',
+    'baiduAipAppSecret' => '7gxpGeWzI2dpBVWbe8ffb11lvbtGfLOC',
 
 ];
 
@@ -157,7 +157,7 @@ if (getenv('YII_ENV') == 'production') {
     $config['mallShortHost'] = 'zhiguanhua.cn';
     $config['mallImgHost'] = $prefixHttp . 'img.zhiguanhua.cn/';
 
-    $config['ossBucket'] = 'pic-hhb-cs';
+    $config['ossBucket'] = 'pic-hhb-online';
 
 }