wupengfei 2 years ago
parent
commit
aa31dec214
2 changed files with 2 additions and 5 deletions
  1. 1 4
      application/api/controller/Qc.php
  2. 1 1
      application/common/model/User.php

+ 1 - 4
application/api/controller/Qc.php

@@ -31,15 +31,12 @@ class Qc extends Base {
 
     public function index()
     {
-        $type = 1;
-        $user_info = User::where('id',65)->field('id,name')->find();
-        var_dump($user_info);
         $list = VideoIntro::with(['cateDetail'])
             ->comment('qctest')
             ->field('id,first_classify,type')
             ->select()->each(function (&$v){
                 $v['a'] = User::where('id',65)->field('id,name')->find();
-            })->toArray();
+            })->shuffle()->toArray();
         var_dump($list);
     }
 

+ 1 - 1
application/common/model/User.php

@@ -4,7 +4,7 @@ use think\Model;
 class User extends Model
 {
     protected $name = 'StoreMember';
-    protected $resultSetType = 'array';// 设置返回类型
+    //protected $resultSetType = 'collection';// 设置返回类型
     public function wallet()
     {
         return $this->hasOne('UserWallet','user_id','id');