stanley-king 8 лет назад
Родитель
Сommit
8671b3434e

+ 13 - 13
data/logic/buy_1.logic.php

@@ -11,10 +11,9 @@ class buy_1Logic
      * 取得商品最新的属性及促销[购物车]
      * @param unknown $cart_list
      */
-    public function getGoodsCartList($cart_list) {
-
+    public function getGoodsCartList($cart_list)
+    {
         $cart_list = $this->_getOnlineCartList($cart_list);
-
         //优惠套装
         $this->_getBundlingCartList($cart_list);
         //抢购
@@ -25,7 +24,6 @@ class buy_1Logic
         $this->_getGiftCartList($cart_list);
 
         return $cart_list;
-
     }
 
     /**
@@ -34,15 +32,13 @@ class buy_1Logic
      * @param int $quantity
      * @return array
      */
-    public function getGoodsOnlineInfo($goods_id,$quantity) {
+    public function getGoodsOnlineInfo($goods_id,$quantity)
+    {
         $goods_info = $this->_getGoodsOnlineInfo($goods_id,$quantity);
-
         //抢购
         $this->getGroupbuyInfo($goods_info);
-
         //限时折扣
         $this->getXianshiInfo($goods_info,$goods_info['goods_num']);
-
         //赠品
         $this->_getGoodsGiftList($goods_info);
 
@@ -429,7 +425,6 @@ class buy_1Logic
                         continue;
                     }
 
-                    
                     $new_data = array();
                     $new_data['buyer_id'] = $member_id;
                     $new_data['store_id'] = $store_id;
@@ -949,7 +944,8 @@ class buy_1Logic
             $goods_online_array[$goods['goods_id']] = $goods;
         }
 
-        foreach ((array)$cart_list as $key => $cart_info) {
+        foreach ((array)$cart_list as $key => $cart_info)
+        {
             if (intval($cart_info['bl_id'])) continue;
             $cart_list[$key]['state'] = true;
             $cart_list[$key]['storage_state'] = true;
@@ -1039,7 +1035,8 @@ class buy_1Logic
      * 取得购买车内组合销售信息以及包含的商品及有效状态
      * @param array $cart_list
      */
-    private function _getBundlingCartList(& $cart_list) {
+    private function _getBundlingCartList(& $cart_list)
+    {
         if (!C('promotion_allow') || empty($cart_list)) return ;
         $model_bl = Model('p_bundling');
         $model_goods = Model('goods');
@@ -1104,7 +1101,8 @@ class buy_1Logic
      * @param array $store_premiums_list 赠品列表
      * @return array 商品ID=>库存
      */
-    private function _getEachGoodsStorageQuantity($store_cart_list, $store_premiums_list = array()) {
+    private function _getEachGoodsStorageQuantity($store_cart_list, $store_premiums_list = array())
+    {
         if(empty($store_cart_list) || !is_array($store_cart_list)) return array();
         $goods_storage_quangity = array();
         foreach ($store_cart_list as $store_cart) {
@@ -1120,8 +1118,10 @@ class buy_1Logic
                 }
             }
         }
+
         //取得赠品商品的库存
-        if (is_array($store_premiums_list)) {
+        if (is_array($store_premiums_list))
+        {
             foreach ($store_premiums_list as $store_id => $goods_list) {
                 foreach($goods_list as $goods_info) {
                     if (!isset($goods_storage_quangity[$goods_info['goods_id']])) {

+ 1 - 0
helper/fcode/generator.php

@@ -53,6 +53,7 @@ class generator
             $data['batch_code'] = $this->mBatchCode;
 
             $ret = $mod_fcode->insert($data);
+
             $affect_rows = $mod_fcode->affected_rows();
             Log::record("fcode make i={$i} ret={$ret} rows={$affect_rows}",Log::DEBUG);
             if($ret != false && $affect_rows > 0) {

+ 5 - 0
helper/user_session/fcode.php

@@ -17,6 +17,7 @@ require_once (BASE_ROOT_PATH . '/helper/fcode/mfcode.php');
 use fcode\mfcode;
 use session_helper;
 use commonid_helper;
+use Log;
 
 class fcode
 {
@@ -41,9 +42,13 @@ class fcode
     {
         if($this->mFClear)
         {
+            Log::record("fcode __destruct clear all fcodes.",Log::DEBUG);
             if(isset($_SESSION['fcodes'])) {
                 unset($_SESSION['fcodes']);
             }
+
+            $this->mDirty = false;
+            return;
         }
 
         if($this->mDirty) {

+ 3 - 0
mobile/control/member_fcode.php

@@ -65,6 +65,9 @@ class member_fcodeControl extends mbMemberControl
     private function format($fcodes)
     {
         $blocks = [];
+        if(!empty($fcodes)) {
+            $blocks[] = special_formater::def_divider();
+        }
 
         foreach ($fcodes as $fcode)
         {