lizhen_gitee 1 rok pred
rodič
commit
88c40ea2e4

+ 2 - 0
addons/unishop/behavior/Order.php

@@ -235,6 +235,8 @@ class Order
         }
 
         // More ...
+        //修改用户活跃
+        Db::name('user')->where('id',$order->user_id)->update(['last_paytime'=>time()]);
     }
 
     /**

+ 3 - 0
addons/unishop/controller/Pay.php

@@ -105,6 +105,8 @@ class Pay extends Base
         $order = $orderModel->where(['id' => $orderId])->find();
 
         Hook::listen('paid_success', $order, ['pay_type' => \addons\unishop\model\Order::PAY_WXPAY]);
+
+        $this->success('支付成功', []);
     }
     public function unify_old()
     {
@@ -339,6 +341,7 @@ class Pay extends Base
      */
     public function alipay()
     {
+        $this->error('暂不支持支付宝');
         $orderId = $this->request->request('order_id', 0);
         $orderId = Hashids::decodeHex($orderId);
 

+ 1 - 1
addons/unishop/model/Order.php

@@ -156,7 +156,7 @@ class Order extends Model
     }
 
     /**
-     * 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,5=售后
+     * 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,5=售后,6=拒绝退款,9=订单关闭
      * 获取当前的订单状态
      */
     public function getStateAttr($value, $data)