Browse Source

xiugaiceshi

longyi 5 tháng trước cách đây
mục cha
commit
e98a2412e9
1 tập tin đã thay đổi với 13 bổ sung8 xóa
  1. 13 8
      core/CoreApp/controllers/Apipf.php

+ 13 - 8
core/CoreApp/controllers/Apipf.php

@@ -149,7 +149,7 @@ class Apipf extends Start_Controller{
         return $fdata;
     }
     public function _orderTbData(){
-        $fdata =  $this->fullorder->find_all('id = 1201336','shop,orderinfo,issku,quantity,fpdata,state,product,name,email,dtime,shouldmoney,shipremarks','id desc');
+        $fdata =  $this->fullorder->find_all('id = 1228433','shop,orderinfo,issku,quantity,fpdata,state,product,name,email,dtime,shouldmoney,shipremarks','id desc');
         $ret_list = [];
         echo "<pre>";
         foreach ($fdata as $k=>$v) 
@@ -168,14 +168,19 @@ class Apipf extends Start_Controller{
             }
             $goods_list = [];
             $fpdata_arr = explode(";",trim($v['fpdata'],";"));
-           
-            foreach($fpdata_arr as $key => $item){
-                $tmp_data = explode("|",$item);
-                $goods_list[] = [
-                    'goods_name'=>$tmp_data['1'],
-                    'qty'=>$tmp_data['2']
-                ];
+            if(!empty($tmp_data[1])){
+                foreach($fpdata_arr as $key => $item){
+                    $tmp_data = explode("|",$item);
+                    $goods_list[] = [
+                        'goods_name'=>$tmp_data[1],
+                        'qty'=>$tmp_data[2]
+                    ];
+                }
+            }else{
+                continue;
             }
+           
+            
             $ret_list[] = [
                 'shop'=>$v['shop'],
                 'orderinfo'=>$v['orderinfo'],