From d635f9489f76e11fce117cc675c7976879103528 Mon Sep 17 00:00:00 2001 From: duLingLing Date: Mon, 25 Nov 2019 17:58:39 +0800 Subject: [PATCH] =?UTF-8?q?Upd:=E4=BF=AE=E6=94=B9RService=E6=97=A0?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=9B=BF=E6=8D=A2=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../partner-incremental-service.js | 37 ++++++++++++++++++- .../static/payment/partner/partner-manage.js | 18 +++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9f37647b7..149192152 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.2.92 + 1.2.93 UTF-8 1.4.0 diff --git a/src/main/ui/static/incrementalService/partner-incremental-service.js b/src/main/ui/static/incrementalService/partner-incremental-service.js index ca95a3e3e..c9934c149 100644 --- a/src/main/ui/static/incrementalService/partner-incremental-service.js +++ b/src/main/ui/static/incrementalService/partner-incremental-service.js @@ -33,6 +33,7 @@ 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'}) @@ -40,6 +41,23 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) { }) } + $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 = {}; diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index f30b1ff25..e810cbfa0 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -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({