Commit 53d5446d authored by 刘小敏's avatar 刘小敏

反馈类型修改类型文案完成

parent a98fe19f
......@@ -29,6 +29,7 @@ class Feedback extends Common
$feedbacks = $this->model->sheepFilter()->with('user')->paginate($this->request->param('list_rows', 10));
// print_r($feedbacks);
$this->success('获取成功', null, $feedbacks);
}
......@@ -81,7 +82,7 @@ class Feedback extends Common
/**
* 删除优惠券
* 删除意见反馈
*
* @param string $id 要删除的意见反馈
* @return void
......
......@@ -4,22 +4,33 @@ namespace app\admin\model\shopro;
use app\admin\model\shopro\Common;
use app\admin\model\shopro\user\User;
use traits\model\SoftDelete;
class Feedback extends Common
{
protected $name = 'shopro_feedback';
use SoftDelete;
protected $deleteTime = 'deletetime';
public $type_text = [
1 => '咨询',
2 => '建议',
3 => '投诉',
];
protected $type = [
'images' => 'json'
];
protected $append = [
'status_text'
'status_text',
'type_text',
];
/**
* 类型列表
* 状态列表
*
* @return array
*/
......@@ -28,6 +39,20 @@ class Feedback extends Common
return ['0' => '待处理', '1' => '已处理'];
}
/**
* 类型列表
*
* @return array
*/
public function typeList()
{
return [
1 => '咨询',
2 => '建议',
3 => '投诉'
];
}
public function user()
{
return $this->belongsTo(User::class, 'user_id', 'id')->field('id, nickname, avatar, mobile');
......
......@@ -9,7 +9,7 @@
<sa-user-profile :user="form.model.user" :id="form.model.user_id"></sa-user-profile>
</el-form-item>
<el-form-item label="反馈类型">
{{ form.model.type }}
{{ form.model.type_text }}
</el-form-item>
<el-form-item label="反馈内容">
{{ form.model.content }}
......
......@@ -28,7 +28,7 @@
<el-table-column label="反馈类型" min-width="140">
<template #default="scope">
<div class="sa-table-line-1">
{{ scope.row.type || '-' }}
{{ scope.row.type_text || '-' }}
</div>
</template>
</el-table-column>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment