qiaowei | f044a74 | 2019-07-10 16:04:20 +0800 | [diff] [blame^] | 1 | var app = { |
| 2 | |
| 3 | // Application Constructor |
| 4 | initialize: function() { |
| 5 | document.addEventListener('deviceready', this.onDeviceReady.bind(this), false); |
| 6 | }, |
| 7 | |
| 8 | onDeviceReady: function() { |
| 9 | $.showLoading("加载中"); |
| 10 | V1Cardinfor(function(ok, ret, err) { |
| 11 | if (ok) { |
| 12 | $.hideLoading(); |
| 13 | if(ret.code==200){ |
| 14 | $("#name").text(ret.name); |
| 15 | $("#cardnum").text(ret.cardno); |
| 16 | $("#cardstatus").text(ret.cardstatus); |
| 17 | }else{ |
| 18 | $.alert(ret.msg, "错误"); |
| 19 | } |
| 20 | } else { |
| 21 | $.hideLoading(); |
| 22 | $.alert("加载失败了:" + ret.status, "错误"); |
| 23 | } |
| 24 | }) |
| 25 | } |
| 26 | }; |
| 27 | app.initialize(); |