|
@@ -65,26 +65,18 @@ class DoctorController extends AuthController
|
|
{
|
|
{
|
|
$req = $this->user;
|
|
$req = $this->user;
|
|
$data = Docter::where('phone', $req['phone'])->orderBy('id','desc')->first(['id', 'name', 'avatar', 'label', 'sign', 'intro', 'service_days', 'service_persons','password', 'eva_num', 'score', 'is_then', 'created_at']);
|
|
$data = Docter::where('phone', $req['phone'])->orderBy('id','desc')->first(['id', 'name', 'avatar', 'label', 'sign', 'intro', 'service_days', 'service_persons','password', 'eva_num', 'score', 'is_then', 'created_at']);
|
|
-
|
|
|
|
if (!empty($data)) {
|
|
if (!empty($data)) {
|
|
-
|
|
|
|
// 获取标签
|
|
// 获取标签
|
|
$LabFind = [];
|
|
$LabFind = [];
|
|
- if ($data['label']!='无'){
|
|
|
|
|
|
+ if (!empty($data['label']) && $data['label']!='无'){
|
|
if(count($data['label'])!=0){
|
|
if(count($data['label'])!=0){
|
|
$labstr = $data['label'];
|
|
$labstr = $data['label'];
|
|
$LabFind = DocterLable::whereIn('id',$labstr)->where('status',1)->select('label_name')->get();
|
|
$LabFind = DocterLable::whereIn('id',$labstr)->where('status',1)->select('label_name')->get();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
$data['label'] = $LabFind;
|
|
$data['label'] = $LabFind;
|
|
-// $counts = Evaluate::where('docter_id', '=', $req['id'])->count();
|
|
|
|
$evalList = Evaluate::where('docter_id', '=', $req['id'])->get();
|
|
$evalList = Evaluate::where('docter_id', '=', $req['id'])->get();
|
|
$counts = count($evalList);
|
|
$counts = count($evalList);
|
|
-
|
|
|
|
-
|
|
|
|
$data['eva_num'] = $counts;
|
|
$data['eva_num'] = $counts;
|
|
$soc = 0;
|
|
$soc = 0;
|
|
if ($counts != 0) {
|
|
if ($counts != 0) {
|
|
@@ -94,7 +86,6 @@ class DoctorController extends AuthController
|
|
}
|
|
}
|
|
$data['score'] = upDecimal($soc / $counts, 1);
|
|
$data['score'] = upDecimal($soc / $counts, 1);
|
|
}
|
|
}
|
|
-
|
|
|
|
$data['service_days'] = numDays(date('Y-m-d', strtotime($data['created_at'])));
|
|
$data['service_days'] = numDays(date('Y-m-d', strtotime($data['created_at'])));
|
|
return out($data);
|
|
return out($data);
|
|
} else {
|
|
} else {
|
|
@@ -960,7 +951,7 @@ class DoctorController extends AuthController
|
|
|
|
|
|
foreach ($Organization as $k => $v) {
|
|
foreach ($Organization as $k => $v) {
|
|
$newList[$k]['value'] = $v['id'];
|
|
$newList[$k]['value'] = $v['id'];
|
|
- $newList[$k]['label'] = $v['name'];
|
|
|
|
|
|
+ $newList[$k]['label'] = $v['intro'];
|
|
if ($v['offices']) {
|
|
if ($v['offices']) {
|
|
foreach ($v['offices'] as $kk => $vv) {
|
|
foreach ($v['offices'] as $kk => $vv) {
|
|
$newList[$k]['children'][$kk]['value'] = $vv['id'];
|
|
$newList[$k]['children'][$kk]['value'] = $vv['id'];
|