|
|
|
@ -303,6 +303,19 @@ function getJsonExt(url) {
|
|
|
|
|
$.getJSON(url, function (result) {
|
|
|
|
|
console.log(result);
|
|
|
|
|
app.dialog.close();
|
|
|
|
|
if (result.code === 0) {
|
|
|
|
|
if (result.type === 0) {
|
|
|
|
|
if (result.format === 1) {
|
|
|
|
|
console.log('format/1/base64 jpeg image');
|
|
|
|
|
$('#callback .page-content .block').html('<img class="shot" src="' + result.data + '">');
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
console.log('format/0/json object');
|
|
|
|
|
$('#callback .page-content .block').html(result.data);
|
|
|
|
|
}
|
|
|
|
|
app.popup.open('#callback');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).fail(function () {
|
|
|
|
|
console.log('error');
|
|
|
|
|
app.dialog.close();
|
|
|
|
@ -316,6 +329,7 @@ connection.on('Connected', function (id) {
|
|
|
|
|
connectionId = id;
|
|
|
|
|
});
|
|
|
|
|
connection.on('ApiResult', function (result) {
|
|
|
|
|
result = JSON.parse(result);
|
|
|
|
|
if (result.code === 0) {
|
|
|
|
|
if (result.type === 0) {
|
|
|
|
|
if (result.format === 1) {
|
|
|
|
|