Phonegap Ajax不返回任何内容

i have tried to make a login in Phonegap and tried to connect it to my DB

it works when i use 'postman'

it alerts the correct email + password combi it alerts an empty string it logs and empty object

what am i doing wrong ? as im getting a reponse from the server but empty, it seems like my parameters are not getting transfered correctly

$("#submit").click(function() {
    var email = $("#username").val();
    var password = $("#password").val();
    if (email == '' || password == '') {

    } else {
        $.ajax({
            type: 'GET',
            url: 'http://xxxxx.php',
            crossDomain: true,
            data: {
                email: 'email',
                password: 'password'
            },
            dataType: 'json',
            success: function(JSONObject) {
                alert(email + password);
                alert(JSON.stringify(JSONObject));
                console.log(JSONObject);

            },
            error: function() {
                //console.error("error");
                alert('Not working!');
            }
        });
    }
});

login.php

<?php


 //Importing Database Script 
 require_once('dbConnect.php');

 //GETS
 $email=$_GET['email'];
 $pass=$_GET['password'];




 //Creating sql query
 $sql = "SELECT * FROM `customerdata` WHERE customerNo = '$email' AND customerName = '$pass'"; 


 //getting results
 mysqli_set_charset($con,'utf8');
 $r = mysqli_query($con,$sql);  

 //creating a blank array 
 $result = array();


 //looping through all the records fetched
 while($row = mysqli_fetch_array($r)){

 //Pushing information in the blank array created ID, deviceID, terminalnumber, qrcode, cloakroomsection, cloakroomnumber, delivered, collected
 array_push($result,array(

 "customerName"=>$row['customerName'],
 "customerNo"=>$row['customerNo']
 ));
 }



 //$finalresult= array();
 //$finalresult['1'] = $result;


 //Displaying the array in json format 
 echo json_encode($result);


 //echo json_encode($encoded_rows);
 mysqli_close($con);

 ?>

Just try the below code.

  header('Access-Control-Allow-Origin: *');
  header('Access-Control-Allow-Methods: GET, POST');  
//Importing Database Script 
  require_once('dbConnect.php');

//GETS
  $email=$_GET['email'];
  $pass=$_GET['password'];




//Creating sql query
  $sql = "SELECT * FROM `customerdata` WHERE customerNo = '$email' AND customerName = '$pass'"; 


 //getting results
   mysqli_set_charset($con,'utf8');
   $r = mysqli_query($con,$sql);  

 //creating a blank array 
   $result = array();


 //looping through all the records fetched
 while($row = mysqli_fetch_array($r)){

 //Pushing information in the blank array created ID, deviceID, terminalnumber, qrcode, cloakroomsection, cloakroomnumber, delivered, collected
        array_push($result,array(
        "customerName"=>$row['customerName'],
        "customerNo"=>$row['customerNo']
        ));
 }



  //$finalresult= array();
 //$finalresult['1'] = $result;

    mysqli_close($con);
    header('content-type: application/json; charset=utf-8');

 //Displaying the array in json format 
 echo json_encode($result);


 //echo json_encode($encoded_rows);

 ?>

In addition to Hamza Dairywala reponse Access-Control-Allow-Origin and content-rype headers, make sure that into your config.xml is added Whitelist plugin and set access to * like this:

<access origin="*"/>
<plugin name="cordova-plugin-whitelist" spec="~1.3.0"/>