276 lines
9.3 KiB
PHP
276 lines
9.3 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||
// +----------------------------------------------------------------------
|
||
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
|
||
// +----------------------------------------------------------------------
|
||
// | Licensed ( https://opensource.org/licenses/mit-license.php )
|
||
// +----------------------------------------------------------------------
|
||
// | Author: Devil
|
||
// +----------------------------------------------------------------------
|
||
namespace base;
|
||
|
||
use app\service\ResourcesService;
|
||
use app\service\SystemBaseService;
|
||
|
||
/**
|
||
* 二维码驱动
|
||
* @author Devil
|
||
* @blog http://gong.gg/
|
||
* @version 0.0.1
|
||
* @datetime 2016-12-01T21:51:08+0800
|
||
*/
|
||
class Qrcode
|
||
{
|
||
// 配置
|
||
private $config;
|
||
|
||
/**
|
||
* 构造方法
|
||
* @author Devil
|
||
* @blog http://gong.gg/
|
||
* @version 1.0.0
|
||
* @param [array] $params [输入参数]
|
||
* @datetime 2019-04-16T21:13:10+0800
|
||
*/
|
||
public function __construct($params = [])
|
||
{
|
||
require_once ROOT.'extend'.DS.'qrcode'.DS.'phpqrcode.php';
|
||
|
||
// 默认配置
|
||
$this->config['root_path'] = isset($params['root_path']) ? $params['root_path'] : ROOT.'public';
|
||
$this->config['path'] = isset($params['path']) ? $params['path'] : DS.'static'.DS.'upload'.DS.'images'.DS.'qrcode'.DS.date('Y').DS.date('m').DS.date('d').DS;
|
||