|
@@ -83,7 +83,7 @@
|
|
|
<img class="sure-text" src="../static/img/changePhoneActivity/sure-text.png" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <input type="text" style="opacity: 0;z-index: -10;position: fixed;" id="inviteCopy" value="">
|
|
|
+ <input type="text" style="opacity: 0;z-index: -10;position: fixed;" id="inviteCopy" disabled="true" value="">
|
|
|
</div>
|
|
|
<script>
|
|
|
toastr.options.positionClass = 'toast-center-center';
|
|
@@ -147,20 +147,7 @@
|
|
|
//点击分享
|
|
|
$('.share-node')[0].addEventListener('click',()=>{
|
|
|
if(!id){
|
|
|
- stopManyClick(() => {
|
|
|
- //加载数据
|
|
|
- var href = window.location.href;
|
|
|
- var copyBefore = JSON.stringify(href);
|
|
|
- var copyUrl = copyBefore.split('"');
|
|
|
- console.log(copyUrl[1])
|
|
|
- $('#inviteCopy').val(copyUrl[1]);
|
|
|
- var input = document.getElementById("inviteCopy");
|
|
|
- // 选中文本
|
|
|
- input.select();
|
|
|
- // 执行浏览器复制命令
|
|
|
- document.execCommand("copy");
|
|
|
- toastr.error('复制成功当前网址成功!')
|
|
|
- })
|
|
|
+ copyUrl();
|
|
|
} else if (isiOS) {
|
|
|
$.ajax({
|
|
|
url: baseUrl + '/api/user/v1/promote',
|
|
@@ -189,9 +176,30 @@
|
|
|
}
|
|
|
})
|
|
|
} else if (isAndroid) {
|
|
|
- window.native.onClikWebView()
|
|
|
+ if(window.native){
|
|
|
+ window.native.onClikWebView()
|
|
|
+ }else{
|
|
|
+ copyUrl();
|
|
|
+ }
|
|
|
}
|
|
|
},false);
|
|
|
+ //复制
|
|
|
+ function copyUrl(){
|
|
|
+ stopManyClick(() => {
|
|
|
+ //加载数据
|
|
|
+ var href = window.location.href;
|
|
|
+ var copyBefore = JSON.stringify(href);
|
|
|
+ var copyUrl = copyBefore.split('"');
|
|
|
+ console.log(copyUrl[1])
|
|
|
+ $('#inviteCopy').val(copyUrl[1]);
|
|
|
+ var input = document.getElementById("inviteCopy");
|
|
|
+ // 选中文本
|
|
|
+ input.select();
|
|
|
+ // 执行浏览器复制命令
|
|
|
+ document.execCommand("copy");
|
|
|
+ toastr.error('复制成功当前网址成功!')
|
|
|
+ })
|
|
|
+ }
|
|
|
//点击选择框
|
|
|
$('.login-row-select')[0].addEventListener('click',()=>{
|
|
|
$('.options')[0].className = 'options show';
|
|
@@ -212,9 +220,7 @@
|
|
|
$('.read-rule')[0].addEventListener('click',()=>{
|
|
|
if(isShow){
|
|
|
$('.selected')[0].className = 'selected hidden';
|
|
|
- $('.no-selected')[0].className = 'no-selected show';
|
|
|
}else{
|
|
|
- $('.no-selected')[0].className = 'no-selected hidden';
|
|
|
$('.selected')[0].className = 'selected show';
|
|
|
}
|
|
|
isShow = !isShow;
|
|
@@ -236,6 +242,7 @@
|
|
|
document.documentElement.style.overflow='auto';
|
|
|
$('#select').val('');
|
|
|
$('#account').val('');
|
|
|
+ $('#password').val('');
|
|
|
window.location.href = 'http://www.androidscloud.com';
|
|
|
}
|
|
|
//点击免费换机按钮
|
|
@@ -246,31 +253,31 @@
|
|
|
password = $('#password').val();
|
|
|
if(fromType === 0){
|
|
|
$('#tip-text').text('请选择兑换时长的平台');
|
|
|
- $('.tip').animate({top: '7.27rem'},"fast");
|
|
|
+ $('.tip').animate({top: '48vh'},"fast");
|
|
|
$('.mask').show();
|
|
|
- $('.dialog').hide();
|
|
|
+ $('.dialog').animate({top: '-6.96rem'},"fast");
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
return
|
|
|
}
|
|
|
if(account === ''){
|
|
|
$('#tip-text').text('请输入兑换时长的账号');
|
|
|
- $('.tip').animate({top: '7.27rem'},"fast");
|
|
|
+ $('.tip').animate({top: '48vh'},"fast");
|
|
|
$('.mask').show();
|
|
|
- $('.dialog').hide();
|
|
|
+ $('.dialog').animate({top: '-6.96rem'},"fast");
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
return
|
|
|
}
|
|
|
if(password === ''){
|
|
|
$('#tip-text').text('请输入兑换时长的密码');
|
|
|
- $('.tip').animate({top: '7.27rem'},"fast");
|
|
|
+ $('.tip').animate({top: '48vh'},"fast");
|
|
|
$('.mask').show();
|
|
|
- $('.dialog').hide();
|
|
|
+ $('.dialog').animate({top: '-6.96rem'},"fast");
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
return
|
|
|
}
|
|
|
if(!isShow){
|
|
|
$('#tip-text').text('请勾选阅读规则按钮');
|
|
|
- $('.tip').animate({top: '7.27rem'},"fast");
|
|
|
+ $('.tip').animate({top: '48vh'},"fast");
|
|
|
$('.mask').show();
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
return
|
|
@@ -302,13 +309,13 @@
|
|
|
if(res.status === 0){
|
|
|
$('.dialog').animate({top: '4.2rem'},"fast");
|
|
|
$('.mask').show();
|
|
|
- $('.tip').hide();
|
|
|
+ $('.tip').animate({top: '-6.96rem'},"fast");
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
}else{
|
|
|
$('#tip-text').text(res.msg);
|
|
|
- $('.tip').animate({top: '7.27rem'},"fast");
|
|
|
+ $('.tip').animate({top: '48vh'},"fast");
|
|
|
$('.mask').show();
|
|
|
- $('.dialog').hide();
|
|
|
+ $('.dialog').animate({top: '-6.96rem'},"fast");
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
}
|
|
|
}
|