WIN-2308041133\Administrator il y a 4 mois
Parent
commit
ed206d0143

+ 0 - 4
app/api/controller/user/UserBillController.php

@@ -325,21 +325,17 @@ class UserBillController
                         ),
                         'background' => $item['pic']
                     );
-                    @file_put_contents('quanju.txt',  "-4\r\n", 8);
                     $resWap = $resWap && $posterInfo = UtilService::setSharePoster($config, 'wap/spread/poster');
                     if (!is_array($posterInfo)) return app('json')->fail($posterInfo);
                     SystemAttachment::attachmentAdd($posterInfo['name'], $posterInfo['size'], $posterInfo['type'], $posterInfo['dir'], $posterInfo['thumb_path'], 1, $posterInfo['image_type'], $posterInfo['time'], 2);
-                    @file_put_contents('quanju.txt',  "-5\r\n", 8);
                     if ($resWap) {
                         if ($posterInfo['image_type'] == 1)
                             $item['wap_poster'] = $siteUrl . $posterInfo['thumb_path'];
                         else
                             $item['wap_poster'] = UtilService::setHttpType($posterInfo['thumb_path'], 1);
                     }
-                    @file_put_contents('quanju.txt',  "-6\r\n", 8);
                 }
             }
-            @file_put_contents('quanju.txt',  json_encode($routineSpreadBanner)."-7\r\n", 8);
             if ($resRoutine && $resWap) return app('json')->successful($routineSpreadBanner);
             else return app('json')->fail('生成图片失败');
         } catch (\Exception $e) {

+ 13 - 8
app/models/store/StoreProduct.php

@@ -288,16 +288,21 @@ class StoreProduct extends BaseModel
             else
                 return $isSingle ? $list : 0;
         //当$list为数组时$isSingle==true为一维数组 ,否则为二维
-        if ($isSingle)
-            if ($list['is_Inclusive']==0&&$list['is_points']==0&&$list['is_explosive']==0){
-                $list['vip_price'] = isset($list['price']) ? bcsub($list['price'], bcmul($discount, $list['price'], 2), 2) : 0;
-            }
-        else
+        if ($isSingle){
+            $list['vip_price'] = isset($list['price']) ? bcsub($list['price'], bcmul($discount, $list['price'], 2), 2) : 0;
+        }
+//            if ($list['is_Inclusive']==0&&$list['is_points']==0&&$list['is_explosive']==0){
+
+//            }
+        else{
             foreach ($list as &$item) {
-                if ($item['is_Inclusive']==0&&$item['is_points']==0&&$item['is_explosive']==0){
-                    $item['vip_price'] = isset($item['price']) ? bcsub($item['price'], bcmul($discount, $item['price'], 2), 2) : 0;
-                }
+//                if ($item['is_Inclusive']==0&&$item['is_points']==0&&$item['is_explosive']==0){
+                @file_put_contents('quanju.txt',  json_encode($item)."-5\r\n", 8);
+                $item['vip_price'] = isset($item['price']) ? bcsub($item['price'], bcmul($discount, $item['price'], 2), 2) : 0;
+//                }
             }
+        }
+
         return $list;
     }