wugg 1 жил өмнө
parent
commit
a79afd5d9d

+ 2 - 1
app/controller/User.php

@@ -391,8 +391,9 @@ class User extends Base
     if($valid->check($param)==false) $this->error($valid->getError());
    	$acc = $this->model->withJoin(['userinfo','accountitem'],'left')->findOrEmpty($param['id']);
    	if($acc->isEmpty())$this->error("账户信息不存在",1004);
+   	if($acc->userinfo->openId!='')$this->error("账户信息已绑定微信请先解除",1004);
    	if(substr($acc->mobile,-4,4)!=$param['lastCode'])$this->error('手机后四位不正确!',1004);
-   	if($param['openId']==''&& $acc->userinfo->openId!=$param['openId'] ){
+   	if($param['openId']!==''&& $acc->userinfo->openId!=$param['openId'] ){
 	        $acc->userinfo->openId=$param['openId'];
 	        $this->model->userinfo()->save($acc->userinfo->toArray());
    	  }

+ 1 - 1
config/cache.php

@@ -6,7 +6,7 @@
 
 return [
     // 默认缓存驱动
-    'default' => env('cache.driver', 'file'),
+    'default' => env('cache.driver', 'redis'),
 
     // 缓存连接方式配置
     'stores'  => [