shop_mode == 10){ $shop_id = $this->shop_id; } $model = new ShopModel; $category = $model->getList(false); $model = new PactModel; $list = $model->getList($shop_id); return View::fetch('index', compact('list','shop_id','category')); } /** * 状态编辑 */ public function status($id) { $model = PactModel::get($id); $model->status['value']==10 ? $model->status = 20 : $model->status = 10; $model->save(); return $this->renderSuccess('更新成功'); } }