2017-04-10 6 views
0

ログイン画面でイオンアプリを使用しています。私は正しいユーザー名とパスワードを入力すると、それは私のPCのクロムで正常に動作します。 、私は自分の携帯電話のブラウザ/クロムを使用してWebサービスを見ることができますアプリのログインはChromeでは動作しますが、デバイスでは動作しません

$scope.enterlogin = function(usern,pass) 
{ 
    var config = { 
     params: { uname: usern, passw: pass } 
    } 

    var url = 'http://xx.xx.x.xxx/UserService3/WebService1.asmx'; 
    $http.get(url + '/getUserbyUsername' + '?uname=' + usern + '&passw=' + pass).success(function(response) { 
    // stuff 
     console.log('response is = ' + JSON.stringify(response)); 
     if(response['IsExisting'] == null) 
     { 
      console.log('null existing = ' + response['IsExisting']); 
      alert('Please check your credentials. Account does not exist.'); 
     } 
     else 
     { 
      console.log('not null existing = ' + response['IsExisting']); 
      sharedProperties3.setUserID(response['UserID']); 
      console.log('setuserid = ' + sharedProperties3.getUserID()); 

      $scope.hide(); 
      if($window.localStorage.getItem('has_run') == '') 
      { 
       //do some stuff if has not loaded before 
       $window.localStorage.setItem('has_run', 'true'); 
       $state.go('helpExtra'); 
      } 
      else 
      { 
       $scope.hide(); 
       $state.go('menu.mainMenu'); 
      } 

     } 
    }) 
    .error(function(response) { 
    // error stuff 
     console.log('response error is = ' + response); 
    }); 

Failed to load resource: the server responded with a status of 404 (Not Found) controllers.js:130 response error is = 

ここに私のコードはcontroller.jsのためだ:私は、デバイスで同じことをするとき、それは次のエラーを与えますホワイトリストプラグインをインストールしてindex.htmlファイルに追加しました:

meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'" 

何が問題になりますか?

+0

は、パス正しいですか? –

+0

@RohithKDパス? –

+0

@RohithKDはい、私はpcのクロムを使ってログインできます。 –

答えて

0

私は、config.xmlファイルにこれを追加しました:

<access origin="*" /> 
関連する問題