dever 3 年之前
父節點
當前提交
b8cdced2b2
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      app/shop/lib/Sell.php

+ 4 - 1
app/shop/lib/Sell.php

@@ -768,7 +768,6 @@ class Sell
             'channel_id' => 1,
             'system_source' => $system_source,
             'uid' => $uid,
-            'openid' => $wechat['openid'],
             'name' => $order_data['name'],
             'cash' => $price,
             'product_id' => $id,
@@ -777,6 +776,10 @@ class Sell
             'refer' => $refer,
         );
 
+        if ($uid > 0 && isset($wechat) && $wechat) {
+            $param['openid'] = $wechat['openid'];
+        }
+
         $receipt = Dever::input('receipt');
         if ($receipt) {
             $param['receipt'] = $receipt;