application/user/controller/Pay.php
(开头部分) 86KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 易优CMS
* ============================================================================
* 版权所有 2016-2028 海南赞赞网络科技有限公司,并保留所有权利。
* 网站地址: http://www.eyoucms.com
* ----------------------------------------------------------------------------
* 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
* ============================================================================
* Author: 陈风任 <491085389@qq.com>
* Date: 2019-2-25
*/
namespace app\user\controller;
use think\Db;
// use think\Session;
use think\Config;
use think\Page;
use app\user\logic\PayLogic;
use think\Cookie;
class Pay extends Base
{
public $php_version = '';
public function _initialize() {
parent::_initialize();
$this->users_db = Db::name('users'); // 会员数据表
$this->users_money_db = Db::name('users_money');// 会员金额明细表
$this->shop_order_db = Db::name('shop_order'); // 订单主表
$this->shop_order_details_db = Db::name('shop_order_details'); // 订单明细表
// 判断PHP版本信息
if (version_compare(PHP_VERSION,'5.5.0','<')) {
$this->php_version = 1; // PHP5.5.0以下版本,可使用旧版支付方式
}else{
$this->php_version = 0;// PHP5.5.0以上版本,可使用新版支付方式,兼容旧版支付方式
}
// 支付功能是否开启
$redirect_url = '';
$pay_open = getUsersConfigData('pay.pay_open');
$web_users_switch = tpCache('web.web_users_switch');
if (empty($pay_open)) {
// 支付功能关闭,立马跳到会员中心
$redirect_url = url('user/Users/index');
$msg = '支付功能尚未开启!';
} else if (empty($web_users_switch)) {
// 前台会员中心已关闭,跳到首页
$redirect_url = ROOT_DIR.'/';
$msg = '会员中心尚未开启!';
}
if (!empty($redirect_url)) {
Db::name('users_menu')->where([
'mca' => 'user/Pay/pay_consumer_details',
'lang' => $this->home_lang,
])->update([
'status' => 0,
'update_time' => getTime(),
后面还有 1652 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
