dever 3 年 前
コミット
6191123bdf
1 ファイル変更6 行追加3 行削除
  1. 6 3
      app/shop/lib/Sell.php

+ 6 - 3
app/shop/lib/Sell.php

@@ -635,11 +635,14 @@ class Sell
 
         $uid = $user['id'];
 
-        $wechat = Dever::db('passport/wechat')->one(array('uid' => $uid, 'type' => 1, 'system_id' => 1));
+        if ($uid > 0) {
+            $wechat = Dever::db('passport/wechat')->one(array('uid' => $uid, 'type' => 1, 'system_id' => 1));
 
-        if (!$wechat) {
-            Dever::alert('错误的用户信息');
+            if (!$wechat) {
+                Dever::alert('错误的用户信息');
+            }
         }
+        
 
         if ($method == 2) {
             $order_data['ps_cash'] = $shop['ps_cash'];