afa 3 月之前
父节点
当前提交
695164087a
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      application/api/controller/Order.php

+ 2 - 1
application/api/controller/Order.php

@@ -197,7 +197,8 @@ class Order extends Api
             $order_info = $productOrder::getProductOrder($params['order_id'], $productOrder::Paid, 'b.is_gift,b.gift_fee,b.is_show');
             if(empty($order_info) || empty($order_info->is_gift)) throw new Exception(__("参数有误,无可用产品"));
 
-            $user = $userModel->getByAddress($params['address']);
+            //
+            $user =  (substr($params['address'], 0, 2) == '0x')? $userModel->getByAddress($params['address']): $userModel->getByUid($params['address'])  ;
             if(empty($user)) throw new Exception(__("赠送用户不存在"));    
             if($user['id'] == $order_info['user_id']) throw new Exception(__("赠送用户不能是自己"));  
             //手续费