You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
810 B
PHTML

5 years ago
<?php
namespace Sdk\Controller;
use Think\Controller;
use Common\Api\GameApi;
/**
* 支付游戏回调控制器
* @author 小纯洁
*/
class LoginNotifyController extends Controller {
/**
*服务器登录验证
*/
public function login_verify(){
$request = json_decode(file_get_contents("php://input"),true);
if (empty($request)) {
echo json_encode(array('status'=>1066,'msg'=>'数据异常'));exit();
}
$user = M("user","tab_")->find($request['user_id']);
if($request['token'] == $user['token']){
echo json_encode(array('status'=>200,'user_id'=>$user['id'],"user_account"=>$user['account']));exit();
}else{
echo json_encode(array('status'=>1003,'msg'=>'token验证失败'));exit();
}
}
}