mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-03-17 11:13:45 +00:00
修改小程序bug
This commit is contained in:
parent
8703f051c5
commit
9653784169
@ -43,11 +43,11 @@ class RoutineUser extends ModelBasic
|
|||||||
$uid = WechatUser::where('routine_openid',$routineInfo['routine_openid'])->value('uid');
|
$uid = WechatUser::where('routine_openid',$routineInfo['routine_openid'])->value('uid');
|
||||||
User::updateWechatUser($routineInfo,$uid);
|
User::updateWechatUser($routineInfo,$uid);
|
||||||
}else{
|
}else{
|
||||||
if(User::isUserSpread($routine['spid'])) $routineInfo['spread_uid'] = $routine['spid'];//用户上级
|
|
||||||
else $routineInfo['spread_uid'] = 0;
|
|
||||||
$routineInfo['add_time'] = time();//用户添加时间
|
$routineInfo['add_time'] = time();//用户添加时间
|
||||||
$routineInfo = WechatUser::set($routineInfo);
|
$routineInfo = WechatUser::set($routineInfo);
|
||||||
$res = User::setRoutineUser($routineInfo);
|
if(User::isUserSpread($routine['spid'])) {
|
||||||
|
$res = User::setRoutineUser($routineInfo,$routine['spid']); //用户上级
|
||||||
|
} else $res = User::setRoutineUser($routineInfo);
|
||||||
$uid = $res->uid;
|
$uid = $res->uid;
|
||||||
}
|
}
|
||||||
return $uid;
|
return $uid;
|
||||||
@ -62,4 +62,10 @@ class RoutineUser extends ModelBasic
|
|||||||
if(!$uid) return false;
|
if(!$uid) return false;
|
||||||
return WechatUser::where('uid',$uid)->where('user_type','routine')->count();
|
return WechatUser::where('uid',$uid)->where('user_type','routine')->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function isUserStatus($uid = 0){
|
||||||
|
if(!$uid) return 0;
|
||||||
|
$user = User::getUserInfo($uid);
|
||||||
|
return $user['status'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user