| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 | 
							- <?php
 
- // +—————————————————————————————————————————————————————————————————————
 
- // | Created by Yunbao
 
- // +—————————————————————————————————————————————————————————————————————
 
- // | Copyright (c) 2013~2022 http://www.yunbaokj.com All rights reserved.
 
- // +—————————————————————————————————————————————————————————————————————
 
- // | Author: https://gitee.com/yunbaokeji
 
- // +—————————————————————————————————————————————————————————————————————
 
- // | Date: 2022-02-17
 
- // +—————————————————————————————————————————————————————————————————————
 
- class Model_Auth extends PhalApi_Model_NotORM {
 
-     
 
-     /*获取认证信息*/
 
- 	public function getAuth($uid) {
 
- 		$rs = array(
 
- 			'uid'=>$uid,
 
- 			'real_name'=>'',
 
- 			'mobile'=>'',
 
- 			'cer_no'=>'',
 
- 			'front_view'=>'',
 
- 			'back_view'=>'',
 
- 			'handset_view'=>'',
 
- 			'status'=>'-1',
 
- 			
 
- 		);
 
- 		$info=DI()->notorm->user_auth
 
- 				->select("uid,real_name,mobile,cer_no,status,front_view,back_view,handset_view")
 
- 				->where('uid=?',$uid)
 
- 				->fetchOne();
 
- 		if($info){
 
- 			$info['front_view']=get_upload_path($info['front_view']);
 
- 			$info['back_view']=get_upload_path($info['back_view']);
 
- 			$info['handset_view']=get_upload_path($info['handset_view']);
 
- 			$rs = $info;
 
- 		}
 
- 		
 
- 		return $rs;
 
- 	}
 
-     
 
- 	
 
- 	public function setAuth($data) {
 
- 		
 
- 		
 
- 		//认证已存在,则进行更新
 
- 		$setdata=$data;
 
- 		$setdata['uptime']=time();
 
- 		
 
- 		return DI()->notorm->user_auth
 
- 			->insert_update(['uid'=>$data['uid']],$data,$setdata);
 
- 	}
 
- 	
 
- 	
 
- 	
 
- }
 
 
  |