zxhxx 3 роки тому
батько
коміт
8f9b855546

+ 0 - 1
application/common/controller/Api.php

@@ -120,7 +120,6 @@ class Api
         if (!$this->auth->match($this->noNeedLogin)) {
             //初始化
             $rs = $this->auth->init($token);
-            @file_put_contents("token.txt",json_encode($rs));
             //检测是否登录
             if (!$this->auth->isLogin()) {
                 $this->error(__('Please login first'), null, 401);

+ 0 - 4
application/common/library/Auth.php

@@ -94,12 +94,10 @@ class Auth
             return false;
         }
         $data = Token::get($token);
-        @file_put_contents('data.txt',json_encode($data));
         if (!$data) {
             return false;
         }
         $user_id = intval($data['user_id']);
-        @file_put_contents('data.txt','-1111--'.$user_id,8);
         if ($user_id > 0) {
             $user = User::get($user_id);
             if (!$user) {
@@ -113,10 +111,8 @@ class Auth
             $this->_user = $user;
             $this->_logined = true;
             $this->_token = $token;
-
             //初始化成功的事件
             Hook::listen("user_init_successed", $this->_user);
-
             return true;
         } else {
             $this->setError('You are not logged in');

+ 1 - 0
application/common/model/User.php

@@ -271,6 +271,7 @@ class User extends BaseModel
         $routineInfo['unionid'] = $routine['unionId'];//用户在开放平台的唯一标识符
         $routineInfo['login_type'] = 2;//用户类型
         $routineInfo['cid'] = $routine['cid'];
+        $routineInfo['status'] = 'normal';
         $spid = 0;//绑定关系uid
         $isCOde = false;
         //获取是否有扫码进小程序