瀏覽代碼

修改模板配置

邹景立 4 年之前
父節點
當前提交
63bbe7cf08

+ 8 - 0
app/data/controller/api/Auth.php

@@ -78,4 +78,12 @@ abstract class Auth extends Controller
         }
     }
 
+    /**
+     * 显示用户禁用提示
+     */
+    protected function checkUserStatus()
+    {
+        $this->error('抱歉,账户已被冻结!');
+    }
+
 }

+ 2 - 0
app/data/controller/api/auth/Order.php

@@ -52,6 +52,8 @@ class Order extends Auth
      */
     public function add()
     {
+        // 检查用户状态
+        $this->checkUserStatus();
         // 商品规则
         $rules = $this->request->post('items', '');
         if (empty($rules)) $this->error('商品不能为空');

+ 3 - 0
app/data/controller/api/auth/Transfer.php

@@ -28,6 +28,9 @@ class Transfer extends Auth
      */
     public function add()
     {
+        // 检查用户状态
+        $this->checkUserStatus();
+        // 接收输入数据
         $data = $this->_vali([
             'type.require'   => '提现方式不能为空!',
             'amount.require' => '提现金额不能为空!',

+ 3 - 3
app/data/view/user/index.html

@@ -70,8 +70,8 @@
                 {/notempty}
             </td>
             <td class="nowrap sub-strong-blue">
-                <div>余额统计:累计充值 <b>{$vo.balance_total+0}</b> 元,已使用 <b>{$vo.balance_used+0}</b> 元</div>
-                <div>奖励统计:共奖励金额 <b>{$vo.rebate_total+$vo.rebate_lock}</b> 元 ( 含锁定 <b>{$vo.rebate_lock+0}</b> 元 )已提现 <b>{$vo.rebate_used+0}</b> 元</div>
+                <div>账户余额:累计充值 <b>{$vo.balance_total+0}</b> 元,已使用 <b>{$vo.balance_used+0}</b> 元</div>
+                <div>返利奖励:共奖励金额 <b>{$vo.rebate_total+$vo.rebate_lock}</b> 元 ( 含锁定 <b>{$vo.rebate_lock+0}</b> 元 ) 已提现 <b>{$vo.rebate_used+0}</b> 元</div>
             </td>
             <td class="nowrap">
                 使用状态:{if $vo.status eq 0}<b class="color-red margin-right-5">已冻结</b>{elseif $vo.status eq 1}<b class="color-green margin-right-5">已激活</b>{/if}<br>
@@ -84,7 +84,7 @@
                 <!--{/if}-->
 
                 <!--{if auth("state") and $vo.status eq 1}-->
-                <a class="layui-btn layui-btn-sm layui-btn-danger" data-action="{:url('state')}" data-value="id#{$vo.id};status#0">冻结账号</a>
+                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="账号冻结后将不能下单和提现,确认吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#0">冻结账号</a>
                 <!--{/if}-->
 
                 <!--{if auth("state") and $vo.status eq 0}-->

+ 1 - 1
vendor/services.php

@@ -1,5 +1,5 @@
 <?php 
-// This file is automatically generated at:2021-03-24 11:43:36
+// This file is automatically generated at:2021-03-24 15:02:16
 declare (strict_types = 1);
 return array (
   0 => 'think\\admin\\Library',