...
|
...
|
@@ -2,7 +2,9 @@ |
|
|
|
|
|
namespace app\admin\controller;
|
|
|
|
|
|
use addons\wechat\library\Config as ConfigService;
|
|
|
use app\common\controller\Backend;
|
|
|
use EasyWeChat\Foundation\Application;
|
|
|
use fast\Auth;
|
|
|
use fast\Random;
|
|
|
use think\Config;
|
...
|
...
|
@@ -203,6 +205,11 @@ class House extends Backend |
|
|
//生成二维码
|
|
|
public function folderqrcode($url,$house_id)
|
|
|
{
|
|
|
$app = new Application(ConfigService::load());
|
|
|
$qrcode = $app->qrcode;
|
|
|
$result = $qrcode->forever($house_id);// 或者 $qrcode->forever("foo");
|
|
|
$url = $result->url;
|
|
|
// $file_path = create_qrcode($url,'wechat_qrcode');
|
|
|
$qrCode = new QrCode('Life is too short to be generating QR codes');
|
|
|
$qrCode
|
|
|
->setText($url)
|
...
|
...
|
@@ -219,7 +226,7 @@ class House extends Backend |
|
|
|
|
|
$qrCode->save(ROOT_PATH . 'public' . DS . 'uploads' . DS . $file_path);
|
|
|
|
|
|
$path = '/uploads/'.$file_path;
|
|
|
$path = $file_path;
|
|
|
$upload = Config::get('upload');
|
|
|
$config = get_addon_config('qiniu');
|
|
|
$filePath = '.'.$path;
|
...
|
...
|
|