heyang преди 3 години
родител
ревизия
d3caa841f3
променени са 1 файла, в които са добавени 7 реда и са изтрити 14 реда
  1. 7 14
      microserviceUserH5/vcloud/activationCode.html

+ 7 - 14
microserviceUserH5/vcloud/activationCode.html

@@ -47,7 +47,7 @@
 		toastr.options.timeOut = '1500';
 	</script>
 	<script type="text/javascript">
-        var baseUrl = 'https://per.cs.se.androidscloud.com/'
+        // var baseUrl = 'http://14.215.128.96/'
 	    let timer,flag = true;
 		var url = window.location.href;
 		url = url.split('/')
@@ -63,19 +63,12 @@
 		}
 		//点击试玩
 		$('.try-play')[0].addEventListener('click',()=>{
+			//是否有token
+			let type = id === ''? 'noToken': 'com.xjro.yy';
 			if (isAndroid) {
-				//是否有token
-				if(id === ''){
-					window.native.tokenJudge('noToken');
-				}else{
-					window.native.toGame('com.xjro.yy');
-				}
+				window.native.toGame(type);
             }else if(isiOS){
-				if(id === ''){
-					window.webkit.messageHandlers.tokenJudge.postMessage('noToken');
-				}else{
-					window.webkit.messageHandlers.getPackageName.postMessage('com.xjro.yy');
-				}
+				window.webkit.messageHandlers.getPackageName.postMessage(type);
 			}else{
 				stopManyClick(() =>{
 					toastr.error('暂不支持当前系统')
@@ -117,10 +110,10 @@
 		function getActivationCode(){
 			//是否有token
 			if (isAndroid && id === '') {
-				window.native.tokenJudge('noToken');
+				window.native.toGame('noToken');
 				return 
             }else if(isiOS && id === ''){
-				window.webkit.messageHandlers.tokenJudge.postMessage('noToken');
+				window.webkit.messageHandlers.getPackageName.postMessage('noToken');
 				return
 			}
 			$.ajax({