|
@@ -9,6 +9,7 @@
|
|
|
namespace app\api\controller;
|
|
|
|
|
|
|
|
|
+use app\api\controller\base\Base;
|
|
|
use app\api\controller\base\Permissions;
|
|
|
use app\common\model\AppointmentApplication;
|
|
|
use app\common\model\AppointmentTicket;
|
|
@@ -16,7 +17,7 @@ use app\common\model\Feedback;
|
|
|
use app\common\model\Webconfig;
|
|
|
use time\DateHelper;
|
|
|
|
|
|
-class User extends Permissions
|
|
|
+class User extends Base
|
|
|
{
|
|
|
//个人资料
|
|
|
public function info()
|
|
@@ -56,13 +57,6 @@ class User extends Permissions
|
|
|
['marriage|婚姻情况', 'number|in:0,1,2'],
|
|
|
['problem_type|咨询问题类别', 'number|in:0,1,2,3,4,5'],
|
|
|
['childs_num_str|子女数量', 'max:255'],
|
|
|
-// ['childs_num|子女数量', 'number|in:1,2,3'],
|
|
|
-// ['childs_age1|一孩年龄', 'number'],
|
|
|
-// ['childs_age2|二孩年龄', 'number'],
|
|
|
-// ['childs_age3|三孩年龄', 'number'],
|
|
|
-// ['childs_sex1|一孩性别', 'number'],
|
|
|
-// ['childs_sex2|二孩性别', 'number'],
|
|
|
-// ['childs_sex3|三孩性别', 'number'],
|
|
|
]);
|
|
|
if (!$validate->check($post)) {
|
|
|
$this->json_error('提交失败:' . $validate->getError());
|
|
@@ -154,13 +148,6 @@ class User extends Permissions
|
|
|
'marriage' => $post['marriage']??0,
|
|
|
'problem_type' => $post['problem_type']??0,
|
|
|
'childs_num_str' => $this->request->param('childs_num_str', '', 'htmlspecialchars'),
|
|
|
-// 'childs_num' => $post['childs_num']??0,
|
|
|
-// 'childs_age1' => $post['childs_age1']??0,
|
|
|
-// 'childs_age2' => $post['childs_age2']??0,
|
|
|
-// 'childs_age3' => $post['childs_age3']??0,
|
|
|
-// 'childs_sex1' => $post['childs_sex1']??0,
|
|
|
-// 'childs_sex2' => $post['childs_sex2']??0,
|
|
|
-// 'childs_sex3' => $post['childs_sex3']??0,
|
|
|
];
|
|
|
if (false === $model->allowField(true)->save($data)) {
|
|
|
$this->json_error("预约入库失败");
|
|
@@ -217,7 +204,7 @@ class User extends Permissions
|
|
|
$this->json_error('提交失败:' . $validate->getError());
|
|
|
}
|
|
|
|
|
|
- $where = ['user_id' => $this->getUserId()];
|
|
|
+ $where = ['user_id' => 1];
|
|
|
$status = $this->request->param('status', 0, 'intval');
|
|
|
if ($status == 1) {
|
|
|
$where['finish_time'] = 0;
|
|
@@ -231,6 +218,7 @@ class User extends Permissions
|
|
|
$item->address;
|
|
|
$item->specialist;
|
|
|
$item->specialist->head_pic = geturl($item->specialist->head_pic, '', true);
|
|
|
+ $item->appointment_date = $item->appointment_date;
|
|
|
$datalist[$key] = $item;
|
|
|
}
|
|
|
if (empty($datalist)) {
|