-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Page Title</title> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" /> | ||
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> | ||
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script> | ||
</head> | ||
<body> | ||
|
||
<div data-role="page"> | ||
|
||
<div data-role="header"> | ||
<h1>detalle de venta</h1> | ||
</div><!-- /header --> | ||
|
||
<div data-role="content"> | ||
<ul data-role="listview" data-inset="true" id="lista"> | ||
|
||
</ul> | ||
<script> | ||
$(document).ready(function() { | ||
$.ajax({ | ||
url: 'http://iworld.ingehost.cl/movil/detalleventa/2?format=json', | ||
type: 'GET', | ||
dataType: 'json', | ||
success: function(data) { | ||
$('#formaDePago').text(data.formaDePago); | ||
$('#total').text(data.total); | ||
$('#vendedor').text(data.vendedor); | ||
|
||
}, | ||
error: function() { alert('no se puedo!'); }, | ||
beforeSend: setHeader | ||
}); | ||
}); | ||
|
||
function setHeader(xhr) { | ||
xhr.setRequestHeader('Authorization', 'Token 89c44636e3f071baa0f67fe4964e6ae244d0fad7'); | ||
} | ||
</script> | ||
|
||
<h2> | ||
Detalle venta | ||
</h2> | ||
<div class="ui-grid-a"> | ||
<div class="ui-block-a"> | ||
Forma de Pago: | ||
</div> | ||
<div class="ui-block-b" id="formaDePago"> | ||
</div> | ||
<div class="ui-block-a"> | ||
Total: | ||
</div> | ||
<div class="ui-block-b"id="total"> | ||
</div> | ||
<div class="ui-block-a"> | ||
Vendedor | ||
</div> | ||
<div class="ui-block-b"id="vendedor"> | ||
</div> | ||
</div> | ||
<h2> | ||
Productos | ||
</h2> | ||
<ul data-role="listview" data-divider-theme="b" data-inset="true"> | ||
<li data-theme="c"> | ||
<a href="#" data-transition="slide"> | ||
Button | ||
</a> | ||
</li> | ||
</ul> | ||
</div><!-- /content --> | ||
|
||
<div data-role="footer"> | ||
<h4>Page Footer</h4> | ||
</div><!-- /footer --> | ||
</div><!-- /page --> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5//EN" | ||
"http://www.w3.org/TR/html5/html5.dtd" | ||
> | ||
<html lang="en"> | ||
<head> | ||
|
||
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | ||
<title>test token></title> | ||
</head> | ||
<body> | ||
<!-- Insert your content here --> | ||
<script> | ||
$.ajax({ | ||
|
||
url: 'http://iworld.ingehost.cl/api-loggin/', | ||
data: {username: "admin", password: "admin" }, | ||
type: 'post', | ||
crossDomain: true, | ||
dataType: 'json', | ||
success: function(data) { alert("token: " +data.token); }, | ||
error: function() { alert('Failed!'); }, | ||
|
||
});</script> | ||
</body> | ||
</html> |