From 562840cedaa43534a0dfbb5cfd98dee9ea7e71f4 Mon Sep 17 00:00:00 2001 From: hellolujian <1370256381@qq.com> Date: Wed, 26 Sep 2018 16:21:51 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E5=95=86=E6=88=B7=E7=AB=AF=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E7=A7=98=E9=92=A5=E6=94=AF=E6=8C=81=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/ui/static/payment/partner/partner.js | 22 +++++++++++++++++-- .../templates/client_payment_info.html | 10 ++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js index e4cdb0451..7096890c6 100644 --- a/src/main/ui/static/payment/partner/partner.js +++ b/src/main/ui/static/payment/partner/partner.js @@ -560,7 +560,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct }; }]); - app.controller('clientPaymentInfoCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) { + app.controller('clientPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog', function ($scope, $http, $state, commonDialog) { $scope.paymentInfo = $scope.partner; $scope.old_customer_surcharge_rate = angular.copy($scope.partner.customer_surcharge_rate); $scope.qrConfig = {currency: 'AUD'}; @@ -829,7 +829,25 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct $scope.bankshow = false; }; - + // 新增需求,商户端刷新支付秘钥 + $scope.refreshCredential = function () { + commonDialog.confirm({ + title: 'Warning', + content: 'Refresh Credential will expire the current one, ' + + 'which will cause the current payment service disabled. ' + + 'Are you sure going on?' + }).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/credential_code').then(function () { + $state.reload(); + }, function (resp) { + commonDialog.alert({ + title: 'Error', + content: resp.data.message, + type: 'error' + }) + }) + }) + }; }]); app.controller('clientPaymentMaterialCtrl', ['$scope', '$http', 'partner', function ($scope, $http, partner) { diff --git a/src/main/ui/static/payment/partner/templates/client_payment_info.html b/src/main/ui/static/payment/partner/templates/client_payment_info.html index 534d6ca61..ad9158a14 100644 --- a/src/main/ui/static/payment/partner/templates/client_payment_info.html +++ b/src/main/ui/static/payment/partner/templates/client_payment_info.html @@ -87,7 +87,15 @@
+ + + + +