Commit 662e81d7 by agan

qudao

parent 6930db73
Showing with 18 additions and 30 deletions
......@@ -373,35 +373,21 @@
function toDown() {
clickDownload();
copyText(andoridData);
var url = 'https://big.bgp.ourpow.com/apk/nf/Release-' + andoridData + '.apk';
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.status == 200) {
xhr.abort();
window.location.href = url;
} else if (xhr.status == 404) {
window.location.href = 'https://big.bgp.ourpow.com/apk/nf/Release-ftsB.apk';
clickDownload(function (data) {
copyText(data);
var url = 'https://big.bgp.ourpow.com/apk/nf/Release-' + data + '.apk';
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.status == 200) {
xhr.abort();
window.location.href = url;
} else if (xhr.status == 404) {
window.location.href = 'https://big.bgp.ourpow.com/apk/nf/Release-ftsB.apk';
}
}
}
// window.location.href = url;
// var mAjax = $.ajax({
// url: url,
// statusCode: {
// 404: function () {
// window.location.href = 'https://big.bgp.ourpow.com/apk/nf/Release-ftsB.apk';
// }
// },
// success: function () {
// mAjax.abort();
// window.location.href = url;
// }
// });
});
}
$('.topUp').on('click', function () {
......
......@@ -13,6 +13,8 @@ function url_get_params() {
var icid = url_get_params().mrefer;
if (!icid) {
icid = window.location.href;
}else{
icid = icid.split('/').pop();
}
function viewPage(callback) {
......@@ -39,8 +41,8 @@ function clickDownload(callback) {
os: 'WEB',
lang: 2
},
success: function () {
callback && callback();
success: function (res) {
callback && callback(res.AndroidChannel);
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment