|
@@ -26,7 +26,7 @@
|
|
|
<img class="login-bg" src="../static/img/changePhoneActivity/login-bg.png" />
|
|
|
<div class="login-row-select">
|
|
|
<div class="login-row-title">选择:</div>
|
|
|
- <input class="login-row-ipt" id="select" placeholder="请选择兑换时常的平台" disabled="true" />
|
|
|
+ <input class="login-row-ipt" id="select" placeholder="请选择兑换时长的平台" disabled="true" />
|
|
|
<img class="icon-down-img" src="../static/img/changePhoneActivity/icon-down.png" />
|
|
|
</div>
|
|
|
<div class="options">
|
|
@@ -41,22 +41,22 @@
|
|
|
</div>
|
|
|
<div class="login-row-account">
|
|
|
<div class="login-row-title">账号:</div>
|
|
|
- <input class="login-row-ipt" id="account" placeholder="请输入兑换时常的账号" />
|
|
|
+ <input class="login-row-ipt" id="account" placeholder="请输入兑换时长的账号" />
|
|
|
</div>
|
|
|
<div class="login-row-password">
|
|
|
<div class="login-row-title">密码:</div>
|
|
|
- <input class="login-row-ipt" id="password" placeholder="请输入兑换时常的密码" />
|
|
|
+ <input class="login-row-ipt" type="password" id="password" placeholder="请输入兑换时长的密码" />
|
|
|
</div>
|
|
|
<img class="login-btn" src="../static/img/changePhoneActivity/login-btn.png" />
|
|
|
<img class="login-btn-text" src="../static/img/changePhoneActivity/login-btn-text.png" />
|
|
|
</div>
|
|
|
<div class="read-rule">
|
|
|
<img class="selected" src="../static/img/changePhoneActivity/selected.png" />
|
|
|
+ <img class="no-selected" src="../static/img/changePhoneActivity/no-selected.png" />
|
|
|
<img class="rule-text" src="../static/img/changePhoneActivity/rule-text.png" />
|
|
|
</div>
|
|
|
<div class="entry-QQ">
|
|
|
<img class="entry-QQ-btn" src="../static/img/changePhoneActivity/entry-QQ-btn.png" />
|
|
|
- <img class="entry-QQ-text" src="../static/img/changePhoneActivity/entry-QQ-text.png" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="middle">
|
|
@@ -88,6 +88,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="">
|
|
|
</div>
|
|
|
<script>
|
|
|
toastr.options.positionClass = 'toast-center-center';
|
|
@@ -95,12 +96,13 @@
|
|
|
</script>
|
|
|
<script type="text/javascript">
|
|
|
let timer,flag = true;
|
|
|
+ let isShow = true;
|
|
|
let fromType = 0,
|
|
|
account = '',
|
|
|
password = '';
|
|
|
var url = window.location.href;
|
|
|
url = url.split('/')
|
|
|
- var baseUrl = 'http://192.168.31.198'
|
|
|
+ // var baseUrl = 'http://192.168.31.198'
|
|
|
var loc = window.location.search,
|
|
|
n1 = loc.length,//地址的总长度
|
|
|
n2 = loc.indexOf("="),//取得=号的位置
|
|
@@ -128,6 +130,36 @@
|
|
|
},
|
|
|
})
|
|
|
}
|
|
|
+ //点击分享
|
|
|
+ $('.share')[0].addEventListener('click',()=>{
|
|
|
+ if (isiOS) {
|
|
|
+ try {
|
|
|
+ getMessage();
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ window.webkit.messageHandlers.getMessage.postMessage();
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+ }else if (isAndroid) {
|
|
|
+ window.native.onClikWebView()
|
|
|
+ }else{
|
|
|
+ stopManyClick(() => {
|
|
|
+ //加载数据
|
|
|
+ var copyBefore = JSON.stringify(window.location.href);
|
|
|
+ var copyUrl = copyBefore.split('"');
|
|
|
+ $('#inviteCopy').val(copyUrl[1]);
|
|
|
+ var input = document.getElementById("inviteCopy");
|
|
|
+ // 选中文本
|
|
|
+ input.select();
|
|
|
+ // 执行浏览器复制命令
|
|
|
+ document.execCommand("copy");
|
|
|
+ toastr.error('复制成功当前网址成功!')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },false);
|
|
|
//点击选择框
|
|
|
$('.login-row-select')[0].addEventListener('click',()=>{
|
|
|
$('.options')[0].className = 'options show';
|
|
@@ -144,6 +176,17 @@
|
|
|
$('#select').val('红手指');
|
|
|
fromType = 2;
|
|
|
},false);
|
|
|
+ //点击协议
|
|
|
+ $('.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;
|
|
|
+ },false);
|
|
|
//点击提示弹窗确定
|
|
|
$('.sure-btn')[0].addEventListener('click',handleClose,false);
|
|
|
$('.sure-text')[0].addEventListener('click',handleClose,false);
|
|
@@ -161,7 +204,6 @@
|
|
|
document.documentElement.style.overflow='auto';
|
|
|
window.location.href = 'http://www.androidscloud.com';
|
|
|
}
|
|
|
- // dt_yhs_加入Q群按钮
|
|
|
//点击免费换机按钮
|
|
|
$('.login-btn-text')[0].addEventListener('click',changePhoneHandle,false);
|
|
|
$('.login-btn')[0].addEventListener('click',changePhoneHandle,false);
|
|
@@ -169,21 +211,28 @@
|
|
|
account = $('#account').val();
|
|
|
password = $('#password').val();
|
|
|
if(fromType === 0){
|
|
|
- $('#tip-text').text('请选择兑换时常的平台');
|
|
|
+ $('#tip-text').text('请选择兑换时长的平台');
|
|
|
$('.tip').animate({top: '5.27rem'},"fast");
|
|
|
$('.mask').show();
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
return
|
|
|
}
|
|
|
if(account === ''){
|
|
|
- $('#tip-text').text('请输入兑换时常的账号');
|
|
|
+ $('#tip-text').text('请输入兑换时长的账号');
|
|
|
$('.tip').animate({top: '5.27rem'},"fast");
|
|
|
$('.mask').show();
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
return
|
|
|
}
|
|
|
if(password === ''){
|
|
|
- $('#tip-text').text('请输入兑换时常的密码');
|
|
|
+ $('#tip-text').text('请输入兑换时长的密码');
|
|
|
+ $('.tip').animate({top: '5.27rem'},"fast");
|
|
|
+ $('.mask').show();
|
|
|
+ document.documentElement.style.overflow='hidden';
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(!isShow){
|
|
|
+ $('#tip-text').text('请勾选阅读规则按钮');
|
|
|
$('.tip').animate({top: '5.27rem'},"fast");
|
|
|
$('.mask').show();
|
|
|
document.documentElement.style.overflow='hidden';
|
|
@@ -193,7 +242,7 @@
|
|
|
}
|
|
|
//调用免费换机接口
|
|
|
function changePhone(){
|
|
|
- $.ajax({
|
|
|
+ let ajaxObj = {
|
|
|
url: baseUrl + '/api/public/v1/activity/change/phone',
|
|
|
type: 'post',
|
|
|
headers: {
|
|
@@ -219,7 +268,11 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- })
|
|
|
+ }
|
|
|
+ if(!id){
|
|
|
+ delete ajaxObj.headers
|
|
|
+ }
|
|
|
+ $.ajax(ajaxObj)
|
|
|
}
|
|
|
//防止提示一秒内重复显示
|
|
|
function stopManyClick(fn) {
|