From 03513f4bf6d14f2e5f115b1e3f3d5dc6c70aa01e Mon Sep 17 00:00:00 2001 From: guojia <445241500@qq.com> Date: Wed, 8 May 2024 23:23:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Feedback.php | 13 ++++++------- public/install/data/install_struct.sql | 8 ++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/api/controller/Feedback.php b/app/api/controller/Feedback.php index dae7cecb..bf72308a 100644 --- a/app/api/controller/Feedback.php +++ b/app/api/controller/Feedback.php @@ -36,14 +36,10 @@ class Feedback extends Controller { $useInfo = UserService::getCurrentLoginUser(true)->toArray(); - $content = $this->request->post('content'); - if (!$content) { + $suggest = $this->request->post('suggest'); + if (!$suggest) { return $this->renderError('内容不能为空'); } - $cate = intval($this->request->post('cate')); - if (!$cate) { - return $this->renderError('分类不能为空'); - } $data = $this->postData(); $data['merchant_id'] = $this->merchantId; @@ -60,13 +56,16 @@ class Feedback extends Controller * 列表 */ public function list(): Json { + $pageSize = $this->request->param('pageSize'); + $pageSize = empty($pageSize) ? 15 : $pageSize; + $useInfo = UserService::getCurrentLoginUser(true)->toArray(); $model = new feedbackModel; $params = $this->request->param(); $params['userName'] = $useInfo['user_id']; - $list = $model->getList($params)->toArray(); + $list = $model->getList($params, intval($pageSize))->toArray(); foreach ($list['data'] as $kr => $r) { $res[$kr]['imgs'] = []; diff --git a/public/install/data/install_struct.sql b/public/install/data/install_struct.sql index 6f81d81c..2751aec9 100644 --- a/public/install/data/install_struct.sql +++ b/public/install/data/install_struct.sql @@ -1765,8 +1765,8 @@ CREATE TABLE `yoshop_squarelike` ( `store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID', `square_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '动态ID', `merchant_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商户ID、商店ID 隔离商城里面的商户', - `user_name` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '买家用户名', - `real_name` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '真实用户名', + `user_name` varchar(100) NOT NULL DEFAULT '' COMMENT '买家用户名', + `real_name` varchar(100) NOT NULL DEFAULT '' COMMENT '真实用户名', `is_delete` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除', `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', @@ -1783,8 +1783,8 @@ CREATE TABLE `yoshop_feedback` ( `imgs` varchar(200) NOT NULL DEFAULT '' COMMENT '图片ID', `suggest` longtext NOT NULL COMMENT '反馈建议', `type` int(1) unsigned NOT NULL DEFAULT '1' COMMENT '问题类型', - `user_name` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '买家用户名', - `real_name` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '真实用户名', + `user_name` varchar(100) NOT NULL DEFAULT '' COMMENT '买家用户名', + `real_name` varchar(100) NOT NULL DEFAULT '' COMMENT '真实用户名', `name` varchar(100) NOT NULL DEFAULT '' COMMENT '填写的用户名', `phone` varchar(100) NOT NULL DEFAULT '' COMMENT '电话', `unit` varchar(100) NOT NULL DEFAULT '' COMMENT '单位',