加是否可以发布动态字段
This commit is contained in:
@@ -1285,23 +1285,27 @@ class Room extends adminApi
|
|||||||
'updatetime'=>time(),
|
'updatetime'=>time(),
|
||||||
]);
|
]);
|
||||||
if(!$result){
|
if(!$result){
|
||||||
if($apply_status ==2){
|
|
||||||
$deal_content = '审核通过';
|
|
||||||
}elseif($apply_status ==3){
|
|
||||||
$deal_content = '审核未通过';
|
|
||||||
}
|
|
||||||
db::name('system_message')->insert([
|
|
||||||
'title' => '房间审核结果',
|
|
||||||
'content' => '您创建的房间'.$room_data['room_name'].$deal_content,
|
|
||||||
'type' => 1,
|
|
||||||
'admin_id' => Session::get('admin_id'),
|
|
||||||
'receiving_id' => $room_data['user_id'],
|
|
||||||
'createtime' => time(),
|
|
||||||
]);
|
|
||||||
return V(0,"修改失败");
|
return V(0,"修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//发系统信息
|
||||||
|
if($apply_status ==2){
|
||||||
|
$deal_content = '审核通过';
|
||||||
|
}elseif($apply_status ==3){
|
||||||
|
$deal_content = '审核未通过';
|
||||||
|
}
|
||||||
|
db::name('system_message')->insert([
|
||||||
|
'title' => '房间审核结果',
|
||||||
|
'content' => '您创建的房间'.$room_data['room_name'].$deal_content,
|
||||||
|
'type' => 1,
|
||||||
|
'admin_id' => Session::get('admin_id'),
|
||||||
|
'receiving_id' => $room_data['user_id'],
|
||||||
|
'createtime' => time(),
|
||||||
|
]);
|
||||||
|
|
||||||
//房间绑定盘
|
//房间绑定盘
|
||||||
model('Room')->bindPan($id);
|
model('Room')->bindPan($id);
|
||||||
|
|
||||||
return V(1,"成功");
|
return V(1,"成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -181,6 +181,15 @@ class Login extends Model
|
|||||||
}
|
}
|
||||||
$return_res[0]['auth'] = $isAuth;
|
$return_res[0]['auth'] = $isAuth;
|
||||||
|
|
||||||
|
//是否可以发布动态
|
||||||
|
$user_rechange = db::name('vs_user_recharge')->field('sum(money) as money')->where(['user_id' => $user_info['id'],'pay_status' => 2])->find();
|
||||||
|
//系统配置
|
||||||
|
$config_money = get_system_config_value('private_chat_recharge_money');
|
||||||
|
if($user_rechange['money'] < $config_money){
|
||||||
|
$return_res[0]['is_can_chat'] = 0;
|
||||||
|
}else{
|
||||||
|
$return_res[0]['is_can_chat'] = 1;
|
||||||
|
}
|
||||||
return ['code' => 1, 'msg' => '登录成功', 'data' => $return_res];
|
return ['code' => 1, 'msg' => '登录成功', 'data' => $return_res];
|
||||||
}else{
|
}else{
|
||||||
return ['code' => 0, 'msg' => '登录失败,账号失效', 'data' => null];
|
return ['code' => 0, 'msg' => '登录失败,账号失效', 'data' => null];
|
||||||
|
|||||||
@@ -149,6 +149,16 @@ class User extends Model
|
|||||||
$user_info['dress'] = model('Decorate')->user_decorate_detail($user_info['user_id'],1);
|
$user_info['dress'] = model('Decorate')->user_decorate_detail($user_info['user_id'],1);
|
||||||
$user_info['auth'] = db::name('user_auth')->where(['mobile' => $user_info['mobile'],'is_real' => 1])->find() ? 1 : 0;
|
$user_info['auth'] = db::name('user_auth')->where(['mobile' => $user_info['mobile'],'is_real' => 1])->find() ? 1 : 0;
|
||||||
|
|
||||||
|
//是否可以发布动态
|
||||||
|
$user_rechange = db::name('vs_user_recharge')->field('sum(money) as money')->where(['user_id' => $uid,'pay_status' => 2])->find();
|
||||||
|
//系统配置
|
||||||
|
$config_money = get_system_config_value('private_chat_recharge_money');
|
||||||
|
if($user_rechange['money'] < $config_money){
|
||||||
|
$user_info['is_can_chat'] = 0;
|
||||||
|
}else{
|
||||||
|
$user_info['is_can_chat'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return ['code' => 1, 'msg' => '获取成功', 'data' => $user_info];
|
return ['code' => 1, 'msg' => '获取成功', 'data' => $user_info];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user