|
@@ -56,37 +56,11 @@
|
|
|
n2 = loc.indexOf("="),//取得=号的位置
|
|
|
id = loc.substr(n2 + 1, n1 - n2);//从=号后面的内容
|
|
|
operate(3);
|
|
|
- //激活码
|
|
|
- $.ajax({
|
|
|
- url: baseUrl + '/api/public/v1/game/activationCode',
|
|
|
- type: 'get',
|
|
|
- headers: {
|
|
|
- 'Authorization': id //id
|
|
|
- },
|
|
|
- contentType: "application/json",
|
|
|
- dataType: 'json',
|
|
|
- cache: false,
|
|
|
- success: function (res) {
|
|
|
- $('#copy-code').text(res.data)
|
|
|
- },
|
|
|
- })
|
|
|
- //试玩url
|
|
|
- $.ajax({
|
|
|
- url: baseUrl + '/api/public/v1/game/url',
|
|
|
- type: 'get',
|
|
|
- headers: {
|
|
|
- 'Authorization': id //id
|
|
|
- },
|
|
|
- contentType: "application/json",
|
|
|
- dataType: 'json',
|
|
|
- cache: false,
|
|
|
- success: function (res) {
|
|
|
- $('.try-play')[0].addEventListener('click',()=>{
|
|
|
- window.location.href = !res.data.includes('http')?'http://' + res.data: res.data;
|
|
|
- operate(5);
|
|
|
- },false);
|
|
|
- },
|
|
|
- })
|
|
|
+ //点击试玩
|
|
|
+ $('.try-play')[0].addEventListener('click',()=>{
|
|
|
+ window.webkit.messageHandlers.getMessage.postMessage('appkey')
|
|
|
+ operate(5);
|
|
|
+ },false);
|
|
|
//埋点
|
|
|
function operate(accessType){
|
|
|
$.ajax({
|
|
@@ -113,6 +87,23 @@
|
|
|
$('.dialog').animate({top: '4.36rem'},"fast");
|
|
|
$('.mask').show();
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
+ getActivationCode();
|
|
|
+ }
|
|
|
+ //激活码
|
|
|
+ function getActivationCode(){
|
|
|
+ $.ajax({
|
|
|
+ url: baseUrl + '/api/public/v1/game/activationCode',
|
|
|
+ type: 'get',
|
|
|
+ headers: {
|
|
|
+ 'Authorization': id //id
|
|
|
+ },
|
|
|
+ contentType: "application/json",
|
|
|
+ dataType: 'json',
|
|
|
+ cache: false,
|
|
|
+ success: function (res) {
|
|
|
+ $('#copy-code').text(res.data)
|
|
|
+ },
|
|
|
+ })
|
|
|
}
|
|
|
$('.close')[0].addEventListener('click',handleClose,false);
|
|
|
$('.close-text')[0].addEventListener('click',handleClose,false);
|