vr-shopxo-source/extend/base/Qrcode.php

276 lines
9.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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;