|
|
@ -42,7 +42,13 @@ class HomeController extends Controller
|
|
|
|
$secret = 'd3219c70a45c5e1954be4608b288d38b';
|
|
|
|
$secret = 'd3219c70a45c5e1954be4608b288d38b';
|
|
|
|
$tokenUrl = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' . $appid . '&secret=' . $secret;
|
|
|
|
$tokenUrl = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' . $appid . '&secret=' . $secret;
|
|
|
|
|
|
|
|
|
|
|
|
$content = file_get_contents(RUNTIME_PATH . 'Data/wechat_ticket');
|
|
|
|
$tempDataDir = RUNTIME_PATH . 'Data';
|
|
|
|
|
|
|
|
if(!is_dir($tempDataDir)) {
|
|
|
|
|
|
|
|
@mkdir($tempDataDir);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$content = file_get_contents($tempDataDir . '/wechat_ticket');
|
|
|
|
|
|
|
|
|
|
|
|
$ticketData = null;
|
|
|
|
$ticketData = null;
|
|
|
|
if ($content) {
|
|
|
|
if ($content) {
|
|
|
|
$ticketData = json_decode($content, true);
|
|
|
|
$ticketData = json_decode($content, true);
|
|
|
|