xxxrrrdddd 3 years ago
parent
commit
ce46d3e0fb
1 changed files with 9 additions and 2 deletions
  1. 9 2
      application/api/controller/MobileController.php

+ 9 - 2
application/api/controller/MobileController.php

@@ -402,13 +402,20 @@ class MobileController extends UserApi
     /**
      * 横幅播报
      * @ApiReturnParams (name=ordered_num,description=已订购人数)
-     * @ApiReturnParams (name=ordered_num,description=已订购人数)
+     * @ApiReturnParams (name=no,description=号码)
+     * @ApiReturnParams (name=name,description=人名)
      */
     public function ordered_show(){
         $data=[];
         $data['ordered_num']=SysConfig::look('mo_ordered_num',0);
-        $data['ordered_list']=MobileOrder::payed()->order('id','desc')->limit(10)
+        $data['ordered_list']=MobileOrder::payed()
+            ->order('id','desc')->limit(10)
+            ->field('name,no')
             ->select();
+        foreach ($data['ordered_list'] as $item){
+            $item['no']=substr($item['no'],0,3).'****'.substr($item['no'],7,4);
+            $item['name']=mb_substr($item['name'],0,mb_strlen($item['name'])-1).'*';
+        }
         $this->success('',$data);
     }
 }