From 20ecbc62346e1d9634cef3ef75d3cdacc25b0ca1 Mon Sep 17 00:00:00 2001
From: 王晓刚 <wxg@bronet.cn>
Date: Mon, 9 Sep 2019 17:31:43 +0800
Subject: [PATCH] 分享bug

---
 app/portal/controller/GoodsdetailsController.php | 2 +-
 app/portal/controller/ShopcartController.php     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/portal/controller/GoodsdetailsController.php b/app/portal/controller/GoodsdetailsController.php
index 6759cc4..cfc984d 100644
--- a/app/portal/controller/GoodsdetailsController.php
+++ b/app/portal/controller/GoodsdetailsController.php
@@ -36,7 +36,7 @@ class GoodsdetailsController extends WeChatBaseController{
             if(!empty($share_user)){
 //                dump($share_user);
                 //判断用户是不是自由人
-                if($share_user['status'] == 0){
+                if($share_user['status'] == 0 || $share_user['status'] == 1 || $share_user['status'] == 5 || $share_user['status'] == 6){
                     //如果是自由人 那就绑定关系
                     $share_data['status'] = 4;
                     $share_data['pid'] = $goods_id['id'];
diff --git a/app/portal/controller/ShopcartController.php b/app/portal/controller/ShopcartController.php
index 21b2466..6e4da94 100644
--- a/app/portal/controller/ShopcartController.php
+++ b/app/portal/controller/ShopcartController.php
@@ -133,7 +133,7 @@ class ShopcartController extends WeChatBaseController{
 
             $indent['uid'] = $uid;
             $indent['state'] = 4;
-            $indent['order_number'] = date('Ymd').substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8);
+            $indent['order_number'] = cmf_get_order_sn();
             $indent['money'] = $_POST['myprice'];
             $indent['create_time'] = time();
             $indent['indent_type'] = 1;
@@ -163,7 +163,7 @@ class ShopcartController extends WeChatBaseController{
         }elseif ($data[0]['type'] == 2){
             $indent['uid'] = $uid;
             $indent['state'] = 4;
-            $indent['order_number'] = date('Ymd').substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8);
+            $indent['order_number'] = cmf_get_order_sn();
             $indent['money'] = $_POST['myprice'];
             $indent['indent_type'] = 2;
             $indent['create_time'] = time();
--
libgit2 0.24.0