Commit 79bb3d4c by dabai

ios 下载修改

parent e8a57e0e
......@@ -80,17 +80,17 @@
<script type="text/javascript">
function url_get_params() {
var url = location.href;
var theRequest = new Object();
if(url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for(var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
var url = location.href;
var theRequest = new Object();
if(url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for(var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
return theRequest;
}
if( url_get_params().icid!=undefined){
var params = url_get_params().icid.replace(/(^\s*)|(\s*$)/g, "");
......@@ -103,10 +103,10 @@
if(params != undefined && params.length>0){
//定义设备号
if(params.substring(0,3) == 'ios'){
iosData = params;
iosData = 'iosfts'+params.substring(3,params.length);
andoridData = params.substring(3,params.length);
} else {
iosData = 'ios'+params;
iosData = 'iosfts'+params;
andoridData = params;
}
} else {
......@@ -115,57 +115,30 @@
}
console.log(iosData,andoridData)
var clickFlag = true;
var ua = window.navigator.userAgent.toLowerCase();
if(/iphone|ipad|ipod/.test(ua)){
var data = {
icid:iosData
}
if(iosData.indexOf('iosftscps')>-1){
new OpenInstall({
appKey: "dzxj4c",
preferWakeup: true,
mask: function () {
return '<div id="openinstall_shadow" class="shadow-img"><img src="images/share-img.png" alt=""></div>'
},
onready: function () {
var m = this, button = document.getElementById("iosDown");
m.schemeWakeup();
button.onclick = function () {
m.wakeupOrInstall();
return false;
}
return false;
}
}, data);
} else {
new OpenInstall({
appKey: "dzxj4c",
preferWakeup: true,
mask: function () {
return '<div id="openinstall_shadow" class="shadow-img"><img src="images/share-img.png" alt=""></div>'
},
onready: function () {
var m = this, button = document.getElementById("iosDown");
m.schemeWakeup();
setTimeout(function () {
m.wakeupOrInstall();
},2000)
button.onclick = function () {
m.wakeupOrInstall();
return false;
}
return false;
}
}, data);
}
var button = document.getElementById("iosDown");
button.onclick = function () {
if(clickFlag){
clickFlag = false;
copyText(iosData);
}
setTimeout(function () {
window.location.href = 'https://apps.apple.com/us/app/footseen-random-video-chat-app/id1491129400';
},1000)
}
} else {
setTimeout(function(){
toDown();
$('.iosDown').on('click',function(){
toDown();
})
},800)
$('.iosDown').on('click',function(){
toDown();
})
}
function toDown(){
......@@ -191,6 +164,27 @@
function add0(m) {
return m < 10 ? '0' + m + "" : m + ""
}
function copyText(text) {
var textarea = document.createElement("textarea");
var currentFocus = document.activeElement;
document.body.appendChild(textarea);
textarea.value = text;
textarea.focus();
if (textarea.setSelectionRange)
textarea.setSelectionRange(0, textarea.value.length);
else
textarea.select();
try {
var flag = document.execCommand("copy");
} catch(eo){
var flag = false;
}
document.body.removeChild(textarea);
currentFocus.focus();
return flag;
}
</script>
</html>
......@@ -65,17 +65,17 @@
<script type="text/javascript">
function url_get_params() {
var url = location.href;
var theRequest = new Object();
if(url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for(var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
var url = location.href;
var theRequest = new Object();
if(url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for(var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
return theRequest;
}
if( url_get_params().icid!=undefined){
var params = url_get_params().icid.replace(/(^\s*)|(\s*$)/g, "");
......@@ -88,10 +88,10 @@
if(params != undefined && params.length>0){
//定义设备号
if(params.substring(0,3) == 'ios'){
iosData = params;
iosData = 'iosfts'+params.substring(3,params.length);
andoridData = params.substring(3,params.length);
} else {
iosData = 'ios'+params;
iosData = 'iosfts'+params;
andoridData = params;
}
} else {
......@@ -100,57 +100,30 @@
}
console.log(iosData,andoridData)
var clickFlag = true;
var ua = window.navigator.userAgent.toLowerCase();
if(/iphone|ipad|ipod/.test(ua)){
var data = {
icid:iosData
}
if(iosData.indexOf('iosftscps')>-1){
new OpenInstall({
appKey: "dzxj4c",
preferWakeup: true,
mask: function () {
return '<div id="openinstall_shadow" class="shadow-img"><img src="images/share-img.png" alt=""></div>'
},
onready: function () {
var m = this, button = document.getElementById("iosDown");
m.schemeWakeup();
button.onclick = function () {
m.wakeupOrInstall();
return false;
}
return false;
}
}, data);
} else {
new OpenInstall({
appKey: "dzxj4c",
preferWakeup: true,
mask: function () {
return '<div id="openinstall_shadow" class="shadow-img"><img src="images/share-img.png" alt=""></div>'
},
onready: function () {
var m = this, button = document.getElementById("iosDown");
m.schemeWakeup();
setTimeout(function () {
m.wakeupOrInstall();
},2000)
button.onclick = function () {
m.wakeupOrInstall();
return false;
}
return false;
}
}, data);
}
var button = document.getElementById("iosDown");
button.onclick = function () {
if(clickFlag){
clickFlag = false;
copyText(iosData);
}
setTimeout(function () {
window.location.href = 'https://apps.apple.com/us/app/footseen-random-video-chat-app/id1491129400';
},1000)
}
} else {
setTimeout(function(){
toDown();
$('.iosDown').on('click',function(){
toDown();
})
},800)
$('.iosDown').on('click',function(){
toDown();
})
}
function toDown(){
......@@ -176,6 +149,27 @@
function add0(m) {
return m < 10 ? '0' + m + "" : m + ""
}
function copyText(text) {
var textarea = document.createElement("textarea");
var currentFocus = document.activeElement;
document.body.appendChild(textarea);
textarea.value = text;
textarea.focus();
if (textarea.setSelectionRange)
textarea.setSelectionRange(0, textarea.value.length);
else
textarea.select();
try {
var flag = document.execCommand("copy");
} catch(eo){
var flag = false;
}
document.body.removeChild(textarea);
currentFocus.focus();
return flag;
}
</script>
</html>
......@@ -65,17 +65,17 @@
<script type="text/javascript">
function url_get_params() {
var url = location.href;
var theRequest = new Object();
if(url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for(var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
var url = location.href;
var theRequest = new Object();
if(url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for(var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
return theRequest;
}
if( url_get_params().icid!=undefined){
var params = url_get_params().icid.replace(/(^\s*)|(\s*$)/g, "");
......@@ -88,10 +88,10 @@
if(params != undefined && params.length>0){
//定义设备号
if(params.substring(0,3) == 'ios'){
iosData = params;
iosData = 'iosfts'+params.substring(3,params.length);
andoridData = params.substring(3,params.length);
} else {
iosData = 'ios'+params;
iosData = 'iosfts'+params;
andoridData = params;
}
} else {
......@@ -100,57 +100,30 @@
}
console.log(iosData,andoridData)
var clickFlag = true;
var ua = window.navigator.userAgent.toLowerCase();
if(/iphone|ipad|ipod/.test(ua)){
var data = {
icid:iosData
}
if(iosData.indexOf('iosftscps')>-1){
new OpenInstall({
appKey: "dzxj4c",
preferWakeup: true,
mask: function () {
return '<div id="openinstall_shadow" class="shadow-img"><img src="images/share-img.png" alt=""></div>'
},
onready: function () {
var m = this, button = document.getElementById("iosDown");
m.schemeWakeup();
button.onclick = function () {
m.wakeupOrInstall();
return false;
}
return false;
}
}, data);
} else {
new OpenInstall({
appKey: "dzxj4c",
preferWakeup: true,
mask: function () {
return '<div id="openinstall_shadow" class="shadow-img"><img src="images/share-img.png" alt=""></div>'
},
onready: function () {
var m = this, button = document.getElementById("iosDown");
m.schemeWakeup();
setTimeout(function () {
m.wakeupOrInstall();
},2000)
button.onclick = function () {
m.wakeupOrInstall();
return false;
}
return false;
}
}, data);
}
var button = document.getElementById("iosDown");
button.onclick = function () {
if(clickFlag){
clickFlag = false;
copyText(iosData);
}
setTimeout(function () {
window.location.href = 'https://apps.apple.com/us/app/footseen-random-video-chat-app/id1491129400';
},1000)
}
} else {
setTimeout(function(){
toDown();
$('.iosDown').on('click',function(){
toDown();
})
},800)
$('.iosDown').on('click',function(){
toDown();
})
}
function toDown(){
......@@ -176,6 +149,27 @@
function add0(m) {
return m < 10 ? '0' + m + "" : m + ""
}
function copyText(text) {
var textarea = document.createElement("textarea");
var currentFocus = document.activeElement;
document.body.appendChild(textarea);
textarea.value = text;
textarea.focus();
if (textarea.setSelectionRange)
textarea.setSelectionRange(0, textarea.value.length);
else
textarea.select();
try {
var flag = document.execCommand("copy");
} catch(eo){
var flag = false;
}
document.body.removeChild(textarea);
currentFocus.focus();
return flag;
}
</script>
</html>
......@@ -65,17 +65,17 @@
<script type="text/javascript">
function url_get_params() {
var url = location.href;
var theRequest = new Object();
if(url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for(var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
var url = location.href;
var theRequest = new Object();
if(url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for(var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
return theRequest;
}
if( url_get_params().icid!=undefined){
var params = url_get_params().icid.replace(/(^\s*)|(\s*$)/g, "");
......@@ -88,10 +88,10 @@
if(params != undefined && params.length>0){
//定义设备号
if(params.substring(0,3) == 'ios'){
iosData = params;
iosData = 'iosfts'+params.substring(3,params.length);
andoridData = params.substring(3,params.length);
} else {
iosData = 'ios'+params;
iosData = 'iosfts'+params;
andoridData = params;
}
} else {
......@@ -100,57 +100,30 @@
}
console.log(iosData,andoridData)
var clickFlag = true;
var ua = window.navigator.userAgent.toLowerCase();
if(/iphone|ipad|ipod/.test(ua)){
var data = {
icid:iosData
}
if(iosData.indexOf('iosftscps')>-1){
new OpenInstall({
appKey: "dzxj4c",
preferWakeup: true,
mask: function () {
return '<div id="openinstall_shadow" class="shadow-img"><img src="images/share-img.png" alt=""></div>'
},
onready: function () {
var m = this, button = document.getElementById("iosDown");
m.schemeWakeup();
button.onclick = function () {
m.wakeupOrInstall();
return false;
}
return false;
}
}, data);
} else {
new OpenInstall({
appKey: "dzxj4c",
preferWakeup: true,
mask: function () {
return '<div id="openinstall_shadow" class="shadow-img"><img src="images/share-img.png" alt=""></div>'
},
onready: function () {
var m = this, button = document.getElementById("iosDown");
m.schemeWakeup();
setTimeout(function () {
m.wakeupOrInstall();
},2000)
button.onclick = function () {
m.wakeupOrInstall();
return false;
}
return false;
}
}, data);
}
var button = document.getElementById("iosDown");
button.onclick = function () {
if(clickFlag){
clickFlag = false;
copyText(iosData);
}
setTimeout(function () {
window.location.href = 'https://apps.apple.com/us/app/footseen-random-video-chat-app/id1491129400';
},1000)
}
} else {
setTimeout(function(){
toDown();
$('.iosDown').on('click',function(){
toDown();
})
},800)
$('.iosDown').on('click',function(){
toDown();
})
}
function toDown(){
......@@ -176,6 +149,27 @@
function add0(m) {
return m < 10 ? '0' + m + "" : m + ""
}
function copyText(text) {
var textarea = document.createElement("textarea");
var currentFocus = document.activeElement;
document.body.appendChild(textarea);
textarea.value = text;
textarea.focus();
if (textarea.setSelectionRange)
textarea.setSelectionRange(0, textarea.value.length);
else
textarea.select();
try {
var flag = document.execCommand("copy");
} catch(eo){
var flag = false;
}
document.body.removeChild(textarea);
currentFocus.focus();
return flag;
}
</script>
</html>
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