|
@@ -117,6 +117,16 @@
|
|
<img class="close" src="img/close.png" />
|
|
<img class="close" src="img/close.png" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="ios-mask">
|
|
|
|
+ <div class="ios-dialog">
|
|
|
|
+ <div class="txt1">仅差一步领取成功<br />限时奖励等你来拿</div>
|
|
|
|
+ <div class="ios-btnlist">
|
|
|
|
+ <img class="btn2" onclick="copyIosUrl()" style="margin-right: 0.3rem;" src="../static/img/qqActivity/btn2.png" alt="">
|
|
|
|
+ <img class="btn3" onclick="copyCodeUrl()" src="../static/img/qqActivity/btn3.png" alt="">
|
|
|
|
+ </div>
|
|
|
|
+ <img class="close1" src="img/close.png" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
<script>
|
|
toastr.options.positionClass = 'toast-center-center';
|
|
toastr.options.positionClass = 'toast-center-center';
|
|
@@ -247,7 +257,14 @@
|
|
//点击下载APP并复制激活码
|
|
//点击下载APP并复制激活码
|
|
$('.get-success-block')[0].addEventListener('click', (e) => {
|
|
$('.get-success-block')[0].addEventListener('click', (e) => {
|
|
operate('QQQB_下载APP并复制激活码');
|
|
operate('QQQB_下载APP并复制激活码');
|
|
- copyUrl();
|
|
|
|
|
|
+ if (isIOS) {
|
|
|
|
+ $('.copy-dialog').animate({top: '-6.96rem'},"fast");
|
|
|
|
+ $('.copy-mask').hide();
|
|
|
|
+ $('.ios-dialog').animate({top: '5.75rem'},"fast");
|
|
|
|
+ $('.ios-mask').show();
|
|
|
|
+ } else {
|
|
|
|
+ copyUrl();
|
|
|
|
+ }
|
|
});
|
|
});
|
|
$('.phone-ipt')[0].oninput = checkPhone;
|
|
$('.phone-ipt')[0].oninput = checkPhone;
|
|
function checkPhone(){
|
|
function checkPhone(){
|
|
@@ -319,6 +336,11 @@
|
|
$('.copy-mask').hide();
|
|
$('.copy-mask').hide();
|
|
document.documentElement.style.overflow='auto';
|
|
document.documentElement.style.overflow='auto';
|
|
});
|
|
});
|
|
|
|
+ $('.close1')[0].addEventListener('click', (e) => {
|
|
|
|
+ $('.ios-dialog').animate({top: '-6.96rem'},"fast");
|
|
|
|
+ $('.ios-mask').hide();
|
|
|
|
+ document.documentElement.style.overflow='auto';
|
|
|
|
+ });
|
|
//复制
|
|
//复制
|
|
function copyUrl() {
|
|
function copyUrl() {
|
|
var oInput = document.createElement('input'); //创建一个input
|
|
var oInput = document.createElement('input'); //创建一个input
|
|
@@ -341,6 +363,44 @@
|
|
}, 1000)
|
|
}, 1000)
|
|
}, 400)
|
|
}, 400)
|
|
}
|
|
}
|
|
|
|
+ //复制
|
|
|
|
+ function copyIosUrl() {
|
|
|
|
+ var oInput = document.createElement('input'); //创建一个input
|
|
|
|
+ oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ oInput.value = 'https://www.pgyer.com/gemini6';
|
|
|
|
+ // oInput.select(); // 选择对象 ios不支持
|
|
|
|
+ document.body.appendChild(oInput)
|
|
|
|
+ selectText(oInput, 0, oInput.value.length);
|
|
|
|
+ document.execCommand("Copy"); // 执行浏览器复制命令
|
|
|
|
+ toastr.error(`复制成功`);
|
|
|
|
+ $('.ios-dialog').animate({top: '-6.96rem'},"fast");
|
|
|
|
+ $('.ios-mask').hide();
|
|
|
|
+ document.documentElement.style.overflow='auto';
|
|
|
|
+ oInput.style.display = 'none'; // 将input隐藏
|
|
|
|
+ oInput.blur();
|
|
|
|
+ oInput.remove(); // 将input销毁
|
|
|
|
+ }, 400)
|
|
|
|
+ }
|
|
|
|
+ //复制
|
|
|
|
+ function copyCodeUrl() {
|
|
|
|
+ var oInput = document.createElement('input'); //创建一个input
|
|
|
|
+ oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ oInput.value = myCode;
|
|
|
|
+ // oInput.select(); // 选择对象 ios不支持
|
|
|
|
+ document.body.appendChild(oInput)
|
|
|
|
+ selectText(oInput, 0, oInput.value.length);
|
|
|
|
+ document.execCommand("Copy"); // 执行浏览器复制命令
|
|
|
|
+ toastr.error(`复制成功`);
|
|
|
|
+ $('.ios-dialog').animate({top: '-6.96rem'},"fast");
|
|
|
|
+ $('.ios-mask').hide();
|
|
|
|
+ document.documentElement.style.overflow='auto';
|
|
|
|
+ oInput.style.display = 'none'; // 将input隐藏
|
|
|
|
+ oInput.blur();
|
|
|
|
+ oInput.remove(); // 将input销毁
|
|
|
|
+ }, 400)
|
|
|
|
+ }
|
|
// input自带的select()方法在苹果端无法进行选择,所以需要自己去写一个类似的方法
|
|
// input自带的select()方法在苹果端无法进行选择,所以需要自己去写一个类似的方法
|
|
// 选择文本。createTextRange(setSelectionRange)是input方法
|
|
// 选择文本。createTextRange(setSelectionRange)是input方法
|
|
function selectText(textbox, startIndex, stopIndex) {
|
|
function selectText(textbox, startIndex, stopIndex) {
|