getList(false); $model = new UserModel; $list = $model->getList($gender, $search); return View::fetch('index', compact('list','shop','gender','search')); } /** * 用户充值 *$recharge 接收表单数据(数组) *$source 0为充值余额,1为充值积分 */ public function recharge() { if ($this->request->isPost()) { $model = new RecordModel; $data = $this->postData('data'); if($this->shop_mode == 10){ $data['shop_id'] = $this->shop_id; } if ($model->add($data)) { return $this->renderSuccess('添加成功', url('food.user/index')); } $error = $model->getError() ?: '添加失败'; return $this->renderError($error); } return redirect(url('food.user/index')); } }