作者 郭文星

'123'

@@ -57,7 +57,7 @@ class Holdactivity extends Backend @@ -57,7 +57,7 @@ class Holdactivity extends Backend
57 ->paginate($limit); 57 ->paginate($limit);
58 58
59 foreach ($list as $row) { 59 foreach ($list as $row) {
60 - $row->visible(['id','name','phone','industry','address']); 60 + $row->visible(['id','name','phone','user_id','verification_store_id','verification_activity_id','industry','address']);
61 $row->visible(['user']); 61 $row->visible(['user']);
62 $row->getRelation('user')->visible(['nickname']); 62 $row->getRelation('user')->visible(['nickname']);
63 $row->visible(['store']); 63 $row->visible(['store']);
@@ -43,14 +43,15 @@ class Holdactivity extends Model @@ -43,14 +43,15 @@ class Holdactivity extends Model
43 } 43 }
44 44
45 45
  46 +
46 public function store() 47 public function store()
47 { 48 {
48 - return $this->belongsTo('Store', 'id', 'id', [], 'LEFT')->setEagerlyType(0); 49 + return $this->belongsTo('Store', 'verification_store_id', 'id', [], 'LEFT')->setEagerlyType(0);
49 } 50 }
50 51
51 -  
52 public function activity() 52 public function activity()
53 { 53 {
54 - return $this->belongsTo('Activity', 'id', 'id', [], 'LEFT')->setEagerlyType(0); 54 + return $this->belongsTo('Activity', 'verification_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
55 } 55 }
  56 +
56 } 57 }
@@ -68,15 +68,13 @@ class Client extends Base @@ -68,15 +68,13 @@ class Client extends Base
68 */ 68 */
69 public function participate_activitie(){ 69 public function participate_activitie(){
70 $activity_id=$this->postParam['id']; 70 $activity_id=$this->postParam['id'];
71 - $page = $this->request->post('page', 1);  
72 - $total = $this->request->post('total', 10);  
73 $where['type']=1; 71 $where['type']=1;
74 $where['verification_activity_id']=$activity_id; 72 $where['verification_activity_id']=$activity_id;
75 73
76 $user=Db::name("verification_order") 74 $user=Db::name("verification_order")
77 ->where($where) 75 ->where($where)
78 ->field('name,createtime') 76 ->field('name,createtime')
79 - ->paginate($total, false, ['page' => $page]) 77 + ->select()
80 ->toArray(); 78 ->toArray();
81 if(!empty($user['data'])){ 79 if(!empty($user['data'])){
82 for ($i=0;$i<count($user['data']);$i++){ 80 for ($i=0;$i<count($user['data']);$i++){
@@ -112,7 +110,6 @@ class Client extends Base @@ -112,7 +110,6 @@ class Client extends Base
112 $industry=$this->postParam['industry']; 110 $industry=$this->postParam['industry'];
113 $address=$this->postParam['address']; 111 $address=$this->postParam['address'];
114 $verification_activity_id=$this->postParam['id']; 112 $verification_activity_id=$this->postParam['id'];
115 - $user_id=$this->auth->id;  
116 $data=[ 113 $data=[
117 'verification_store_id'=>$verification_store_id, 114 'verification_store_id'=>$verification_store_id,
118 'name'=>$name, 115 'name'=>$name,
@@ -120,7 +117,7 @@ class Client extends Base @@ -120,7 +117,7 @@ class Client extends Base
120 'industry'=>$industry, 117 'industry'=>$industry,
121 'address'=>$address, 118 'address'=>$address,
122 'verification_activity_id'=>$verification_activity_id, 119 'verification_activity_id'=>$verification_activity_id,
123 - 'user_id'=>$user_id 120 + 'user_id'=>$this->auth->id
124 ]; 121 ];
125 $res=Db::name('verification_hold_activity')->insertGetId($data); 122 $res=Db::name('verification_hold_activity')->insertGetId($data);
126 if($res){ 123 if($res){