blob: bd4cc2ae8c777e207a525921b770f42eb3f8c6af [file] [log] [blame]
qiaoweibd656ad2020-06-11 15:12:03 +08001var app = {
2
3 // Application Constructor
4 initialize: function() {
5 document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
6 },
7
8 onDeviceReady: function() {
9 var userid = window.localStorage.getItem("userid");
10 $('#moreBtn3').click(function() {
11 window.location = "bill.html";
12 });
13 $("#moreBtn1").click(function(){
14 //window.location = "more.html";
qiaowei98635db2020-06-28 17:41:21 +080015 showRet("https://yy.dlsmk.cn/wisdompolice/app/atte/addindex?custid="+userid);
qiaoweibd656ad2020-06-11 15:12:03 +080016 })
qiaowei0d9c0cd2020-06-24 16:27:18 +080017 $("#moreBtn4").click(function(){
18 //window.location = "more.html";
19 //showRet("https://yy.dlsmk.cn/wisdompolice/app/doorappindex?custid="+userid);
qiaowei98635db2020-06-28 17:41:21 +080020 showRet("https://yy.dlsmk.cn/wisdompolice/app/atte/clockindex?custid="+userid);
qiaowei0d9c0cd2020-06-24 16:27:18 +080021 })
22 $("#moreBtn5").click(function(){
23 //window.location = "more.html";
24 //showRet("https://yy.dlsmk.cn/wisdompolice/app/doorappindex?custid="+userid);
qiaowei98635db2020-06-28 17:41:21 +080025 showRet("https://yy.dlsmk.cn/wisdompolice/app/atte/reviewindex?custid="+userid);
qiaowei0d9c0cd2020-06-24 16:27:18 +080026 })
qiaowei98635db2020-06-28 17:41:21 +080027 $("#moreBtn6").click(function(){
28 //window.location = "more.html";
29 //showRet("https://yy.dlsmk.cn/wisdompolice/app/doorappindex?custid="+userid);
30 showRet("https://yy.dlsmk.cn/wisdompolice/app/atte/reviewClock?custid="+userid);
31 })
32 $("#moreBtn7").click(function(){
33 //window.location = "more.html";
34 //showRet("https://yy.dlsmk.cn/wisdompolice/app/doorappindex?custid="+userid);
35 showRet("https://yy.dlsmk.cn/wisdompolice/app/doordtl?custid="+userid);
36 })
37 $("#moreBtn8").click(function(){
38 //window.location = "more.html";
39 //showRet("https://yy.dlsmk.cn/wisdompolice/app/doorappindex?custid="+userid);
40 showRet("https://yy.dlsmk.cn/wisdompolice/app/doordtl?custid="+userid);
41 })
42 $("#moreBtn2").click(function(){
43 //window.location = "more.html";
44 //showRet("https://yy.dlsmk.cn/wisdompolice/app/doorappindex?custid="+userid);
45 showRet("https://yy.dlsmk.cn/wisdompolice/app/conference/attendconference?custid="+userid);
46 })
47
qiaoweibd656ad2020-06-11 15:12:03 +080048 },
49
50};
51app.initialize();
52
53function showRet(url) {
54 if(isEmpty(url)){
55 return;
56 }
57 var userid = window.localStorage.getItem("userid");
58 //if (url.indexOf("yy.dlsmk.cn")>=0) {
59 if(url.indexOf("?")>0){
60 url=url+'&userid='+userid;
61 }else{
62 url=url+'?userid='+userid;
63 }
64 //}
65 console.log(url)
66 var inAppBrowserRef = cordova.ThemeableBrowser.open(url, '_blank', {
67 statusbar: {
68 color: '#03a9f4ff'
69 },
70 toolbar: {
71 height: 44,
72 color: '#03a9f4ff'
73 },
74 title: {
75 color: '#ffffffff',
76 showPageTitle: true
77 },
78 backButton: {
79 wwwImage: 'img/back.png',
80 wwwImagePressed: 'img/back.png',
81 align: 'left',
82 event: 'backPressed'
83 },
84 backButtonCanClose: true
85 }).addEventListener('backPressed', function(e) {
86 //alert('back pressed');
87 }).addEventListener('closePressed', function(e) {
88 //alert('closePressed pressed');
89 inAppBrowserRef.close();
90 window.location = "main.html"
91 });
92 }