From 3514d264beaaeefeded096787168f801fd6acf65 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=85=94=E5=A7=AC=E6=A1=91?= <867057410@qq.com>
Date: Tue, 20 Sep 2022 20:31:56 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E8=BF=94=E5=88=A9?=
=?UTF-8?q?=E4=B8=80=E9=94=AE=E8=87=B3=E4=BD=99=E9=A2=9D=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
resources/views/admin/aff/index.blade.php | 36 ++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/resources/views/admin/aff/index.blade.php b/resources/views/admin/aff/index.blade.php
index 44afb964..207825c1 100644
--- a/resources/views/admin/aff/index.blade.php
+++ b/resources/views/admin/aff/index.blade.php
@@ -80,8 +80,14 @@
驳回
@elseif($apply->status === 1)
+ @can('admin.user.updateCredit')
+
+ 打款至余额
+ @endcan
- 已打款
+ 已 打 款
@endif
@endcan
@can('admin.aff.detail')
@@ -151,5 +157,33 @@
});
}
@endcan
+
+ @can('admin.user.updateCredit')
+ // 余额充值
+ function handleUserCredit(uid, amount, aid, status) {
+ $.ajax({
+ url: '{{route('admin.user.updateCredit', '')}}/' + uid,
+ method: 'POST',
+ data: {_token: '{{csrf_token()}}', amount: amount, description: '推广返利'},
+ beforeSend: function() {
+ $('#makePayment_' + aid).removeClass('wb-payment').addClass('wb-loop icon-spin');
+ },
+ success: function(ret) {
+ if (ret.status === 'success') {
+ swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => {
+ setStatus(aid, status)
+ });
+ } else {
+ swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+ }
+ },
+ error: function() {
+ $('#msg').show().html('请求错误,请重试');
+ },
+ complete: function() {
+ },
+ });
+ }
+ @endcan
@endsection