意见反馈

feature/main20240421
guojia 7 months ago
parent 0d9998edba
commit 03513f4bf6
  1. 13
      app/api/controller/Feedback.php
  2. 8
      public/install/data/install_struct.sql

@ -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'] = [];

@ -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 '单位',

Loading…
Cancel
Save