소스 검색

修复部分已知问题

sunxbiao 6 달 전
부모
커밋
66a2872363
1개의 변경된 파일10개의 추가작업 그리고 10개의 파일을 삭제
  1. 10 10
      app/controller/api/store/product/TaoKe.php

+ 10 - 10
app/controller/api/store/product/TaoKe.php

@@ -234,7 +234,7 @@ class TaoKe extends BaseController
234
             //     continue;
234
             //     continue;
235
             // }
235
             // }
236
 
236
 
237
-            
237
+
238
             try {
238
             try {
239
                 $current_goods= [
239
                 $current_goods= [
240
                     'type' => 1,//拼多多商品
240
                     'type' => 1,//拼多多商品
@@ -243,13 +243,13 @@ class TaoKe extends BaseController
243
                     'name' => $goods['goods_name'],
243
                     'name' => $goods['goods_name'],
244
                     'commission' => $yanglaojin, //养老金  //app()->make(ProductRepository::class)->thirdYanglaojin(0, $commission),
244
                     'commission' => $yanglaojin, //养老金  //app()->make(ProductRepository::class)->thirdYanglaojin(0, $commission),
245
                     'commission_' => $commission,
245
                     'commission_' => $commission,
246
-    
246
+
247
                     'yanglaojin' => $yanglaojin,
247
                     'yanglaojin' => $yanglaojin,
248
                     'pv' => $pv,
248
                     'pv' => $pv,
249
                     'gongxian'=>$pv,
249
                     'gongxian'=>$pv,
250
                     'jifen'=>$pv,
250
                     'jifen'=>$pv,
251
-                    
252
-    
251
+
252
+
253
                     'commission_rate' => $commissionRate,
253
                     'commission_rate' => $commissionRate,
254
                     'sales' => $goods['sales_tip'],
254
                     'sales' => $goods['sales_tip'],
255
                     //'desc' => $goods['goods_desc'],
255
                     //'desc' => $goods['goods_desc'],
@@ -257,7 +257,7 @@ class TaoKe extends BaseController
257
                     //'market_price' => $groupPrice,
257
                     //'market_price' => $groupPrice,
258
                     'market_price' => set_price_rtrim(sprintf('%.2f', $min_normal_price - $couponMoney)),
258
                     'market_price' => set_price_rtrim(sprintf('%.2f', $min_normal_price - $couponMoney)),
259
                     'price' => set_price_rtrim(sprintf('%.2f', $groupPrice - $couponMoney)),
259
                     'price' => set_price_rtrim(sprintf('%.2f', $groupPrice - $couponMoney)),
260
-    
260
+
261
                     'shopName'=>$goods['mall_name'], //店铺名称
261
                     'shopName'=>$goods['mall_name'], //店铺名称
262
                     'monthSales'=>$goods['sales_tip']>0?$goods['sales_tip']:mt_rand(100,10000), //月销量
262
                     'monthSales'=>$goods['sales_tip']>0?$goods['sales_tip']:mt_rand(100,10000), //月销量
263
                     'cat_ids'=>$goods['cat_ids']
263
                     'cat_ids'=>$goods['cat_ids']
@@ -274,10 +274,10 @@ class TaoKe extends BaseController
274
             } catch (\Throwable $th) {
274
             } catch (\Throwable $th) {
275
                 Log::error($th->getMessage());
275
                 Log::error($th->getMessage());
276
             }
276
             }
277
-            
277
+
278
 
278
 
279
         }
279
         }
280
-        
280
+
281
         shuffle($goodsList);
281
         shuffle($goodsList);
282
         $uid = $uid ?? 0;
282
         $uid = $uid ?? 0;
283
         $repository->sproductkeywordHistory($uid, $keyword, 3);
283
         $repository->sproductkeywordHistory($uid, $keyword, 3);
@@ -404,7 +404,7 @@ class TaoKe extends BaseController
404
 
404
 
405
     //获取多多进宝商品详情
405
     //获取多多进宝商品详情
406
     public function pdd_detail()
406
     public function pdd_detail()
407
-    {       
407
+    {
408
         $goodsId = $this->request->param('goodsId');
408
         $goodsId = $this->request->param('goodsId');
409
         try{
409
         try{
410
             $uid = $this->request->uid();
410
             $uid = $this->request->uid();
@@ -477,7 +477,7 @@ class TaoKe extends BaseController
477
 
477
 
478
 //            $pv=sprintf('%.2f', $commission *0.5);  //PV
478
 //            $pv=sprintf('%.2f', $commission *0.5);  //PV
479
 //            $yanglaojin=$pv; //新的养老金
479
 //            $yanglaojin=$pv; //新的养老金
480
-        
480
+
481
         $gongxian=$pv;
481
         $gongxian=$pv;
482
         $jifen=$pv;
482
         $jifen=$pv;
483
         $detail['yanglaojin'] =$yanglaojin;
483
         $detail['yanglaojin'] =$yanglaojin;
@@ -559,7 +559,7 @@ class TaoKe extends BaseController
559
             //mobile_short_url-唤醒拼多多app的推广短链接
559
             //mobile_short_url-唤醒拼多多app的推广短链接
560
             //we_app_web_view_short_url-唤起微信app推广短链接
560
             //we_app_web_view_short_url-唤起微信app推广短链接
561
             //short_url-web推广短链接
561
             //short_url-web推广短链接
562
-            $shortUrl = $result['mobile_short_url'];
562
+            $shortUrl = $result['mobile_short_url'] ?? '';
563
             $wxUrl = $result['we_app_web_view_short_url'] ?? '';
563
             $wxUrl = $result['we_app_web_view_short_url'] ?? '';
564
             $url['mobile_url'] = $shortUrl;
564
             $url['mobile_url'] = $shortUrl;
565
             $url['url'] = $shortUrl;
565
             $url['url'] = $shortUrl;