Commit 662e81d7 by agan

qudao

parent 6930db73
Showing with 18 additions and 30 deletions
...@@ -373,35 +373,21 @@ ...@@ -373,35 +373,21 @@
function toDown() { function toDown() {
clickDownload(); clickDownload(function (data) {
copyText(andoridData); copyText(data);
var url = 'https://big.bgp.ourpow.com/apk/nf/Release-' + data + '.apk';
var xhr = new XMLHttpRequest();
var url = 'https://big.bgp.ourpow.com/apk/nf/Release-' + andoridData + '.apk'; xhr.open('GET', url);
var xhr = new XMLHttpRequest(); xhr.send();
xhr.open('GET', url); xhr.onreadystatechange = function () {
xhr.send(); if (xhr.status == 200) {
xhr.onreadystatechange = function () { xhr.abort();
if (xhr.status == 200) { window.location.href = url;
xhr.abort(); } else if (xhr.status == 404) {
window.location.href = url; window.location.href = 'https://big.bgp.ourpow.com/apk/nf/Release-ftsB.apk';
} 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 () { $('.topUp').on('click', function () {
......
...@@ -13,6 +13,8 @@ function url_get_params() { ...@@ -13,6 +13,8 @@ function url_get_params() {
var icid = url_get_params().mrefer; var icid = url_get_params().mrefer;
if (!icid) { if (!icid) {
icid = window.location.href; icid = window.location.href;
}else{
icid = icid.split('/').pop();
} }
function viewPage(callback) { function viewPage(callback) {
...@@ -39,8 +41,8 @@ function clickDownload(callback) { ...@@ -39,8 +41,8 @@ function clickDownload(callback) {
os: 'WEB', os: 'WEB',
lang: 2 lang: 2
}, },
success: function () { success: function (res) {
callback && callback(); 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