|
|
@ -30,6 +30,16 @@ class ExchangeController extends BaseController{
|
|
|
|
|
|
|
|
|
|
|
|
$request = json_decode(base64_decode(file_get_contents("php://input")),true);
|
|
|
|
$request = json_decode(base64_decode(file_get_contents("php://input")),true);
|
|
|
|
$request = SafeFilter($request);
|
|
|
|
$request = SafeFilter($request);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$role = M("user_play_info", "tab_")->where([
|
|
|
|
|
|
|
|
'user_id' => $request['user_id'],
|
|
|
|
|
|
|
|
'game_id' => $request['game_id'],
|
|
|
|
|
|
|
|
'server_id' => $request['server_id']
|
|
|
|
|
|
|
|
])->find();
|
|
|
|
|
|
|
|
if (!$role || !$role['role_id']) {
|
|
|
|
|
|
|
|
$this->set_message(0,"fail","未上传角色,不允许充值");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
M("pay_info", "tab_")->add([
|
|
|
|
M("pay_info", "tab_")->add([
|
|
|
|
'user_id' => $request['user_id'],
|
|
|
|
'user_id' => $request['user_id'],
|
|
|
|
'game_id' => $request['game_id'],
|
|
|
|
'game_id' => $request['game_id'],
|
|
|
|