瀏覽代碼

访问日志

541469799@qq.com 1 年之前
父節點
當前提交
ae2958d8c5
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      app/index/controller/Checkout.php

+ 6 - 6
app/index/controller/Checkout.php

@@ -247,18 +247,18 @@ class Checkout extends Controller
                     $fromUserId = decrypt($key);
                     if ($fromUserId && $fromUserId != $order['user_id']) {
                         $describe = "Giveaway after sharing";
-                        $payPoints = intval(bcmul($order['pay_price'], strval(UserAlias::POINTS_FOR_SHARE), 0));
-                        UserModel::setIncPoints(intval($fromUserId), $payPoints, $describe);
+                        //$payPoints = intval(bcmul($order['pay_price'], strval(UserAlias::POINTS_FOR_SHARE), 0));
+                        UserModel::setIncPoints(intval($fromUserId), UserAlias::POINTS_FOR_SHARE, $describe);
                         Cache::delete(UserModel::SHARE_PREFIX . $order['user_id']);
                         ShareKey::delKey($key);
                     }
                 }
 
-            } else {
-                //自己购买获得积分
-                $describe = "Purchase goods to earn points.";
-                UserModel::setIncPoints(intval($order['user_id']), UserAlias::POINTS_FOR_BUY, $describe);
             }
+
+            //自己购买获得积分
+            $describe = "Purchase goods to earn points.";
+            UserModel::setIncPoints(intval($order['user_id']), UserAlias::POINTS_FOR_BUY, $describe);
         }
 
         return view('paySuccessful', ['notice' => 'Payment Successful']);