12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace app\api\controller;
- /**
-
- *
-
- *
- * ----------------------------------------------------------------------------
- *
-
- * 用户反馈控制器
- */
- class Memberfeedback extends MobileMember
- {
- public function initialize()
- {
- parent::initialize();
- }
- /**
- * 反馈列表
- */
- public function feedback_list()
- {
- $feedback_model = model('feedback');
- $condition = array(
- 'member_id' => $this->member_info['member_id']
- );
- $feedback_list = $feedback_model->getFeedbackList($condition);
- $result = array_merge(array('feedback_list' => $feedback_list), mobile_page($feedback_model->page_info));
- ds_json_encode(10000, '', $result);
- }
- /**
- * 添加反馈
- */
- public function feedback_add()
- {
- $feedback_model = model('feedback');
- $param = array();
- $param['fb_content'] = input('post.feedback');
- $param['fb_type'] = 1;
- $param['fb_time'] = TIMESTAMP;
- $param['member_id'] = $this->member_info['member_id'];
- $param['member_name'] = $this->member_info['member_name'];
- $res = word_filter($param['fb_content']);
- if (!$res['code']) {
- ds_json_encode(10001, $res['msg']);
- }
- $param['fb_content'] = $res['data']['text'];
- $result = $feedback_model->addFeedback($param);
- if ($result) {
- ds_json_encode(10000, lang('ds_common_op_succ'), 1);
- } else {
- ds_json_encode(10001, lang('ds_common_op_fail'));
- }
- }
- }
|