Skip to content

Commit

Permalink
废弃二维码接口,改为自动生成
Browse files Browse the repository at this point in the history
  • Loading branch information
assimon committed Aug 4, 2018
1 parent cb9c1a4 commit 625d021
Show file tree
Hide file tree
Showing 265 changed files with 31,524 additions and 42 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea/*
install/install.lock
logs/*
logs/*
app/db.php
/nbproject/private/
11 changes: 11 additions & 0 deletions app/controller/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace YS\app\controller;

use YS\app\libs\Controller;
use Endroid\QrCode\QrCode;

/**首页控制器
* Class index
Expand Down Expand Up @@ -242,5 +243,15 @@ private function zdOrder($data,$goods)
resMsg(0,null,'下单失败!');

}
/**
* 生产二维码
*/
public function qrcode()
{
$url = $this->req->get('url') ? $this->req->get('url') : 'http://phpke.cn';
$qrCode = new QrCode($url);
header('Content-Type: '.$qrCode->getContentType());
echo $qrCode->writeString();
}

}
2 changes: 1 addition & 1 deletion app/db.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'port'=>'3306',
'user'=>'root',
'pass'=>'root',
'name'=>'faka',
'name'=>'ysfk',
'prefix'=>'ys_',
'driver'=>'pdo',
'debug'=>true,
Expand Down
2 changes: 1 addition & 1 deletion app/init.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

error_reporting(0);
ini_set('display_errors','off');
//ini_set('display_errors','off');

define('YS_ROOT',dirname(__FILE__));
ob_start();header('Content-Type:text/html;charset=utf8');
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"require": {
"riverslei/payment": "*",
"aileshe/upload": "*"
"aileshe/upload": "*",
"endroid/qr-code": "^2.5"
}
}
Loading

0 comments on commit 625d021

Please sign in to comment.