Commit 41ccf394 by agan

ios粘贴板

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