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']]); }
public function actionIndex() { //查询的分类列表 $shop_type = new shop_type(); $typelist = $shop_type->index(); //区域查询(默认为北京区域,随用户当前访问位置而变动) $area = new area(); $arealist = $area->index(); //优质商家列表查询 $shop = new shop(); $data = $shop->index(); return $this->render('index', ['typelist' => $typelist, 'arealist' => $arealist, 'shoplist' => $data['list'], 'pagination' => $data['pagination']]); }
public function index_desc($id) { $query = self::find()->where("job_id = {$id} ")->asArray()->one(); $query['district'] = area::find()->select("name")->where("code=" . $query['district'])->asArray()->one(); $query['arr'] = self::find()->where("type = " . $query['type'])->asArray()->all(); return $query; }