错误样式:
修改方法:
1. 增加:
public function getMerTypeNameAttr(){
return MerchantType::where('mer_type_id',$this->type_id)->value('type_name');
}
2. 修改:
public function detail($id, $userInfo){
$merchant = $this->dao->apiGetOne($id)->hidden([ "real_name", "mer_phone", "reg_admin_id", "sort", "is_del", "is_audit", "is_best", "mer_state", "bank", "bank_number", "bank_name", 'update_time', 'financial_alipay', 'financial_bank', 'financial_wechat', 'financial_type','mer_take_phone' ]);
$merchant->append(['mer_type_name', 'isset_certificate', 'services_type']);
$merchant['care'] = false;
$merchant['type_name'] = $merchant['mer_type_name'];
if ($userInfo)
$merchant['care'] = $this->getCareByUser($id, $userInfo->uid);
return $merchant;
}