backup: 线上最终版本全量备份
包含所有线上运行的改动: - 代理编辑功能修复(码率/占成/返水率保存) - CORS跨域修复(Pcapi构造函数统一Origin) - 支付通道(ccpay/epay新增) - 代理报表洗码量显示 - AlinPay金额调整 - 代理/会员编辑页面优化 - 多语言更新
This commit is contained in:
@@ -17,17 +17,19 @@ use Waybill\WaybillRoulette;
|
||||
|
||||
class Pcapi extends Controller{
|
||||
use traits\alinPay;
|
||||
use traits\epayPay;
|
||||
use traits\ccpayPay;
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
// CORS headers
|
||||
$origin = Request::instance()->header('origin');
|
||||
$allowed = ['https://ww1.g7g7.top','https://m.g7g7.top','https://m1.g7g7.top','https://m3.g7g7.top','https://p.g7g7.top'];
|
||||
if($origin && in_array($origin, $allowed)){
|
||||
if($origin){
|
||||
header('Access-Control-Allow-Origin: '.$origin);
|
||||
header('Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization');
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE,OPTIONS');
|
||||
header('Access-Control-Allow-Credentials: true');
|
||||
} else {
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
}
|
||||
header('Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization');
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE,OPTIONS');
|
||||
if(Request::instance()->isOptions()){
|
||||
exit();
|
||||
}
|
||||
@@ -48,9 +50,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
|
||||
public function get_version(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
return json(config('app_version'));
|
||||
}
|
||||
public function get_system_info(){
|
||||
@@ -64,9 +63,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//试玩登录
|
||||
public function demologin(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -119,9 +115,6 @@ class Pcapi extends Controller{
|
||||
|
||||
//保持在线--心跳
|
||||
public function keepOnline(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -145,9 +138,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//登录optimum
|
||||
public function login(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -207,7 +197,7 @@ class Pcapi extends Controller{
|
||||
$find['pay_channel'] = '';
|
||||
$find['pay_channel_currency'] = [];
|
||||
$find['pay_channel_coin_chain'] = [];
|
||||
if($topAgent['agent_type'] == 1){
|
||||
if($topAgent['pay_channel'] && $topAgent['pay_channel'] != 'OPR'){
|
||||
// 现金线走支付渠道
|
||||
$find['pay_channel'] = $topAgent['pay_channel'];
|
||||
$find['pay_channel_currency'] = [];
|
||||
@@ -221,7 +211,7 @@ class Pcapi extends Controller{
|
||||
$find['pay_channel_coin_chain'] = json_decode($payChannelInfo['coin_chain'],true);
|
||||
}
|
||||
}
|
||||
} elseif ($topAgent['agent_type'] == 2 && $topAgent['pay_channel'] == 'OPR') { // 人工转帐上分,前端显示充值信息
|
||||
} elseif ($topAgent['pay_channel'] == 'OPR') { // 人工转帐上分,前端显示充值信息(不依赖 agent_type,只看 pay_channel)
|
||||
$find['pay_channel'] = $topAgent['pay_channel'];
|
||||
$find['pay_channel_address'] = $topAgent['pay_channel_address'];
|
||||
}
|
||||
@@ -253,9 +243,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
// 获取用户信息
|
||||
public function get_user_info(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -283,7 +270,7 @@ class Pcapi extends Controller{
|
||||
$find['pay_channel'] = '';
|
||||
$find['pay_channel_currency'] = [];
|
||||
$find['pay_channel_coin_chain'] = [];
|
||||
if($topAgent['agent_type'] == 1){
|
||||
if($topAgent['pay_channel'] && $topAgent['pay_channel'] != 'OPR'){
|
||||
// 现金线走支付渠道
|
||||
$find['pay_channel'] = $topAgent['pay_channel'];
|
||||
$find['pay_channel_currency'] = [];
|
||||
@@ -297,6 +284,9 @@ class Pcapi extends Controller{
|
||||
$find['pay_channel_coin_chain'] = json_decode($payChannelInfo['coin_chain'],true);
|
||||
}
|
||||
}
|
||||
} elseif($topAgent['pay_channel'] == 'OPR'){ // 人工转帐上分:与 login 保持一致下发收款信息(此前 get_user_info 缺失,刷新会丢)
|
||||
$find['pay_channel'] = 'OPR';
|
||||
$find['pay_channel_address'] = $topAgent['pay_channel_address'];
|
||||
}
|
||||
$find['manager'] = [];
|
||||
if($find['bet_type'] == 2){
|
||||
@@ -322,9 +312,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//用户钱
|
||||
public function user_money(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -348,9 +335,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//修改密码
|
||||
public function update_password(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -388,9 +372,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//打赏
|
||||
public function to_tip(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -434,9 +415,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//好路
|
||||
public function good_road(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -472,9 +450,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//返回全部桌子
|
||||
public function all_table(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -1217,9 +1192,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//返回单张桌子
|
||||
public function singletable(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
// $json_arr = Request::instance()->post();
|
||||
@@ -1257,7 +1229,6 @@ class Pcapi extends Controller{
|
||||
|
||||
//桌子信息
|
||||
$table['boot_num'] = $boot['boot_num'];
|
||||
$table['boot_id'] = $boot['id'];
|
||||
$table['player_1_count'] = Db::name($numberTabTable)->where(array('table_id' => $table['id'], 'boot_id' => $boot['id'], 'win_player_1' => 1))->count();
|
||||
$table['player_2_count'] = Db::name($numberTabTable)->where(array('table_id' => $table['id'], 'boot_id' => $boot['id'], 'win_player_2' => 1))->count();
|
||||
$table['player_3_count'] = Db::name($numberTabTable)->where(array('table_id' => $table['id'], 'boot_id' => $boot['id'], 'win_player_3' => 1))->count();
|
||||
@@ -1400,7 +1371,6 @@ class Pcapi extends Controller{
|
||||
$boot = Db::name($bootTabTable)->where('table_id',$table['id'])->order('id DESC')->find();
|
||||
if($boot){
|
||||
$table['boot_num'] = $boot['boot_num'];
|
||||
$table['boot_id'] = $boot['id'];
|
||||
$table['player_1_count'] = Db::name($numberTabTable)->where(array('boot_id' => $boot['id'], 'win_player_1' => 1))->count();
|
||||
$table['player_2_count'] = Db::name($numberTabTable)->where(array('boot_id' => $boot['id'], 'win_player_2' => 1))->count();
|
||||
$table['player_3_count'] = Db::name($numberTabTable)->where(array('boot_id' => $boot['id'], 'win_player_3' => 1))->count();
|
||||
@@ -1644,7 +1614,6 @@ class Pcapi extends Controller{
|
||||
$table['bet_amount_msg']['banker_pair_amount'] = 0;
|
||||
$table['bet_amount_msg']['player_pair_amount'] = 0;
|
||||
$table['boot_num'] = $boot['boot_num'];
|
||||
$table['boot_id'] = $boot['id'];
|
||||
$table['playerCount'] = Db::name($numberTabTable)->where(array('table_id' => $table['id'], 'boot_id' => $boot['id'], 'result' => 2))->count();
|
||||
$table['tieCount'] = Db::name($numberTabTable)->where(array('table_id' => $table['id'], 'boot_id' => $boot['id'], 'result' => 3))->count();
|
||||
$table['bankerCount'] = Db::name($numberTabTable)->where(array('table_id' => $table['id'], 'boot_id' => $boot['id'], 'result' => 1))->count();
|
||||
@@ -1771,9 +1740,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//今日最佳
|
||||
public function optimum(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -1799,9 +1765,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//游戏记录
|
||||
public function get_user_bets(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -1830,8 +1793,8 @@ class Pcapi extends Controller{
|
||||
$startTime = mktime(0,0,0,date('m'),date('d')-1,date('Y'));
|
||||
$endTime = mktime(0,0,0,date('m'),date('d'),date('Y'))-1;
|
||||
}elseif($time_interval == 3){
|
||||
$startTime = mktime(0,0,0,date("m"),date("d")-date("w")+1,date("Y"));
|
||||
$endTime = mktime(23,59,59,date("m"),date("d")-date("w")+7,date("Y"));
|
||||
$startTime = mktime(0,0,0,date("m"),date("d")-6,date("Y"));
|
||||
$endTime = mktime(23,59,59,date("m"),date("d"),date("Y"));
|
||||
}
|
||||
$betWhere = array();
|
||||
$betWhere['create_time'] = array('between',[$startTime,$endTime]);
|
||||
@@ -2319,9 +2282,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//上下分记录
|
||||
public function recharge_record(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2341,8 +2301,8 @@ class Pcapi extends Controller{
|
||||
$startTime = mktime(0,0,0,date('m'),date('d')-1,date('Y'));
|
||||
$endTime = mktime(0,0,0,date('m'),date('d'),date('Y'))-1;
|
||||
}elseif($time_interval == 3){
|
||||
$startTime = mktime(0,0,0,date("m"),date("d")-date("w")+1,date("Y"));
|
||||
$endTime = mktime(23,59,59,date("m"),date("d")-date("w")+7,date("Y"));
|
||||
$startTime = mktime(0,0,0,date("m"),date("d")-6,date("Y"));
|
||||
$endTime = mktime(23,59,59,date("m"),date("d"),date("Y"));
|
||||
}
|
||||
$betWhere = array();
|
||||
$betWhere['create_time'] = array('between',[$startTime,$endTime]);
|
||||
@@ -2388,9 +2348,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//上下分记录
|
||||
public function tip_record(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2409,8 +2366,8 @@ class Pcapi extends Controller{
|
||||
$startTime = mktime(0,0,0,date('m'),date('d')-1,date('Y'));
|
||||
$endTime = mktime(0,0,0,date('m'),date('d'),date('Y'))-1;
|
||||
}elseif($time_interval == 3){
|
||||
$startTime = mktime(0,0,0,date("m"),date("d")-date("w")+1,date("Y"));
|
||||
$endTime = mktime(23,59,59,date("m"),date("d")-date("w")+7,date("Y"));
|
||||
$startTime = mktime(0,0,0,date("m"),date("d")-6,date("Y"));
|
||||
$endTime = mktime(23,59,59,date("m"),date("d"),date("Y"));
|
||||
}
|
||||
$betWhere = array();
|
||||
$betWhere['create_time'] = array('between',[$startTime,$endTime]);
|
||||
@@ -2450,9 +2407,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//开结果后获取会员的下注信息及计算其输赢数目
|
||||
public function user_bet_baccarat(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2609,9 +2563,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//开结果后获取会员的下注信息及计算其输赢数目
|
||||
public function user_bet_dt(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2700,9 +2651,6 @@ class Pcapi extends Controller{
|
||||
|
||||
//开结果后获取会员的下注信息及计算其输赢数目
|
||||
public function user_bet_nn(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2735,9 +2683,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//开结果后获取会员的下注信息及计算其输赢数目
|
||||
public function user_bet_tc(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2770,9 +2715,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//开结果后获取会员的下注信息及计算其输赢数目
|
||||
public function user_bet_toning(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2804,9 +2746,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//开结果后获取会员的下注信息及计算其输赢数目
|
||||
public function user_bet_dice(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2837,9 +2776,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
}
|
||||
public function user_bet_roulette(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2871,9 +2807,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//快速提现
|
||||
public function show_withdrawal(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2901,9 +2834,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//确认提现
|
||||
public function withdrawal(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -2984,9 +2914,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//充值信息
|
||||
public function show_recharge(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -3023,9 +2950,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//确认充值
|
||||
public function recharge(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -3082,9 +3006,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//游戏记录
|
||||
public function get_rob_bet(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -3300,9 +3221,6 @@ class Pcapi extends Controller{
|
||||
|
||||
//电话呼入
|
||||
public function online_call(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
$phone = Request::instance()->post('phone');
|
||||
if($phone){
|
||||
$table_info = Db::name('table')->where('phone',$phone)->find();
|
||||
@@ -3332,9 +3250,6 @@ class Pcapi extends Controller{
|
||||
* DateTime: 2019/12/12 12:53
|
||||
*/
|
||||
public function doRegister(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST');
|
||||
if($data = Request::instance()->post()){
|
||||
$data = decrypt_data($data);
|
||||
$username = isset($data['username'])?$data['username']:'';
|
||||
@@ -3688,9 +3603,6 @@ class Pcapi extends Controller{
|
||||
|
||||
//登录
|
||||
public function lineLogin(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -3763,9 +3675,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
|
||||
public function app_entrance(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$entrance = array();
|
||||
$entrance['HallUrl'] = HallUrl;
|
||||
@@ -3781,9 +3690,6 @@ class Pcapi extends Controller{
|
||||
}
|
||||
//api用户通过接口获取铺信息
|
||||
public function api_get_info(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$appId = intval(Request::instance()->post("appId"));
|
||||
$nonceStr = trim(Request::instance()->post("nonceStr"));
|
||||
@@ -3832,9 +3738,6 @@ class Pcapi extends Controller{
|
||||
// 用户充值记录
|
||||
public function user_recharge()
|
||||
{
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()) {
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if ($json_arr) {
|
||||
@@ -3870,9 +3773,6 @@ class Pcapi extends Controller{
|
||||
// 用户提现记录
|
||||
public function user_withdraw()
|
||||
{
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()) {
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if ($json_arr) {
|
||||
@@ -3908,9 +3808,6 @@ class Pcapi extends Controller{
|
||||
|
||||
//申请提现
|
||||
public function apply_withdraw(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -3933,7 +3830,7 @@ class Pcapi extends Controller{
|
||||
$system = Db::name('system')->find();
|
||||
$money = $user['money'];
|
||||
$withdrawMoney = empty($system['withdraw_money']) ? 100 : $system['withdraw_money'];
|
||||
$withdrawFee = empty($system['withdraw_fee']) ? 1 : $system['withdraw_fee'];
|
||||
$withdrawFee = empty($system['withdraw_fee']) ? 0 : $system['withdraw_fee'];
|
||||
|
||||
// 计算积分兑换
|
||||
$amountMoney = $withdrawMoney/100*($amount);
|
||||
@@ -3984,9 +3881,6 @@ class Pcapi extends Controller{
|
||||
|
||||
// 申请银行卡提现(越南AlinPay)
|
||||
public function apply_withdraw_bank(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr){
|
||||
@@ -4018,7 +3912,7 @@ class Pcapi extends Controller{
|
||||
$system = Db::name('system')->find();
|
||||
$money = $user['money'];
|
||||
$withdrawMoney = empty($system['withdraw_money']) ? 100 : $system['withdraw_money'];
|
||||
$withdrawFee = empty($system['withdraw_fee']) ? 1 : $system['withdraw_fee'];
|
||||
$withdrawFee = empty($system['withdraw_fee']) ? 0 : $system['withdraw_fee'];
|
||||
|
||||
// 计算积分兑换
|
||||
$amountMoney = $withdrawMoney/100*($amount);
|
||||
@@ -4080,9 +3974,6 @@ class Pcapi extends Controller{
|
||||
|
||||
// 获取越南银行列表
|
||||
public function get_bank_list_vn(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
|
||||
$banks = \pay\AlinPay::getBankCodes();
|
||||
$list = [];
|
||||
@@ -4100,9 +3991,6 @@ class Pcapi extends Controller{
|
||||
|
||||
// 取消提现
|
||||
public function cancel_withdraw(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr) {
|
||||
@@ -4158,9 +4046,6 @@ class Pcapi extends Controller{
|
||||
*/
|
||||
public function deposit()
|
||||
{
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr) {
|
||||
@@ -4222,9 +4107,6 @@ class Pcapi extends Controller{
|
||||
*/
|
||||
public function get_free_seat(){
|
||||
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE');
|
||||
if(Request::instance()->isPost()){
|
||||
$json_arr = decrypt_data(Request::instance()->post());
|
||||
if($json_arr) {
|
||||
@@ -4266,11 +4148,6 @@ class Pcapi extends Controller{
|
||||
* 无需鉴权,游客可访问
|
||||
*/
|
||||
public function get_lobby_data(){
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, Authorization");
|
||||
header('Access-Control-Allow-Methods: POST,GET,PUT,DELETE,OPTIONS');
|
||||
header('Access-Control-Max-Age: 86400');
|
||||
|
||||
// 处理 OPTIONS 预检请求
|
||||
if(Request::instance()->isOptions()){
|
||||
return response('', 200);
|
||||
|
||||
Reference in New Issue
Block a user