Files
evus.acvisa.com/app/home/controller/Index.php

45 lines
1.1 KiB
PHP

<?php
declare (strict_types = 1);
namespace app\home\controller;
use api\Httpcurl;
use think\facade\Log;
use think\facade\View;
class Index extends Base
{
public function index()
{
$news_list = Httpcurl::request(NEWS_LIST, 'post', [
'model' => 'article',
'source_code' => DOMAIN,
'page' => 1,
'size' => 10,
]);
$news_list = json_decode($news_list[0], true);
Log::info(json_encode($news_list));
if (!empty($news_list) && $news_list['code'] == 1) {
View::assign('data', $news_list['data']);
} else {
View::assign('data', []);
}
return View::fetch();
}
public function screen()
{
return View::fetch();
}
public function test()
{
$order_sn = '2026061008342768';
$wechaturl = 'https://pay.qlevisa.cn/home/bjqzpay/wechat';
$wechaturl .= '?order_sn=' . $order_sn . '&mark=qlmsg' . '&body=' . urlencode(COUNTRY . '服务费');
header('location:' . $wechaturl); // 跳转到 user/profile
exit;
}
}