blob: 7c6e8f81972827fd15bfead914c899976b436dfd [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 })
guangchao.xu5f13fea2020-07-16 10:35:20 +080037 $("#moreBtn8").click(function(){ //考勤记录
qiaowei98635db2020-06-28 17:41:21 +080038 //window.location = "more.html";
39 //showRet("https://yy.dlsmk.cn/wisdompolice/app/doorappindex?custid="+userid);
guangchao.xu5f13fea2020-07-16 10:35:20 +080040 showRet("https://yy.dlsmk.cn/wisdompolice/app/attedtl?custid="+userid);
qiaowei98635db2020-06-28 17:41:21 +080041 })
guangchao.xu5f13fea2020-07-16 10:35:20 +080042 $("#moreBtn9").click(function(){ //会议记录
43 //window.location = "more.html";
44 //showRet("https://yy.dlsmk.cn/wisdompolice/app/doorappindex?custid="+userid);
guangchao.xub11a35b2020-07-17 16:56:37 +080045 showRet("https://yy.dlsmk.cn/wisdompolice/app/conference/conferencedtl?userId="+userid);
guangchao.xu5f13fea2020-07-16 10:35:20 +080046 })
guangchao.xub11a35b2020-07-17 16:56:37 +080047 $("#moreBtn2").click(function(){ //会议
qiaowei98635db2020-06-28 17:41:21 +080048 //window.location = "more.html";
49 //showRet("https://yy.dlsmk.cn/wisdompolice/app/doorappindex?custid="+userid);
guangchao.xub11a35b2020-07-17 16:56:37 +080050 showRet("https://yy.dlsmk.cn/wisdompolice/app/conference/signupconference?userId="+userid);
qiaowei98635db2020-06-28 17:41:21 +080051 })
52
qiaoweibd656ad2020-06-11 15:12:03 +080053 },
54
55};
56app.initialize();
57
58function showRet(url) {
59 if(isEmpty(url)){
60 return;
61 }
62 var userid = window.localStorage.getItem("userid");
63 //if (url.indexOf("yy.dlsmk.cn")>=0) {
64 if(url.indexOf("?")>0){
65 url=url+'&userid='+userid;
66 }else{
67 url=url+'?userid='+userid;
68 }
69 //}
70 console.log(url)
71 var inAppBrowserRef = cordova.ThemeableBrowser.open(url, '_blank', {
72 statusbar: {
73 color: '#03a9f4ff'
74 },
75 toolbar: {
76 height: 44,
77 color: '#03a9f4ff'
78 },
79 title: {
80 color: '#ffffffff',
81 showPageTitle: true
82 },
83 backButton: {
84 wwwImage: 'img/back.png',
85 wwwImagePressed: 'img/back.png',
86 align: 'left',
87 event: 'backPressed'
88 },
89 backButtonCanClose: true
90 }).addEventListener('backPressed', function(e) {
91 //alert('back pressed');
92 }).addEventListener('closePressed', function(e) {
93 //alert('closePressed pressed');
94 inAppBrowserRef.close();
95 window.location = "main.html"
96 });
97 }