Upd:修改RService无图片替换图片

master
duLingLing 5 years ago
parent 7b47c9f3e7
commit d635f9489f

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.2.92</version>
<version>1.2.93</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.4.0</jib-maven-plugin.version>

@ -33,12 +33,30 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.serviceAll = res.data.all_service;
$scope.serviceAll.forEach(function(service){
service.logo_url = '/static/images/'+service.channel+'.jpg'
service.logo_url = $scope.CheckImgExists(service.logo_url)?service.logo_url:'/static/images/royalpay_sign.png'
})
res.data.incremental_channel.forEach(function(channel){
$scope.channelOptions.push({name:channel,logo_url:'/static/images/'+channel+'.jpg'})
})
})
}
$scope.CheckImgExists =function (url) {
var xmlHttp ;
if (window.ActiveXObject)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();
}
xmlHttp.open("Get",url,false);
xmlHttp.send();
if(xmlHttp.status==404)
return false;
else
return true;
}
$scope.initDate();
}]);
@ -50,9 +68,26 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$http.get("/client/partner_info/"+partner.data.client_moniker+"/incremental_service/"+$stateParams.channel+"/info").then(function(res){
$scope.serviceInfo =res.data
$scope.serviceInfo.logo_url = '/static/images/'+$scope.serviceInfo.channel+'.jpg'
$scope.serviceInfo.logo_url = $scope.CheckImgExists($scope.serviceInfo.logo_url)?$scope.serviceInfo.logo_url:'/static/images/royalpay_sign.png'
})
}
$scope.CheckImgExists =function (url) {
var xmlHttp ;
if (window.ActiveXObject)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();
}
xmlHttp.open("Get",url,false);
xmlHttp.send();
if(xmlHttp.status==404)
return false;
else
return true;
}
$scope.initDate();
$scope.params = {source: $stateParams.channel,status: 'PAID', channel :'ALL' ,textType: 'all', datefrom: new Date(), dateto: new Date()};
$scope.pagination = {};

@ -5279,10 +5279,28 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.serviceAll = res.data.all_service;
$scope.serviceAll.forEach(function(service){
service.logo_url = '/static/images/'+service.channel+'.jpg'
service.logo_url = $scope.CheckImgExists(service.logo_url)?service.logo_url:'/static/images/royalpay_sign.png'
})
$scope.channelOptions=res.data.incremental_channel;
})
}
$scope.CheckImgExists =function (url) {
var xmlHttp ;
if (window.ActiveXObject)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();
}
xmlHttp.open("Get",url,false);
xmlHttp.send();
if(xmlHttp.status==404)
return false;
else
return true;
}
$scope.initData();
$scope.newServiceChannelDialog = function (){
$uibModal.open({

Loading…
Cancel
Save