From 0c11ea0de01e62f59a18ce0a522bdf32f77768f0 Mon Sep 17 00:00:00 2001
From: lihan <3398341942@qq.com>
Date: Wed, 10 Oct 2018 17:36:18 +0800
Subject: [PATCH] 测试

---
 app/pay/controller/PayController.php | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/app/pay/controller/PayController.php b/app/pay/controller/PayController.php
index 241ca8b..bb69df1 100644
--- a/app/pay/controller/PayController.php
+++ b/app/pay/controller/PayController.php
@@ -6,16 +6,6 @@ use think\Db;
 class PayController extends HomeBaseController
 {
 
-    function _initialize()
-    {
-        parent::_initialize(); // TODO: Change the autogenerated stub
-        if (empty(session('user.id'))) {
-            $this->error('登录失败');
-        } else {
-            require_once EXTEND_PATH . '/Payment.php';
-        }
-    }
-
     //提交订单
     public function done()
     {
@@ -82,12 +72,14 @@ class PayController extends HomeBaseController
     //微信支付
     public function wxPay($info)
     {
+        require_once EXTEND_PATH . '/Payment.php';
         $pay = new \Payment($info['attach'], $info['openid'], $info['body'], 1);
         $this->success('ok', url('user/center/orderlist'), $pay->pay());
     }
 
     public function notify()
     {
+        require_once EXTEND_PATH . '/Payment.php';
         $pay = new \Payment();
         $notify = $pay->handleNotify();
         if(!empty($notify)) {
--
libgit2 0.24.0