|
@@ -73,6 +73,21 @@
|
|
|
<img class="footer_bg_img" src="../static/img/changePhoneActivity/footer_bg_img.png" />
|
|
|
<img class="rule4" src="../static/img/changePhoneActivity/rule4.png" />
|
|
|
</div>
|
|
|
+ <div class="mask">
|
|
|
+ <div class="dialog">
|
|
|
+ <img class="dialog-bg" src="../static/img/changePhoneActivity/dialog.png" />
|
|
|
+ <img class="title" src="../static/img/changePhoneActivity/title.png" />
|
|
|
+ <img class="content" src="../static/img/changePhoneActivity/content.png" />
|
|
|
+ <img class="register-btn" src="../static/img/changePhoneActivity/register-btn.png" />
|
|
|
+ <img class="register-text" src="../static/img/changePhoneActivity/register-text.png" />
|
|
|
+ </div>
|
|
|
+ <div class="tip">
|
|
|
+ <img class="tip-bg" src="../static/img/changePhoneActivity/tip-bg.png" />
|
|
|
+ <div class="tip-title" id="tip-text"></div>
|
|
|
+ <img class="sure-btn" src="../static/img/changePhoneActivity/sure-btn.png" />
|
|
|
+ <img class="sure-text" src="../static/img/changePhoneActivity/sure-text.png" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<script>
|
|
|
toastr.options.positionClass = 'toast-center-center';
|
|
@@ -94,9 +109,8 @@
|
|
|
ua = navigator.userAgent.toLowerCase(),
|
|
|
isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
|
|
|
isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
|
|
|
-
|
|
|
//埋点
|
|
|
- operate('10月换机活动');
|
|
|
+ operate('dt_yhs_活动页面浏览');
|
|
|
function operate(pointName,type){
|
|
|
$.ajax({
|
|
|
url: baseUrl + '/api/public/v1/systemBuriedPoint/stat',
|
|
@@ -130,6 +144,24 @@
|
|
|
$('#select').val('红手指');
|
|
|
fromType = 2;
|
|
|
},false);
|
|
|
+ //点击提示弹窗确定
|
|
|
+ $('.sure-btn')[0].addEventListener('click',handleClose,false);
|
|
|
+ $('.sure-text')[0].addEventListener('click',handleClose,false);
|
|
|
+ function handleClose() {
|
|
|
+ $('.tip').animate({top: '-6.96rem'},"fast");
|
|
|
+ $('.mask').hide();
|
|
|
+ document.documentElement.style.overflow='auto';
|
|
|
+ }
|
|
|
+ //点击立即注册
|
|
|
+ $('.register-text')[0].addEventListener('click',registerHandle,false);
|
|
|
+ $('.register-btn')[0].addEventListener('click',registerHandle,false);
|
|
|
+ function registerHandle(){
|
|
|
+ $('.dialog').animate({top: '-6.96rem'},"fast");
|
|
|
+ $('.mask').hide();
|
|
|
+ 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);
|
|
@@ -137,31 +169,38 @@
|
|
|
account = $('#account').val();
|
|
|
password = $('#password').val();
|
|
|
if(fromType === 0){
|
|
|
- stopManyClick(() =>{
|
|
|
- toastr.error('请选择兑换时常的平台')
|
|
|
- })
|
|
|
+ $('#tip-text').text('请选择兑换时常的平台');
|
|
|
+ $('.tip').animate({top: '5.27rem'},"fast");
|
|
|
+ $('.mask').show();
|
|
|
+ document.documentElement.style.overflow='hidden';
|
|
|
return
|
|
|
}
|
|
|
if(account === ''){
|
|
|
- stopManyClick(() =>{
|
|
|
- toastr.error('请输入兑换时常的账号')
|
|
|
- })
|
|
|
+ $('#tip-text').text('请输入兑换时常的账号');
|
|
|
+ $('.tip').animate({top: '5.27rem'},"fast");
|
|
|
+ $('.mask').show();
|
|
|
+ document.documentElement.style.overflow='hidden';
|
|
|
return
|
|
|
}
|
|
|
if(password === ''){
|
|
|
- stopManyClick(() =>{
|
|
|
- toastr.error('请输入兑换时常的密码')
|
|
|
- })
|
|
|
+ $('#tip-text').text('请输入兑换时常的密码');
|
|
|
+ $('.tip').animate({top: '5.27rem'},"fast");
|
|
|
+ $('.mask').show();
|
|
|
+ document.documentElement.style.overflow='hidden';
|
|
|
return
|
|
|
}
|
|
|
- operate('10月换机活动','click');
|
|
|
+ operate('dt_yhs_点击免费换机按钮','click');
|
|
|
}
|
|
|
//调用免费换机接口
|
|
|
function changePhone(){
|
|
|
$.ajax({
|
|
|
url: baseUrl + '/api/public/v1/activity/change/phone',
|
|
|
type: 'post',
|
|
|
+ headers: {
|
|
|
+ 'Authorization': id //id
|
|
|
+ },
|
|
|
data:JSON.stringify({
|
|
|
+ InviteTime: new Date().Format("yyyy-MM-dd hh:mm:ss"),
|
|
|
type: fromType,
|
|
|
account: account,
|
|
|
password: password
|
|
@@ -171,7 +210,9 @@
|
|
|
cache: false,
|
|
|
success: function (res) {
|
|
|
if(res.status === 0){
|
|
|
- window.location.href = 'https://wjzx.androidscloud.com:9091/file-center/fileOperate/downloadFile?id=573420181';
|
|
|
+ $('.dialog').animate({top: '4.2rem'},"fast");
|
|
|
+ $('.mask').show();
|
|
|
+ document.documentElement.style.overflow='hidden';
|
|
|
}else{
|
|
|
stopManyClick(() =>{
|
|
|
toastr.error(res.msg)
|
|
@@ -182,13 +223,29 @@
|
|
|
}
|
|
|
//防止提示一秒内重复显示
|
|
|
function stopManyClick(fn) {
|
|
|
- if (flag) {
|
|
|
+ if (flag) {
|
|
|
fn();
|
|
|
}
|
|
|
flag = false;
|
|
|
if(timer){clearTimeout(timer);}
|
|
|
timer = setTimeout(() => {flag = true}, 1500);
|
|
|
}
|
|
|
+ Date.prototype.Format = function (fmt) { // author: meizz
|
|
|
+ var o = {
|
|
|
+ "M+": this.getMonth() + 1, // 月份
|
|
|
+ "d+": this.getDate(), // 日
|
|
|
+ "h+": this.getHours(), // 小时
|
|
|
+ "m+": this.getMinutes(), // 分
|
|
|
+ "s+": this.getSeconds(), // 秒
|
|
|
+ "q+": Math.floor((this.getMonth() + 3) / 3), // 季度
|
|
|
+ "S": this.getMilliseconds() // 毫秒
|
|
|
+ };
|
|
|
+ if (/(y+)/.test(fmt))
|
|
|
+ fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
|
+ for (var k in o)
|
|
|
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
|
|
+ return fmt;
|
|
|
+ }
|
|
|
</script>
|
|
|
</body>
|
|
|
|