初始化代码
This commit is contained in:
614
application/api/controller/User.php
Normal file
614
application/api/controller/User.php
Normal file
@@ -0,0 +1,614 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
|
||||
class User extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取用户详情
|
||||
public function get_user_info()
|
||||
{
|
||||
$reslut = model('user')->get_user_info($this->uid);
|
||||
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取用户详情
|
||||
public function get_base_user_info()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$reslut = model('user')->get_base_user_info($uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//欧皇钥匙数
|
||||
public function europe_key_num(){
|
||||
$reslut = model('user')->europe_key_num($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取用户余额
|
||||
public function get_user_money()
|
||||
{
|
||||
$reslut = model('user')->get_user_money($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取用户邀请二维码
|
||||
public function get_user_reg_qrcode()
|
||||
{
|
||||
$data = [];
|
||||
$data['invitation_page_url'] = url('index/index/invitation', ['uid' => $this->uid], 'html', true);
|
||||
return ajaxReturn(200, '获取成功', $data);
|
||||
|
||||
$reslut = model('user')->get_user_reg_qrcode($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取用户黑名单
|
||||
public function get_blacklist(){
|
||||
$reslut = model('UserTencent')->get_blacklist($this->uid, 0);
|
||||
return ajaxReturn($reslut['code'],$reslut['msg'],$reslut['data']);
|
||||
}
|
||||
|
||||
//添加用户黑名单
|
||||
public function add_blacklist(){
|
||||
$user_id = input('user_id','');
|
||||
$reslut = model('UserTencent')->add_blacklist($this->uid, 0, $user_id);
|
||||
return ajaxReturn($reslut['code'],$reslut['msg'],$reslut['data']);
|
||||
}
|
||||
|
||||
//移除用户黑名单
|
||||
public function remove_blacklist(){
|
||||
$user_id = input('user_id','');
|
||||
$reslut = model('UserTencent')->remove_blacklist($this->uid, 0, $user_id);
|
||||
return ajaxReturn($reslut['code'],$reslut['msg'],$reslut['data']);
|
||||
}
|
||||
|
||||
//用户签到
|
||||
public function user_sign()
|
||||
{
|
||||
$key_name = "api:user:user_sign:" . $this->uid;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('user_sign')->user_sign($this->uid);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取用户收藏房间
|
||||
public function get_user_collect_room_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 10);
|
||||
$reslut = model('user')->get_user_collect_room_list($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//我的余额记录
|
||||
public function get_user_money_log_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_user_money_log_list($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//我的积分记录
|
||||
public function get_user_integral_log_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_user_integral_log_list($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//我的陪玩接单资金收入
|
||||
public function get_player_order_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_player_order_list($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//我的礼物资金收入记录
|
||||
public function get_gift_reward_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_user_integral_log_list($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//我的礼物打赏用户记录
|
||||
public function get_send_gift_user_list()
|
||||
{
|
||||
$gift_from_type = input('gift_from_type', 0);
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_send_gift_user_list($this->uid, $gift_from_type, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//我的礼物打赏记录
|
||||
public function get_send_gift_list()
|
||||
{
|
||||
$gift_from_type = input('gift_from_type', 0);
|
||||
$uid = input('uid', 0);
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_send_gift_list($this->uid, $gift_from_type, $uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//我的礼物打赏用户记录
|
||||
public function get_receive_gift_user_list()
|
||||
{
|
||||
$gift_from_type = input('gift_from_type', 0);
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_receive_gift_user_list($this->uid, $gift_from_type, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//我的礼物接收记录
|
||||
public function get_receive_gift_list()
|
||||
{
|
||||
$gift_from_type = input('gift_from_type', 0);
|
||||
$uid = input('uid', 0);
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_receive_gift_list($this->uid, $gift_from_type, $uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取用户魅力、财富等级详情
|
||||
public function get_user_level_info()
|
||||
{
|
||||
$reslut = model('user')->get_user_level_info($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取用户魅力等级详情
|
||||
public function get_user_charm_level_info()
|
||||
{
|
||||
$reslut = model('user')->get_user_charm_level_info($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取用户贡献值详情
|
||||
public function get_user_contribution_info()
|
||||
{
|
||||
$reslut = model('user')->get_user_contribution_info($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取用户关注列表
|
||||
public function get_user_follow_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_user_follow_list($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取用户粉丝列表
|
||||
public function get_user_fans_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_user_fans_list($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取我的邀请人列表
|
||||
public function get_user_child_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$reslut = model('user')->get_user_child_list($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//用户关注
|
||||
public function follow_user()
|
||||
{
|
||||
$key_name = "api:user:follow_user:" . $this->uid;
|
||||
redis_lock_exit($key_name);
|
||||
$follow_uid = input('follow_uid', 0);
|
||||
$reslut = model('user')->follow_user($this->uid, $follow_uid);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//用户取消关注
|
||||
public function unfollow_user()
|
||||
{
|
||||
$key_name = "api:user:follow_user:" . $this->uid;
|
||||
redis_lock_exit($key_name);
|
||||
$follow_uid = input('follow_uid', 0);
|
||||
$reslut = model('user')->unfollow_user($this->uid, $follow_uid);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//修改用户 信息
|
||||
public function modify_user_info()
|
||||
{
|
||||
$key_name = "api:user:follow_user:" . $this->uid;
|
||||
redis_lock_exit($key_name);
|
||||
$nick_name = input('nick_name');
|
||||
$birthday = input('birthday');
|
||||
$sex = input('sex', 1);
|
||||
$head_pic = input('head_pic', '');
|
||||
$city = input('city', 0);
|
||||
$autograph = input('autograph', '');
|
||||
$hobby = input('hobby','');
|
||||
$reslut = model('user')->modify_user_info($this->uid, $nick_name, $birthday, $sex, $head_pic, $city, $autograph, $hobby);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//修改交易密码
|
||||
public function modify_trade_password()
|
||||
{
|
||||
$trade_password = input('trade_password');
|
||||
$sms_code = input('sms_code', ''); //短信验证码
|
||||
$reslut = model('sms')->verification_code_by_uid($this->uid, $sms_code);
|
||||
if ($reslut['code'] == 201) {
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
$reslut = model('user')->modify_trade_password($this->uid, $trade_password);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//兑换查询
|
||||
public function exchange_check()
|
||||
{
|
||||
$money = input('money');
|
||||
$reslut = model('user')->exchange_check($money);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//兑换
|
||||
public function exchange()
|
||||
{
|
||||
$key_name = "api:user:exchange:" . $this->uid;
|
||||
redis_lock_exit($key_name);
|
||||
$money = input('money');
|
||||
$reslut = model('user')->exchange($this->uid, $money);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
public function user_give_integral()
|
||||
{
|
||||
$reveive_uid = input('reveive_uid', 0);
|
||||
$integral = input('integral', 0);
|
||||
$last_login_device = input('last_login_device', '');
|
||||
$key_name = "api:user:user_give_integral:" . $this->uid;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('user')->user_give_integral($this->uid, $reveive_uid, $integral, $last_login_device);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
public function get_user_give_integral_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 10);
|
||||
$reslut = model('user')->get_user_give_integral_list($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//提现
|
||||
public function user_withdrawal()
|
||||
{
|
||||
$type = input('type', 1);
|
||||
$money = input('money', 0);
|
||||
$code = input('code', 0);
|
||||
$reslut = model('sms')->verification_code_by_uid($this->uid, $code);
|
||||
if ($reslut['code'] == 201) {
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
$key_name = "api:user:user_withdrawal:" . $this->uid;
|
||||
redis_lock_exit($key_name,3);
|
||||
$reslut = model('user')->user_withdrawal($this->uid, $money, $type);
|
||||
// if ($reslut['code'] != 200) {
|
||||
// ajaxReturn($reslut['code'], $reslut['msg']);
|
||||
// }
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//提现
|
||||
public function user_withdrawal_bank()
|
||||
{
|
||||
$money = input('money', 0);
|
||||
$code = input('code', 0);
|
||||
$reslut = model('sms')->verification_code_by_uid($this->uid, $code);
|
||||
if ($reslut['code'] == 201) {
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
$key_name = "api:user:user_withdrawal_bank:" . $this->uid;
|
||||
redis_lock_exit($key_name,3);
|
||||
$reslut = model('user')->user_withdrawal_bank($this->uid, $money);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//绑定支付宝
|
||||
public function binding_zfb()
|
||||
{
|
||||
$alipay_name = input('alipay_name');
|
||||
$alipay_account = input('alipay_account');
|
||||
$reslut = model('user')->binding_zfb($this->uid, $alipay_name, $alipay_account);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//绑定银行卡
|
||||
public function binding_bank_card()
|
||||
{
|
||||
$bank_user_name = input('bank_user_name');
|
||||
$bank_card = input('bank_card');
|
||||
$open_bank = input('open_bank');
|
||||
$bank_card_number = input('bank_card_number');
|
||||
$reslut = model('user')->binding_bank_card($this->uid, $bank_user_name, $bank_card, $open_bank, $bank_card_number);
|
||||
|
||||
|
||||
// $bank_card_number = input('bank_card_number'); //银行卡卡号
|
||||
// $bank_user_name = input('bank_user_name'); //持卡人真实姓名
|
||||
// $bank_cert_id = input('bank_cert_id'); //银行卡身份证号
|
||||
// $bank_tel_no = input('bank_tel_no'); //银行卡手机号
|
||||
// $bank_card_name = input('bank_card_name'); //银行卡名字
|
||||
// $reslut = model('user')->binding_bank_card($this->uid, $bank_card_number, $bank_user_name, $bank_cert_id, $bank_tel_no,$bank_card_name);
|
||||
|
||||
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//我的钱包
|
||||
public function get_user_withdrawal_info()
|
||||
{
|
||||
$reslut = model('user')->get_user_withdrawal_info($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取兑换记录
|
||||
public function exchange_log()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 10);
|
||||
$reslut = model('user')->exchange_log($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取提现记录
|
||||
public function get_user_withdrawal_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 10);
|
||||
$reslut = model('user')->get_user_withdrawal_list($this->uid, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//根据日志获取用户星座
|
||||
public function get_user_constellation()
|
||||
{
|
||||
$birthday = input('birthday');
|
||||
$reslut = model('user')->get_user_constellation($birthday);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取用户装扮
|
||||
public function get_user_decorate_list()
|
||||
{
|
||||
return ajaxReturn(201, '该接口已废弃', null);
|
||||
$type = input('type', 0);
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 10);
|
||||
$reslut = model('UserDecorate')->get_user_decorate_list($this->uid, $type, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//设置用户装扮
|
||||
public function set_user_decorate()
|
||||
{
|
||||
return ajaxReturn(201, '该接口已废弃', null);
|
||||
$udid = input('udid');
|
||||
$reslut = model('UserDecorate')->set_user_decorate($this->uid, $udid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//取消用户装扮
|
||||
public function cancel_user_decorate()
|
||||
{
|
||||
return ajaxReturn(201, '该接口已废弃', null);
|
||||
$udid = input('udid');
|
||||
$reslut = model('UserDecorate')->cancel_user_decorate($this->uid, $udid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//添加用户相册照片
|
||||
public function add_user_albums()
|
||||
{
|
||||
$image = input('image', '');
|
||||
$reslut = model('User')->add_user_albums($this->uid, $image);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//删除用户相册照片
|
||||
public function delete_user_albums()
|
||||
{
|
||||
$aid = input('aid', 0);
|
||||
$reslut = model('User')->delete_user_albums($this->uid, $aid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//申请用户情缘关系
|
||||
public function apply_user_relation()
|
||||
{
|
||||
|
||||
$recived_uid = input('recived_uid', 0);
|
||||
$type = input('type', 0);
|
||||
$key_name = "api:user:apply_user_relation:" . $this->uid;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('user_relation')->apply_user_relation($this->uid, $recived_uid, $type);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
public function get_apply_user_relation_info()
|
||||
{
|
||||
$aid = input('aid', 0);
|
||||
$reslut = model('user_relation')->get_apply_user_relation_info($this->uid, $aid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//处理用户情缘关系
|
||||
public function deal_user_relation_apply()
|
||||
{
|
||||
$aid = input('aid', 0);
|
||||
$status = input('status', 0);
|
||||
$key_name = "api:user:deal_user_relation_apply:" . $this->uid;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('user_relation')->deal_user_relation_apply($this->uid, $aid, $status);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//删除用户情缘关系
|
||||
public function delete_user_relation()
|
||||
{
|
||||
$rid = input('rid', 0);
|
||||
$reslut = model('user_relation')->delete_user_relation($this->uid, $rid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取用户情缘关系
|
||||
public function get_user_relation_list()
|
||||
{
|
||||
$type = input('type', 0);
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 10);
|
||||
$reslut = model('user_relation')->get_user_relation_list($this->uid, $type, $page, $page_limit);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//退出登录
|
||||
public function user_log_out(){
|
||||
$reslut = model('user')->log_out($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
public function get_decorate_list()
|
||||
{
|
||||
$result = model('UserDecorate')->get_decorate_list();
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
|
||||
//用户点亮礼物墙
|
||||
public function get_user_illume_gift_wall(){
|
||||
$uid = $this->uid;
|
||||
$user_id = input('user_id', 0);
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 20);
|
||||
$result = model('GiftWall')->get_user_illume_gift_wall($uid, $user_id, $page, $page_limit);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
|
||||
}
|
||||
|
||||
//用户未点亮礼物墙
|
||||
public function get_user_unillume_gift_wall(){
|
||||
$uid = $this->uid;
|
||||
$user_id = input('user_id', 0);
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 20);
|
||||
$result = model('GiftWall')->get_user_unillume_gift_wall($uid, $user_id, $page, $page_limit);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
|
||||
}
|
||||
|
||||
//注销账号
|
||||
public function logout_user_name(){
|
||||
$uid = $this->uid;
|
||||
$key_name = "api:user:logout_user_name:uid:".$uid;
|
||||
$sms_code = input('sms_code', ''); //短信验证码
|
||||
$reslut = model('sms')->verification_code_by_uid($this->uid, $sms_code);
|
||||
if ($reslut['code'] == 201) {
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('User')->logout_user_name($uid);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//用户等级信息
|
||||
public function get_level_list(){
|
||||
$uid = $this->uid;
|
||||
$type = input('type', 1);
|
||||
$reslut = model('UserLevel')->get_level_list($uid, $type);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//进厅隐身
|
||||
public function user_is_room_hiding(){
|
||||
$uid = $this->uid;
|
||||
$is_room_hiding = input('is_room_hiding', 1);
|
||||
$key_name = "api:user:user_is_room_hiding:".$uid;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('User')->user_is_room_hiding($uid, $is_room_hiding);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//位置信息开关
|
||||
public function options_is_open_address(){
|
||||
$uid = $this->uid;
|
||||
$is_open_address = input('is_open_address', 1);
|
||||
$key_name = "api:user:options_is_open_address:".$uid;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('User')->options_is_open_address($uid, $is_open_address);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
|
||||
}
|
||||
|
||||
public function check_user_is_real()
|
||||
{
|
||||
$reslut = model('User')->check_user_is_real($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function user_day_sign(){
|
||||
$uid = $this->uid;
|
||||
$key_name = "api:user:user_day_sign:".$uid;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('UserSign')->user_day_sign($this->uid);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
public function user_day_sign_log(){
|
||||
$reslut = model('UserSign')->user_day_sign_log($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
public function get_kf_message(){
|
||||
$result = model('user')->get_kf_message();
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function get_one_withdrawal_detail(){
|
||||
$wid = input('wid', 0);
|
||||
$result = model('user')->get_one_withdrawal_detail($this->uid,$wid);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function get_user_withdrawal_detail(){
|
||||
$start = input('start', '');
|
||||
$end = input('end', '');
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 50);
|
||||
$result = model('user')->get_user_withdrawal_detail($this->uid,$start,$end,$page,$page_limit);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user