<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ~~~ <?php namespace app\utils; use Endroid\QrCode\Builder\Builder; use Endroid\QrCode\Encoding\Encoding; use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelHigh; use Endroid\QrCode\Label\Alignment\LabelAlignmentCenter; use Endroid\QrCode\Label\Font\NotoSans; use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeMargin; use Endroid\QrCode\Writer\PngWriter; class QrcodeServer { /** * 二維碼生成 并保存為圖片 * @param $userId 用戶ID * @param int $size 二維碼大小 * @throws \Exception */ public static function generate($username,$size=300){ $root_path = app()->getRootPath(); $result = Builder::create() ->writer(new PngWriter()) ->writerOptions([]) ->data('only_code:'.$username) ->encoding(new Encoding('UTF-8')) ->errorCorrectionLevel(new ErrorCorrectionLevelHigh()) ->size($size) ->margin(10) ->roundBlockSizeMode(new RoundBlockSizeModeMargin()) // ->logoPath($root_path.'/public/img/1.png') ->labelText('') ->labelFont(new NotoSans(20)) ->labelAlignment(new LabelAlignmentCenter()) ->build(); // Directly output the QR code // header('Content-Type: '.$result->getMimeType()); $codeName = time().rand(100,999); // Save it to a file $path = $root_path.'/public/qrcode/qrcode_'.$codeName.'.png'; //生成成功 $result->saveToFile($path); // base64 //$dataUri = $result->getDataUri(); //沒有開啟oss if(env('oss.open') !== true){ return '/qrcode/qrcode_'.$codeName.'.png'; } if($result){ $res = AliOss::simpleUpload($path,$codeName.'.png',2); if($res){ @unlink($path); return $res; } return false; } return false; } } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看