12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace app\admin\controller;
- use think\facade\View;
- use think\facade\Lang;
- /**
-
- *
-
- *
- * ----------------------------------------------------------------------------
- *
-
- * 控制器
- */
- class Feedback extends AdminControl
- {
- public function initialize()
- {
- parent::initialize(); // TODO: Change the autogenerated stub
- Lang::load(base_path() . 'admin/lang/' . config('lang.default_lang') . '/feedback.lang.php');
- }
- /**
- * 意见反馈
- */
- public function flist()
- {
- $feedback_model = model('feedback');
- $feedback_list = $feedback_model->getFeedbackList(array(), 10);
- View::assign('feedback_list', $feedback_list);
- View::assign('show_page', $feedback_model->page_info->render());
- $this->setAdminCurItem('index');
- return View::fetch('index');
- }
- /**
- * 删除
- */
- public function del()
- {
- $feedback_model = model('feedback');
- $feedback_id = input('param.feedback_id');
- $feedback_id_array = ds_delete_param($feedback_id);
- $condition = array(array('fb_id', 'in', $feedback_id_array));
- $result = $feedback_model->delFeedback($condition);
- if ($result) {
- ds_json_encode(10000, lang('ds_common_op_succ'));
- } else {
- ds_json_encode(10001, lang('ds_common_op_fail'));
- }
- }
- protected function getAdminItemList()
- {
- $menu = array(
- array(
- 'text' => lang('ds_feedback'), 'name' => 'index', 'url' => ''
- ),
- );
- return $menu;
- }
- }
|