|
|
|
|
@ -107,41 +107,50 @@ class UserController extends Controller
|
|
|
|
|
];
|
|
|
|
|
$res=$XCX::Post('就诊人列表',$data);
|
|
|
|
|
$ApiPersonList=$res['data'];
|
|
|
|
|
// dd($ApiPersonList[0]);
|
|
|
|
|
//dd($ApiPersonList[0]);
|
|
|
|
|
$XCX::XCXDecode($ApiPersonList[0]['idNumber']);
|
|
|
|
|
}
|
|
|
|
|
//更新用户列表,调用远程小程序接口
|
|
|
|
|
public function UpdatePersonList($openid)
|
|
|
|
|
{
|
|
|
|
|
$XCX=new XCXApiController();
|
|
|
|
|
$data=[
|
|
|
|
|
'wxid'=>$openid
|
|
|
|
|
];
|
|
|
|
|
// $res=$XCX::Post('就诊人列表',$data);
|
|
|
|
|
// $ApiPersonList=$res['data'];
|
|
|
|
|
// dd($ApiPersonList);
|
|
|
|
|
$ApiPersonList = [
|
|
|
|
|
[
|
|
|
|
|
'ghzid' => 'ghz11',
|
|
|
|
|
'idNumber'=>'15210219920524154X',
|
|
|
|
|
'name' => '周京京',
|
|
|
|
|
'phone' => '11111111111',
|
|
|
|
|
'sex' => '1',
|
|
|
|
|
'birthday' => '1989-01-01',
|
|
|
|
|
'patientType' => '0',
|
|
|
|
|
'marriage' => '1',
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'ghzid' => 'ghz22',
|
|
|
|
|
'idNumber'=>'460026199002190013',
|
|
|
|
|
'name' => '测试2',
|
|
|
|
|
'phone' => '222222222',
|
|
|
|
|
'sex' => '1',
|
|
|
|
|
'birthday' => '1990-01-01',
|
|
|
|
|
'patientType' => '1',
|
|
|
|
|
'marriage' => '1',
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
$env=config('app.globals.Env');
|
|
|
|
|
if($env=='pro'){ //如果是正式环境
|
|
|
|
|
$XCX=new XCXApiController();
|
|
|
|
|
$data=[
|
|
|
|
|
'wxid'=>$openid
|
|
|
|
|
];
|
|
|
|
|
$res=$XCX::Post('就诊人列表',$data);
|
|
|
|
|
$ApiPersonList=$res['data'];
|
|
|
|
|
// dd($ApiPersonList);
|
|
|
|
|
}
|
|
|
|
|
if($env=='dev'){//如果是开发环境
|
|
|
|
|
$ApiPersonList = [
|
|
|
|
|
[
|
|
|
|
|
'ghzid' => 'ghz11',
|
|
|
|
|
'idNumber'=>'15210219920524154X',
|
|
|
|
|
'name' => '周京京',
|
|
|
|
|
'phone' => '11111111111',
|
|
|
|
|
'sex' => '1',
|
|
|
|
|
'birthday' => '1989-01-01',
|
|
|
|
|
'patientType' => '0',
|
|
|
|
|
'marriage' => '1',
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'ghzid' => 'ghz22',
|
|
|
|
|
'idNumber'=>'460026199002190013',
|
|
|
|
|
'name' => '测试2',
|
|
|
|
|
'phone' => '222222222',
|
|
|
|
|
'sex' => '1',
|
|
|
|
|
'birthday' => '1990-01-01',
|
|
|
|
|
'patientType' => '1',
|
|
|
|
|
'marriage' => '1',
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$user = DB::table('web_users')->where(['openid' => $openid, 'status' => 1, 'is_del' => 0])->first();
|
|
|
|
|
if (!$user) return \Yz::echoError1('用户不存在');
|
|
|
|
|
//库里存在的用户ghzid数组
|
|
|
|
|
@ -168,11 +177,11 @@ class UserController extends Controller
|
|
|
|
|
}
|
|
|
|
|
$personInfo = [
|
|
|
|
|
'ghzid' => $apiperson['ghzid'],
|
|
|
|
|
'id_number' => $apiperson['idNumber'],
|
|
|
|
|
'id_number' => $env=='dev'? $apiperson['idNumber']:$XCX::XCXDecode($apiperson['idNumber']),
|
|
|
|
|
'name' => $apiperson['name'],
|
|
|
|
|
'birthday' => $apiperson['birthday'],
|
|
|
|
|
'sex' => $apiperson['sex'],
|
|
|
|
|
'phone' => $apiperson['phone'],
|
|
|
|
|
'phone' => $env=='dev'?$apiperson['phone']:$XCX::XCXDecode($apiperson['phone']),
|
|
|
|
|
'married' =>$marriage,
|
|
|
|
|
'user_id' => $user->id,
|
|
|
|
|
'patient_type' => $apiperson['patientType'],
|
|
|
|
|
|