|
|
@@ -137,7 +137,7 @@
|
|
|
toastr.options.timeOut = '1500';
|
|
|
</script>
|
|
|
<script type="text/javascript">
|
|
|
- // var baseUrl = 'https://test.androidscloud.com'
|
|
|
+ // var baseUrl = 'http://14.18.190.141:24380'
|
|
|
let timer, flag = true;
|
|
|
let time = 60, codeTimer = null, enable = false, isStart = false, changePhoneType = 2, phone = '', code = '', captchaVerification = '';
|
|
|
var url = window.location.href;
|
|
|
@@ -155,9 +155,10 @@
|
|
|
var imgHeight = html.getBoundingClientRect().width / 750 * 200 + 'px';
|
|
|
var barHeight = html.getBoundingClientRect().width / 750 * 70 + 'px';
|
|
|
getConfig();
|
|
|
+ operate('cp_h5_活动首页');
|
|
|
function captchaVerificationHandle(){
|
|
|
$.ajax({
|
|
|
- url: baseUrl + '/api/user/v1/client/regist/changePhone',
|
|
|
+ url: baseUrl + '/api/user/v5/client/register/changePhone',
|
|
|
type: 'post',
|
|
|
data: JSON.stringify({
|
|
|
changePhoneType: changePhoneType,
|
|
|
@@ -176,15 +177,15 @@
|
|
|
document.getElementById('form-btn').click();
|
|
|
},500)
|
|
|
} else if(res.status === 0) {
|
|
|
- timerHandle('back');
|
|
|
if(changePhoneType == 1){
|
|
|
- $('.copy-dialog').animate({top: '3.8rem'},"fast");
|
|
|
+ $('.copy-dialog').animate({top: '5.75rem'},"fast");
|
|
|
$('.copy-mask').show();
|
|
|
}else{
|
|
|
$('.ios-dialog').animate({top: '5.75rem'},"fast");
|
|
|
$('.ios-mask').show();
|
|
|
}
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
+ timerHandle('back');
|
|
|
} else {
|
|
|
toastr.error(res.msg);
|
|
|
}
|
|
|
@@ -214,7 +215,7 @@
|
|
|
let phone = $('.phone-ipt').eq(0).val();
|
|
|
phone = phone.replace(/\s+/g,"");
|
|
|
$.ajax({
|
|
|
- url: baseUrl + '/api/user/v1/phone/v_code/send',
|
|
|
+ url: baseUrl + '/api/message/v5/phone/send',
|
|
|
type: 'post',
|
|
|
data: JSON.stringify({
|
|
|
type: 'change_phone',
|
|
|
@@ -257,6 +258,7 @@
|
|
|
})
|
|
|
//点击立即领取按钮
|
|
|
$('.btns')[0].addEventListener('click',() => {
|
|
|
+ operate('cp_h5_免费兑换云机');
|
|
|
if(!enable){
|
|
|
toastr.error(`活动暂未开始!`);
|
|
|
return
|
|
|
@@ -302,9 +304,11 @@
|
|
|
if(changePhoneType == 1){
|
|
|
$('.copy-dialog').animate({top: '3.8rem'},"fast");
|
|
|
$('.copy-mask').show();
|
|
|
+ operate('cp_h5_选择_新用户');
|
|
|
}else{
|
|
|
$('.ios-dialog').animate({top: '5.75rem'},"fast");
|
|
|
$('.ios-mask').show();
|
|
|
+ operate('cp_h5_选择_某手指');
|
|
|
}
|
|
|
document.documentElement.style.overflow='hidden';
|
|
|
}else{
|
|
|
@@ -365,20 +369,23 @@
|
|
|
$('.code-tip').eq(0).css('display', 'block');
|
|
|
}
|
|
|
},false);
|
|
|
- $('.mask-btn-wrap')[0].addEventListener('click',download,false);
|
|
|
- $('.mask-btn-wrap')[1].addEventListener('click',download,false);
|
|
|
+ $('.mask-btn-wrap')[0].addEventListener('click',()=>{
|
|
|
+ operate('cp_h5_立即领取', 'down');
|
|
|
+ },false);
|
|
|
+ $('.mask-btn-wrap')[1].addEventListener('click',()=>{
|
|
|
+ operate('cp_h5_立即体验', 'down');
|
|
|
+ },false);
|
|
|
function download() {
|
|
|
if (isAndroid) {
|
|
|
- if (baseUrl == 'https://per.cs.se.androidscloud.com') {
|
|
|
- window.location.href = 'http://per.cs.se.androidscloud.com:8888'
|
|
|
- } else {
|
|
|
- window.location.href = 'http://www.androidscloud.com?timestamp=' + Math.random();
|
|
|
- }
|
|
|
-
|
|
|
+ if(baseUrl == 'https://per.cs.se.androidscloud.com'){
|
|
|
+ location.href = `./exchangePhoneDownApp.html?code=h8v320gxzb2W&platform=1`;
|
|
|
+ }else{
|
|
|
+ location.href = `./exchangePhoneDownApp.html?code=nEk3HnNl61C3&platform=1`;
|
|
|
+ }
|
|
|
} else if (isIOS) {
|
|
|
- document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
|
|
|
+ location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
|
|
|
} else {
|
|
|
- document.location.href = 'https://www.androidscloud.com?timestamp=' + Math.random();
|
|
|
+ location.href = 'https://www.androidscloud.com?timestamp=' + Math.random();
|
|
|
}
|
|
|
}
|
|
|
$('.close')[0].addEventListener('click', (e) => {
|
|
|
@@ -393,7 +400,7 @@
|
|
|
});
|
|
|
function getConfig() {
|
|
|
$.ajax({
|
|
|
- url: baseUrl + '/api/user/v1/changePhone/activity/config',
|
|
|
+ url: baseUrl + '/api/activity/v1/changePhone/activity/config',
|
|
|
type: 'get',
|
|
|
contentType: "application/json",
|
|
|
dataType: 'json',
|
|
|
@@ -407,7 +414,7 @@
|
|
|
},
|
|
|
})
|
|
|
}
|
|
|
- function operate(pointName) {
|
|
|
+ function operate(pointName, type) {
|
|
|
$.ajax({
|
|
|
url: baseUrl + '/api/public/v1/systemBuriedPoint/stat',
|
|
|
type: 'post',
|
|
|
@@ -417,7 +424,11 @@
|
|
|
contentType: "application/json",
|
|
|
dataType: 'json',
|
|
|
cache: false,
|
|
|
- success: function (res) {},
|
|
|
+ success: function (res) {
|
|
|
+ if(type == 'down'){
|
|
|
+ download();
|
|
|
+ }
|
|
|
+ },
|
|
|
})
|
|
|
}
|
|
|
function validate() {
|
|
|
@@ -452,12 +463,13 @@
|
|
|
time = 60;
|
|
|
clearInterval(codeTimer);
|
|
|
$('.get-code').eq(0).text('获取验证码');
|
|
|
- $('.get-code-active')[0].className = 'get-code';
|
|
|
if(type == 'back'){
|
|
|
$('.phone-ipt').eq(0).val('');
|
|
|
$('.code-ipt').eq(0).val('');
|
|
|
phone = '';
|
|
|
code = '';
|
|
|
+ } else {
|
|
|
+ $('.get-code-active')[0].className = 'get-code';
|
|
|
}
|
|
|
}
|
|
|
//防止提示一秒内重复显示
|