diff --git a/src/main/resources/templates/activity/mondelay/mondelay.html b/src/main/resources/templates/activity/mondelay/mondelay.html index d2350f0ff..6cf9c91e8 100644 --- a/src/main/resources/templates/activity/mondelay/mondelay.html +++ b/src/main/resources/templates/activity/mondelay/mondelay.html @@ -124,13 +124,10 @@ if(operation_pause){ return; } - var u = navigator.userAgent; - var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); - if(is_weixin()){ - + return; } else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { - appCmd('{\"type\":\"cmd_join_mondelay\"'); + window.webkit.messageHandlers.appCmd.postMessage({type:'cmd_join_mondelay'}); } else if (/(Android)/i.test(navigator.userAgent)) { android.appCmd('{\"type\":\"cmd_join_mondelay\"}'); } else { @@ -141,18 +138,16 @@ if(operation_pause){ return; } - var u = navigator.userAgent; - var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); - if(is_weixin()){ - + return; } else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { - appCmd('{\"type\":\"cmd_cancel_mondelay\"'); + window.webkit.messageHandlers.appCmd.postMessage({type:'cmd_cancel_mondelay'}); } else if (/(Android)/i.test(navigator.userAgent)) { android.appCmd('{\"type\":\"cmd_cancel_mondelay\"}'); } else { } + }); }) \ No newline at end of file