feat: 新增分销分佣结算、商家认证及草稿管理功能,优化界面与版本更新
这个提交包含在:
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcReport extends Model
|
||||
@@ -25,14 +26,37 @@ class FcReport extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
'status_text'
|
||||
'status_text',
|
||||
'reporter_name',
|
||||
'target_title',
|
||||
];
|
||||
|
||||
public function getReporterNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['reporter_id']) ? $data['reporter_id'] : 0);
|
||||
}
|
||||
|
||||
public function getTargetTitleAttr($value, $data)
|
||||
{
|
||||
$type = isset($data['target_type']) ? $data['target_type'] : '';
|
||||
$id = isset($data['target_id']) ? $data['target_id'] : 0;
|
||||
if ($type === 'post') {
|
||||
return FcRelation::postTitle($id);
|
||||
}
|
||||
if ($type === 'comment') {
|
||||
return FcRelation::commentSnippet($id);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['16' => __('Status 16')];
|
||||
return [
|
||||
'pending' => __('待处理'),
|
||||
'handled' => __('已处理'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户