mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-02-20 08:30:28 +00:00
格式化代码
This commit is contained in:
parent
eb0c12fa0e
commit
59966e170a
@ -40,7 +40,8 @@ class WechatUser extends BaseModel
|
|||||||
* @param string $uid
|
* @param string $uid
|
||||||
* @return bool|mixed
|
* @return bool|mixed
|
||||||
*/
|
*/
|
||||||
public static function getOpenId($uid = ''){
|
public static function getOpenId($uid = '')
|
||||||
|
{
|
||||||
if ($uid == '') return false;
|
if ($uid == '') return false;
|
||||||
return self::where('uid', $uid)->value('routine_openid');
|
return self::where('uid', $uid)->value('routine_openid');
|
||||||
}
|
}
|
||||||
@ -75,7 +76,8 @@ class WechatUser extends BaseModel
|
|||||||
* @param $routineInfo
|
* @param $routineInfo
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public static function routineOauth($routine){
|
public static function routineOauth($routine)
|
||||||
|
{
|
||||||
$routineInfo['nickname'] = filterEmoji($routine['nickName']);//姓名
|
$routineInfo['nickname'] = filterEmoji($routine['nickName']);//姓名
|
||||||
$routineInfo['sex'] = $routine['gender'];//性别
|
$routineInfo['sex'] = $routine['gender'];//性别
|
||||||
$routineInfo['language'] = $routine['language'];//语言
|
$routineInfo['language'] = $routine['language'];//语言
|
||||||
@ -120,12 +122,14 @@ class WechatUser extends BaseModel
|
|||||||
}
|
}
|
||||||
return $uid;
|
return $uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断是否是小程序用户
|
* 判断是否是小程序用户
|
||||||
* @param int $uid
|
* @param int $uid
|
||||||
* @return bool|int|string
|
* @return bool|int|string
|
||||||
*/
|
*/
|
||||||
public static function isRoutineUser($uid = 0){
|
public static function isRoutineUser($uid = 0)
|
||||||
|
{
|
||||||
if (!$uid) return false;
|
if (!$uid) return false;
|
||||||
return self::where('uid', $uid)->where('user_type', 'routine')->count();
|
return self::where('uid', $uid)->where('user_type', 'routine')->count();
|
||||||
}
|
}
|
||||||
@ -134,7 +138,8 @@ class WechatUser extends BaseModel
|
|||||||
* @param int $uid
|
* @param int $uid
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public static function isUserStatus($uid = 0){
|
public static function isUserStatus($uid = 0)
|
||||||
|
{
|
||||||
if (!$uid) return 0;
|
if (!$uid) return 0;
|
||||||
$user = User::getUserInfo($uid);
|
$user = User::getUserInfo($uid);
|
||||||
return $user['status'];
|
return $user['status'];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user