Преглед изворни кода

员工绑定二维码上传oss

林琦海 пре 5 година
родитељ
комит
77881df196
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      common/components/miniUtil.php

+ 4 - 1
common/components/miniUtil.php

@@ -1613,8 +1613,11 @@ class miniUtil
         $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
         $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
 
 
         Yii::info('获取小程序图片资源:' . json_encode($result));
         Yii::info('获取小程序图片资源:' . json_encode($result));
-
         file_put_contents($file, $result);
         file_put_contents($file, $result);
+        //上传oss
+        $obj = $behind . $fileName;
+        $obj = ltrim($obj,"/");
+        oss::uploadImage($obj,$file);
         return $behind . $fileName;
         return $behind . $fileName;
     }
     }