Commit 41ccf394 by agan

ios粘贴板

parent c5283651
Showing with 75 additions and 24 deletions
...@@ -58,13 +58,22 @@ ...@@ -58,13 +58,22 @@
<script src='https://www.footseen.com/layer-v3.1.0/layer/layer.js'></script> <script src='https://www.footseen.com/layer-v3.1.0/layer/layer.js'></script>
<script type="text/javascript"> <script type="text/javascript">
var data = url_get_params(); if (url_get_params().icid != undefined) {
var params = { var params = url_get_params().icid.replace(/(^\s*)|(\s*$)/g, "");
icid: data.icid, } else {
} var params = '';
}
var iosData = '';
// var andoridData = '';
if (params != undefined && params.length > 0) {
iosData = params
} else {
iosData = 'iosftsB';
// andoridData = 'ftsB';
}
ShareTrace.init({ ShareTrace.init({
appkey: "cd3ba48d0699c7fa", // 此值必填 appkey: "cd3ba48d0699c7fa", // 此值必填
param: JSON.stringify(params), param: JSON.stringify(iosData),
success: function () { success: function () {
console.log("init success...") console.log("init success...")
}, },
...@@ -75,23 +84,10 @@ ...@@ -75,23 +84,10 @@
console.log(params); console.log(params);
$(".iosDown").on("click", function () { $(".iosDown").on("click", function () {
clickDownload(); clickDownload();
copyText(iosData);
// window.location.href = 'https://apps.apple.com/us/app/firefly-live-live-video-chat/id1473568058' // window.location.href = 'https://apps.apple.com/us/app/firefly-live-live-video-chat/id1473568058'
window.location.href = 'http://www.app9.pw/app/1609398203'; window.location.href = 'http://www.app9.pw/app/1609398203';
// ga('send', 'event', {
// eventCategory: 'ios',
// eventAction: 'click',
// eventLabel: 'ios'
// });
// ga('clientTracker.send', 'event', {
// eventCategory: 'ios',
// eventAction: 'click',
// eventLabel: 'ios'
// });
// gtag('event', 'conversion', {
// 'send_to': 'AW-678006312/kqI0CJCE-7gBEKicpsMC',
// 'event_callback': gtag_report_conversion()
// });
}) })
function gtag_report_conversion() { function gtag_report_conversion() {
setTimeout(function () { setTimeout(function () {
...@@ -115,6 +111,28 @@ ...@@ -115,6 +111,28 @@
} }
return theRequest; return theRequest;
} }
//複製到剪切板
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> </script>
</html> </html>
\ No newline at end of file
...@@ -53,13 +53,22 @@ ...@@ -53,13 +53,22 @@
<script src='https://www.footseen.com/layer-v3.1.0/layer/layer.js'></script> <script src='https://www.footseen.com/layer-v3.1.0/layer/layer.js'></script>
<script type="text/javascript"> <script type="text/javascript">
var data = url_get_params(); if (url_get_params().icid != undefined) {
var params = { var params = url_get_params().icid.replace(/(^\s*)|(\s*$)/g, "");
icid: data.icid, } else {
} var params = '';
}
var iosData = '';
// var andoridData = '';
if (params != undefined && params.length > 0) {
iosData = params
} else {
iosData = 'iosftsB';
// andoridData = 'ftsB';
}
ShareTrace.init({ ShareTrace.init({
appkey: "cd3ba48d0699c7fa", // 此值必填 appkey: "cd3ba48d0699c7fa", // 此值必填
param: JSON.stringify(params), param: JSON.stringify(iosData),
success: function () { success: function () {
console.log("init success...") console.log("init success...")
}, },
...@@ -69,6 +78,7 @@ ...@@ -69,6 +78,7 @@
}); });
console.log(params); console.log(params);
$(".iosDown").on("click", function () { $(".iosDown").on("click", function () {
copyText(iosData);
clickDownload(); clickDownload();
// window.location.href = 'https://apps.apple.com/us/app/firefly-live-live-video-chat/id1473568058' // window.location.href = 'https://apps.apple.com/us/app/firefly-live-live-video-chat/id1473568058'
window.location.href = 'http://www.app9.pw/app/1609398203'; window.location.href = 'http://www.app9.pw/app/1609398203';
...@@ -110,6 +120,27 @@ ...@@ -110,6 +120,27 @@
} }
return theRequest; return theRequest;
} }
//複製到剪切板
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> </script>
</html> </html>
\ No newline at end of file
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