public function actionIndex()
 {
     //查询兼职分类列表
     $shop_type = new and_jobtype();
     $typelist = $shop_type->index_job();
     //兼职区域查询(默认为北京区域,随用户当前访问位置而变动)
     $area = new area();
     $arealist = $area->index();
     //兼职列表查询
     $shop = new jobs();
     $data = $shop->index();
     return $this->render('index', ['typelist' => $typelist, 'arealist' => $arealist, 'joblist' => $data['list'], 'pagination' => $data['pagination']]);
 }
Beispiel #2
0
 public function getJtype()
 {
     return $this->hasOne(and_jobtype::className(), ['type_id' => 'type']);
 }