diff --git a/Application/Admin/Controller/PaymentMerchantController.class.php b/Application/Admin/Controller/PaymentMerchantController.class.php
index caf9137ef..ebb8baa29 100644
--- a/Application/Admin/Controller/PaymentMerchantController.class.php
+++ b/Application/Admin/Controller/PaymentMerchantController.class.php
@@ -938,7 +938,7 @@ class PaymentMerchantController extends ThinkController
$gameService = new GameService();
$games = $gameService->getBaseGames();
- $gameNameMap = array_column($games, 'id', 'name');
+ $gameNameMap = array_column($games, 'name', 'id');
$records = [];
foreach ($items as $item) {
diff --git a/Application/Admin/View/PaymentMerchant/masterForm.html b/Application/Admin/View/PaymentMerchant/masterForm.html
index ec261eb35..a9c04ee7c 100644
--- a/Application/Admin/View/PaymentMerchant/masterForm.html
+++ b/Application/Admin/View/PaymentMerchant/masterForm.html
@@ -102,10 +102,10 @@
*首充限制: |
- |
diff --git a/Application/Admin/View/PaymentMerchant/masterRules.html b/Application/Admin/View/PaymentMerchant/masterRules.html
index 060a73c6c..2b5b6ee8d 100644
--- a/Application/Admin/View/PaymentMerchant/masterRules.html
+++ b/Application/Admin/View/PaymentMerchant/masterRules.html
@@ -232,27 +232,34 @@
})
return ids;
}
+
$('.delete-btn').on({
click: function() {
- var id = $(this).parents('tr').eq(0).attr('data-id');
- $.ajax({
- url: '{:U("deleteMasterRule")}',
- type: 'post',
- dataType: 'json',
- data: {id: id},
- success: function(result) {
- if (result.status == 1) {
- layer.msg(result.message)
- setTimeout(function() {
- window.location.href = window.location.href
- }, 200)
- } else {
- layer.msg(result.message)
- }
- }
+ var id = $(this).parents('tr').eq(0).attr('data-id')
+ layer.confirm('确定要删除该规则 ?', {icon: 3, title:'提示'}, function(index){
+ deleteRule(id)
})
}
})
+
+ function deleteRule(id) {
+ $.ajax({
+ url: '{:U("deleteMasterRule")}',
+ type: 'post',
+ dataType: 'json',
+ data: {id: id},
+ success: function(result) {
+ if (result.status == 1) {
+ layer.msg(result.message)
+ setTimeout(function() {
+ window.location.href = window.location.href
+ }, 200)
+ } else {
+ layer.msg(result.message)
+ }
+ }
+ })
+ }
$('.edit-form-btn').on({
click: function() {