作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

interface

... ... @@ -67,7 +67,9 @@ class LoginController extends HomeBaseController{
* @param name:encrypted_data type:String require:1 default:无 other: desc:encrypted_data
* @param name:iv type:String require:1 default:无 other: desc:iv
*
* @return result:退款接口返回值
* @return users_id:用户id
* @return type:是否注册(0、未注册,1、已注册)
* @return is_use:是否在使用设备(0:空闲,1:在用)
*/
public function getPhone(){
$param = $this->request->param();
... ... @@ -85,14 +87,14 @@ class LoginController extends HomeBaseController{
if ($errCode != 0) {
$this->apiResponse(301,'操作失败');
}
$phone="";
$phone=$wxUserData['phoneNumber'];
$users=Db::name('users')->where('open_id',$openid)->find();
try{
Db::name('users')->where('open_id',$openid)->update([]);
Db::name('users')->where('open_id',$openid)->update(['phone'=>$phone]);
}catch (\Exception $exception){
}
$this->apiResponse(200,'success',$wxUserData);
$this->apiResponse(200,'success',['users_id'=>$users['id'],'type'=>1,'is_use'=>$users['is_use']]);
}
... ...