COntent updates
This commit is contained in:
parent
bb4904955a
commit
4d2aa12b18
11 changed files with 37 additions and 194 deletions
|
|
@ -11,7 +11,6 @@ angular.module('copayApp.controllers').controller('bitcoincomController',
|
|||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.network = bitcoincomController.getNetwork();
|
||||
initBitcoincom;
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,27 +10,7 @@ angular.module('copayApp.controllers').controller('buyandsellController', functi
|
|||
}
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
console.log("Enter buy page");
|
||||
var r = new XMLHttpRequest();
|
||||
r.open("GET", "https://www.bitcoin.com/api/rv/promoted-exchange", true);
|
||||
r.onreadystatechange = function () {
|
||||
if (r.readyState != 4 || r.status != 200) return;
|
||||
console.log(r.responseText);
|
||||
var adResponse = JSON.parse(r.responseText)
|
||||
document.getElementById("exchange-logo").setAttribute('src', "https://www.bitcoin.com" + adResponse.image)
|
||||
document.getElementById("exchange-link").setAttribute('href', "https://www.bitcoin.com" + adResponse.url)
|
||||
document.getElementById("exchange-link").setAttribute('ng-click', "openExternalLink('"+ "https://www.bitcoin.com" + adResponse.url +"')")
|
||||
document.getElementById("exchange-name").textContent = adResponse.bannerName;
|
||||
document.getElementById("exchange-text").textContent = adResponse.description;
|
||||
|
||||
var exchangeLink = document.getElementById("exchange-link");
|
||||
|
||||
exchangeLink.addEventListener('click', function() {
|
||||
externalLinkService.open("https://www.bitcoin.com" + adResponse.url);
|
||||
});
|
||||
|
||||
};
|
||||
r.send("defaultpromotion=360");
|
||||
});
|
||||
|
||||
if (lodash.isEmpty($scope.services))
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ angular.module('copayApp.services').factory('buydotbitcoindotcomService', functi
|
|||
|
||||
buyAndSellService.register({
|
||||
name: 'buydotbitcoindotcom',
|
||||
logo: 'img/bitcoin-com-logo.png',
|
||||
logo: 'img/bitcoin-com-logo-grey.png',
|
||||
location: 'Buy Bitcoin With Credit Card',
|
||||
sref: 'tabs.buyandsell.bitcoindotcom'
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue