Commit d0b3719b by dawei

feat: 火箭

parent e1b1675d
Showing with 54 additions and 1 deletions
...@@ -314,6 +314,7 @@ $(function(){ ...@@ -314,6 +314,7 @@ $(function(){
$(".layer-yes2-p3 .layer-yes2-txt1").text("Initial DEWs") $(".layer-yes2-p3 .layer-yes2-txt1").text("Initial DEWs")
$(".layer-yes2-p4 .layer-yes2-txt1").text('My victory multiplier') $(".layer-yes2-p4 .layer-yes2-txt1").text('My victory multiplier')
} }
var gameDateId = new Date().getTime()
var hot=null var hot=null
var boomTime=null var boomTime=null
var nowExplose=true; var nowExplose=true;
...@@ -595,7 +596,21 @@ $(function(){ ...@@ -595,7 +596,21 @@ $(function(){
$(".num-box-p2").removeClass('n0 n1 n2 n3 n4 n5 n6 n7 n8 n9').addClass('n'+numArr[1]+'') $(".num-box-p2").removeClass('n0 n1 n2 n3 n4 n5 n6 n7 n8 n9').addClass('n'+numArr[1]+'')
$(".go-btn").unbind("click").on("click",function(){ $(".go-btn").unbind("click").on("click",function(){
bet(sessionStorage.gameId,betType)
if(url_get_params().isAllowDialog == 1 && url_get_params().appversion >= 7620){
var obj = {
"cid": 48,
"reqCode": gameDateId,
"data": {
"msg": "用戶協議",
"type": 0, //遊戲
}
}
var obj2 = JSON.stringify(obj);
appCollaboration(obj2);
} else {
goBetCallBack()
}
}) })
} }
...@@ -931,6 +946,44 @@ $(function(){ ...@@ -931,6 +946,44 @@ $(function(){
} }
}) })
} }
function goBetCallBack() {
bet(sessionStorage.gameId,betType)
}
function appCollaboration(msg) {
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
var bIsMidp = sUserAgent.match(/midp/i) == "midp";
var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
var bIsAndroid = sUserAgent.match(/android/i) == "android";
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
}
else if (bIsAndroid) {
window.yazhai.appCollaboration(msg);
} else if (bIsIphoneOs || bIsIpad) {
window.webkit.messageHandlers.appCollaboration.postMessage(msg);
}
}
/* 客戶端回調 */
function appCallback(msg) {
let binaryString = atob(msg);
let obj = JSON.parse(binaryString);
let objStr = JSON.stringify(obj)
// layer.msg(`客戶端回調:${objStr},${app.betId}`)
if(obj.reqCode == gameDateId && obj.isAllagree == 1 && obj.type == 0) {
// layer.msg('客戶端回調成功')
goBetCallBack()
} else {
console.log(`客戶端回調失敗:${objStr},${app.betId}`)
layer.msg('請稍後重試')
}
}
}) })
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment