@@ -17,18 +17,6 @@ class Qc
public function index2()
{
- $user_id = 66;
- $user_code = function () use($user_id){
- $length = 8;
- $base_code = explode(',',"A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,T,U,V,W,X,Y,Z");
- $id_length = strlen($user_id);
- $code_key = array_rand($base_code, $length - $id_length);
- $code_str = '';
- array_map(function ($val)use (&$code_str,$base_code){
- $code_str .=$base_code[$val] ;
- },$code_key);
- return $code_str.$user_id;
- };
$user = Db::table('fa_user')->select();
foreach ($user as $v) {
$code = $this->getRegisterCode($v['id']);