<?php

	/*******************************************************************\
	|																	|
	|	房开源（综合房产ERP管理系统）									|
	|																	|
	|	© 2019-2023 http://www.kaidandashi.com/ All rights reserved.	|
	|																	|
	|	本系统由淮南市银泰软件科技有限公司提供技术支持					|
	|																	|
	|	QQ号：984784483													|
	|																	|
	\*******************************************************************/

	namespace Admin\Controller;
	use Think\Controller;
	class GetfyqrController extends Controller {
		public function index(){
			$fybh = I('fybh');
			$url = 'http://'.$_SERVER['HTTP_HOST'].'/index.php/wap/fangyuan/fyneirong/bianhao/'.$fybh;
			$this->qrcode($url,3,4);
		}
		public function qrcode($url='',$level=3,$size=4){
			ob_end_clean(); //清空所有缓冲区
			//引入二维码生成插件
			Vendor('phpqrcode.phpqrcode');
			$errorCorrectionLevel =intval($level) ;//容错级别 
			$matrixPointSize = intval($size);//生成图片大小 
			//生成二维码图片 
			//echo $_SERVER['REQUEST_URI'];
			$object = new \QRcode();
			$object->png($url, false, $errorCorrectionLevel, $matrixPointSize, 2);   
		}
		public function mobileqr(){
			$url = "http://demofky.kaidandashi.com/mobile/";
			$this->qrcode($url,3,4);
		}
		public function wapqr(){
			$url = "http://demofky.kaidandashi.com/wap/";
			$this->qrcode($url,3,4);
		}
	}