初始化代码
This commit is contained in:
115
application/admin/controller/Admin.php
Normal file
115
application/admin/controller/Admin.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Admin extends Common
|
||||
{
|
||||
|
||||
//获取管理员列表
|
||||
public function get_admin_list()
|
||||
{
|
||||
$user_name = input('user_name', '');
|
||||
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('admin')->get_admin_list($user_name, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//获取 管理员 详情
|
||||
public function admin_info()
|
||||
{
|
||||
$login_token = input('login_token', 0);
|
||||
$reslut = model('Admin')->admin_info($login_token);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取 管理员 详情
|
||||
public function add_admin()
|
||||
{
|
||||
$user_name = input('user_name', '');
|
||||
$password = input('password', '');
|
||||
$re_password = input('re_password', '');
|
||||
$reslut = model('Admin')->add_admin($user_name, $password, $re_password);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//修改管理员密码
|
||||
public function edit_admin_password()
|
||||
{
|
||||
|
||||
$aid = input('aid', 0);
|
||||
$old_password = input('old_password', '');
|
||||
$password = input('new_password', '');
|
||||
$re_password = input('re_password', '');
|
||||
$phone = input('phone', '');
|
||||
$reslut = model('Admin')->edit_admin_password($aid, $old_password, $password, $re_password, $phone);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//修改管理员密码
|
||||
public function edit_admin_auth()
|
||||
{
|
||||
$aid = input('aid', 0);
|
||||
$auth = input('auth', '');
|
||||
$reslut = model('Admin')->edit_admin_auth($aid, $auth);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取管理员详情
|
||||
public function get_admin_info()
|
||||
{
|
||||
$aid = input('aid', 0);
|
||||
$reslut = model('Admin')->get_admin_info($aid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取管理员详情
|
||||
public function delete_admin()
|
||||
{
|
||||
$aid = input('aid', 0);
|
||||
$reslut = model('Admin')->delete_admin($aid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
public function get_all_system_menu_list()
|
||||
{
|
||||
$aid = input('aid', 0);
|
||||
$reslut = model('SystemMenu')->get_all_system_menu_list($aid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//获取管理员日志
|
||||
public function get_admin_log_list(){
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Admin')->get_admin_log_list($page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//退出登录
|
||||
public function quit_admin_login(){
|
||||
$aid = $this->aid;
|
||||
$reslut = model('Admin')->quit_admin_login($aid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//清除登录token
|
||||
public function clear_admin_token()
|
||||
{
|
||||
$super_aid = $this->aid;
|
||||
$aid = input('aid', 0);
|
||||
$reslut = model('Admin')->clear_admin_token($super_aid, $aid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
}
|
||||
50
application/admin/controller/Agora.php
Normal file
50
application/admin/controller/Agora.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\facade\Request;
|
||||
|
||||
class Agora extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取音乐列表
|
||||
public function agora_song_list()
|
||||
{
|
||||
$aid = input('aid', 0);
|
||||
$song_name = input('song_name', 0);
|
||||
$singer = input('singer', 0);
|
||||
$order = input('order', 'aid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
|
||||
$reslut = model('Agora')->agora_song_list($aid, $song_name, $singer, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//同步歌曲
|
||||
public function synchro_song(){
|
||||
$key_name = "admin:agora:synchro_song";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('Agora')->synchro_song();
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//增量歌曲
|
||||
public function increment_song(){
|
||||
$key_name = "admin:agora:increment_song";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('Agora')->increment_song();
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
}
|
||||
206
application/admin/controller/ApiTask.php
Normal file
206
application/admin/controller/ApiTask.php
Normal file
@@ -0,0 +1,206 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class ApiTask extends Controller
|
||||
{
|
||||
|
||||
//监控宝箱状态 设置5s 监控一次
|
||||
public function control_box()
|
||||
{
|
||||
$key_name = "admin:cli:control_box";
|
||||
$tid = input('tid', 0);
|
||||
$is_reset = input('is_reset', 0);
|
||||
redis_lock_exit($key_name,20);
|
||||
$reslut = model('admin/box')->control_generate_box($tid, $is_reset);
|
||||
redis_unlock($key_name);
|
||||
if($is_reset){
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}else{
|
||||
echo date('Y-m-d H:i:s') . "监控奖池 执行成功" . $reslut['data'] . "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
//清理房间当天热度
|
||||
public function clear_room_hot_value(){
|
||||
$key_name = "admin:cli:clear_room_hot_value";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/room')->clear_room_hot_value();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "清除房间当天热度 执行成功"." \r\n";
|
||||
}
|
||||
|
||||
//爵位到期监控
|
||||
public function close_user_nobility(){
|
||||
$key_name = "admin:ApiTask:close_user_nobility";
|
||||
redis_lock_exit($key_name,20);
|
||||
$reslut = model('api/Nobility')->user_nobility_over_time();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "爵位到期监控 执行成功"." \r\n";
|
||||
}
|
||||
|
||||
//定时清除用户关系
|
||||
public function close_user_relation(){
|
||||
$key_name = "admin:cli:close_user_relation";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/DatingRoom')->close_user_relation();
|
||||
redis_unlock($key_name);
|
||||
// echo date('Y-m-d H:i:s') . "定时清除用户关系 执行成功"." \r\n";
|
||||
}
|
||||
|
||||
//定时结束唱歌时间
|
||||
public function colse_room_song_user_status(){
|
||||
$key_name = "admin:cli:colse_room_song_user_status";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/KtvRoom')->colse_room_song_user_status();
|
||||
redis_unlock($key_name);
|
||||
// echo date('Y-m-d H:i:s') . "定时结束唱歌时间 执行成功"." \r\n";
|
||||
}
|
||||
|
||||
//定时清理到期私密小屋
|
||||
public function close_room_privacy_status(){
|
||||
$key_name = "api:cli:close_room_privacy_status";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/DatingRoom')->close_room_privacy_status();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "监控私密小屋倒计时 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//定时清理到期心动连线
|
||||
public function close_room_dating_stage(){
|
||||
$key_name = "admin:cli:close_room_dating_stage";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/DatingRoom')->close_room_dating_stage();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "监控心动连线倒计时 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//定时清理到期拍卖活动监控成功
|
||||
public function close_auction_pm(){
|
||||
$key_name = "admin:cli:close_auction_pm";
|
||||
redis_lock_exit($key_name);
|
||||
$data = model('api/AuctionRoom')->close_auction_pm();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "定时清理到期拍卖活动 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//定时清理酒吧房掉麦
|
||||
public function close_room_date_micro(){
|
||||
$key_name = "admin:cli:close_room_date_micro";
|
||||
redis_lock_exit($key_name);
|
||||
$data = model('api/PubRoom')->close_room_date_micro();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "定时清理酒吧房掉麦 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//清理过期装扮
|
||||
public function clear_user_decorate()
|
||||
{
|
||||
$key_name = "admin:cli:clear_user_decorate";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('Decorate')->clear_user_decorate();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "清理过期装扮 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//清理空房间机器人
|
||||
public function auto_clear_robot_room()
|
||||
{
|
||||
$key_name = "admin:cli:auto_clear_robot_room";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/room')->auto_clear_robot_room();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "清理空房间机器人 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//每日签到删除处理
|
||||
public function del_user_day_sign_log()
|
||||
{
|
||||
$key_name = "admin:cli:del_user_day_sign_log";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model("api/UserSign")->del_user_day_sign_log();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "每日签到删除处理 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//获取上周排行榜
|
||||
public function last_week_rank(){
|
||||
$key_name = "admin:cli:last_week_rank";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/gift')->last_week_rank1();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "获取上周排行榜 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//结算上周房间流水
|
||||
public function statistics_room_last_week_earnings(){
|
||||
$key_name = "admin:cli:statistics_room_last_week_earnings";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/RoomWages')->statistics_room_last_week_earnings(1);
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "结算上周房间流水 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//结算上周公会流水
|
||||
public function statistics_guild_last_week_earnings(){
|
||||
$key_name = "admin:cli:statistics_guild_last_week_earnings";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/RoomWages')->statistics_guild_last_week_earnings(1);
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "结算上周公会流水 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//房间工资结算
|
||||
public function batch_give_room_subsidy(){
|
||||
$key_name = "admin:cli:batch_give_room_subsidy";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/RoomWages')->batch_give_room_subsidy();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "结算上周房间流水 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//公会工资结算
|
||||
public function batch_give_guild_subsidy(){
|
||||
$key_name = "admin:cli:batch_give_guild_subsidy";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/RoomWages')->batch_give_guild_subsidy();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "结算上周房间流水 执行成功" . "\r\n";
|
||||
}
|
||||
|
||||
//监控练仙传说
|
||||
public function create_monster_log(){
|
||||
$key_name = "admin:cli:create_monster_log";
|
||||
redis_lock_exit($key_name,1,1);
|
||||
$reslut = model('api/Monster')->create_monster_log();
|
||||
redis_unlock($key_name);
|
||||
if($reslut['code'] == 201){
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}else{
|
||||
echo date('Y-m-d H:i:s') . "监控练仙传说 执行成功" . $reslut['data'] . "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
//盲盒巡乐会自动结束
|
||||
public function close_blind_box()
|
||||
{
|
||||
$key_name = "api:cli:close_blind_box";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/BlindBox')->close_blind_box();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "盲盒巡乐会自动结束 执行成功\r\n";
|
||||
}
|
||||
|
||||
//盲盒巡乐会自动结束
|
||||
public function blind_box_reward()
|
||||
{
|
||||
$key_name = "api:cli:blind_box_reward";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/BlindBox')->blind_box_reward();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "盲盒巡乐会结束奖励 执行成功\r\n";
|
||||
}
|
||||
|
||||
}
|
||||
230
application/admin/controller/Apip.php
Normal file
230
application/admin/controller/Apip.php
Normal file
@@ -0,0 +1,230 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\captcha\Captcha;
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
|
||||
class Apip extends Controller
|
||||
{
|
||||
public function initialize()
|
||||
{
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
add_operation(1, 0); //用户行为日志
|
||||
}
|
||||
public function login()
|
||||
{
|
||||
|
||||
$captcha = input('captcha');
|
||||
$username = input('username');
|
||||
$password = input('password');
|
||||
if (empty($captcha)) {
|
||||
return ajaxReturn(201, '验证码不能为空');
|
||||
}
|
||||
if (!captcha_check($captcha)) {
|
||||
// 验证失败
|
||||
return ajaxReturn(201, '验证码错误');
|
||||
}
|
||||
if (empty($username)) {
|
||||
return ajaxReturn(201, '用户名不能为空');
|
||||
}
|
||||
if (empty($password)) {
|
||||
return ajaxReturn(201, '密码不能为空');
|
||||
}
|
||||
$map = [];
|
||||
$map[] = ['user_name', '=', $username];
|
||||
$map[] = ['is_delete', '=', 1];
|
||||
// $map[] = ['password', '=', md5($password)];
|
||||
|
||||
$info = db::name('admin')->where($map)->find();
|
||||
if (empty($info)) {
|
||||
return ajaxReturn(201, '用户名不存在');
|
||||
} else {
|
||||
$admin_open_sms_code = $info['open_sms_code'];
|
||||
$surplus_time = time() - $info['update_time'];
|
||||
if($info['error_num'] >= 3 && $surplus_time < 3600){
|
||||
return ajaxReturn(201, '账号已锁定,一小时内无法登录');
|
||||
}
|
||||
|
||||
if (md5($password) != $info['password']) {
|
||||
$update_err = [];
|
||||
$update_err['update_time'] = time();
|
||||
if($info['error_num'] >= 3) {
|
||||
// return ajaxReturn(201, '账号已锁定,一小时内无法登录');
|
||||
// $update_err['status'] = 2;
|
||||
}
|
||||
db::name('admin')->where('aid',$info['aid'])->inc('error_num',1)->update($update_err);
|
||||
return ajaxReturn(201, '密码错误');
|
||||
}
|
||||
|
||||
$ip_address = request()->ip();
|
||||
// $ip_address = '211.94.238.248';
|
||||
$address = ip_to_position($ip_address);
|
||||
$province = $address['province'];
|
||||
$city = $address['city'];
|
||||
|
||||
//该用户是否已退出
|
||||
if($info['aid'] != 1 || $admin_open_sms_code == 0) {
|
||||
if(!empty($info['login_token'])){
|
||||
if($ip_address != $info['ip']){
|
||||
// return ajaxReturn(201, '该账号已被其他人登录');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//发送短信
|
||||
if(empty($info['phone'])){
|
||||
$mobile = db::name('admin')->where('aid', 1)->value('phone');
|
||||
}else{
|
||||
$mobile = $info['phone'];
|
||||
}
|
||||
|
||||
$province_time = $province . $city .', 时间 '.date('Y-m-d H:i:s');
|
||||
|
||||
$content = '【语音安全监控】你的账号'.$info['user_name'].'正在被登录,登录IP:'.$ip_address.',登录位置:'.$province_time;
|
||||
$login_token = generateRandom(32);
|
||||
// if ($info['aid'] == 1) {
|
||||
// $login_token = $info['login_token'];
|
||||
// }
|
||||
$data = [];
|
||||
$data['aid'] = $info['aid'];
|
||||
$data['login_token'] = $login_token;
|
||||
$data['ip'] = $ip_address;
|
||||
$data['province'] = $address['province'];
|
||||
$data['city'] = $city;
|
||||
$data['error_num'] = 0;
|
||||
$data['update_time'] = time();
|
||||
$data['token_validity_time'] = time() + (60*60*12);
|
||||
$reslut = db::name('admin')->update($data);
|
||||
if (!$reslut) {
|
||||
return ajaxReturn(201, '登录失败', '');
|
||||
} else {
|
||||
$show_mobile = substr_replace($mobile,'****',3,4);
|
||||
$base64_mobile = $this->base64_encode_mobile($mobile);
|
||||
if($admin_open_sms_code == 1) {
|
||||
$data = ['uid' => $info['aid'], 'login_token' => '', 'is_has_warn' => 2, 'show_mobile' => $show_mobile, 'mobile' => $base64_mobile, 'need_sms_code' => 1];
|
||||
} else {
|
||||
$data = ['uid' => $info['aid'], 'login_token' => $login_token, 'is_has_warn' => 2, 'need_sms_code' => 0];
|
||||
}
|
||||
|
||||
return ajaxReturn(200, '登录成功', $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
public function verify()
|
||||
{
|
||||
$config = [
|
||||
'codeSet' => '0123456789',
|
||||
// 验证码字体大小
|
||||
'fontSize' => 30,
|
||||
// 验证码位数
|
||||
'length' => 4,
|
||||
// 关闭验证码杂点
|
||||
'useNoise' => false,
|
||||
];
|
||||
$captcha = new Captcha($config);
|
||||
return $captcha->entry();
|
||||
}
|
||||
|
||||
public function test()
|
||||
{
|
||||
$file = request()->file('file');
|
||||
$file_category_name = input('file_category', 'all');
|
||||
$reslut = model('Upload')->qiniu_upload($file, $file_category_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
private function send_smsbao_msg($mobile, $content){
|
||||
$config = get_uncache_system_config();
|
||||
//短信宝
|
||||
// $url = "https://dx.ipyy.net/smsJson.aspx?action=send&userid=&account=" . $config['huaxin_account'] . "&password=" . $config['huaxin_password'] . "&mobile=" . $mobile . "&content=" . urlencode($content) . "&sendTime=&extno=";
|
||||
$url = "https://api.smsbao.com/sms?u=".$config['smsbao_account']."&p=".md5($config['smsbao_password'])."&m=".$mobile."&c=".urlencode($content) ."&g=";
|
||||
$result = myCurl($url);
|
||||
$result_arr = json_decode($result, true);
|
||||
if ($result_arr == 0) {
|
||||
return ['code' => 200, 'msg' => '发送成功', 'data' => null];
|
||||
} else {
|
||||
return ['code' => 201, 'msg' => '发送失败', 'data' => null];
|
||||
}
|
||||
}
|
||||
|
||||
public function get_mobile_code()
|
||||
{
|
||||
$mobile = input('mobile', '');
|
||||
$captcha = input('captcha', '');
|
||||
if (empty($captcha)) {
|
||||
return ajaxReturn(201, '验证码不能为空');
|
||||
}
|
||||
if (!captcha_check($captcha)) {
|
||||
// 验证失败
|
||||
return ajaxReturn(201, '验证码错误');
|
||||
}
|
||||
|
||||
$mobile = $this->base64_decode_mobile($mobile);
|
||||
$key_name = "admin:cli:get_mobile_code";
|
||||
redis_lock_exit($key_name);
|
||||
$result = model('api/sms')->send_sms_admin($mobile);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
public function sms_login()
|
||||
{
|
||||
|
||||
$aid = input('uid', '');
|
||||
$mobile = input('mobile', '');
|
||||
$sms_code = input('sms_code', '');
|
||||
if(empty($sms_code)) {
|
||||
return ajaxReturn(201, '短信验证码不能为空');
|
||||
}
|
||||
if(empty($aid)) {
|
||||
return ajaxReturn(201, '管理员账号不能为空');
|
||||
}
|
||||
if($aid != 1) {
|
||||
return ajaxReturn(201, '非验证码管理员');
|
||||
}
|
||||
$mobile = $this->base64_decode_mobile($mobile);
|
||||
$result = model('api/sms')->verification_code_admin($mobile, $sms_code);
|
||||
if($result['code'] == 201) {
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
|
||||
$map = [];
|
||||
$map[] = ['aid', '=', $aid];
|
||||
$map[] = ['is_delete', '=', 1];
|
||||
$info = db::name('admin')->where($map)->find();
|
||||
if($info['phone'] !== $mobile) {
|
||||
return ajaxReturn(201, '账号错误');
|
||||
}
|
||||
$ip_address = request()->ip();
|
||||
$login_token = generateRandom(32);
|
||||
$data = [];
|
||||
$data['aid'] = $info['aid'];
|
||||
$data['login_token'] = $login_token;
|
||||
$data['update_time'] = time();
|
||||
$data['ip'] = $ip_address;
|
||||
$data['token_validity_time'] = time()+7200;
|
||||
$reslut = db::name('admin')->update($data);
|
||||
if($reslut) {
|
||||
$data = ['uid' => $info['aid'], 'login_token' => $login_token, 'is_has_warn' => 1];
|
||||
return ajaxReturn(200, '登录成功', $data);
|
||||
}
|
||||
return ajaxReturn(201, '登录失败', $data);
|
||||
}
|
||||
//手机号
|
||||
public function base64_decode_mobile($mobile)
|
||||
{
|
||||
$mobile = base64_decode($mobile);
|
||||
$mobile_arr = explode('_', $mobile);
|
||||
return $mobile_arr[1];
|
||||
}
|
||||
//手机号转换数据流
|
||||
public function base64_encode_mobile($mobile)
|
||||
{
|
||||
$rand_code = 'scsy';
|
||||
$rand_mobile = $rand_code . '_' . $mobile;
|
||||
return base64_encode($rand_mobile);
|
||||
}
|
||||
|
||||
}
|
||||
143
application/admin/controller/BlindBox.php
Normal file
143
application/admin/controller/BlindBox.php
Normal file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\facade\Request;
|
||||
|
||||
class BlindBox extends Common
|
||||
{
|
||||
|
||||
//获取盲盒礼物
|
||||
public function get_blind_box_gift_list()
|
||||
{
|
||||
$tid = input('tid', 0);
|
||||
$result = model('BlindBox')->get_blind_box_gift_list($tid);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
|
||||
public function get_gift_list()
|
||||
{
|
||||
$result = model('BlindBox')->get_gift_list();
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//获取列表
|
||||
public function get_config_list()
|
||||
{
|
||||
$pattern_id = input('pattern_id', 0);
|
||||
|
||||
$gid = input('gid', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$result = model('BlindBox')->get_config_list($pattern_id, $gid, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $result['data']['count'];
|
||||
$data['data'] = $result['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加限定礼物配置
|
||||
public function add_config(){
|
||||
$data = input('post.');
|
||||
$result = model('BlindBox')->add_config($data);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//限定礼物配置详情
|
||||
public function get_config_info(){
|
||||
$id = input('id', 0);
|
||||
$result = model('BlindBox')->get_config_info($id);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//限定礼物修改
|
||||
public function edit_config(){
|
||||
$data = input('post.');
|
||||
$result = model('BlindBox')->edit_config($data);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//移除封禁
|
||||
public function del_config(){
|
||||
$id = input('id', 0);
|
||||
$result = model('BlindBox')->del_config($id);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
|
||||
}
|
||||
//获取阶段列表
|
||||
public function get_stage_list()
|
||||
{
|
||||
$pattern_id = input('pattern_id', 0);
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$result = model('BlindBox')->get_stage_list($pattern_id, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $result['data']['count'];
|
||||
$data['data'] = $result['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//阶段详情
|
||||
public function get_stage_info(){
|
||||
$id = input('id', 0);
|
||||
$result = model('BlindBox')->get_stage_info($id);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//阶段修改
|
||||
public function edit_stage(){
|
||||
$data = input('post.');
|
||||
$result = model('BlindBox')->edit_stage($data);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//获取期数列表
|
||||
public function get_term_list()
|
||||
{
|
||||
$status = input('status', 0);
|
||||
|
||||
$gid = input('gid', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$result = model('BlindBox')->get_term_list($status, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $result['data']['count'];
|
||||
$data['data'] = $result['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加期数
|
||||
public function add_term(){
|
||||
$data = input('post.');
|
||||
$result = model('BlindBox')->add_term($data);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//期数详情
|
||||
public function get_term_info(){
|
||||
$id = input('id', 0);
|
||||
$result = model('BlindBox')->get_term_info($id);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//期数修改
|
||||
public function edit_term(){
|
||||
$data = input('post.');
|
||||
$result = model('BlindBox')->edit_term($data);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//移除期数
|
||||
public function del_term(){
|
||||
$id = input('id', 0);
|
||||
$result = model('BlindBox')->del_term($id);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
|
||||
}
|
||||
|
||||
public function open_term(){
|
||||
$id = input('id', 0);
|
||||
$result = model('BlindBox')->open_term($id);
|
||||
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
46
application/admin/controller/Block.php
Normal file
46
application/admin/controller/Block.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\facade\Request;
|
||||
|
||||
class Block extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取列表
|
||||
public function get_block_list()
|
||||
{
|
||||
$type = input('type', 0);
|
||||
$type_text = input('type_text', '');
|
||||
$is_delete = input('is_delete', 0);
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Block')->get_block_list($type, $type_text, $is_delete, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加封禁
|
||||
public function add_block(){
|
||||
$aid = $this->aid;
|
||||
$data = input('post.');
|
||||
$reslut = model('Block')->add_block($aid, $data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//移除封禁
|
||||
public function del_block(){
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Block')->del_block($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
339
application/admin/controller/Box.php
Normal file
339
application/admin/controller/Box.php
Normal file
@@ -0,0 +1,339 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\facade\Request;
|
||||
|
||||
class Box extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取宝箱列表
|
||||
public function get_box_type_list()
|
||||
{
|
||||
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Box')->get_box_type_list($page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
public function get_box_count_type_list()
|
||||
{
|
||||
$reslut = model('Box')->get_box_count_type_list();
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
public function get_box_person_type_list()
|
||||
{
|
||||
$reslut = model('Box')->get_box_person_type_list();
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
public function get_box_common_type_list()
|
||||
{
|
||||
$reslut = model('Box')->get_box_common_type_list();
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取房间信息
|
||||
public function get_box_type_info()
|
||||
{
|
||||
$tid = input('tid', 0);
|
||||
$reslut = model('Box')->get_box_type_info($tid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//添加类型
|
||||
public function add_box_type()
|
||||
{
|
||||
$data = Request::only(['type_name', 'show_name', 'open_price', 'consume', 'open_status']);
|
||||
$reslut = model('Box')->add_box_type($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//编辑类型
|
||||
public function edit_box_type()
|
||||
{
|
||||
$data = Request::only(['tid', 'type_name', 'show_name', 'open_price', 'consume', 'rate', 'open_status']);
|
||||
$reslut = model('Box')->edit_box_type($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//获取宝箱列表
|
||||
public function get_box_config_list()
|
||||
{
|
||||
|
||||
$tid = input('tid', 0);
|
||||
$gid = input('gid', 0);
|
||||
$gift_name = input('gift_name', '');
|
||||
$gift_price = input('gift_price', 0);
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Box')->get_box_config_list($tid, $gid, $gift_name, $gift_price, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalData'] = $reslut['data']['totalData'];
|
||||
return json($data);
|
||||
}
|
||||
//获取礼物列表
|
||||
public function get_gift_list()
|
||||
{
|
||||
$reslut = model('Gift')->gift_list(0, "", 0, 0, 0, 1, 2, 'gift_price', 'asc', 1, 99999, 1);
|
||||
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']['list']);
|
||||
}
|
||||
|
||||
//添加宝箱信息
|
||||
public function add_box_config()
|
||||
{
|
||||
$tid = input('tid', 0);
|
||||
$gid = input('gid', 0);
|
||||
$num = input('num', 0);
|
||||
$open_num_obtain = input('open_num_obtain',0);
|
||||
$is_public_screen = input('is_public_screen');
|
||||
$is_public_server = input('is_public_server');
|
||||
//二级密码
|
||||
$pass = input('secondary_password', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$reslut = model('box')->add_box_config($tid, $gid, $num, $open_num_obtain, $is_public_screen, $is_public_server);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取详情
|
||||
public function get_box_config_info()
|
||||
{
|
||||
$bid = input('bid');
|
||||
$reslut = model('box')->get_box_config_info($bid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//修改宝箱信息
|
||||
public function edit_box_config()
|
||||
{
|
||||
$bid = input('bid');
|
||||
$gid = input('gid');
|
||||
$num = input('num');
|
||||
$accumulate_price = input('accumulate_price',0);
|
||||
$accumulate_rate = input('accumulate_rate',0);
|
||||
$open_num_obtain = input('open_num_obtain',0);
|
||||
$is_public_screen = input('is_public_screen');
|
||||
$is_public_server = input('is_public_server');
|
||||
//二级密码
|
||||
$pass = input('secondary_password', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$reslut = model('box')->edit_box_config($bid, $gid, $num, $open_num_obtain, $accumulate_price, $accumulate_rate, $is_public_screen, $is_public_server);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//删除宝箱信息
|
||||
public function delete_box_config()
|
||||
{
|
||||
$bid = input('bid');
|
||||
//二级密码
|
||||
$pass = input('pass', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$reslut = model('box')->delete_box_config($bid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//批量删除宝箱信息
|
||||
public function batch_delete_box_config(){
|
||||
//二级密码
|
||||
$pass = input('pass', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$data = input('info');
|
||||
$reslut = model('box')->batch_delete_box_config($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//查看每期奖池列表
|
||||
public function get_box_log_list()
|
||||
{
|
||||
$tid = input('tid', 0);
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Box')->get_box_log_list($tid, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//获取用户开奖记录
|
||||
public function get_user_box_log_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$bl_id = input('bl_id', 0);
|
||||
$gid = input('gid', 0);
|
||||
$tid = input('tid', 0);
|
||||
$start = input('start', '');
|
||||
$end = input('end', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Box')->get_user_box_log_list($uid, $bl_id, $gid, $tid, $start, $end, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
//获取用户开奖记录
|
||||
public function get_user_box_count_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$out_amount = input('out_amount', 0);
|
||||
$last_login_device = input('last_login_device','');
|
||||
$profit = input('profit',0);
|
||||
$tid = input('tid',0);
|
||||
$add_time = input('add_time','');
|
||||
$order = input('order', 'a.update_time');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Box')->get_user_box_count_list($uid, $out_amount, $last_login_device, $profit, $tid, $add_time, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取用户开奖记录
|
||||
public function get_box_give_gift_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$gid = input('gid', 0);
|
||||
$gift_name = input('gift_name', '');
|
||||
$give_status = input('give_status',0);
|
||||
$deduction_status = input('deduction_status',0);
|
||||
$start = input('start', '');
|
||||
$give = input('give', '');
|
||||
$deduction = input('deduction', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('BoxGiveGift')->get_box_give_gift_list($uid, $gid, $gift_name, $give_status, $deduction_status, $start, $give, $deduction, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//添加
|
||||
public function add_give_gift()
|
||||
{
|
||||
$data = Request::only(['uid', 'tid', 'gid']);
|
||||
//二级密码
|
||||
$pass = input('secondary_password', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$reslut = model('BoxGiveGift')->add_give_gift($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
public function cancel_give_gift()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('BoxGiveGift')->cancel_give_gift($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//用户个池统计
|
||||
public function get_box_person_log_list() {
|
||||
$uid = input('user_id', 0);
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$box_type = input('tid',0);
|
||||
$reslut = model('Box')->get_box_person_log_list($box_type, $uid, $page, $limit);
|
||||
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//清空积攒金额
|
||||
public function accumulate_del(){
|
||||
$reslut = model('Box')->accumulate_del();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取房间开奖统计
|
||||
public function get_room_box_count_list(){
|
||||
$uid = input('uid',0);
|
||||
$out_amount = input('out_amount','');
|
||||
$tid = input('tid',0);
|
||||
$add_time = input('add_time','');
|
||||
$order = input('order', 'a.update_time');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Box')->get_room_box_count_list($uid, $out_amount, $tid, $add_time, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取房间开奖统计
|
||||
public function get_room_box_counts_list(){
|
||||
$uid = input('uid',0);
|
||||
$out_amount = input('out_amount','');
|
||||
$order = input('order', 'a.profit');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Box')->get_room_box_counts_list($uid, $out_amount, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
}
|
||||
307
application/admin/controller/Capital.php
Normal file
307
application/admin/controller/Capital.php
Normal file
@@ -0,0 +1,307 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
|
||||
class Capital extends Common
|
||||
{
|
||||
//获取资金改变类型
|
||||
public function get_change_type()
|
||||
{
|
||||
$data = model('UserMoneyLog')->ChangeTypeLable();
|
||||
return ajaxReturn(200, '', $data);
|
||||
}
|
||||
//获取资金类型
|
||||
public function get_money_type()
|
||||
{
|
||||
$data = model('UserMoneyLog')->MoneyTypeLable();
|
||||
return ajaxReturn(200, '', $data);
|
||||
}
|
||||
|
||||
|
||||
//获取资金日志列表
|
||||
public function user_money_log()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$nick_name = input('nick_name', 0);
|
||||
$change_type = input('change_type', 0);
|
||||
$money_type = input('money_type', '');
|
||||
$change_value = input('change_value', '');
|
||||
$from_id = input('from_id', 0);
|
||||
$from_uid = input('from_uid', 0);
|
||||
$order = input('order', 'a.log_id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Capital')->user_money_log($uid, $nick_name, $change_type, $money_type, $change_value, $from_id, $from_uid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取充值订单
|
||||
public function user_recharge()
|
||||
{
|
||||
$rid = input('rid', 0);
|
||||
$order_sn = input('order_sn', 0);
|
||||
$uid = input('uid', 0);
|
||||
$nick_name = input('nick_name', '');
|
||||
$money = input('money', '');
|
||||
$pay_type = input('pay_type', 0);
|
||||
$pay_status = input('pay_status', 0);
|
||||
$start = input('start', '');
|
||||
$end = input('end', '');
|
||||
$order = input('order', 'a.rid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Capital')->user_recharge($rid, $order_sn, $uid, $nick_name, $money, $pay_type, $pay_status, $start, $end, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取提现订单 列表
|
||||
public function user_withdrawal()
|
||||
{
|
||||
$wid = input('wid', 0);
|
||||
$order_sn = input('order_sn', 0);
|
||||
$uid = input('uid', 0);
|
||||
$nick_name = input('nick_name', '');
|
||||
$money = input('money', '');
|
||||
$alipay_name = input('alipay_name', 0);
|
||||
$status = input('status', 0);
|
||||
$alipay_account = input('alipay_account', 0);
|
||||
$order = input('order', 'a.wid');
|
||||
|
||||
|
||||
|
||||
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
|
||||
|
||||
$withdrawal_type = input('withdrawal_type', 0);
|
||||
|
||||
$bank_card_number = input('bank_card_number', '');
|
||||
|
||||
$type = input('type', 0);
|
||||
$deal_type = input('deal_type', 0);
|
||||
|
||||
$reslut = model('Capital')->user_withdrawal($wid, $order_sn, $uid, $nick_name, $money, $alipay_name, $status, $alipay_account, $order, $sort, $page, $limit,$withdrawal_type,$bank_card_number,$type,$deal_type);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//修改提现订单
|
||||
public function user_withdrawal_edit()
|
||||
{
|
||||
$wid = input('wid', 0);
|
||||
$status = input('status');
|
||||
$remarke = input('remarke');
|
||||
$deal_type = input('deal_type',0);
|
||||
$data = model('Capital')->user_withdrawal_edit($wid, $status, $remarke, $deal_type);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//修改提现订单
|
||||
public function user_withdrawal_edit_bank()
|
||||
{
|
||||
$wid = input('wid', 0);
|
||||
$status = input('status');
|
||||
$remarke = input('remarke');
|
||||
$withd_type = input('withd_type',0);
|
||||
$transfer_type = input('transfer_type',0);
|
||||
|
||||
$key_name = "api:user_withdrawal_edit_ss7" ;
|
||||
redis_lock_exit($key_name,3);
|
||||
$data = model('Capital')->user_withdrawal_edit_bank($wid, $status, $remarke,$withd_type,$transfer_type);
|
||||
redis_unlock($key_name);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//获取提现订单详情
|
||||
public function user_withdrawal_info()
|
||||
{
|
||||
$wid = input('wid', 0);
|
||||
$reslut = model('Capital')->user_withdrawal_info($wid);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取兑换记录 列表
|
||||
public function user_exchange()
|
||||
{
|
||||
$eid = input('eid', 0);
|
||||
$uid = input('uid', 0);
|
||||
$nick_name = input('nick_name', 0);
|
||||
$money = input('money', '');
|
||||
$integral = input('integral', '');
|
||||
$order = input('order', 'a.eid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Capital')->user_exchange($eid, $uid, $nick_name, $money, $integral, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取用户赠送礼物记录 列表
|
||||
public function user_send_gift()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$room_id = input('room_id', 0);
|
||||
$room_uid = input('room_uid', 0);
|
||||
$receive_uid = input('receive_uid', '');
|
||||
$gid = input('gid', '');
|
||||
$gift_name = input('gift_name', 0);
|
||||
$gift_from_type = input('gift_from_type', 0);
|
||||
$is_tester = input('is_tester', 0);
|
||||
$start = input('start', '');
|
||||
$end = input('end', '');
|
||||
$order = input('order', 'a.sid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Capital')->user_send_gift($uid, $room_id, $room_uid, $receive_uid, $gid, $gift_name, $gift_from_type, $is_tester, $start, $end, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
|
||||
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取房间流水 列表
|
||||
public function room_money_log()
|
||||
{
|
||||
|
||||
$rid = input('rid', 0);
|
||||
$room_number = input('room_number', 0);
|
||||
$room_name = input('room_name', '');
|
||||
$time1 = input('time1', '');
|
||||
$time2 = input('time2', 0);
|
||||
|
||||
$order = input('order', 'a.sid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Capital')->room_money_log($rid, $room_number, $room_name, $time1, $time2, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
//获取房间流水 列表
|
||||
public function room_account_log()
|
||||
{
|
||||
|
||||
$rid = input('rid', 0);
|
||||
$room_number = input('room_number', 0);
|
||||
$room_name = input('room_name', '');
|
||||
$time1 = input('time1', '');
|
||||
$time2 = input('time2', 0);
|
||||
|
||||
$order = input('order', 'a.sid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$cate_id = input('cate_id', 0);
|
||||
$reslut = model('Capital')->room_account_log($rid, $room_number, $room_name, $time1, $time2, $order, $sort, $cate_id, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//财务统计
|
||||
public function financial_statistics(){
|
||||
$uid = input('uid', 0);
|
||||
$start = input('time1', '');
|
||||
$end = input('time2', '');
|
||||
$reslut = model('Capital')->financial_statistics($uid, $start, $end);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//提现提交云账号
|
||||
public function sumbit_yun()
|
||||
{
|
||||
$password = input('password', '');
|
||||
$wid = input('wid', 0);
|
||||
$key_name = "admin:capital:sumbit_yun:wid:" . $wid;
|
||||
redis_lock_exit($key_name);
|
||||
$result = model('Capital')->submit_yun($wid, $password);
|
||||
redis_unlock($key_name);
|
||||
ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
371
application/admin/controller/Cli.php
Normal file
371
application/admin/controller/Cli.php
Normal file
@@ -0,0 +1,371 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Cli extends Common
|
||||
{
|
||||
//关闭陪玩订单
|
||||
public function close_palyer_order()
|
||||
{
|
||||
$key_name = "admin:cli:close_palyer_order";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('UserPlayerOrder')->close_palyer_order();
|
||||
echo $reslut;
|
||||
redis_unlock($key_name);
|
||||
}
|
||||
//清理过期装扮
|
||||
public function clear_user_decorate()
|
||||
{
|
||||
$key_name = "admin:cli:clear_user_decorate";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('Decorate')->clear_user_decorate();
|
||||
echo $reslut;
|
||||
redis_unlock($key_name);
|
||||
}
|
||||
//监听结束房间PK状态 可以5秒执行一次 最好每秒执行一次
|
||||
public function close_room_pk()
|
||||
{
|
||||
$key_name = "admin:cli:close_room_pk";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/Room')->close_room_pk();
|
||||
redis_unlock($key_name);
|
||||
// return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
echo date('Y-m-d H:i:s') . "监控房间PK 执行成功\r\n";
|
||||
}
|
||||
|
||||
//刷新麦位信息 websocket 服务调用
|
||||
public function push_micro_data()
|
||||
{
|
||||
$rid = input('rid', 0);
|
||||
$push_data = [];
|
||||
$push_data['code'] = 301;
|
||||
$push_data['msg'] = "房间麦位信息";
|
||||
$data = model('api/room')->get_room_micro_info($rid);
|
||||
$push_data['data'] = $data['data'];
|
||||
model('api/WebSocketPush')->send_to_group($rid, $push_data);
|
||||
}
|
||||
//用户退出房间 websokcet 服务调用
|
||||
public function user_enter_room()
|
||||
{
|
||||
|
||||
$rid = input('rid', 0);
|
||||
$uid = input('uid', 0);
|
||||
$key_name = "admin:cli:user_quit_room:rid:$rid:uid:$uid";
|
||||
// error_log("进入直播间:$rid----$uid---\r\n", 3, "my-errors.log");
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/room')->user_enter_room($uid, $rid);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//用户退出房间 websokcet 服务调用
|
||||
public function user_quit_room()
|
||||
{
|
||||
|
||||
$rid = input('rid', 0);
|
||||
$uid = input('uid', 0);
|
||||
// error_log("退出直播间:$rid----$uid---\r\n", 3, "my-errors.log");
|
||||
$key_name = "admin:cli:user_quit_room:rid:$rid:uid:$uid";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/room')->quit_room($uid, $rid);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//监控宝箱状态 设置5s 监控一次
|
||||
public function control_box()
|
||||
{
|
||||
$key_name = "admin:cli:control_box";
|
||||
$tid = input('tid', 0);
|
||||
$is_reset = input('is_reset', 0);
|
||||
redis_lock_exit($key_name,20);
|
||||
$reslut = model('admin/box')->control_generate_box($tid, $is_reset);
|
||||
redis_unlock($key_name);
|
||||
if($is_reset){
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}else{
|
||||
echo date('Y-m-d H:i:s') . "监控奖池 执行成功" . $reslut['data'] . "\r\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//监控宝箱状态 设置5s 监控一次
|
||||
public function controls_box()
|
||||
{
|
||||
$key_name = "admin:cli:control_box";
|
||||
$tid = input('tid', 0);
|
||||
$is_reset = input('is_reset', 0);
|
||||
//二级密码
|
||||
$pass = input('pass', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
redis_lock_exit($key_name,20);
|
||||
$reslut = model('admin/box')->control_generate_box($tid, $is_reset);
|
||||
redis_unlock($key_name);
|
||||
if($is_reset){
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}else{
|
||||
echo date('Y-m-d H:i:s') . "监控奖池 执行成功" . $reslut['data'] . "\r\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//监控宝箱状态 设置5s 监控一次
|
||||
public function control_boxs()
|
||||
{
|
||||
$key_name = "admin:cli:control_boxs";
|
||||
$tid = input('tid', 0);
|
||||
$is_reset = input('is_reset', 0);
|
||||
redis_lock_exit($key_name,20);
|
||||
$reslut = model('admin/box')->control_generate_boxs($tid, $is_reset);
|
||||
redis_unlock($key_name);
|
||||
if($is_reset){
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}else{
|
||||
echo date('Y-m-d H:i:s') . "监控奖池 执行成功" . $reslut['data'] . "\r\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//监控个人宝箱状态 设置5s 监控一次
|
||||
// public function person_control_box()
|
||||
// {
|
||||
// $tid = input('tid',0);
|
||||
// $key_name = "admin:cli:person_control_box:".$tid;
|
||||
// redis_lock_exit($key_name,600);
|
||||
// $reslut = model('admin/box')->control_person_box($tid);
|
||||
// redis_unlock($key_name);
|
||||
// echo date('Y-m-d H:i:s') . "监控奖池 执行成功" . $reslut['data'] . "\r\n";
|
||||
// }
|
||||
|
||||
//清理房间当天热度
|
||||
public function clear_room_hot_value(){
|
||||
$key_name = "admin:cli:clear_room_hot_value";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/room')->clear_room_hot_value();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "清除房间当天热度 执行成功"." \r\n";
|
||||
}
|
||||
|
||||
//监控个人宝箱状态 设置5s 监控一次
|
||||
// public function control_user_box()
|
||||
// {
|
||||
// $tid = input('tid',0);
|
||||
// $uid = input('uid',0);
|
||||
// $key_name = "admin:cli:control_user_box:".$tid.':'.$uid;
|
||||
// redis_lock_exit($key_name);
|
||||
// $reslut = model('admin/box')->control_user_box($uid,$tid);
|
||||
// redis_unlock($key_name);
|
||||
// echo date('Y-m-d H:i:s') . "监控奖池 执行成功" . $reslut['data'] . "\r\n";
|
||||
// }
|
||||
|
||||
public function user_clear_box(){
|
||||
$tid = input('tid',0);
|
||||
$key_name = "admin:cli:user_clear_box";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('admin/box')->user_clear_box($tid);
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
public function control_accumulate_box(){
|
||||
$key_name = "admin:cli:control_accumulate_box";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('admin/box')->control_accumulate_box();
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
public function control_user_box(){
|
||||
$key_name = "admin:cli:control_user_box";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('admin/box')->control_user_box();
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//异步推送送礼物
|
||||
public function async_push_message()
|
||||
{
|
||||
$reslut = model('api/AsyncPushMessage')->send_message();
|
||||
}
|
||||
|
||||
|
||||
/*******************************定时任务*************************************/
|
||||
|
||||
//定时查询签约是否结束进行解约
|
||||
public function close_user_sign_contract(){
|
||||
$key_name = "admin:cli:close_user_sign_contract";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/UserSignContract')->close_user_sign_contract();
|
||||
redis_unlock($key_name);
|
||||
|
||||
}
|
||||
|
||||
//定时清理到期心动连线
|
||||
public function close_room_dating_stage(){
|
||||
$key_name = "admin:cli:close_room_dating_stage";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/DatingRoom')->close_room_dating_stage();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "监控心动连线倒计时 执行成功" . $reslut['code'] . "\r\n";
|
||||
}
|
||||
|
||||
//定时清理到期私密小屋
|
||||
public function close_room_privacy_status(){
|
||||
$key_name = "api:cli:close_room_privacy_status";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/DatingRoom')->close_room_privacy_status();
|
||||
redis_unlock($key_name);
|
||||
echo date('Y-m-d H:i:s') . "监控私密小屋倒计时 执行成功" . $reslut['code'] . "\r\n";
|
||||
}
|
||||
|
||||
//定时更新到期游客记录
|
||||
public function close_room_visitor(){
|
||||
$key_name = "admin:cli:close_room_visitor";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/RoomVisitor')->close_room_visitor();
|
||||
redis_unlock($key_name);
|
||||
|
||||
}
|
||||
|
||||
//定时结束唱歌时间
|
||||
public function colse_room_song_user_status(){
|
||||
$key_name = "admin:cli:colse_room_song_user_status";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/KtvRoom')->colse_room_song_user_status();
|
||||
redis_unlock($key_name);
|
||||
|
||||
}
|
||||
|
||||
//定时清除用户关系
|
||||
public function close_user_relation(){
|
||||
$key_name = "admin:cli:close_user_relation";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/DatingRoom')->close_user_relation();
|
||||
redis_unlock($key_name);
|
||||
|
||||
}
|
||||
|
||||
//统计上周房间流水
|
||||
public function statistics_room_last_week_earnings(){
|
||||
$type = input('type', 0);
|
||||
$key_name = "admin:cli:statistics_room_last_week_earnings:type:".$type;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/RoomSubsidy')->statistics_room_last_week_earnings($type);
|
||||
redis_unlock($key_name);
|
||||
|
||||
}
|
||||
|
||||
//发送用户收益
|
||||
public function give_user_room_week_earnings(){
|
||||
$type = input('type', 0);
|
||||
$key_name = "admin:cli:give_user_room_week_earnings:type:".$type;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/RoomSubsidy')->give_user_room_week_earnings($type);
|
||||
redis_unlock($key_name);
|
||||
}
|
||||
|
||||
//统计用户收益
|
||||
public function gives_user_room_week_earnings(){
|
||||
$type = input('type', 0);
|
||||
$key_name = "admin:cli:gives_user_room_week_earnings:type:".$type;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/RoomSubsidy')->gives_user_room_week_earnings($type);
|
||||
redis_unlock($key_name);
|
||||
}
|
||||
|
||||
//统计上周公会流水
|
||||
public function statistics_guild_last_week_earnings(){
|
||||
$type = input('type', 0);
|
||||
$key_name = "admin:cli:statistics_guild_last_week_earnings:type:".$type;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/GuildSubsidy')->statistics_guild_last_week_earnings($type);
|
||||
redis_unlock($key_name);
|
||||
|
||||
}
|
||||
|
||||
//统计公会长收益
|
||||
public function gives_user_guild_week_earnings(){
|
||||
$type = input('type', 0);
|
||||
$key_name = "admin:cli:gives_user_guild_week_earnings:type:".$type;
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/GuildSubsidy')->gives_user_guild_week_earnings($type);
|
||||
redis_unlock($key_name);
|
||||
}
|
||||
|
||||
//定时关闭没有主持房间
|
||||
public function close_room_status(){
|
||||
$key_name = "admin:cli:close_room_status";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/RoomMicro')->close_room_status();
|
||||
redis_unlock($key_name);
|
||||
}
|
||||
|
||||
//到期会员清除
|
||||
public function close_user_vip(){
|
||||
$key_name = "admin:cli:close_user_vip";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/Vip')->close_user_vip();
|
||||
redis_unlock($key_name);
|
||||
|
||||
}
|
||||
|
||||
//解约用户每天降低身价
|
||||
public function relieve_user_sign_contract(){
|
||||
$key_name = "admin:cli:relieve_user_sign_contract";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/UserSignContract')->relieve_user_sign_contract();
|
||||
redis_unlock($key_name);
|
||||
}
|
||||
|
||||
//监控仲夏夜梦曲
|
||||
public function create_sprite_log(){
|
||||
$key_name = "admin:cli:create_sprite_log";
|
||||
redis_lock_exit($key_name,1,1);
|
||||
$reslut = model('api/Sprite')->create_sprite_log();
|
||||
redis_unlock($key_name);
|
||||
if($reslut['code'] == 201){
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}else{
|
||||
echo date('Y-m-d H:i:s') . "监控仲夏夜梦曲 执行成功" . $reslut['data'] . "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
//监控仲夏夜梦曲结算用户投票
|
||||
public function close_user_sprite(){
|
||||
$key_name = "admin:cli:close_user_sprite";
|
||||
redis_lock_exit($key_name,1,1);
|
||||
$reslut = model('api/Sprite')->close_user_sprite();
|
||||
redis_unlock($key_name);
|
||||
if($reslut['code'] == 201){
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}else{
|
||||
echo date('Y-m-d H:i:s') . "监控仲夏夜梦曲结算用户投票 执行成功" . $reslut['data'] . "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function close_auction_pm(){
|
||||
$key_name = "admin:cli:close_auction_pm";
|
||||
$data = model('api/AuctionRoom')->close_auction_pm();
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($data['code'], $data['msg'], $data['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
93
application/admin/controller/Common.php
Normal file
93
application/admin/controller/Common.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
|
||||
class Common extends Controller
|
||||
{
|
||||
public $aid;
|
||||
public function initialize()
|
||||
{
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
|
||||
// ajaxReturn(301, '系统维护');
|
||||
$login_token = input('login_token', 0);
|
||||
$reslut = model('Admin')->check_login_token($login_token);
|
||||
if ($reslut['code'] == 201) {
|
||||
return ajaxReturn(301, $reslut['msg'], $reslut['data']);
|
||||
} else {
|
||||
$this->aid = $reslut['data'];
|
||||
}
|
||||
|
||||
$check_ip = $this->check_ip();
|
||||
if($check_ip['code'] == 201){
|
||||
db::name('admin')->where('aid', $this->aid)->update(['login_token' => '']);
|
||||
return ajaxReturn(301, $check_ip['msg'], $check_ip['data']);
|
||||
}
|
||||
|
||||
$header = request()->header();
|
||||
if(!isset($header['referer'])){
|
||||
return ajaxReturn(301, '登录失效', $reslut['data']);
|
||||
}
|
||||
|
||||
add_operation(1, $this->aid); //用户行为日志
|
||||
}
|
||||
public function check_login_status()
|
||||
{
|
||||
$user_name = Db::name("admin")->where(array("aid" => $this->aid))->value("user_name");
|
||||
$data['data'] = $user_name;
|
||||
$check_ip = $this->check_ip();
|
||||
if($check_ip['code'] == 201){
|
||||
db::name('admin')->where('aid', $this->aid)->update(['login_token' => '']);
|
||||
return ajaxReturn(301, $check_ip['msg'], $check_ip['data']);
|
||||
}
|
||||
ajaxReturn(1, '登录成功', $data);
|
||||
}
|
||||
public function get_menu_list()
|
||||
{
|
||||
$data = model('SystemMenu')->getSystemInit($this->aid);
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//限制ip
|
||||
public function check_ip(){
|
||||
$check_ip = request()->ip();
|
||||
if($check_ip){
|
||||
// $check_ip = explode('.',$check_ip);
|
||||
// $check_ip = $check_ip[0].'.'.$check_ip[1];
|
||||
// $ip = array(
|
||||
// '61.52',
|
||||
// '219.157',
|
||||
// '113.137',
|
||||
// '117.37',
|
||||
// '123.149',
|
||||
// '125.41',
|
||||
// '115.60',
|
||||
// '113.141',
|
||||
// '221.15',
|
||||
// '36.46',
|
||||
// '113.137',
|
||||
// '123.53',
|
||||
// '1.198',
|
||||
// '111.18',
|
||||
// '1.193',
|
||||
// '119.137',
|
||||
// '111.19'
|
||||
// );
|
||||
// if(!in_array($check_ip,$ip)){
|
||||
// return ['code' => 201, 'msg' => 'ip不匹配无法登陆!', 'data'=>null];
|
||||
// }
|
||||
$check_ips = has_ip();
|
||||
if(!$check_ips){
|
||||
return ['code' => 201, 'msg' => 'ip不匹配无法登陆!', 'data'=>null];
|
||||
}
|
||||
}else{
|
||||
return ['code' => 201, 'msg' => 'ip不匹配无法登陆!', 'data'=>null];
|
||||
}
|
||||
return ['code' => 200, 'msg' => 'ip可登陆', 'data'=>null];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
78
application/admin/controller/Config.php
Normal file
78
application/admin/controller/Config.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Config extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取系统配置
|
||||
public function config_list()
|
||||
{
|
||||
$cid = input('cid', 0);
|
||||
$key_name = input('key_name', 0);
|
||||
$order = input('order', 'cid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('config')->config_list($cid,$key_name,$order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取 配置 详情
|
||||
public function config_info()
|
||||
{
|
||||
$cid = input('cid', 0);
|
||||
$data = model('config')->config_info($cid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
//编辑 配置
|
||||
public function edit_config()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('config')->edit_config($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加 配置
|
||||
public function add_config()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('config')->add_config($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 配置
|
||||
public function del_config()
|
||||
{
|
||||
$cid = input('cid', 0);
|
||||
$data = model('config')->del_config($cid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
265
application/admin/controller/Decorate.php
Normal file
265
application/admin/controller/Decorate.php
Normal file
@@ -0,0 +1,265 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Request;
|
||||
|
||||
class Decorate extends Common
|
||||
{
|
||||
//获取装扮列表
|
||||
public function get_decorate_list()
|
||||
{
|
||||
$title = input('title', '');
|
||||
$type = input('type', 0);
|
||||
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('decorate')->get_decorate_list($title, $type, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
//获取装扮列表
|
||||
public function get_decorates_list()
|
||||
{
|
||||
$reslut = model('decorate')->get_decorates_list();
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//修改装扮信息
|
||||
public function edit_decorate_info()
|
||||
{
|
||||
$did = input('did', 0);
|
||||
$title = input('title', ''); //所属分类
|
||||
$type = input('type', 0); //装扮类型
|
||||
$file_type = input('file_type', 1);
|
||||
$base_image = input('base_image', '');
|
||||
$play_image = input('play_image', '');
|
||||
$plays_image = input('plays_image', '');
|
||||
$show_status = input('show_status', 0); //所属分类
|
||||
$day = input('day', 0);
|
||||
$price = input('price', 0);
|
||||
$is_buy = input('is_buy', 1);
|
||||
$data = model('decorate')->edit_decorate_info($did, $title, $type, $base_image, $play_image, $show_status, $day, $price, $file_type, $plays_image,$is_buy);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加装扮
|
||||
|
||||
public function add_decorate_info()
|
||||
{
|
||||
|
||||
$title = input('title', ''); //所属分类
|
||||
$type = input('type', 0); //装扮类型
|
||||
$file_type = input('file_type', 1);
|
||||
$base_image = input('base_image', '');
|
||||
$play_image = input('play_image', '');
|
||||
$plays_image = input('plays_image', '');
|
||||
$day = input('day', 0);
|
||||
$price = input('price', 0);
|
||||
$show_status = input('show_status', 0);
|
||||
$is_buy = input('is_buy', 1);
|
||||
$data = model('decorate')->add_decorate_info($title, $type, $base_image, $play_image, $day, $price, $show_status, $file_type, $plays_image,$is_buy);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取装扮信息
|
||||
public function get_decorate_info()
|
||||
{
|
||||
$did = input('did', 0);
|
||||
$data = model('decorate')->get_decorate_info($did);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除装扮
|
||||
public function delete_decorate_info()
|
||||
{
|
||||
$did = input('did', 0);
|
||||
$data = model('decorate')->delete_decorate_info($did);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
//获取用户装扮列表
|
||||
public function get_user_decorate_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$did = input('did', 0);
|
||||
$type = input('type', 0);
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('decorate')->get_user_decorate_list($uid, $did, $type, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//赠送用户装扮
|
||||
public function give_user_decorate()
|
||||
{
|
||||
$did = input('did', 0);
|
||||
$day = input('day', 0);
|
||||
$uid = input('uid', 0);
|
||||
$data = model('decorate')->give_user_decorate($uid, $did, $day);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
//删除用户赠送装扮
|
||||
public function delete_user_decorate()
|
||||
{
|
||||
$udid = input('udid', 0);
|
||||
$data = model('decorate')->delete_user_decorate($udid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//用户头像装扮列表
|
||||
public function get_head_decorate_list(){
|
||||
$reslut = model('decorate')->get_head_decorate_list();
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//用户坐骑装扮列表
|
||||
public function get_mount_decorate_list(){
|
||||
$reslut = model('decorate')->get_mount_decorate_list();
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
public function get_cp_tx_list(){
|
||||
$reslut = model('decorate')->get_cp_tx_list();
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//用户cp资料装扮列表
|
||||
public function get_wind_decorate_list(){
|
||||
$reslut = model('decorate')->get_wind_decorate_list();
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取装扮价位列表
|
||||
public function get_decorate_price_list()
|
||||
{
|
||||
$did = input('did', 0);
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('decorate')->get_decorate_price_list($did, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//修改装扮价位信息
|
||||
public function edit_decorate_price()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$price = input('price', 0);
|
||||
$day = input('day', 0);
|
||||
$data = model('decorate')->edit_decorate_price($id, $price, $day);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加装扮价位
|
||||
public function add_decorate_price()
|
||||
{
|
||||
|
||||
$did = input('did', 0);
|
||||
$price = input('price', 0);
|
||||
$day = input('day', 0);
|
||||
$data = model('decorate')->add_decorate_price($did, $price, $day);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取装扮价位信息
|
||||
public function decorate_price_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('decorate')->decorate_price_info($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除装扮价位
|
||||
public function del_decorate_price()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('decorate')->del_decorate_price($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
68
application/admin/controller/Envelope.php
Normal file
68
application/admin/controller/Envelope.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Envelope extends Common
|
||||
{
|
||||
|
||||
//发红包列表
|
||||
public function give_red_envelope_list(){
|
||||
$id = input('id', 0);
|
||||
$tid = input('tid', 0);
|
||||
$type = input('type', 0);
|
||||
$uid = input('uid', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Envelope')->give_red_envelope_list($id, $tid, $type, $uid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
//发红包
|
||||
public function give_red_envelope(){
|
||||
$tid = input('tid', 0);
|
||||
$aid = $this->aid;
|
||||
$num = input('num', 10);
|
||||
$secondary_password = input('secondary_password', '');
|
||||
$reslut = model('Envelope')->give_red_envelope($aid, $tid, $num, $secondary_password);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//抢红包记录
|
||||
public function get_user_red_envelope_log_list(){
|
||||
$rid = input('rid', 0);
|
||||
$room_number = input('room_number', 0);
|
||||
$room_name = input('room_name', '');
|
||||
$uid = input('uid', 0);
|
||||
$eid = input('eid', 0);
|
||||
$tid = input('tid', 0);
|
||||
$time1 = input('time1', '');
|
||||
$time2 = input('time2', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Envelope')->get_user_red_envelope_log_list($rid, $room_number, $room_name, $uid, $eid, $tid, $time1, $time2, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
178
application/admin/controller/Gift.php
Normal file
178
application/admin/controller/Gift.php
Normal file
@@ -0,0 +1,178 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Gift extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取礼物列表
|
||||
public function gift_list()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$gift_name = input('gift_name', 0);
|
||||
$gift_price = input('gift_price', '');
|
||||
$is_public_screen = input('is_public_screen', '');
|
||||
$is_public_server = input('is_public_server', '');
|
||||
$is_show = input('is_show', '');
|
||||
$is_can_buy = input('is_can_buy', '');
|
||||
$type = input('type', 0);
|
||||
$order = input('order', 'gid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Gift')->gift_list($gid, $gift_name, $gift_price, $is_public_screen, $is_public_server, $is_show, $is_can_buy, $order, $sort, $page, $limit, $type);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取 礼物 详情
|
||||
public function gift_info()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$data = model('Gift')->gift_info($gid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
//编辑 礼物
|
||||
public function edit_gift()
|
||||
{
|
||||
$data = input('post.');
|
||||
//二级密码
|
||||
$pass = input('secondary_password', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
unset($data['secondary_password']);
|
||||
$data = model('Gift')->edit_gift($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加 礼物
|
||||
public function add_gift()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Gift')->add_gift($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 礼物
|
||||
public function del_gift()
|
||||
{
|
||||
$bid = input('gid', 0);
|
||||
$data = model('Gift')->del_gift($bid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//批量删除礼物
|
||||
public function batch_delete_gift(){
|
||||
$data = input('info');
|
||||
$reslut = model('Gift')->batch_delete_gift($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//礼物位置
|
||||
public function get_gift_position_list(){
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'asc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Gift')->get_gift_position_list($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
|
||||
}
|
||||
|
||||
//获取
|
||||
public function get_privacy_gift_list()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Gift')->get_privacy_gift_list($gid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取 详情
|
||||
public function get_privacy_gift_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Gift')->get_privacy_gift_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//编辑
|
||||
public function edit_privacy_gift()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Gift')->edit_privacy_gift($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//添加
|
||||
public function add_privacy_gift()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Gift')->add_privacy_gift($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//删除
|
||||
public function del_privacy_gift()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Gift')->del_privacy_gift($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取
|
||||
public function get_optional_gift_list()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$order = input('order', 'gid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Gift')->get_optional_gift_list($gid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
313
application/admin/controller/Guild.php
Normal file
313
application/admin/controller/Guild.php
Normal file
@@ -0,0 +1,313 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Guild extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取公会列表
|
||||
public function guild_list()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$guild_name = input('guild_name', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$jie_shan = input('jie_shan', 2);;
|
||||
|
||||
$reslut = model('Guild')->guild_list($id, $guild_name, $order, $sort, $page, $limit , $jie_shan);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取 公会 详情
|
||||
public function guild_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Guild')->guild_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//编辑 公会
|
||||
public function edit_guild()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Guild')->edit_guild($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//添加 公会
|
||||
public function add_guild()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Guild')->add_guild($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//删除 公会
|
||||
public function del_guild()
|
||||
{
|
||||
$bid = input('id', 0);
|
||||
$reslut = model('Guild')->del_guild($bid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//批量删除公会
|
||||
public function batch_delete_guild(){
|
||||
$data = input('info');
|
||||
$reslut = model('Guild')->batch_delete_guild($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//用户公会信息
|
||||
public function user_guild_info(){
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Guild')->user_guild_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//编辑用户公会信息
|
||||
public function edit_user_guild(){
|
||||
$data = input('post.');
|
||||
$reslut = model('Guild')->edit_user_guild($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//设置公会是否显示
|
||||
public function set_is_show()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$is_show = input('is_show', 0);
|
||||
if(!in_array($is_show, [1,2])) {
|
||||
ajaxReturn(201, '显示参数错误', '');
|
||||
}
|
||||
$result = model('Guild')->set_is_show($id, $is_show);
|
||||
ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//公会成员
|
||||
public function get_user_guild_list(){
|
||||
$id = input('id', 0);
|
||||
$uid = input('uid', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Guild')->get_user_guild_list($id, $uid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//公会流水排行
|
||||
public function get_guild_rank_list(){
|
||||
$id = input('id', 0);
|
||||
$start = input('start', '');
|
||||
$end = input('end', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 15);
|
||||
$order = input('order', 'b.total_gift_total_price');
|
||||
$sort = input('sort', 'desc');
|
||||
$result = model('Guild')->get_guild_rank_list($id, $start, $end, $order, $sort, $page, $limit);
|
||||
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $result['data']['count'];
|
||||
$data['data'] = $result['data']['list'];
|
||||
// $data['totalRow'] = $result['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//公会成员流水排行
|
||||
public function get_guild_user_rank_list(){
|
||||
$guild_id = input('guild_id', 0);
|
||||
$uid = input('uid', 0);
|
||||
$start = input('start', '');
|
||||
$end = input('end', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 15);
|
||||
$order = input('order', 'b.total_gift_total_price');
|
||||
$sort = input('sort', 'desc');
|
||||
$result = model('Guild')->get_guild_user_rank_list($guild_id, $uid, $start, $end, $order, $sort, $page, $limit);
|
||||
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $result['data']['count'];
|
||||
$data['data'] = $result['data']['list'];
|
||||
// $data['totalRow'] = $result['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//公会房间流水排行
|
||||
public function get_guild_room_rank_list(){
|
||||
$guild_id = input('guild_id', 0);
|
||||
$room_number = input('room_number', 0);
|
||||
$start = input('start', '');
|
||||
$end = input('end', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 15);
|
||||
$order = input('order', 'b.total_gift_total_price');
|
||||
$sort = input('sort', 'desc');
|
||||
$result = model('Guild')->get_guild_room_rank_list($guild_id, $room_number, $start, $end, $order, $sort, $page, $limit);
|
||||
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $result['data']['count'];
|
||||
$data['data'] = $result['data']['list'];
|
||||
// $data['totalRow'] = $result['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//工会流水
|
||||
public function get_guild_money_list()
|
||||
{
|
||||
$guild_id = input('guild_id', 0);
|
||||
$start = input('start', '');
|
||||
$end = input('end', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 15);
|
||||
$order = input('order', 'a.add_time');
|
||||
$sort = input('sort', 'desc');
|
||||
$result = model('GuildMoneyLog')->get_list($guild_id,$start, $end, $page, $limit);
|
||||
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $result['data']['count'];
|
||||
$data['data'] = $result['data']['list'];
|
||||
$data['totalRow'] = $result['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//工会房间流水
|
||||
public function get_guild_room_money_list()
|
||||
{
|
||||
$guild_id = input('guild_id', 0);
|
||||
$rid = input('rid', 0);
|
||||
|
||||
$start = input('start', '');
|
||||
$end = input('end', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 15);
|
||||
$order = input('order', 'a.add_time');
|
||||
$sort = input('sort', 'desc');
|
||||
$result = model('GuildMoneyLog')->get_guild_room_money_log_list($guild_id,$rid, $start, $end, $page, $limit);
|
||||
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $result['data']['count'];
|
||||
$data['data'] = $result['data']['list'];
|
||||
$data['totalRow'] = $result['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
//获取工会房间
|
||||
public function get_guild_room_list()
|
||||
{
|
||||
$guild_id = input('guild_id', 0);
|
||||
$data = model('GuildMoneyLog')->get_guild_room_list_by_guild_id($guild_id);
|
||||
ajaxReturn(200, '获取数据成功', $data);
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function give_guild_subsidy_list()
|
||||
{
|
||||
$guild_id = input('guild_id', 0);
|
||||
$uid = input('uid', 0);
|
||||
$is_fa = input('is_fa', 0);
|
||||
$start = input('start', '');
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
|
||||
$belong_week = input('belong_week', '');
|
||||
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Guild')->give_guild_subsidy_list($guild_id, $uid, $is_fa, $order, $sort, $page, $limit, $belong_week);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//批量结算
|
||||
public function batch_give_guild_subsidy(){
|
||||
//二级密码
|
||||
$pass = input('pass', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$reslut = model('Guild')->batch_give_guild_subsidy();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//补贴详情
|
||||
public function get_give_guild_subsidy_info(){
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Guild')->get_give_guild_subsidy_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
|
||||
}
|
||||
|
||||
//修改补贴
|
||||
public function edit_give_guild_subsidy(){
|
||||
//二级密码
|
||||
$pass = input('secondary_password', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$id = input('id', 0);
|
||||
$user_earnings = input('user_earnings', 0);
|
||||
$reslut = model('Guild')->edit_give_guild_subsidy($id, $user_earnings);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//解散公会
|
||||
public function diss_guild(){
|
||||
$guild_id = input('guild_id', '');
|
||||
$reslut = model('Guild')->diss_guild($guild_id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//解散公会
|
||||
public function guild_combine(){
|
||||
$cancel_guild_id = input('cancel_guild_id', 0);
|
||||
$join_guild_id = input('join_guild_id', 0);
|
||||
$reslut = model('Guild')->guild_combine($cancel_guild_id,$join_guild_id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
45
application/admin/controller/Message.php
Normal file
45
application/admin/controller/Message.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
use think\facade\Request;
|
||||
|
||||
class Message extends Common
|
||||
{
|
||||
public function get_message_list()
|
||||
{
|
||||
$smid = input('smid', 0);
|
||||
$title = input('title', '');
|
||||
$order = input('order', 'smid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Message')->get_message_list($smid, $title, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
public function get_message_info()
|
||||
{
|
||||
$smid = input('smid', 0);
|
||||
$reslut = model('Message')->get_message_info($smid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
public function add_message()
|
||||
{
|
||||
$data = Request::only(['title', 'content']);
|
||||
$reslut = model('Message')->add_message($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
public function edit_message()
|
||||
{
|
||||
$data = Request::only(['smid', 'title', 'content', 'is_show']);
|
||||
$reslut = model('Message')->edit_message($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
}
|
||||
142
application/admin/controller/Monster.php
Normal file
142
application/admin/controller/Monster.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Monster extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取列表
|
||||
public function get_monster_list()
|
||||
{
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Monster')->get_monster_list($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取详情
|
||||
public function get_monster_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Monster')->get_monster_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//编辑
|
||||
public function edit_monster()
|
||||
{
|
||||
|
||||
$data = input('post.');
|
||||
//二级密码
|
||||
$pass = input('secondary_password', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$reslut = model('Monster')->edit_monster($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取礼物列表
|
||||
public function get_gift_list()
|
||||
{
|
||||
$reslut = model('Monster')->get_gift_list();
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
//获取列表
|
||||
public function get_monster_multiple_list()
|
||||
{
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Monster')->get_monster_multiple_list($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取详情
|
||||
public function get_monster_multiple_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Monster')->get_monster_multiple_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//编辑
|
||||
public function edit_monster_multiple()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Monster')->edit_monster_multiple($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function get_monster_log(){
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Monster')->get_monster_log($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function get_user_monster_log(){
|
||||
$mid = input('mid', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Monster')->get_user_monster_log($mid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function get_user_monster_win_log(){
|
||||
$mid = input('mid', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Monster')->get_user_monster_win_log($mid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
259
application/admin/controller/Multiple.php
Normal file
259
application/admin/controller/Multiple.php
Normal file
@@ -0,0 +1,259 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Multiple extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取类型列表
|
||||
public function get_gift_multiple_type_list()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$name = input('name', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Multiple')->get_gift_multiple_type_list($id, $name, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取 类型 详情
|
||||
public function get_gift_multiple_type_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Multiple')->get_gift_multiple_type_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//编辑 类型
|
||||
public function edit_gift_multiple_type()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Multiple')->edit_gift_multiple_type($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//添加 类型
|
||||
public function add_gift_multiple_type()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Multiple')->add_gift_multiple_type($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//删除 类型
|
||||
public function del_gift_multiple_type()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Multiple')->del_gift_multiple_type($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取倍率列表
|
||||
public function get_gift_multiple_rate_list()
|
||||
{
|
||||
$pid = input('pid', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Multiple')->get_gift_multiple_rate_list($pid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取倍率详情
|
||||
public function get_gift_multiple_rate_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Multiple')->get_gift_multiple_rate_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//编辑
|
||||
public function edit_gift_multiple_rate()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Multiple')->edit_gift_multiple_rate($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//添加
|
||||
public function add_gift_multiple_rate()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Multiple')->add_gift_multiple_rate($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//删除
|
||||
public function del_gift_multiple_rate()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Multiple')->del_gift_multiple_rate($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取
|
||||
public function get_user_send_gift_rate_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$room_id = input('room_id', 0);
|
||||
$room_uid = input('room_uid', 0);
|
||||
$receive_uid = input('receive_uid', '');
|
||||
$gid = input('gid', '');
|
||||
$gift_name = input('gift_name', 0);
|
||||
$start = input('start', '');
|
||||
$end = input('end', '');
|
||||
$order = input('order', 'a.sid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Multiple')->get_user_send_gift_rate_list($uid, $room_id, $room_uid, $receive_uid, $gid, $gift_name, $start, $end, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function room_subsidy()
|
||||
{
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Multiple')->room_subsidy($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取详情
|
||||
public function room_subsidy_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Multiple')->room_subsidy_info($id);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加
|
||||
public function add_room_subsidy()
|
||||
{
|
||||
$type = input('type', 1);
|
||||
$level_name = input('level_name', '');
|
||||
$total_gift_price = input('total_gift_price', 0);
|
||||
$money = input('money', 0);
|
||||
$data = model('Multiple')->add_room_subsidy($level_name, $total_gift_price, $money, $type);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改
|
||||
public function edit_room_subsidy()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$type = input('type', 1);
|
||||
$level_name = input('level_name', '');
|
||||
$total_gift_price = input('total_gift_price', 0);
|
||||
$money = input('money', 0);
|
||||
$data = model('Multiple')->edit_room_subsidy($id, $level_name, $total_gift_price, $money, $type);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function give_room_subsidy_list()
|
||||
{
|
||||
$room_number = input('room_number', 0);
|
||||
$uid = input('uid', 0);
|
||||
$is_delete = input('is_delete', 0);
|
||||
$start = input('start', '');
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Multiple')->give_room_subsidy_list($room_number, $uid, $is_delete, $order, $sort, $page, $limit, $start);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//批量结算
|
||||
public function batch_give_room_subsidy(){
|
||||
//二级密码
|
||||
$pass = input('pass', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$data = input('info');
|
||||
$reslut = model('Multiple')->batch_give_room_subsidy($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//补贴详情
|
||||
public function get_give_room_subsidy_info(){
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Multiple')->get_give_room_subsidy_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
|
||||
}
|
||||
|
||||
//修改补贴
|
||||
public function edit_give_room_subsidy(){
|
||||
//二级密码
|
||||
$pass = input('secondary_password', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$id = input('id', 0);
|
||||
$user_earnings = input('user_earnings', 0);
|
||||
$reslut = model('Multiple')->edit_give_room_subsidy($id, $user_earnings);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//删除
|
||||
public function room_subsidy_del()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Multiple')->room_subsidy_del($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
81
application/admin/controller/NewBox.php
Normal file
81
application/admin/controller/NewBox.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\facade\Request;
|
||||
|
||||
class NewBox extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取宝箱列表
|
||||
public function get_new_box_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('NewBox')->get_new_box_list($page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//获取房间信息
|
||||
public function get_new_box_info()
|
||||
{
|
||||
$tid = input('id', 0);
|
||||
$reslut = model('NewBox')->get_new_box_info($tid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//编辑类型
|
||||
public function edit_new_box()
|
||||
{
|
||||
$data = Request::only(['id', 'gid', 'total_amount','new_box_status']);
|
||||
$reslut = model('NewBox')->edit_new_box($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//期数列表
|
||||
public function get_new_box_log()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('limit', 15);
|
||||
$nb_id = input('nb_id', 0);
|
||||
$status = input('status', 0);
|
||||
$reslut = model('NewBox')->get_new_box_log($nb_id, $status, $page, $page_limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//开奖记录
|
||||
public function get_user_new_box_log()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('limit', 15);
|
||||
$nb_id = input('nbl_id', 0);
|
||||
$start_time = input('start_time', '');
|
||||
$end_time = input('end_time', '');
|
||||
$uid = input('uid', 0);
|
||||
$reslut = model('NewBox')->get_user_new_box_log($uid, $nb_id, $start_time, $end_time, $page, $page_limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalData'] = $reslut['data']['totalData'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
}
|
||||
182
application/admin/controller/Nobility.php
Normal file
182
application/admin/controller/Nobility.php
Normal file
@@ -0,0 +1,182 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Nobility extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取列表
|
||||
public function get_nobility_list()
|
||||
{
|
||||
$order = input('order', 'lid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Nobility')->get_nobility_list($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取详情
|
||||
public function nobility_info()
|
||||
{
|
||||
$lid = input('lid', 0);
|
||||
$data = model('Nobility')->nobility_info($lid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//编辑
|
||||
public function edit_nobility()
|
||||
{
|
||||
$data = input('post.');
|
||||
//二级密码
|
||||
// $pass = input('secondary_password', '');
|
||||
// $check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
// if($check_pass['code'] == 201){
|
||||
// return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
// }
|
||||
// unset($data['secondary_password']);
|
||||
$data = model('Nobility')->edit_nobility($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取权限列表
|
||||
public function get_nobility_power_list()
|
||||
{
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Nobility')->get_nobility_power_list($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//权限详情
|
||||
public function nobility_power_info(){
|
||||
$id = input('id', 0);
|
||||
$data = model('Nobility')->nobility_power_info($id);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//编辑
|
||||
public function edit_nobility_power()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Nobility')->edit_nobility_power($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取用户爵位列表
|
||||
public function get_user_nobility_list()
|
||||
{
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Nobility')->get_user_nobility_list($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//列表
|
||||
public function get_nobility_decorate_list()
|
||||
{
|
||||
$lid = input('lid', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Nobility')->get_nobility_decorate_list($lid, $order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取详情
|
||||
public function nobility_decorate_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Nobility')->nobility_decorate_info($id);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加信息
|
||||
public function add_nobility_decorate()
|
||||
{
|
||||
$lid = input('lid', 0);
|
||||
$did = input('decorate_id', 0);
|
||||
$day_num = input('day_num', 0);
|
||||
$data = model('Nobility')->add_nobility_decorate($lid, $did, $day_num);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改信息
|
||||
public function edit_nobility_decorate()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$did = input('decorate_id', 0);
|
||||
$day_num = input('day_num', 0);
|
||||
$data = model('Nobility')->edit_nobility_decorate($id, $did,$day_num);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除
|
||||
public function del_nobility_decorate()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Nobility')->del_nobility_decorate($id);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
238
application/admin/controller/Play.php
Normal file
238
application/admin/controller/Play.php
Normal file
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Play extends Common
|
||||
{
|
||||
|
||||
//游戏列表
|
||||
public function game_list()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$game_name = input('game_name', 0);
|
||||
$is_show = input('is_show', '');
|
||||
|
||||
$order = input('order', 'gid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Play')->game_list($gid, $game_name, $is_show, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取 游戏 详情
|
||||
public function game_info()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$data = model('Play')->game_info($gid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
//编辑 游戏
|
||||
public function edit_game()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Play')->edit_game($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加 游戏
|
||||
public function add_game()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Play')->add_game($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 游戏
|
||||
public function del_game()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$data = model('Play')->del_game($gid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//游戏等级 列表
|
||||
public function game_skill_level_list()
|
||||
{
|
||||
$lid = input('lid', 0);
|
||||
$gid = input('gid', '');
|
||||
$game_level_name = input('game_level_name', 0);
|
||||
$order = input('order', 'a.lid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Play')->game_skill_level_list($lid, $gid, $game_level_name, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取 游戏等级 详情
|
||||
public function game_skill_level_info()
|
||||
{
|
||||
$lid = input('lid', 0);
|
||||
$data = model('Play')->game_skill_level_info($lid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
//编辑 游戏等级
|
||||
public function edit_game_skill_level()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Play')->edit_game_skill_level($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加 游戏等级
|
||||
public function add_game_skill_level()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Play')->add_game_skill_level($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 游戏等级
|
||||
public function del_game_skill_level()
|
||||
{
|
||||
$lid = input('lid', 0);
|
||||
$data = model('Play')->del_game_skill_level($lid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//游戏等级 列表
|
||||
public function player_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$nick_name = input('nick_name', '');
|
||||
$sex = input('sex', 0);
|
||||
$special_uid = input('special_uid', 0);
|
||||
$gid = input('gid', 0);
|
||||
$real_name = input('real_name', 0);
|
||||
$is_top = input('is_top', 0);
|
||||
$is_recommend = input('is_recommend', 0);
|
||||
$is_business = input('is_business', 0);
|
||||
$status = input('status', 0);
|
||||
$order = input('order', 'a.pid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Play')->player_list($uid, $nick_name, $sex, $special_uid, $gid, $real_name, $is_top, $is_recommend, $is_business, $status, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取 陪玩主播 详情
|
||||
public function player_info()
|
||||
{
|
||||
$pid = input('pid', 0);
|
||||
$data = model('Play')->player_info($pid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
//编辑 陪玩主播
|
||||
public function edit_player()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Play')->edit_player($data);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 陪玩主播
|
||||
public function del_player()
|
||||
{
|
||||
$pid = input('pid', 0);
|
||||
$data = model('Play')->del_player($pid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
// 陪玩订单 列表
|
||||
public function player_order_list()
|
||||
{
|
||||
$order_sn = input('order_sn', 0);
|
||||
$uid = input('uid', '');
|
||||
$player_uid = input('player_uid', 0);
|
||||
$price = input('price', 0);
|
||||
$service_rate = input('service_rate', 0);
|
||||
$status = input('status', 0);
|
||||
$is_over = input('is_over', 0);
|
||||
$order = input('order', '');
|
||||
$sort = input('sort', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Play')->player_order_list($order_sn, $uid, $player_uid, $price, $service_rate, $status, $is_over, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取 陪玩订单 详情
|
||||
public function player_order_info()
|
||||
{
|
||||
$oid = input('oid', 0);
|
||||
$data = model('Play')->player_order_info($oid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
}
|
||||
49
application/admin/controller/Relation.php
Normal file
49
application/admin/controller/Relation.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
|
||||
class Relation extends Common
|
||||
{
|
||||
//获取列表
|
||||
public function get_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('limit', 10);
|
||||
return model('admin/Relation')->get_list($page, $page_limit);
|
||||
}
|
||||
//添加
|
||||
public function add()
|
||||
{
|
||||
$name = input('name', '');
|
||||
$color = input('color', '');
|
||||
$day = input('day', 0);
|
||||
$result = model('admin/Relation')->add($name, $color, $day);
|
||||
ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//获取信息
|
||||
public function get_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$result = model('admin/Relation')->get_info($id);
|
||||
ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//编辑
|
||||
public function edit()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$name = input('name', '');
|
||||
$color = input('color', '');
|
||||
$day = input('day', 0);
|
||||
$result = model('admin/Relation')->edit($id, $name, $color, $day);
|
||||
ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
//删除
|
||||
public function del()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$result = model('admin/Relation')->del($id);
|
||||
ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||||
}
|
||||
}
|
||||
133
application/admin/controller/Report.php
Normal file
133
application/admin/controller/Report.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Report extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取举报列表
|
||||
public function report_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$to_uid = input('to_uid', 0);
|
||||
$nick_name = input('nick_name', '');
|
||||
$to_nick_name = input('to_nickname', '');
|
||||
|
||||
$order = input('order', 'rid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Report')->report_list($uid, $to_uid,$nick_name, $to_nick_name, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//获取举报详情
|
||||
public function report_info()
|
||||
{
|
||||
$rid = input('rid', 0);
|
||||
$data = model('Report')->report_info($rid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
|
||||
}
|
||||
//处理举报信息
|
||||
public function edit_user_info()
|
||||
{
|
||||
$rid = input('rid', 0);
|
||||
$status = input('status', '');
|
||||
$data = model('Report')->edit_user_info($rid,$status);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除举报信息
|
||||
public function del_Report()
|
||||
{
|
||||
$rid = input('rid', 0);
|
||||
$data = model('Report')->del_Report($rid);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//举报类型 列表
|
||||
public function report_type_list()
|
||||
{
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Report')->report_type_list($order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取举报类型详情
|
||||
public function report_type_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Report')->report_type_info($id);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//添加 举报类型信息
|
||||
public function add_report_type()
|
||||
{
|
||||
$type_name = input('type_name', '');
|
||||
$data = model('Report')->add_report_type($type_name);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改 举报类型信息
|
||||
public function edit_report_type()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$type_name = input('type_name', '');
|
||||
$data = model('Report')->edit_report_type($id,$type_name);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除举报类型
|
||||
public function del_report_type()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Report')->del_report_type($id);
|
||||
if ($data['code'] == 0) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
}
|
||||
692
application/admin/controller/Room.php
Normal file
692
application/admin/controller/Room.php
Normal file
@@ -0,0 +1,692 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\facade\Request;
|
||||
|
||||
class Room extends Common
|
||||
{
|
||||
|
||||
//获取房间列表
|
||||
public function get_room_list()
|
||||
{
|
||||
$data = Request::only(['rid', 'room_number', 'room_owner_uid', 'room_name', 'tid', 'cate_id', 'is_hot', 'is_top', 'is_online', 'room_status', 'is_delete', 'is_earnings']);
|
||||
$order = input('order', 'rid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Room')->get_room_list($data, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//添加房间
|
||||
public function add_room()
|
||||
{
|
||||
$data = Request::only(['xq_type', 'room_owner_uid', 'room_number', 'room_background_id', 'cate_id', 'room_cover', 'tid', 'room_name', 'room_intro', 'hot_value', 'is_pretty', 'is_top', 'is_hot', 'is_need_password', 'room_password', 'room_status', 'is_online', 'is_delete','accumulate_rate']);
|
||||
$reslut = model('Room')->add_room($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//修改房间信息
|
||||
public function edit_room_info()
|
||||
{
|
||||
$data = Request::only(['xq_type', 'rid', 'cate_id', 'room_number', 'room_cover', 'tid', 'room_name', 'room_background_id', 'room_intro', 'hot_value', 'pretty_room_number', 'is_top', 'is_hot', 'is_need_password', 'room_password', 'room_status', 'is_online', 'is_delete', 'sort', 'accumulate_rate','is_look','is_show_dial', 'envelope_rate', 'is_earnings', 'is_show_room','robot_num']);
|
||||
$reslut = model('Room')->edit_room_info($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取房间信息
|
||||
public function get_room_info()
|
||||
{
|
||||
$rid = input('rid', 0);
|
||||
$reslut = model('Room')->get_room_info($rid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//删除房间
|
||||
public function room_del()
|
||||
{
|
||||
$rid = input('rid', 0);
|
||||
$data = model('Room')->room_del($rid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//获取房间列表
|
||||
public function get_room_visitor_list()
|
||||
{
|
||||
$data = Request::only(['rid', 'uid', 'is_micro']);
|
||||
$order = input('order', 'vid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Room')->get_room_visitor_list($data, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//获取房间分类列表
|
||||
public function room_cate_list()
|
||||
{
|
||||
$cate_id = input('cate_id', 0);
|
||||
$category_name = input('category_name', 0);
|
||||
$order = input('order', 'cate_id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Room')->room_cate_list($cate_id, $category_name, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取房间分类详情
|
||||
public function get_room_cate_info()
|
||||
{
|
||||
$cate_id = input('cate_id', 0);
|
||||
$reslut = model('Room')->get_room_cate_info($cate_id);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//修改房间分类
|
||||
public function room_cate_edit()
|
||||
{
|
||||
$cate_id = input('cate_id', 0);
|
||||
$category_name = input('category_name', '');
|
||||
$tid = input('tid', 0);
|
||||
$sort = input('sort', 0);
|
||||
$data = model('Room')->room_cate_edit($cate_id, $tid, $category_name, $sort);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加房间分类
|
||||
public function add_room_cate()
|
||||
{
|
||||
$category_name = input('category_name', '');
|
||||
$tid = input('tid', 0);
|
||||
$sort = input('sort', 0);
|
||||
$data = model('Room')->add_room_cate($tid, $category_name, $sort);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
//删除房间分类
|
||||
public function room_cate_del()
|
||||
{
|
||||
$cate_id = input('cate_id', 0);
|
||||
$data = model('Room')->room_cate_del($cate_id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取房间类型列表
|
||||
public function get_room_type_list()
|
||||
{
|
||||
$tid = input('tid', 0);
|
||||
$type_name = input('type_name', 0);
|
||||
$order = input('order', 'tid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Room')->get_room_type_list($tid, $type_name, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取房间类型详情
|
||||
public function get_room_type_info()
|
||||
{
|
||||
$tid = input('tid', 0);
|
||||
$reslut = model('Room')->get_room_type_info($tid);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//修改房间类型
|
||||
public function edit_room_type_info()
|
||||
{
|
||||
$tid = input('tid', 0);
|
||||
$type_name = input('type_name', '');
|
||||
$data = model('Room')->edit_room_type_info($tid, $type_name);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加房间类型
|
||||
public function add_room_type()
|
||||
{
|
||||
$type_name = input('type_name', '');
|
||||
$data = model('Room')->add_room_type($type_name);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
//删除房间类型
|
||||
public function room_type_del()
|
||||
{
|
||||
$tid = input('tid', 0);
|
||||
$data = model('Room')->room_type_del($tid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取房间背景列表
|
||||
public function room_background_list()
|
||||
{
|
||||
$bid = input('bid', 0);
|
||||
$image_name = input('image_name', 0);
|
||||
$order = input('order', 'bid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
|
||||
$reslut = model('Room')->room_background_list($bid, $image_name, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取房间背景详情
|
||||
public function background_info()
|
||||
{
|
||||
$bid = input('bid', 0);
|
||||
|
||||
$reslut = model('Room')->background_info($bid);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加房间背景
|
||||
public function add_room_background()
|
||||
{
|
||||
$image_name = input('image_name');
|
||||
$image_url = input('image_url');
|
||||
$image_size = input('image_size');
|
||||
$status = input('status');
|
||||
$data = model('Room')->add_room_background($image_name, $image_url, $image_size, $status);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改房间背景
|
||||
public function edit_room_background()
|
||||
{
|
||||
$bid = input('bid', 0);
|
||||
$image_name = input('image_name');
|
||||
$image_url = input('image_url');
|
||||
$image_size = input('image_size');
|
||||
$status = input('status');
|
||||
$data = model('Room')->edit_room_background($bid, $image_name, $image_url, $image_size, $status);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除房间背景
|
||||
public function room_background_del()
|
||||
{
|
||||
$bid = input('bid', 0);
|
||||
$data = model('Room')->room_background_del($bid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取房间表情列表
|
||||
public function room_emoji_list()
|
||||
{
|
||||
$eid = input('eid', 0);
|
||||
$emoji_type = input('emoji_type', 0);
|
||||
$type = input('type'); //1非交互表情2交互表情
|
||||
$name = input('name'); //图片名称
|
||||
$order = input('order', 'eid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Room')->room_emoji_list($eid, $type, $name, $emoji_type, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取房间表情详情
|
||||
public function room_emoji_info()
|
||||
{
|
||||
$eid = input('eid', 0);
|
||||
$reslut = model('Room')->room_emoji_info($eid);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加房间表情
|
||||
public function add_room_emoji()
|
||||
{
|
||||
$emoji_type = input('emoji_type', 1);
|
||||
$nid = input('nid', 0);
|
||||
$type = input('type');
|
||||
$name = input('name');
|
||||
$pid = input('pid');
|
||||
$image = input('image');
|
||||
$second = input('second');
|
||||
$result = input('result');
|
||||
$show_status = input('show_status');
|
||||
$sort = input('sort');
|
||||
$data = model('Room')->add_room_emoji($pid, $type, $name, $emoji_type, $nid, $image, $second, $result, $show_status, $sort);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改房间表情
|
||||
public function edit_room_emoji()
|
||||
{
|
||||
$eid = input('eid', 0);
|
||||
$emoji_type = input('emoji_type', 1);
|
||||
$nid = input('nid', 0);
|
||||
$type = input('type');
|
||||
$pid = input('pid');
|
||||
$name = input('name');
|
||||
$image = input('image');
|
||||
$second = input('second');
|
||||
$result = input('result');
|
||||
$show_status = input('show_status');
|
||||
$sort = input('sort');
|
||||
$data = model('Room')->edit_room_emoji($eid, $pid, $type, $name, $emoji_type, $nid, $image, $second, $result, $show_status, $sort);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除房间表情
|
||||
public function del_room_emoji()
|
||||
{
|
||||
$eid = input('eid', 0);
|
||||
$data = model('Room')->del_room_emoji($eid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取房间音乐列表
|
||||
public function room_music_list()
|
||||
{
|
||||
$mid = input('mid', 0);
|
||||
$music_name = input('music_name', 0);
|
||||
$singer = input('singer', 0);
|
||||
$order = input('order', 'mid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
|
||||
$reslut = model('Room')->room_music_list($mid, $music_name, $singer, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取房间音乐
|
||||
public function music_info()
|
||||
{
|
||||
$mid = input('mid', 0);
|
||||
$reslut = model('Room')->music_info($mid);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加房间音乐
|
||||
public function add_room_music()
|
||||
{
|
||||
$music_name = input('music_name');
|
||||
$singer = input('singer');
|
||||
$music_url = input('music_url');
|
||||
$music_size = input('music_size');
|
||||
$status = input('status');
|
||||
$music_type = input('music_type');
|
||||
$data = model('Room')->add_room_music($music_name, $singer, $music_url, $music_size, $status, $music_type);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改房间音乐
|
||||
public function edit_room_music()
|
||||
{
|
||||
$mid = input('mid', 0);
|
||||
$music_name = input('music_name');
|
||||
$singer = input('singer');
|
||||
$music_url = input('music_url');
|
||||
$music_size = input('music_size');
|
||||
$status = input('status');
|
||||
$music_type = input('music_type');
|
||||
$data = model('Room')->edit_room_music($mid, $music_name, $singer, $music_url, $music_size, $status, $music_type);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除房间音乐
|
||||
public function room_music_del()
|
||||
{
|
||||
$mid = input('mid', 0);
|
||||
$data = model('Room')->room_music_del($mid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function room_subsidy()
|
||||
{
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Room')->room_subsidy($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取详情
|
||||
public function room_subsidy_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Room')->room_subsidy_info($id);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['data'] = $reslut['data'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加
|
||||
public function add_room_subsidy()
|
||||
{
|
||||
$type = input('type', 1);
|
||||
$level_name = input('level_name', '');
|
||||
$total_gift_price = input('total_gift_price', 0);
|
||||
$money = input('money', 0);
|
||||
$data = model('Room')->add_room_subsidy($level_name, $total_gift_price, $money, $type);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改
|
||||
public function edit_room_subsidy()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$type = input('type', 1);
|
||||
$level_name = input('level_name', '');
|
||||
$total_gift_price = input('total_gift_price', 0);
|
||||
$money = input('money', 0);
|
||||
$data = model('Room')->edit_room_subsidy($id, $level_name, $total_gift_price, $money, $type);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除
|
||||
public function room_subsidy_del()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Room')->room_subsidy_del($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function give_room_subsidy_list()
|
||||
{
|
||||
$room_number = input('room_number', 0);
|
||||
$owner_uid = input('owner_uid', 0);
|
||||
$is_fa = input('is_fa', 0);
|
||||
$belong_week = input('belong_week', '');
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
|
||||
$reslut = model('Room')->give_room_subsidy_list($room_number, $owner_uid, $is_fa, $order, $sort, $page, $limit, $belong_week);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//批量结算
|
||||
public function batch_give_room_subsidy(){
|
||||
//二级密码
|
||||
$pass = input('pass', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$data = input('info');
|
||||
$reslut = model('Room')->batch_give_room_subsidy($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//补贴详情
|
||||
public function get_give_room_subsidy_info(){
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Room')->get_give_room_subsidy_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//房间明细
|
||||
public function room_week_earnings_info(){
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Room')->room_week_earnings_log_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//修复
|
||||
public function room_week_earnings_log_edit(){
|
||||
$data = input();
|
||||
$reslut = model('Room')->room_week_earnings_log_edit($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//修改补贴
|
||||
public function edit_give_room_subsidy(){
|
||||
//二级密码
|
||||
$pass = input('secondary_password', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$id = input('id', 0);
|
||||
$user_earnings = input('user_earnings', 0);
|
||||
$reslut = model('Room')->edit_give_room_subsidy($id, $user_earnings);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//检测房间
|
||||
public function check_room(){
|
||||
$rid = input('rid', 0);
|
||||
$reslut = model('room')->check_room($rid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//清理房间异常麦位
|
||||
public function check_room_micro(){
|
||||
$rid = input('rid', 0);
|
||||
$reslut = model('room')->check_room_micro($rid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//获取举报列表
|
||||
public function room_apply_list()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$room_owner_uid = input('room_owner_uid', 0);
|
||||
$room_number = input('room_number', 0);
|
||||
$apply_status = input('apply_status', 0);
|
||||
$reslut = model('Room')->room_apply_list($room_owner_uid,$room_number,$apply_status,$page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function room_apply_info(){
|
||||
$id = input('id', 0);
|
||||
$reslut = model('room')->room_apply_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function room_apply_edit(){
|
||||
$data = input();
|
||||
$reslut = model('room')->room_apply_edit($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//踢禁记录
|
||||
public function out_forbid_log(){
|
||||
$data = Request::only(['operator_uid', 'uid', 'room_number', 'pay_type', 'start', 'end']);
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('room')->out_forbid_log($data,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
public function jie_word(){
|
||||
$fid = input('fid', '');
|
||||
$reslut = model('room')->jie_word($fid);
|
||||
return json($reslut);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
198
application/admin/controller/Sprite.php
Normal file
198
application/admin/controller/Sprite.php
Normal file
@@ -0,0 +1,198 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Sprite extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取列表
|
||||
public function get_monster_list()
|
||||
{
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Sprite')->get_monster_list($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取详情
|
||||
public function get_monster_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Sprite')->get_monster_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//编辑
|
||||
public function edit_monster()
|
||||
{
|
||||
|
||||
$data = input('post.');
|
||||
//二级密码
|
||||
$pass = input('secondary_password', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$reslut = model('Sprite')->edit_monster($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取礼物列表
|
||||
public function get_gift_list()
|
||||
{
|
||||
$reslut = model('Gift')->gift_list(0, "", 0, 0, 0, 1, 0, 'gift_price', 'asc', 1, 99999, 1);
|
||||
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']['list']);
|
||||
}
|
||||
|
||||
|
||||
//获取列表
|
||||
public function get_monster_multiple_list()
|
||||
{
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Sprite')->get_monster_multiple_list($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取详情
|
||||
public function get_monster_multiple_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Sprite')->get_monster_multiple_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//编辑
|
||||
public function edit_monster_multiple()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Sprite')->edit_monster_multiple($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function get_monster_log(){
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Sprite')->get_monster_log($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function get_user_monster_log(){
|
||||
$mid = input('mid', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Sprite')->get_user_monster_log($mid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function get_user_monster_win_log(){
|
||||
$mid = input('mid', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Sprite')->get_user_monster_win_log($mid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function get_monster_gift_list()
|
||||
{
|
||||
$order = input('order', 'a.id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Sprite')->get_monster_gift_list($order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取详情
|
||||
public function get_monster_gift_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$reslut = model('Sprite')->get_monster_gift_info($id);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//编辑
|
||||
public function edit_monster_gift()
|
||||
{
|
||||
|
||||
$data = input('post.');
|
||||
//二级密码
|
||||
$pass = input('secondary_password', '');
|
||||
$check_pass = model('admin/admin')->check_secondary_password($pass);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$reslut = model('Sprite')->edit_monster_gift($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function get_exchange_sprite_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$room_number = input('room_number', 0);
|
||||
$start = input('time1', '');
|
||||
$end = input('time2', '');
|
||||
$order = input('order', 'a.id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Sprite')->get_exchange_sprite_list($uid, $order, $sort, $page, $limit, $room_number, $start, $end);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
113
application/admin/controller/Statistics.php
Normal file
113
application/admin/controller/Statistics.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Request;
|
||||
|
||||
class Statistics extends Common
|
||||
{
|
||||
//首页基础数据
|
||||
public function welcome_data()
|
||||
{
|
||||
$reslut = model('Statistics')->welcome_data();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//打赏礼物数据根据天
|
||||
public function get_send_gift_data_by_day()
|
||||
{
|
||||
$reslut = model('Statistics')->get_send_gift_data_by_day();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//打赏礼物数据根据小时
|
||||
public function get_send_gift_data_by_hour()
|
||||
{
|
||||
$reslut = model('Statistics')->get_send_gift_data_by_hour();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//打赏礼物数据根据小时
|
||||
public function get_room_type_date()
|
||||
{
|
||||
$reslut = model('Statistics')->get_room_type_date();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//充值排行统计
|
||||
public function get_recharge_rank_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$time_section = input('time_section', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Statistics')->get_recharge_rank_list($uid, $time_section, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//送礼排行统计
|
||||
public function get_send_gift_rank_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$time_section = input('time_section', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Statistics')->get_send_gift_rank_list($uid, $time_section, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//收礼排行统计
|
||||
public function get_receive_gift_rank_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$time_section = input('time_section', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Statistics')->get_receive_gift_rank_list($uid, $time_section, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//陪玩排行统计
|
||||
public function get_player_order_rank_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$time_section = input('time_section', '');
|
||||
$order = input('order', 'order_num');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Statistics')->get_player_order_rank_list($uid, $time_section, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//用户消费排行统计
|
||||
public function get_user_consume_rank_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$time_section = input('time_section', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Statistics')->get_user_consume_rank_list($uid, $time_section, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
}
|
||||
439
application/admin/controller/Ueditor.php
Normal file
439
application/admin/controller/Ueditor.php
Normal file
@@ -0,0 +1,439 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Ueditor extends Common
|
||||
{
|
||||
public $web_site = "";
|
||||
public function initialize()
|
||||
{
|
||||
// $this->web_site = config('bosUrl') . "/";
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
// header('Access-Control-Allow-Origin: *'); //设置http://www.baidu.com允许跨域访问
|
||||
// header('Access-Control-Allow-Headers: X-Requested-With,X_Requested_With'); //设置允许的跨域header
|
||||
// date_default_timezone_set("Asia/chongqing");
|
||||
// error_reporting(E_ERROR);
|
||||
// header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
$path = str_replace('public', "", $_SERVER['DOCUMENT_ROOT']);
|
||||
$config_json_path = $path . "/config/ueditconfig.json";
|
||||
$CONFIG = json_decode(preg_replace("/\/\*[\s\S]+?\*\//", "", file_get_contents($config_json_path)), true);
|
||||
$action = input('action');
|
||||
|
||||
switch ($action) {
|
||||
case 'config':
|
||||
// header("content:application/json;chartset=uft-8");
|
||||
$result = json_encode($CONFIG);
|
||||
break;
|
||||
/* 上传图片 */
|
||||
case 'uploadimage':
|
||||
$fieldName = $CONFIG['imageFieldName'];
|
||||
$result = $this->upFile($fieldName);
|
||||
break;
|
||||
/* 上传涂鸦 */
|
||||
case 'uploadscrawl':
|
||||
$config = array(
|
||||
"pathFormat" => $CONFIG['scrawlPathFormat'],
|
||||
"maxSize" => $CONFIG['scrawlMaxSize'],
|
||||
"allowFiles" => $CONFIG['scrawlAllowFiles'],
|
||||
"oriName" => "scrawl.png",
|
||||
);
|
||||
$fieldName = $CONFIG['scrawlFieldName'];
|
||||
$base64 = "base64";
|
||||
$result = $this->upBase64($config, $fieldName);
|
||||
break;
|
||||
/* 上传视频 */
|
||||
case 'uploadvideo':
|
||||
$fieldName = $CONFIG['videoFieldName'];
|
||||
$result = $this->upFile($fieldName);
|
||||
break;
|
||||
/* 上传文件 */
|
||||
case 'uploadfile':
|
||||
$fieldName = $CONFIG['fileFieldName'];
|
||||
$result = $this->upFile($fieldName);
|
||||
break;
|
||||
/* 列出图片 */
|
||||
case 'listimage':
|
||||
$allowFiles = $CONFIG['imageManagerAllowFiles'];
|
||||
$listSize = $CONFIG['imageManagerListSize'];
|
||||
$path = $CONFIG['imageManagerListPath'];
|
||||
$get = $_GET;
|
||||
$result = $this->fileList($allowFiles, $listSize, $get);
|
||||
break;
|
||||
/* 列出文件 */
|
||||
case 'listfile':
|
||||
$allowFiles = $CONFIG['fileManagerAllowFiles'];
|
||||
$listSize = $CONFIG['fileManagerListSize'];
|
||||
$path = $CONFIG['fileManagerListPath'];
|
||||
$get = $_GET;
|
||||
$result = $this->fileList($allowFiles, $listSize, $get);
|
||||
break;
|
||||
/* 抓取远程文件 */
|
||||
case 'catchimage':
|
||||
$config = array(
|
||||
"pathFormat" => $CONFIG['catcherPathFormat'],
|
||||
"maxSize" => $CONFIG['catcherMaxSize'],
|
||||
"allowFiles" => $CONFIG['catcherAllowFiles'],
|
||||
"oriName" => "remote.png",
|
||||
);
|
||||
$fieldName = $CONFIG['catcherFieldName'];
|
||||
/* 抓取远程图片 */
|
||||
$list = array();
|
||||
isset($_POST[$fieldName]) ? $source = $_POST[$fieldName] : $source = $_GET[$fieldName];
|
||||
|
||||
foreach ($source as $imgUrl) {
|
||||
$info = json_decode($this->saveRemote($config, $imgUrl), true);
|
||||
array_push($list, array(
|
||||
"state" => $info["state"],
|
||||
"url" => $info["url"],
|
||||
"size" => $info["size"],
|
||||
"title" => htmlspecialchars($info["title"]),
|
||||
"original" => htmlspecialchars($info["original"]),
|
||||
"source" => htmlspecialchars($imgUrl),
|
||||
));
|
||||
}
|
||||
|
||||
$result = json_encode(array(
|
||||
'state' => count($list) ? 'SUCCESS' : 'ERROR',
|
||||
'list' => $list,
|
||||
));
|
||||
break;
|
||||
default:
|
||||
$result = json_encode(array(
|
||||
'state' => '请求地址出错',
|
||||
));
|
||||
break;
|
||||
}
|
||||
|
||||
/* 输出结果 */
|
||||
if (isset($_GET["callback"])) {
|
||||
if (preg_match("/^[\w_]+$/", $_GET["callback"])) {
|
||||
echo htmlspecialchars($_GET["callback"]) . '(' . $result . ')';
|
||||
} else {
|
||||
echo json_encode(array(
|
||||
'state' => 'callback参数不合法',
|
||||
));
|
||||
}
|
||||
} else {
|
||||
echo $result;
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
//上传文件
|
||||
private function upFile($fieldName)
|
||||
{
|
||||
$file = request()->file($fieldName);
|
||||
$reslut = model('Upload')->single_file_upload($file, "onepage");
|
||||
// dump($reslut);exit;
|
||||
$data = [];
|
||||
if ($reslut['code'] == 200) {
|
||||
$data = array(
|
||||
'state' => 'SUCCESS',
|
||||
'url' => $reslut['data']['http_image_path'],
|
||||
'title' => "image",
|
||||
'original' => $reslut['data']['image_path'],
|
||||
'type' => '',
|
||||
'size' => $reslut['data']['size'],
|
||||
);
|
||||
} else {
|
||||
$data = array(
|
||||
'state' => "上传错误",
|
||||
);
|
||||
}
|
||||
return json_encode($data);
|
||||
/*
|
||||
$reslut = model('api/BaiduBce')->admin_uedit_upload('content', $file);
|
||||
if ($reslut['code'] == 1) {
|
||||
|
||||
$data = array(
|
||||
'state' => 'SUCCESS',
|
||||
'url' => $this->web_site . $reslut['data']['bosPath'],
|
||||
'title' => $reslut['data']['title'],
|
||||
'original' => $this->web_site . $reslut['data']['original'],
|
||||
'type' => $reslut['data']['type'],
|
||||
'size' => $reslut['data']['size'],
|
||||
);
|
||||
|
||||
} else {
|
||||
$data = array(
|
||||
'state' => $reslut['data'],
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
return json_encode($data);
|
||||
*/
|
||||
/*
|
||||
$file = request()->file($fieldName);
|
||||
$info = $file->validate(['size' => 1567800000, 'ext' => 'jpg,gif,png,jpeg,mp4,mp3'])->move('uploads/uedit/');
|
||||
if ($info) { //上传成功
|
||||
$fname = '/uploads/uedit/' . str_replace('\\', '/', $info->getSaveName());
|
||||
$imgArr = explode(',', 'jpg,gif,png,jpeg,bmp,ttf,tif');
|
||||
$imgExt = strtolower($info->getExtension());
|
||||
$isImg = in_array($imgExt, $imgArr);
|
||||
|
||||
// if($isImg){//如果是图片,开始处理
|
||||
// $image = Image::open($file);
|
||||
// $thumbnail = 1;
|
||||
// $water = 1;
|
||||
|
||||
// //在这里你可以根据你需要,调用ThinkPHP5的图片处理方法了
|
||||
// if($water == 1){//文字水印
|
||||
// $image->text('df81.com','./public/font/4.ttf',180,'#ff0000')->save('.'.$fname);
|
||||
// }
|
||||
// if($water ==2 ){//图片水印
|
||||
// $image->water('./public/img/df81.png',9,100)->save('.'.$fname);
|
||||
// }
|
||||
// if($thumbnail == 1){//生成缩略图
|
||||
// $image->thumb(500,500,1)->save('.'.$fname);
|
||||
// }
|
||||
// }
|
||||
|
||||
$data = array(
|
||||
'state' => 'SUCCESS',
|
||||
'url' => $this->web_site . $fname,
|
||||
'title' => $info->getFilename(),
|
||||
'original' => $this->web_site . $info->getFilename(),
|
||||
'type' => '.' . $info->getExtension(),
|
||||
'size' => $info->getSize(),
|
||||
);
|
||||
} else {
|
||||
$data = array(
|
||||
'state' => $info->getError(),
|
||||
);
|
||||
}
|
||||
return json_encode($data);
|
||||
*/
|
||||
}
|
||||
|
||||
//列出图片
|
||||
private function fileList($allowFiles, $listSize, $get)
|
||||
{
|
||||
$dirname = './uploads/uedit/';
|
||||
$allowFiles = substr(str_replace(".", "|", join("", $allowFiles)), 1);
|
||||
|
||||
/* 获取参数 */
|
||||
$size = isset($get['size']) ? htmlspecialchars($get['size']) : $listSize;
|
||||
$start = isset($get['start']) ? htmlspecialchars($get['start']) : 0;
|
||||
$end = $start + $size;
|
||||
|
||||
/* 获取文件列表 */
|
||||
$path = $dirname;
|
||||
$files = $this->getFiles($path, $allowFiles);
|
||||
if (!count($files)) {
|
||||
return json_encode(array(
|
||||
"state" => "no match file",
|
||||
"list" => array(),
|
||||
"start" => $start,
|
||||
"total" => count($files),
|
||||
));
|
||||
}
|
||||
|
||||
/* 获取指定范围的列表 */
|
||||
$len = count($files);
|
||||
for ($i = min($end, $len) - 1, $list = array(); $i < $len && $i >= 0 && $i >= $start; $i--) {
|
||||
$list[] = $files[$i];
|
||||
}
|
||||
|
||||
/* 返回数据 */
|
||||
$result = json_encode(array(
|
||||
"state" => "SUCCESS",
|
||||
"list" => $list,
|
||||
"start" => $start,
|
||||
"total" => count($files),
|
||||
));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/*
|
||||
* 遍历获取目录下的指定类型的文件
|
||||
* @param $path
|
||||
* @param array $files
|
||||
* @return array
|
||||
*/
|
||||
private function getFiles($path, $allowFiles, &$files = array())
|
||||
{
|
||||
if (!is_dir($path)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (substr($path, strlen($path) - 1) != '/') {
|
||||
$path .= '/';
|
||||
}
|
||||
|
||||
$handle = opendir($path);
|
||||
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != '.' && $file != '..') {
|
||||
$path2 = $path . $file;
|
||||
if (is_dir($path2)) {
|
||||
$this->getFiles($path2, $allowFiles, $files);
|
||||
} else {
|
||||
if (preg_match("/\.(" . $allowFiles . ")$/i", $file)) {
|
||||
$files[] = array(
|
||||
'url' => substr($path2, 1),
|
||||
'mtime' => filemtime($path2),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $files;
|
||||
}
|
||||
|
||||
//抓取远程图片
|
||||
private function saveRemote($config, $fieldName)
|
||||
{
|
||||
$imgUrl = htmlspecialchars($fieldName);
|
||||
$imgUrl = str_replace("&", "&", $imgUrl);
|
||||
|
||||
//http开头验证
|
||||
if (strpos($imgUrl, "http") !== 0) {
|
||||
$data = array(
|
||||
'state' => '链接不是http链接',
|
||||
);
|
||||
return json_encode($data);
|
||||
}
|
||||
//获取请求头并检测死链
|
||||
$heads = get_headers($imgUrl);
|
||||
if (!(stristr($heads[0], "200") && stristr($heads[0], "OK"))) {
|
||||
$data = array(
|
||||
'state' => '链接不可用',
|
||||
);
|
||||
return json_encode($data);
|
||||
}
|
||||
//格式验证(扩展名验证和Content-Type验证)
|
||||
$fileType = strtolower(strrchr($imgUrl, '.'));
|
||||
if (!in_array($fileType, $config['allowFiles']) || stristr($heads['Content-Type'], "image")) {
|
||||
$data = array(
|
||||
'state' => '链接contentType不正确',
|
||||
);
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
//打开输出缓冲区并获取远程图片
|
||||
ob_start();
|
||||
$context = stream_context_create(
|
||||
array('http' => array(
|
||||
'follow_location' => false, // don't follow redirects
|
||||
))
|
||||
);
|
||||
readfile($imgUrl, false, $context);
|
||||
$img = ob_get_contents();
|
||||
ob_end_clean();
|
||||
preg_match("/[\/]([^\/]*)[\.]?[^\.\/]*$/", $imgUrl, $m);
|
||||
|
||||
$dirname = './public/uploads/remote/';
|
||||
$file['oriName'] = $m ? $m[1] : "";
|
||||
$file['filesize'] = strlen($img);
|
||||
$file['ext'] = strtolower(strrchr($config['oriName'], '.'));
|
||||
$file['name'] = uniqid() . $file['ext'];
|
||||
$file['fullName'] = $dirname . $file['name'];
|
||||
$fullName = $file['fullName'];
|
||||
|
||||
//检查文件大小是否超出限制
|
||||
if ($file['filesize'] >= ($config["maxSize"])) {
|
||||
$data = array(
|
||||
'state' => '文件大小超出网站限制',
|
||||
);
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
//创建目录失败
|
||||
if (!file_exists($dirname) && !mkdir($dirname, 0777, true)) {
|
||||
$data = array(
|
||||
'state' => '目录创建失败',
|
||||
);
|
||||
return json_encode($data);
|
||||
} else if (!is_writeable($dirname)) {
|
||||
$data = array(
|
||||
'state' => '目录没有写权限',
|
||||
);
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
//移动文件
|
||||
if (!(file_put_contents($fullName, $img) && file_exists($fullName))) { //移动失败
|
||||
$data = array(
|
||||
'state' => '写入文件内容错误',
|
||||
);
|
||||
return json_encode($data);
|
||||
} else { //移动成功
|
||||
$data = array(
|
||||
'state' => 'SUCCESS',
|
||||
'url' => $this->web_site . substr($file['fullName'], 1),
|
||||
'title' => $file['name'],
|
||||
'original' => $this->web_site . $file['oriName'],
|
||||
'type' => $file['ext'],
|
||||
'size' => $file['filesize'],
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
/*
|
||||
* 处理base64编码的图片上传
|
||||
* 例如:涂鸦图片上传
|
||||
*/
|
||||
private function upBase64($config, $fieldName)
|
||||
{
|
||||
$base64Data = $_POST[$fieldName];
|
||||
$img = base64_decode($base64Data);
|
||||
|
||||
$dirname = './uploads/uedit/scrawl/';
|
||||
$file['filesize'] = strlen($img);
|
||||
$file['oriName'] = $config['oriName'];
|
||||
$file['ext'] = strtolower(strrchr($config['oriName'], '.'));
|
||||
$file['name'] = uniqid() . $file['ext'];
|
||||
$file['fullName'] = $dirname . $file['name'];
|
||||
$fullName = $file['fullName'];
|
||||
|
||||
//检查文件大小是否超出限制
|
||||
if ($file['filesize'] >= ($config["maxSize"])) {
|
||||
$data = array(
|
||||
'state' => '文件大小超出网站限制',
|
||||
);
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
//创建目录失败
|
||||
if (!file_exists($dirname) && !mkdir($dirname, 0777, true)) {
|
||||
$data = array(
|
||||
'state' => '目录创建失败',
|
||||
);
|
||||
return json_encode($data);
|
||||
} else if (!is_writeable($dirname)) {
|
||||
$data = array(
|
||||
'state' => '目录没有写权限',
|
||||
);
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
//移动文件
|
||||
if (!(file_put_contents($fullName, $img) && file_exists($fullName))) { //移动失败
|
||||
$data = array(
|
||||
'state' => '写入文件内容错误',
|
||||
);
|
||||
} else { //移动成功
|
||||
$data = array(
|
||||
'state' => 'SUCCESS',
|
||||
'url' => $this->web_site . substr($file['fullName'], 1),
|
||||
'title' => $file['name'],
|
||||
'original' => $this->web_site . $file['oriName'],
|
||||
'type' => $file['ext'],
|
||||
'size' => $file['filesize'],
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode($data);
|
||||
}
|
||||
}
|
||||
17
application/admin/controller/Upload.php
Normal file
17
application/admin/controller/Upload.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Request;
|
||||
|
||||
class Upload extends Common
|
||||
{
|
||||
public function file_upload()
|
||||
{
|
||||
$file = request()->file('file');
|
||||
$file_category_name = input('file_category', 'all');
|
||||
$reslut = model('Upload')->single_file_upload($file, $file_category_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
}
|
||||
308
application/admin/controller/User.php
Normal file
308
application/admin/controller/User.php
Normal file
@@ -0,0 +1,308 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\facade\Request;
|
||||
|
||||
class User extends Common
|
||||
{
|
||||
|
||||
//获取用户列表
|
||||
public function get_user_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$pid = input('pid', 0);
|
||||
$user_name = input('user_name', '');
|
||||
$nick_name = input('nick_name', '');
|
||||
$special_uid = input('special_uid',0);
|
||||
$last_login_device = input('last_login_device','');
|
||||
$is_can_recharge = input('is_can_recharge', 0);
|
||||
$is_sign = input('is_sign', 0);
|
||||
$is_real = input('is_real', 0);
|
||||
$order = input('order', 'uid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$integral_min = input('integral_min',0);
|
||||
$integral_max = input('integral_max',0);
|
||||
$is_sys_tester = input('is_sys_tester',2);
|
||||
$reslut = model('User')->get_user_list($uid, $pid, $user_name, $nick_name, $special_uid, $last_login_device, $is_can_recharge, $is_sign, $is_real, $order, $sort, $page, $limit,$integral_min,$integral_max,$is_sys_tester);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取用户列表
|
||||
public function get_write_user_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$pid = input('pid', 0);
|
||||
$user_name = input('user_name', '');
|
||||
$nick_name = input('nick_name', '');
|
||||
$special_uid = input('special_uid',0);
|
||||
$last_login_device = input('last_login_device','');
|
||||
$is_can_recharge = input('is_can_recharge', 0);
|
||||
$is_sign = input('is_sign', 0);
|
||||
$is_real = input('is_real', 0);
|
||||
$order = input('order', 'uid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$integral_min = input('integral_min',0);
|
||||
$integral_max = input('integral_max',0);
|
||||
$reslut = model('User')->get_write_user_list($uid, $pid, $user_name, $nick_name, $special_uid, $last_login_device, $is_can_recharge, $is_sign, $is_real, $order, $sort, $page, $limit,$integral_min,$integral_max);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
$data['totalRow'] = $reslut['data']['totalRow'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
//获取用户资料
|
||||
public function get_user_info()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$reslut = model('User')->get_user_info($uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
// $data = model('User')->get_user_info($uid);
|
||||
// if ($data['code'] == 0) {
|
||||
// return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
// } else {
|
||||
// return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
// }
|
||||
}
|
||||
//修改用户资料
|
||||
public function edit_user_info()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$nick_name = input('nick_name', '');
|
||||
$sex = input('sex', 0);
|
||||
$login_status = input('login_status', 0);
|
||||
$is_tester = input('is_tester',0);
|
||||
$is_sign = input('is_sign', 0);
|
||||
$is_can_recharge = input('is_can_recharge', 0);
|
||||
$special_uid = input('special_uid', '');
|
||||
$is_real = input('is_real', 2);
|
||||
$is_look_rank = input('is_look_rank', '');
|
||||
$room_owner_commission = input('room_owner_commission', '');
|
||||
$room_owner_lucky_commission = input('room_owner_lucky_commission','');
|
||||
|
||||
|
||||
$real_name = input('real_name', '');
|
||||
$card_id = input('card_id', '');
|
||||
|
||||
|
||||
$data = model('User')->edit_user_info($uid, $nick_name, $sex, $login_status, $is_tester, $is_sign, $is_can_recharge, $special_uid, $is_real,$is_look_rank,$room_owner_commission,$room_owner_lucky_commission,$real_name,$card_id);
|
||||
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//修改用户资料
|
||||
public function lu_edit_user_info()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$nick_name = input('nick_name', '');
|
||||
$sex = input('sex', 0);
|
||||
$head_pic = input('head_pic', '');
|
||||
|
||||
$data = model('User')->lu_edit_user_info($uid, $nick_name, $sex, $head_pic);
|
||||
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//修改用户资金
|
||||
public function edit_user_money()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$money_type = input('money_type', '');
|
||||
$change_value = input('change_value', 0);
|
||||
$secondary_password = input('secondary_password','');
|
||||
$remarks = input('remarks', '');
|
||||
//二级密码
|
||||
$check_pass = model('admin/admin')->check_secondary_password($secondary_password);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$reslut = model('User')->edit_user_money($uid, $change_value, $money_type, $secondary_password, $remarks, $this->aid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//恢复注销用户
|
||||
public function edit_user_write()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$login_status = input('login_status', '');
|
||||
$secondary_password = input('secondary_password','');
|
||||
//二级密码
|
||||
$check_pass = model('admin/admin')->check_secondary_password($secondary_password);
|
||||
if($check_pass['code'] == 201){
|
||||
return ajaxReturn($check_pass['code'], $check_pass['msg'], $check_pass['data']);
|
||||
}
|
||||
$reslut = model('User')->edit_user_write($uid, $login_status, $this->aid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//修改用户密码
|
||||
public function edit_user_password()
|
||||
{
|
||||
$data = Request::only(['uid', 'password']);
|
||||
$reslut = model('User')->edit_user_password($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//修改用户密码
|
||||
public function edit_user_passwords()
|
||||
{
|
||||
$data = Request::only(['uid', 'trade_password']);
|
||||
$reslut = model('User')->edit_user_passwords($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取用户背包列表
|
||||
public function get_user_gift_pack()
|
||||
{
|
||||
$pid = input('pid', 0);
|
||||
$uid = input('uid', 0);
|
||||
$nick_name = input('nick_name', '');
|
||||
$gid = input('gid', 0);
|
||||
$order = input('order', 'pid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('User')->get_user_gift_pack($pid, $uid, $nick_name, $gid, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//删除用户背包礼物
|
||||
public function del_user_gift_pack()
|
||||
{
|
||||
//return ajaxReturn(201, '功能暂已停用', null);
|
||||
$pid = input('pid', 0);
|
||||
$reslut = model('User')->del_user_gift_pack($pid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//清除用户地阶奖池累消
|
||||
public function gold_consume_del(){
|
||||
$reslut = model('User')->gold_consume_del();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//清除用户天阶奖池累消
|
||||
public function drill_consume_del(){
|
||||
$reslut = model('User')->drill_consume_del();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
//清除用户天阶奖池累消
|
||||
public function silver_consume_del(){
|
||||
$reslut = model('User')->silver_consume_del();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//清空所有背包礼物
|
||||
public function user_gift_pack_del_all(){
|
||||
return ajaxReturn(201, '功能暂已停用', null);
|
||||
$reslut = model('User')->user_gift_pack_del_all();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//清空用户token
|
||||
public function clear_user_token(){
|
||||
$type = input('type', 0);
|
||||
$uid = input('uid', 0);
|
||||
$reslut = model('User')->clear_user_token($uid, $type);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//幸运摩天奖励发放
|
||||
public function motian_fa(){
|
||||
$key_name = "api:user:motian_fa";
|
||||
redis_lock_exit($key_name,100);
|
||||
$reslut = model('User')->yesterday_motian_award();
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function get_mo_tian_log(){
|
||||
$uid = input('uid', 0);
|
||||
$gid = input('gid', 0);
|
||||
$gift_name = input('gift_name', '');
|
||||
$level = input('level', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('user')->get_mo_tian_log($uid, $gid, $gift_name,$level,$page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
//批量生成测试账号
|
||||
public function batch_create_test_account(){
|
||||
$key_name = "admin:batch_create_test_account";
|
||||
redis_lock_exit($key_name);
|
||||
$reslut = model('api/UserLogin')->batch_create_test_account();
|
||||
redis_unlock($key_name);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
31
application/admin/controller/UserPack.php
Normal file
31
application/admin/controller/UserPack.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class UserPack extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取系统配置
|
||||
public function add_user_pack_gift()
|
||||
{
|
||||
$password = input('secondary_password', '');
|
||||
$aid = $this->aid;
|
||||
$uid = input('uid', 0);
|
||||
$num = input('num', 0);
|
||||
$gid = input('gid', 0);
|
||||
$res = model('Admin')->check_secondary_password($password);
|
||||
if($res['code'] == 201) {
|
||||
return ajaxReturn(201, '二级密码错误', null);
|
||||
}
|
||||
$result = model('UserPack')->add_user_pack_gift($aid, $uid, $gid, $num);
|
||||
return ajaxReturn($result['code'], $result['msg'], null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
51
application/admin/controller/Userzone.php
Normal file
51
application/admin/controller/Userzone.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\facade\Request;
|
||||
|
||||
class Userzone extends Common
|
||||
{
|
||||
|
||||
//获取举报列表
|
||||
public function user_zone_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$nick_name = input('nick_name', '');
|
||||
$content = input('content', '');
|
||||
$show_status = input('show_status', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Userzone')->user_zone_list($uid, $nick_name, $content, $show_status, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//审核说说信息
|
||||
// public function zone_examine()
|
||||
// {
|
||||
// $zid = input('zid', 0);
|
||||
// $show_status = input('show_status', 0);
|
||||
// $reslut = model('Userzone')->zone_examine($zid, $show_status);
|
||||
// return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
// }
|
||||
|
||||
public function get_zone_info()
|
||||
{
|
||||
$zid = input('zid', 0);
|
||||
$reslut = model('Userzone')->get_zone_info($zid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//编辑说说
|
||||
public function edit_zone()
|
||||
{
|
||||
$data = Request::only(['zid', 'is_recommend', 'show_status']);
|
||||
$reslut = model('Userzone')->edit_zone($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
}
|
||||
872
application/admin/controller/Website.php
Normal file
872
application/admin/controller/Website.php
Normal file
@@ -0,0 +1,872 @@
|
||||
<?php
|
||||
namespace app\admin\controller;
|
||||
use think\Controller;
|
||||
// 网站管理
|
||||
class Website extends Common
|
||||
{
|
||||
|
||||
//获取轮播图 列表
|
||||
public function get_banner_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$room_number = input('room_number', 0);
|
||||
$room_name = input('room_name', '');
|
||||
$order = input('order', 'uid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->get_banner_list($uid, $room_number, $room_name, $order, $sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//修改轮播图信息
|
||||
public function edit_banner_info()
|
||||
{
|
||||
$bid = input('bid', 0);
|
||||
$image = input('image', 0);
|
||||
$aid = input('aid', '');
|
||||
$type = input('type', '');
|
||||
$show_status = input('show_status', '');
|
||||
$sort = input('sort', '');
|
||||
$data = model('Website')->edit_banner_info($bid, $image, $aid, $type,$show_status, $sort);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加轮播图
|
||||
public function add_banner()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->add_banner($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取房间信息
|
||||
public function get_banner_info()
|
||||
{
|
||||
$bid = input('bid', 0);
|
||||
$data = model('Website')->get_banner_info($bid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//删除轮播图
|
||||
public function banner_del()
|
||||
{
|
||||
$bid = input('bid', 0);
|
||||
$data = model('Website')->banner_del($bid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取充值可选 列表
|
||||
public function can_recharge_list()
|
||||
{
|
||||
$crid = input('crid', 0);
|
||||
$order = input('order', 'crid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->can_recharge_list($crid,$order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//修改 充值可选
|
||||
public function edit_recharge_info()
|
||||
{
|
||||
$crid = input('crid', 0);
|
||||
$money = input('money', 0);
|
||||
$integral = input('integral', '');
|
||||
$data = model('Website')->edit_recharge_info($crid, $money, $integral);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加 充值可选
|
||||
public function add_recharge()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->add_recharge($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 充值可选 信息
|
||||
public function get_recharge_info()
|
||||
{
|
||||
$crid = input('crid', 0);
|
||||
$data = model('Website')->get_recharge_info($crid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//删除 充值可选
|
||||
public function recharge_del()
|
||||
{
|
||||
$crid = input('crid', 0);
|
||||
$data = model('Website')->recharge_del($crid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//用户建议 列表
|
||||
public function suggest_list()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$uid = input('uid', 0);
|
||||
$nickanme = input('nickanme', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->suggest_list($id,$uid,$nickanme,$order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//获取 建议 信息
|
||||
public function get_suggest_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->get_suggest_info($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改 建议状态
|
||||
public function edit_suggest_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$is_deal = input('is_deal', 0);
|
||||
$data = model('Website')->edit_suggest_info($id, $is_deal);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 建议
|
||||
public function suggest_del()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->suggest_del($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//用户等级列表
|
||||
public function user_level_list()
|
||||
{
|
||||
$lid = input('lid', 0);
|
||||
$type = input('type', 0);
|
||||
$type_name = input('type_name', 0);
|
||||
$order = input('order', 'lid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->user_level_list($lid,$type,$type_name,$order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加 用户等级
|
||||
public function add_user_level()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->add_user_level($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 用户等级
|
||||
public function get_user_level()
|
||||
{
|
||||
$lid = input('lid', 0);
|
||||
$data = model('Website')->get_user_level($lid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改 用户等级
|
||||
public function edit_user_level()
|
||||
{
|
||||
$data = input('post.');
|
||||
|
||||
$data = model('Website')->edit_user_level($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 用户等级
|
||||
public function user_level_del()
|
||||
{
|
||||
$lid = input('lid', 0);
|
||||
$data = model('Website')->user_level_del($lid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//守护类型 列表
|
||||
public function guard_type_list()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$guard_name = input('guard_name', 0);
|
||||
$order = input('order', 'gid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->guard_type_list($gid,$guard_name,$order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加 守护类型
|
||||
public function add_guard_type()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->add_guard_type($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 守护类型
|
||||
public function get_guard_type()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$data = model('Website')->get_guard_type($gid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改 守护类型
|
||||
public function edit_guard_type()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->edit_guard_type($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 守护类型
|
||||
public function guard_type_del()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$data = model('Website')->guard_type_del($gid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 守护类型 l列表
|
||||
public function get_guard_type_list()
|
||||
{
|
||||
$data = model('Website')->get_guard_type_list();
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//守护价格 列表
|
||||
public function guard_price_list()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$order = input('order', 'a.id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->guard_price_list($id,$order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//添加 守护价格
|
||||
public function add_guard_price()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->add_guard_price($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 守护价格详情
|
||||
public function get_guard_price()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->get_guard_price($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改 守护价格
|
||||
public function edit_guard_price()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->edit_guard_price($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 守护价格
|
||||
public function guard_price_del()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->guard_price_del($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//特效 列表
|
||||
public function special_effects_list()
|
||||
{
|
||||
$sid = input('sid', 0);
|
||||
$type = input('type', 0);
|
||||
$effects_name = input('effects_name', 0);
|
||||
$is_can_buy = input('is_can_buy', 0);
|
||||
$is_show = input('is_show', 0);
|
||||
|
||||
$order = input('order', 'sid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->special_effects_list($sid,$type,$effects_name,$is_can_buy,$is_show,$order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//添加 特效
|
||||
public function add_special_effects()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->add_special_effects($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 特效详情
|
||||
public function get_special_effects()
|
||||
{
|
||||
$sid = input('sid', 0);
|
||||
$data = model('Website')->get_special_effects($sid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改 特效
|
||||
public function edit_special_effects()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->edit_special_effects($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 特效
|
||||
public function special_effects_del()
|
||||
{
|
||||
$sid = input('sid', 0);
|
||||
$data = model('Website')->special_effects_del($sid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 特效价格 列表
|
||||
public function get_special_effects_list()
|
||||
{
|
||||
$data = model('Website')->get_special_effects_list();
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//特效价格 列表
|
||||
public function special_effects_price()
|
||||
{
|
||||
$spid = input('spid', 0);
|
||||
$day = input('day', 0);
|
||||
$sell_price = input('sell_price', 0);
|
||||
$effects_name = input('effects_name', 0);
|
||||
$order = input('order', 'a.spid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->special_effects_price($spid,$day,$sell_price,$effects_name,$order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加 特效价格
|
||||
public function add_special_effects_price()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->add_special_effects_price($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 特效价格 详情
|
||||
public function get_special_effects_price()
|
||||
{
|
||||
$spid = input('spid', 0);
|
||||
$data = model('Website')->get_special_effects_price($spid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改 特效价格
|
||||
public function edit_special_effects_price()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->edit_special_effects_price($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 特效价格
|
||||
public function special_effects_price_del()
|
||||
{
|
||||
$spid = input('spid', 0);
|
||||
$data = model('Website')->special_effects_price_del($spid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//单页信息 列表
|
||||
public function page_list()
|
||||
{
|
||||
$order = input('order', 'aid');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->page_list($order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加 单页信息
|
||||
public function add_page()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->add_page($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 单页信息 详情
|
||||
public function get_page()
|
||||
{
|
||||
$aid = input('aid', 0);
|
||||
$data = model('Website')->get_page($aid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改 单页信息
|
||||
public function edit_page()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->edit_page($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 单页信息
|
||||
public function page_del()
|
||||
{
|
||||
$aid = input('aid', 0);
|
||||
$data = model('Website')->page_del($aid);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取列表
|
||||
public function pay_way_list()
|
||||
{
|
||||
$pay_type = input('pay_type', 0);
|
||||
$status = input('status', '');
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->pay_way_list($pay_type, $status, $order, $sort,$page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//修改
|
||||
public function edit_pay_way()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Website')->edit_pay_way($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//添加
|
||||
public function add_pay_way()
|
||||
{
|
||||
$data = input('post.');
|
||||
$reslut = model('Website')->add_pay_way($data);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取信息
|
||||
public function get_pay_way_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->get_pay_way_info($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//删除
|
||||
public function pay_way_del()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->pay_way_del($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 列表
|
||||
public function auction_price_list()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->auction_price_list($id,$order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//修改
|
||||
public function edit_auction_price_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$price = input('price', 0);
|
||||
$data = model('Website')->edit_auction_price_info($id, $price);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//添加
|
||||
public function add_auction_price()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->add_auction_price($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 信息
|
||||
public function get_auction_price_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->get_auction_price_info($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//删除
|
||||
public function auction_price_del()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->auction_price_del($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//CP特权列表
|
||||
public function coupling_privilege_list()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->coupling_privilege_list($id,$order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//添加 CP特权
|
||||
public function add_coupling_privilege()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->add_coupling_privilege($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取 CP特权
|
||||
public function get_coupling_privilege_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->get_coupling_privilege_info($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//修改 CP特权
|
||||
public function edit_coupling_privilege()
|
||||
{
|
||||
$data = input('post.');
|
||||
$data = model('Website')->edit_coupling_privilege($data);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//删除 CP特权
|
||||
public function coupling_privilege_del()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->coupling_privilege_del($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//客服信息
|
||||
public function support_staff(){
|
||||
$order = input('order', 'id');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Website')->support_staff($order,$sort,$page,$limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//客服详情
|
||||
public function support_staff_info()
|
||||
{
|
||||
$id = input('id', 0);
|
||||
$data = model('Website')->support_staff_info($id);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
//客服信息编辑
|
||||
public function support_staff_edit(){
|
||||
$id = input('id', 0);
|
||||
$image = input('image', '');
|
||||
$content = input('content', '');
|
||||
$contents = input('contents', '');
|
||||
$data = model('Website')->support_staff_edit($id,$image, $content, $contents);
|
||||
if ($data['code'] == 201) {
|
||||
return ajaxReturn(201, $data['msg'], $data['data']);
|
||||
} else {
|
||||
return ajaxReturn(200, $data['msg'], $data['data']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user