Kirin 4 năm trước cách đây
mục cha
commit
799c975bbd

+ 5 - 0
app/admin/controller/Index.php

@@ -3,6 +3,8 @@
 namespace app\admin\controller;
 
 use app\models\trade\CashTradeOrder;
+use app\models\user\UserExtract;
+use app\models\user\UserMoney;
 use FormBuilder\Json;
 use think\facade\Config;
 use app\admin\model\order\StoreOrder as StoreOrderModel;
@@ -65,6 +67,9 @@ class Index extends AuthController
 
         $topData['treatedRecharge'] = UserRecharge::where('paid', 0)->count();
         $topData['treatedSite'] = CashTradeOrder::where('trade_uid', 0)->where('status', -1)->count();
+        $topData['USDT'] = UserMoney::where('money_type', 'USDT')->sum('money');
+        $topData['recharged'] = UserRecharge::where('recharge_type', 'USDT')->where('paid', 1)->whereTime('add_time', 'today')->sum('price');
+        $topData['extracted'] = bcadd(UserExtract::where('money_type', 'USDT')->whereTime('add_time', 'today')->where('status', 1)->sum('real_get'), UserExtract::where('service_type', 'USDT')->whereTime('add_time', 'today')->where('status', 1)->sum('service'), 8) * 1;
 
 
         //订单数->昨日

+ 6 - 1
app/admin/controller/finance/Finance.php

@@ -12,6 +12,7 @@ use app\models\trade\CashTradeOrder;
 use app\models\user\UserMoney;
 use app\Request;
 use crmeb\basic\BaseModel;
+use crmeb\repositories\ShortLetterRepositories;
 use app\admin\model\user\{User, UserBill};
 use app\admin\model\finance\FinanceModel;
 use crmeb\services\{UtilService as Util, JsonService as Json, UtilService};
@@ -28,7 +29,7 @@ class Finance extends AuthController
      */
     public function bill()
     {
-        $list = UserBill::where('type', 'not in', ['gain', 'system_sub', 'deduction', 'sign'])
+        $list = UserBill::where('type', 'not in', ['gain', 'deduction', 'sign'])
             ->where('category', 'not in', 'integral')
             ->field(['title', 'type'])
             ->group('type')
@@ -173,6 +174,10 @@ class Finance extends AuthController
                 && CashTradeOrder::brokerage($id);
             BaseModel::checkTrans($res);
             if ($res) {
+                if ($order['trade_uid'] === 0) {
+                    $user = \app\models\user\User::getUserInfo($order['uid']);
+                    ShortLetterRepositories::SMSSend($user['phone'], ['code' => 0], 'SUCCESS_TRADE');
+                }
                 Json::successful('审核成功');
 //                return app('json')->success('审核成功');
             } else {

+ 1 - 1
app/admin/model/finance/FinanceModel.php

@@ -108,7 +108,7 @@ class FinanceModel extends BaseModel
         if (trim($where['type']) != '') {
             $model = $model->where('A.type', $where['type']);
         } else {
-            $model = $model->where('A.type', 'not in', 'gain,system_sub,deduction,sign');
+            $model = $model->where('A.type', 'not in', 'gain,deduction,sign');
         }
         if ($where['nickname'] != '') {
             $model = $model->where('B.nickname|B.uid', 'like', "%$where[nickname]%");

+ 1 - 0
app/admin/model/user/User.php

@@ -164,6 +164,7 @@ class User extends BaseModel
             ->page((int)$where['page'], (int)$where['limit'])
             ->select()
             ->each(function ($item) {
+                $item['usdt'] = UserMoney::initialUserMoney($item['uid'], 'usdt')['money'];
                 $item['add_time'] = date('Y-m-d H:i:s', $item['add_time']);
                 if ($item['last_time']) $item['last_time'] = date('Y-m-d H:i:s', $item['last_time']);//最近一次访问日期
                 else $item['last_time'] = '无访问';//最近一次访问日期

+ 365 - 317
app/admin/view/index/main.php

@@ -6,221 +6,267 @@
 <script src="{__PLUG_PATH}echarts/theme/westeros.js"></script>
 {/block}
 {block name="content"}
-    <div class="row">
-<!--        <div class="col-sm-3 ui-sortable">-->
-<!--            <div class="ibox float-e-margins">-->
-<!--                <div class="ibox-title">-->
-<!--                    <span class="label label-danger pull-right">急</span>-->
-<!--                    <h5>订单</h5>-->
-<!--                </div>-->
-<!--                <div class="ibox-content">-->
-<!--                    <h1 class="no-margins">{$topData.orderDeliveryNum}</h1>-->
-<!--                    <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index',['status'=>1])}">待发货</a> </small>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--        </div>-->
-<!--        <div class="col-sm-3 ui-sortable">-->
-<!--            <div class="ibox float-e-margins">-->
-<!--                <div class="ibox-title">-->
-<!--                    <span class="label label-info pull-right">待</span>-->
-<!--                    <h5>订单</h5>-->
-<!--                </div>-->
-<!--                <div class="ibox-content">-->
-<!--                    <h1 class="no-margins">{$topData.orderRefundNum}</h1>-->
-<!--                    <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index',['status'=>-1])}">退换货</a></small>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--        </div>-->
-<!--        <div class="col-sm-3 ui-sortable" >-->
-<!--            <div class="ibox float-e-margins">-->
-<!--                <div class="ibox-title">-->
-<!--                    <span class="label label-danger pull-right">急</span>-->
-<!--                    <h5>商品</h5>-->
-<!--                </div>-->
-<!--                <div class="ibox-content">-->
-<!--                    <h1 class="no-margins">{$topData.stockProduct}</h1>-->
-<!--                    <small><a href="javascript:;" class="opFrames" data-name="商品管理" data-href="{:Url('store.store_product/index',array('type'=>5))}">库存预警</a></small>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--        </div>-->
-        <div class="col-sm-3 ui-sortable">
-            <div class="ibox float-e-margins">
-                <div class="ibox-title">
-                    <span class="label label-danger pull-right">待</span>
-                    <h5>待提现</h5>
-                </div>
-                <div class="ibox-content">
-                    <h1 class="no-margins">{$topData.treatedExtract}</h1>
-                    <small><a href="javascript:;" class="opFrames" data-name="提现盛情" data-href="{:Url('finance.user_extract/index')}">待处理提现</a></small>
-                </div>
+<div class="row">
+    <!--        <div class="col-sm-3 ui-sortable">-->
+    <!--            <div class="ibox float-e-margins">-->
+    <!--                <div class="ibox-title">-->
+    <!--                    <span class="label label-danger pull-right">急</span>-->
+    <!--                    <h5>订单</h5>-->
+    <!--                </div>-->
+    <!--                <div class="ibox-content">-->
+    <!--                    <h1 class="no-margins">{$topData.orderDeliveryNum}</h1>-->
+    <!--                    <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index',['status'=>1])}">待发货</a> </small>-->
+    <!--                </div>-->
+    <!--            </div>-->
+    <!--        </div>-->
+    <!--        <div class="col-sm-3 ui-sortable">-->
+    <!--            <div class="ibox float-e-margins">-->
+    <!--                <div class="ibox-title">-->
+    <!--                    <span class="label label-info pull-right">待</span>-->
+    <!--                    <h5>订单</h5>-->
+    <!--                </div>-->
+    <!--                <div class="ibox-content">-->
+    <!--                    <h1 class="no-margins">{$topData.orderRefundNum}</h1>-->
+    <!--                    <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index',['status'=>-1])}">退换货</a></small>-->
+    <!--                </div>-->
+    <!--            </div>-->
+    <!--        </div>-->
+    <!--        <div class="col-sm-3 ui-sortable" >-->
+    <!--            <div class="ibox float-e-margins">-->
+    <!--                <div class="ibox-title">-->
+    <!--                    <span class="label label-danger pull-right">急</span>-->
+    <!--                    <h5>商品</h5>-->
+    <!--                </div>-->
+    <!--                <div class="ibox-content">-->
+    <!--                    <h1 class="no-margins">{$topData.stockProduct}</h1>-->
+    <!--                    <small><a href="javascript:;" class="opFrames" data-name="商品管理" data-href="{:Url('store.store_product/index',array('type'=>5))}">库存预警</a></small>-->
+    <!--                </div>-->
+    <!--            </div>-->
+    <!--        </div>-->
+    <div class="col-sm-3 ui-sortable">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <span class="label label-danger pull-right">待</span>
+                <h5>待提现</h5>
+            </div>
+            <div class="ibox-content">
+                <h1 class="no-margins">{$topData.treatedExtract}</h1>
+                <small><a href="javascript:;" class="opFrames" data-name="提现盛情"
+                          data-href="{:Url('finance.user_extract/index')}">待处理提现</a></small>
             </div>
         </div>
-        <div class="col-sm-3 ui-sortable">
-            <div class="ibox float-e-margins">
-                <div class="ibox-title">
-                    <span class="label label-danger pull-right">待</span>
-                    <h5>待充值</h5>
-                </div>
-                <div class="ibox-content">
-                    <h1 class="no-margins">{$topData.treatedRecharge}</h1>
-                    <small><a href="javascript:;" class="opFrames" data-name="充值申情" data-href="{:Url('finance.user_recharge/index')}">待处理充值</a></small>
-                </div>
+    </div>
+    <div class="col-sm-3 ui-sortable">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <span class="label label-danger pull-right">待</span>
+                <h5>待充值</h5>
+            </div>
+            <div class="ibox-content">
+                <h1 class="no-margins">{$topData.treatedRecharge}</h1>
+                <small><a href="javascript:;" class="opFrames" data-name="充值申情"
+                          data-href="{:Url('finance.user_recharge/index')}">待处理充值</a></small>
             </div>
         </div>
-        <div class="col-sm-3 ui-sortable">
-            <div class="ibox float-e-margins">
-                <div class="ibox-title">
-                    <span class="label label-danger pull-right">待</span>
-                    <h5>平台订单</h5>
-                </div>
-                <div class="ibox-content">
-                    <h1 class="no-margins">{$topData.treatedSite}</h1>
-                    <small><a href="javascript:;" class="opFrames" data-name="平台订单" data-href="{:Url('finance.finance/cashTrade')}">待处理交易</a></small>
+    </div>
+    <div class="col-sm-3 ui-sortable">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <span class="label label-danger pull-right">待</span>
+                <h5>平台订单</h5>
+            </div>
+            <div class="ibox-content">
+                <h1 class="no-margins">{$topData.treatedSite}</h1>
+                <small><a href="javascript:;" class="opFrames" data-name="平台订单"
+                          data-href="{:Url('finance.finance/cashTrade')}">待处理交易</a></small>
+            </div>
+        </div>
+    </div>
+    <!--        <div class="col-sm-3 ui-sortable">-->
+    <!--            <div class="ibox float-e-margins">-->
+    <!--                <div class="ibox-title">-->
+    <!--                    <span class="label label-info pull-right">昨</span>-->
+    <!--                    <h5>订单</h5>-->
+    <!--                </div>-->
+    <!--                <div class="ibox-content">-->
+    <!--                    <h1 class="no-margins">{$first_line.d_num.data}</h1>-->
+    <!--                    <div class="stat-percent font-bold text-navy">-->
+    <!--                        {$first_line.d_num.percent}%-->
+    <!--                        {if condition='$first_line.d_num.is_plus egt 0'}<i class="fa {if condition='$first_line.d_num.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}-->
+    <!--                    </div>-->
+    <!--                    <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index')}?data=yesterday">昨日支付订单数</a></small>-->
+    <!--                </div>-->
+    <!--            </div>-->
+    <!--        </div>-->
+    <!--        <div class="col-sm-3 ui-sortable">-->
+    <!--            <div class="ibox float-e-margins">-->
+    <!--                <div class="ibox-title">-->
+    <!--                    <span class="label label-info pull-right">昨</span>-->
+    <!--                    <h5>交易</h5>-->
+    <!--                </div>-->
+    <!--                <div class="ibox-content">-->
+    <!--                    <h1 class="no-margins">{$first_line.d_price.data}</h1>-->
+    <!--                    <div class="stat-percent font-bold text-info">-->
+    <!--                        {$first_line.d_price.percent}%-->
+    <!--                        {if condition='$first_line.d_price.is_plus egt 0'}<i class="fa {if condition='$first_line.d_price.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}-->
+    <!--                    </div>-->
+    <!--                    <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index')}?data=yesterday">昨日交易额</a></small>-->
+    <!--                </div>-->
+    <!--            </div>-->
+    <!--        </div>-->
+    <div class="col-sm-3 ui-sortable">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <span class="label label-info pull-right">今</span>
+                <h5>粉丝</h5>
+            </div>
+            <div class="ibox-content">
+                <h1 class="no-margins">{$first_line.day.data}</h1>
+                <div class="stat-percent font-bold text-info">
+                    {$first_line.day.percent}%
+                    {if condition='$first_line.day.is_plus egt 0'}<i
+                            class="fa {if condition='$first_line.day.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
                 </div>
+                <small><a href="javascript:;" class="opFrames" data-name="会员管理" data-href="{:Url('user.user/index')}">今日新增粉丝</a></small>
             </div>
         </div>
-<!--        <div class="col-sm-3 ui-sortable">-->
-<!--            <div class="ibox float-e-margins">-->
-<!--                <div class="ibox-title">-->
-<!--                    <span class="label label-info pull-right">昨</span>-->
-<!--                    <h5>订单</h5>-->
-<!--                </div>-->
-<!--                <div class="ibox-content">-->
-<!--                    <h1 class="no-margins">{$first_line.d_num.data}</h1>-->
-<!--                    <div class="stat-percent font-bold text-navy">-->
-<!--                        {$first_line.d_num.percent}%-->
-<!--                        {if condition='$first_line.d_num.is_plus egt 0'}<i class="fa {if condition='$first_line.d_num.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}-->
-<!--                    </div>-->
-<!--                    <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index')}?data=yesterday">昨日支付订单数</a></small>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--        </div>-->
-<!--        <div class="col-sm-3 ui-sortable">-->
-<!--            <div class="ibox float-e-margins">-->
-<!--                <div class="ibox-title">-->
-<!--                    <span class="label label-info pull-right">昨</span>-->
-<!--                    <h5>交易</h5>-->
-<!--                </div>-->
-<!--                <div class="ibox-content">-->
-<!--                    <h1 class="no-margins">{$first_line.d_price.data}</h1>-->
-<!--                    <div class="stat-percent font-bold text-info">-->
-<!--                        {$first_line.d_price.percent}%-->
-<!--                        {if condition='$first_line.d_price.is_plus egt 0'}<i class="fa {if condition='$first_line.d_price.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}-->
-<!--                    </div>-->
-<!--                    <small><a href="javascript:;" class="opFrames" data-name="订单管理" data-href="{:Url('order.store_order/index')}?data=yesterday">昨日交易额</a></small>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--        </div>-->
-        <div class="col-sm-3 ui-sortable">
-            <div class="ibox float-e-margins">
-                <div class="ibox-title">
-                    <span class="label label-info pull-right">今</span>
-                    <h5>粉丝</h5>
+    </div>
+    <div class="col-sm-3 ui-sortable">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <span class="label label-info pull-right">月</span>
+                <h5>粉丝</h5>
+            </div>
+            <div class="ibox-content">
+                <h1 class="no-margins">{$first_line.month.data}</h1>
+                <div class="stat-percent font-bold text-info">
+                    {$first_line.month.percent}%
+                    {if condition='$first_line.month.is_plus egt 0'}<i
+                            class="fa {if condition='$first_line.month.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
                 </div>
-                <div class="ibox-content">
-                    <h1 class="no-margins">{$first_line.day.data}</h1>
-                    <div class="stat-percent font-bold text-info">
-                        {$first_line.day.percent}%
-                        {if condition='$first_line.day.is_plus egt 0'}<i class="fa {if condition='$first_line.day.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
-                    </div>
-                    <small><a href="javascript:;" class="opFrames" data-name="会员管理" data-href="{:Url('user.user/index')}">今日新增粉丝</a></small>
+                <small><a href="javascript:;" class="opFrames" data-name="会员管理" data-href="{:Url('user.user/index')}">本月新增粉丝</a></small>
+            </div>
+        </div>
+    </div>
+    <div class="col-sm-3 ui-sortable">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <span class="label label-info pull-right">U</span>
+                <h5>USDT</h5>
+            </div>
+            <div class="ibox-content">
+                <h1 class="no-margins">{$topData.USDT}</h1>
+                <div class="stat-percent font-bold text-info">
                 </div>
+                <small>平台内USDT</small>
             </div>
         </div>
-        <div class="col-sm-3 ui-sortable">
-            <div class="ibox float-e-margins">
-                <div class="ibox-title">
-                    <span class="label label-info pull-right">月</span>
-                    <h5>粉丝</h5>
+    </div>
+    <div class="col-sm-3 ui-sortable">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <span class="label label-info pull-right">U</span>
+                <h5>今日充值</h5>
+            </div>
+            <div class="ibox-content">
+                <h1 class="no-margins">{$topData.recharged}</h1>
+                <div class="stat-percent font-bold text-info">
                 </div>
-                <div class="ibox-content">
-                    <h1 class="no-margins">{$first_line.month.data}</h1>
-                    <div class="stat-percent font-bold text-info">
-                        {$first_line.month.percent}%
-                        {if condition='$first_line.month.is_plus egt 0'}<i class="fa {if condition='$first_line.month.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
-                    </div>
-                    <small><a href="javascript:;" class="opFrames" data-name="会员管理" data-href="{:Url('user.user/index')}">本月新增粉丝</a></small>
+                <small>今日充值USDT</small>
+            </div>
+        </div>
+    </div>
+    <div class="col-sm-3 ui-sortable">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <span class="label label-info pull-right">U</span>
+                <h5>今日提出</h5>
+            </div>
+            <div class="ibox-content">
+                <h1 class="no-margins">{$topData.extracted}</h1>
+                <div class="stat-percent font-bold text-info">
                 </div>
+                <small>今日提出USDT</small>
             </div>
         </div>
-
     </div>
+</div>
 <div id="app">
-<!--    <div class="row">-->
-<!--        <div class="col-lg-12">-->
-<!--            <div class="ibox float-e-margins">-->
-<!--                <div class="ibox-title">-->
-<!--                    <h5>订单</h5>-->
-<!--                    <div class="pull-right">-->
-<!--                        <div class="btn-group">-->
-<!--                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'thirtyday'}" v-on:click="getlist('thirtyday')">30天</button>-->
-<!--                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'week'}" v-on:click="getlist('week')">周</button>-->
-<!--                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'month'}" v-on:click="getlist('month')">月</button>-->
-<!--                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'year'}" v-on:click="getlist('year')">年</button>-->
-<!--                        </div>-->
-<!--                    </div>-->
-<!--                </div>-->
-<!--                <div class="ibox-content">-->
-<!--                    <div class="row">-->
-<!--                        <div class="col-lg-9">-->
-<!--                            <div class="flot-chart-content echarts" ref="order_echart" id="flot-dashboard-chart1"></div>-->
-<!--                        </div>-->
-<!--                        <div class="col-lg-3">-->
-<!--                            <ul class="stat-list">-->
-<!--                                <li>-->
-<!--                                    <h2 class="no-margins ">{{pre_cycleprice}}</h2>-->
-<!--                                    <small>{{precyclename}}销售额</small>-->
-<!--                                </li>-->
-<!--                                <li>-->
-<!--                                    <h2 class="no-margins ">{{cycleprice}}</h2>-->
-<!--                                    <small>{{cyclename}}销售额</small>-->
-<!--                                    <div class="stat-percent text-navy" v-if='cycleprice_is_plus ===1'>-->
-<!--                                        {{cycleprice_percent}}%-->
-<!--                                        <i  class="fa fa-level-up"></i>-->
-<!--                                    </div>-->
-<!--                                    <div class="stat-percent text-danger" v-else-if='cycleprice_is_plus === -1'>-->
-<!--                                        {{cycleprice_percent}}%-->
-<!--                                        <i class="fa fa-level-down"></i>-->
-<!--                                    </div>-->
-<!--                                    <div class="stat-percent" v-else>-->
-<!--                                        {{cycleprice_percent}}%-->
-<!--                                    </div>-->
-<!--                                    <div class="progress progress-mini">-->
-<!--                                        <div :style="{width:cycleprice_percent+'%'}" class="progress-bar box"></div>-->
-<!--                                    </div>-->
-<!--                                </li>-->
-<!--                                <li>-->
-<!--                                    <h2 class="no-margins ">{{pre_cyclecount}}</h2>-->
-<!--                                    <small>{{precyclename}}订单总数</small>-->
-<!--                                </li>-->
-<!--                                <li>-->
-<!--                                    <h2 class="no-margins">{{cyclecount}}</h2>-->
-<!--                                    <small>{{cyclename}}订单总数</small>-->
-<!--                                    <div class="stat-percent text-navy" v-if='cyclecount_is_plus ===1'>-->
-<!--                                        {{cyclecount_percent}}%-->
-<!--                                        <i class="fa fa-level-up"></i>-->
-<!--                                    </div>-->
-<!--                                    <div class="stat-percent text-danger" v-else-if='cyclecount_is_plus === -1'>-->
-<!--                                        {{cyclecount_percent}}%-->
-<!--                                        <i  class="fa fa-level-down"></i>-->
-<!--                                    </div>-->
-<!--                                    <div class="stat-percent " v-else>-->
-<!--                                        {{cyclecount_percent}}%-->
-<!--                                    </div>-->
-<!--                                    <div class="progress progress-mini">-->
-<!--                                        <div :style="{width:cyclecount_percent+'%'}" class="progress-bar box"></div>-->
-<!--                                    </div>-->
-<!--                                </li>-->
-<!---->
-<!---->
-<!--                            </ul>-->
-<!--                        </div>-->
-<!--                    </div>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--        </div>-->
-<!--    </div>-->
-    <div class="row" >
+    <!--    <div class="row">-->
+    <!--        <div class="col-lg-12">-->
+    <!--            <div class="ibox float-e-margins">-->
+    <!--                <div class="ibox-title">-->
+    <!--                    <h5>订单</h5>-->
+    <!--                    <div class="pull-right">-->
+    <!--                        <div class="btn-group">-->
+    <!--                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'thirtyday'}" v-on:click="getlist('thirtyday')">30天</button>-->
+    <!--                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'week'}" v-on:click="getlist('week')">周</button>-->
+    <!--                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'month'}" v-on:click="getlist('month')">月</button>-->
+    <!--                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'year'}" v-on:click="getlist('year')">年</button>-->
+    <!--                        </div>-->
+    <!--                    </div>-->
+    <!--                </div>-->
+    <!--                <div class="ibox-content">-->
+    <!--                    <div class="row">-->
+    <!--                        <div class="col-lg-9">-->
+    <!--                            <div class="flot-chart-content echarts" ref="order_echart" id="flot-dashboard-chart1"></div>-->
+    <!--                        </div>-->
+    <!--                        <div class="col-lg-3">-->
+    <!--                            <ul class="stat-list">-->
+    <!--                                <li>-->
+    <!--                                    <h2 class="no-margins ">{{pre_cycleprice}}</h2>-->
+    <!--                                    <small>{{precyclename}}销售额</small>-->
+    <!--                                </li>-->
+    <!--                                <li>-->
+    <!--                                    <h2 class="no-margins ">{{cycleprice}}</h2>-->
+    <!--                                    <small>{{cyclename}}销售额</small>-->
+    <!--                                    <div class="stat-percent text-navy" v-if='cycleprice_is_plus ===1'>-->
+    <!--                                        {{cycleprice_percent}}%-->
+    <!--                                        <i  class="fa fa-level-up"></i>-->
+    <!--                                    </div>-->
+    <!--                                    <div class="stat-percent text-danger" v-else-if='cycleprice_is_plus === -1'>-->
+    <!--                                        {{cycleprice_percent}}%-->
+    <!--                                        <i class="fa fa-level-down"></i>-->
+    <!--                                    </div>-->
+    <!--                                    <div class="stat-percent" v-else>-->
+    <!--                                        {{cycleprice_percent}}%-->
+    <!--                                    </div>-->
+    <!--                                    <div class="progress progress-mini">-->
+    <!--                                        <div :style="{width:cycleprice_percent+'%'}" class="progress-bar box"></div>-->
+    <!--                                    </div>-->
+    <!--                                </li>-->
+    <!--                                <li>-->
+    <!--                                    <h2 class="no-margins ">{{pre_cyclecount}}</h2>-->
+    <!--                                    <small>{{precyclename}}订单总数</small>-->
+    <!--                                </li>-->
+    <!--                                <li>-->
+    <!--                                    <h2 class="no-margins">{{cyclecount}}</h2>-->
+    <!--                                    <small>{{cyclename}}订单总数</small>-->
+    <!--                                    <div class="stat-percent text-navy" v-if='cyclecount_is_plus ===1'>-->
+    <!--                                        {{cyclecount_percent}}%-->
+    <!--                                        <i class="fa fa-level-up"></i>-->
+    <!--                                    </div>-->
+    <!--                                    <div class="stat-percent text-danger" v-else-if='cyclecount_is_plus === -1'>-->
+    <!--                                        {{cyclecount_percent}}%-->
+    <!--                                        <i  class="fa fa-level-down"></i>-->
+    <!--                                    </div>-->
+    <!--                                    <div class="stat-percent " v-else>-->
+    <!--                                        {{cyclecount_percent}}%-->
+    <!--                                    </div>-->
+    <!--                                    <div class="progress progress-mini">-->
+    <!--                                        <div :style="{width:cyclecount_percent+'%'}" class="progress-bar box"></div>-->
+    <!--                                    </div>-->
+    <!--                                </li>-->
+    <!---->
+    <!---->
+    <!--                            </ul>-->
+    <!--                        </div>-->
+    <!--                    </div>-->
+    <!--                </div>-->
+    <!--            </div>-->
+    <!--        </div>-->
+    <!--    </div>-->
+    <div class="row">
         <div class="col-lg-12">
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
@@ -242,119 +288,121 @@
 {/block}
 {block name="script"}
 <style scoped>
-    .box{width:0px;}
+    .box {
+        width: 0px;
+    }
 </style>
 <script>
-     require(['vue','axios','layer'],function(Vue,axios,layer){
+    require(['vue', 'axios', 'layer'], function (Vue, axios, layer) {
         new Vue({
-            el:"#app",
-            data:{
-                option:{},
-                myChart:{},
-                active:'thirtyday',
-                cyclename:'最近30天',
-                precyclename:'上个30天',
-                cyclecount:0,
-                cycleprice:0,
-                cyclecount_percent:0,
-                cycleprice_percent:0,
-                cyclecount_is_plus:0,
-                cycleprice_is_plus:0,
-                pre_cyclecount:0,
-                pre_cycleprice:0
+            el: "#app",
+            data: {
+                option: {},
+                myChart: {},
+                active: 'thirtyday',
+                cyclename: '最近30天',
+                precyclename: '上个30天',
+                cyclecount: 0,
+                cycleprice: 0,
+                cyclecount_percent: 0,
+                cycleprice_percent: 0,
+                cyclecount_is_plus: 0,
+                cycleprice_is_plus: 0,
+                pre_cyclecount: 0,
+                pre_cycleprice: 0
             },
-            methods:{
-                info:function () {
-                    var that=this;
-                    axios.get("{:Url('userchart')}").then((res)=>{
+            methods: {
+                info: function () {
+                    var that = this;
+                    axios.get("{:Url('userchart')}").then((res) => {
                         that.myChart.user_echart.setOption(that.userchartsetoption(res.data.data));
                     });
                 },
-                getlist:function (e) {
-                    var that=this;
-                    var cycle = e!=null ? e :'thirtyday';
-                    axios.get("{:Url('orderchart')}?cycle="+cycle).then((res)=>{
-                            that.myChart.order_echart.clear();
-                            that.myChart.order_echart.setOption(that.orderchartsetoption(res.data.data));
-                            that.active = cycle;
-                            switch (cycle){
-                                case 'thirtyday':
-                                    that.cyclename = '最近30天';
-                                    that.precyclename = '上个30天';
-                                    break;
-                                case 'week':
-                                    that.precyclename = '上周';
-                                    that.cyclename = '本周';
-                                    break;
-                                case 'month':
-                                    that.precyclename = '上月';
-                                    that.cyclename = '本月';
-                                    break;
-                                case 'year':
-                                    that.cyclename = '去年';
-                                    that.precyclename = '今年';
-                                    break;
-                                default:
-                                    break;
-                            }
-                            var data=res.data.data;
-                            if(data) {
-                                that.cyclecount = data.cycle.count.data;
-                                that.cyclecount_percent = data.cycle.count.percent;
-                                that.cyclecount_is_plus = data.cycle.count.is_plus;
-                                that.cycleprice = data.cycle.price.data;
-                                that.cycleprice_percent = data.cycle.price.percent;
-                                that.cycleprice_is_plus = data.cycle.price.is_plus;
-                                that.pre_cyclecount = data.pre_cycle.count.data;
-                                that.pre_cycleprice = data.pre_cycle.price.data;
-                            }
+                getlist: function (e) {
+                    var that = this;
+                    var cycle = e != null ? e : 'thirtyday';
+                    axios.get("{:Url('orderchart')}?cycle=" + cycle).then((res) => {
+                        that.myChart.order_echart.clear();
+                        that.myChart.order_echart.setOption(that.orderchartsetoption(res.data.data));
+                        that.active = cycle;
+                        switch (cycle) {
+                            case 'thirtyday':
+                                that.cyclename = '最近30天';
+                                that.precyclename = '上个30天';
+                                break;
+                            case 'week':
+                                that.precyclename = '上周';
+                                that.cyclename = '本周';
+                                break;
+                            case 'month':
+                                that.precyclename = '上月';
+                                that.cyclename = '本月';
+                                break;
+                            case 'year':
+                                that.cyclename = '去年';
+                                that.precyclename = '今年';
+                                break;
+                            default:
+                                break;
+                        }
+                        var data = res.data.data;
+                        if (data) {
+                            that.cyclecount = data.cycle.count.data;
+                            that.cyclecount_percent = data.cycle.count.percent;
+                            that.cyclecount_is_plus = data.cycle.count.is_plus;
+                            that.cycleprice = data.cycle.price.data;
+                            that.cycleprice_percent = data.cycle.price.percent;
+                            that.cycleprice_is_plus = data.cycle.price.is_plus;
+                            that.pre_cyclecount = data.pre_cycle.count.data;
+                            that.pre_cycleprice = data.pre_cycle.price.data;
+                        }
                     });
                 },
-                orderchartsetoption:function(data){
+                orderchartsetoption: function (data) {
                     data = data == undefined ? {} : data;
-                        this.option = {
-                            tooltip: {
-                                trigger: 'axis',
-                                axisPointer: {
-                                    type: 'cross',
-                                    crossStyle: {
-                                        color: '#999'
-                                    }
+                    this.option = {
+                        tooltip: {
+                            trigger: 'axis',
+                            axisPointer: {
+                                type: 'cross',
+                                crossStyle: {
+                                    color: '#999'
                                 }
-                            },
-                            toolbox: {
-                                feature: {
-                                    dataView: {show: true, readOnly: false},
-                                    magicType: {show: true, type: ['line', 'bar']},
-                                    restore: {show: false},
-                                    saveAsImage: {show: true}
+                            }
+                        },
+                        toolbox: {
+                            feature: {
+                                dataView: {show: true, readOnly: false},
+                                magicType: {show: true, type: ['line', 'bar']},
+                                restore: {show: false},
+                                saveAsImage: {show: true}
+                            }
+                        },
+                        legend: {
+                            data: data.legend || []
+                        },
+                        grid: {
+                            x: 70,
+                            x2: 50,
+                            y: 60,
+                            y2: 50
+                        },
+                        xAxis: [
+                            {
+                                type: 'category',
+                                data: data.xAxis,
+                                axisPointer: {
+                                    type: 'shadow'
+                                },
+                                axisLabel: {
+                                    interval: 0,
+                                    rotate: 40
                                 }
-                            },
-                            legend: {
-                                data: data.legend || []
-                            },
-                            grid: {
-                                x: 70,
-                                x2: 50,
-                                y: 60,
-                                y2: 50
-                            },
-                            xAxis: [
-                                {
-                                    type: 'category',
-                                    data: data.xAxis,
-                                    axisPointer: {
-                                        type: 'shadow'
-                                    },
-                                    axisLabel:{
-                                        interval: 0,
-                                        rotate:40
-                                    }
 
 
-                                }
-                            ],
-                            yAxis:[{type : 'value'}],
+                            }
+                        ],
+                        yAxis: [{type: 'value'}],
 //                            yAxis: [
 //                                {
 //                                    type: 'value',
@@ -377,11 +425,11 @@
 //                                    }
 //                                }
 //                            ],
-                            series: data.series
-                        };
-                    return  this.option;
+                        series: data.series
+                    };
+                    return this.option;
                 },
-                userchartsetoption:function(data){
+                userchartsetoption: function (data) {
                     this.option = {
                         tooltip: {
                             trigger: 'axis',
@@ -401,7 +449,7 @@
                             }
                         },
                         legend: {
-                            data:data.legend
+                            data: data.legend
                         },
                         grid: {
                             x: 70,
@@ -431,10 +479,10 @@
                             }
                         ],
 //                        series: data.series
-                        series : [ {
-                            name : '人数',
-                            type : 'bar',
-                            barWidth : '50%',
+                        series: [{
+                            name: '人数',
+                            type: 'bar',
+                            barWidth: '50%',
                             itemStyle: {
                                 normal: {
                                     label: {
@@ -447,28 +495,28 @@
                                     }
                                 }
                             },
-                            data : data.series
-                        } ]
+                            data: data.series
+                        }]
                     };
-                    return  this.option;
+                    return this.option;
                 },
-                setChart:function(name,myChartname){
-                    this.myChart[myChartname] = echarts.init(name,'macarons');//初始化echart
+                setChart: function (name, myChartname) {
+                    this.myChart[myChartname] = echarts.init(name, 'macarons');//初始化echart
                 }
             },
-            mounted:function () {
+            mounted: function () {
                 const self = this;
                 // this.setChart(self.$refs.order_echart,'order_echart');//订单图表
-                this.setChart(self.$refs.user_echart,'user_echart');//用户图表
+                this.setChart(self.$refs.user_echart, 'user_echart');//用户图表
                 this.info();
                 this.getlist();
-                $('.opFrames').on('click',function () {
-                    parent.addframes($(this).data('href'),'',$(this).data('name'));
+                $('.opFrames').on('click', function () {
+                    parent.addframes($(this).data('href'), '', $(this).data('name'));
 
                 });
-                setTimeout(function(){
+                setTimeout(function () {
                     window.location.reload()
-                },60000)
+                }, 60000)
             }
         });
     });

+ 1 - 1
app/admin/view/user/user/index.php

@@ -361,7 +361,7 @@
             {field: 'nickname', title: '姓名', templet: '#nickname', align: 'center'},
             {field: 'phone', title: '手机号', align: 'center', width: '8%'},
             {field: 'email', title: '邮箱', align: 'center', width: '12%'},
-            // {field: 'now_money', title: '余额',width:'6%',sort:true,event:'now_money',align:'center'},
+            {field: 'usdt', title: 'USDT余额', width: '6%', sort: true, event: 'usdt', align: 'center'},
             // {field: 'pay_count', title: '购买次数',align:'center',width:'6%'},
             // {field: 'extract_count_price', title: '累计提现',align:'center',width:'6%'},
             // {field: 'integral', title: '积分',width:'6%',sort:true,event:'integral',align:'center'},

+ 2 - 1
app/api/controller/AuthController.php

@@ -204,7 +204,8 @@ class AuthController
                         return 'DEFAULT';
                 }
             };
-            $res = ShortLetterRepositories::AliSend($phone, $data, $temp($type));
+//            $res = ShortLetterRepositories::AliSend($phone, $data, $temp($type));
+            $res = ShortLetterRepositories::SMSSend($phone, $data, $temp($type));
         } else {
             //发邮件
             $res = ShortLetterRepositories::EmailSend($phone, $data);

+ 14 - 0
app/api/controller/PublicController.php

@@ -25,6 +25,7 @@ use think\db\exception\DbException;
 use think\db\exception\ModelNotFoundException;
 use think\facade\Cache;
 use crmeb\services\upload\Upload;
+use think\facade\Db;
 
 /**
  * 公共类
@@ -34,12 +35,25 @@ use crmeb\services\upload\Upload;
 class PublicController
 {
 
+    public function test()
+    {
+        try {
+            Db::startTrans();
+            CashTradeOrder::orderClose();//挂出结束退回
+            Db::commit();
+        } catch (\Exception $e) {
+            var_dump($e->getMessage());
+            Db::rollback();
+        }
+    }
+
     public function version(Request $request)
     {
         $version_code = sys_config('version_code');
         $apk = sys_config('apk');
         return app('json')->success('ok', compact('version_code', 'apk'));
     }
+
     /**
      * @param Request $request
      * @return mixed

+ 3 - 0
app/api/controller/trade/CashTradeController.php

@@ -12,6 +12,7 @@ use app\models\user\UserMoney;
 use app\Request;
 use crmeb\basic\BaseModel;
 use crmeb\repositories\OrderRepository;
+use crmeb\repositories\ShortLetterRepositories;
 use crmeb\services\AliPayService;
 use crmeb\services\CacheService;
 use crmeb\services\UtilService;
@@ -563,6 +564,8 @@ class CashTradeController
         }
         $res = CashTradeOrder::where('id', $id)->update(['proof' => $proof, 'status' => 3]);
         if ($res) {
+            $user = User::getUserInfo($order['uid']);
+            ShortLetterRepositories::SMSSend($user['phone'], ['code' => 0], 'END_TRADE');
             return app('json')->success('上传成功');
         } else {
             return app('json')->fail('上传失败');

+ 6 - 1
app/api/controller/user/UserBillController.php

@@ -140,7 +140,12 @@ class UserBillController
             ['page', 0],
             ['limit', 0],
         ], $request, true);
-        return app('json')->successful(UserBill::getUserBillList($request->uid(), $page, $limit, $type));
+//        var_dump($type);
+//        var_dump($request->uid());
+//        var_dump($page);
+//        var_dump($limit);
+
+        return app('json')->successful(UserBill::getUserBillList($request->uid(), (int)$page, (int)$limit, $type));
     }
 
     /**

+ 1 - 0
app/api/controller/user/UserController.php

@@ -801,6 +801,7 @@ class UserController
             $back[$v['code']] = $v;
             $back[$v['code']]['price'] = $back[$v['code']]['price'] > 0 ? $back[$v['code']]['price'] : CashTradeOrder::averagePrice($v['code']);
             $back[$v['code']]['money'] = UserMoney::initialUserMoney($uid, $v['code']);
+            $back[$v['code']]['lock'] = bcadd(bcadd(bcadd(CashTradeOrder::where('uid', $uid)->where('trade_type', 1)->where('status', 'in', [-1, 0, 3])->where('money_type', $v['code'])->sum('money_num'), CashTradeOrder::where('trade_uid', $uid)->where('trade_type', 2)->where('status', 'in', [-1, 0, 3])->where('money_type', $v['code'])->sum('money_num'), 8), UserExtract::where('uid', $uid)->where('money_type', $v['code'])->where('status', 0)->sum('real_get'), 8), UserExtract::where('uid', $uid)->where('service_type', $v['code'])->where('status', 0)->sum('service'), 8);
             if (explode('_', $v['code'])[0] == "USDT") {
                 $usdt_price = $back[$v['code']]['price'];
             }

+ 11 - 8
app/models/trade/CashTradeOrder.php

@@ -8,6 +8,7 @@ use app\models\user\UserBanks;
 use app\models\user\UserBill;
 use app\models\user\UserMoney;
 use app\models\user\UserMoneyOrder;
+use crmeb\repositories\ShortLetterRepositories;
 use crmeb\traits\ModelTrait;
 use crmeb\basic\BaseModel;
 use think\db\exception\DataNotFoundException;
@@ -68,7 +69,7 @@ class CashTradeOrder extends BaseModel
             case 3://挂出时间结束
                 return self::where('status', 'in', [0, -1, 2])->where('end_time', '<', time());
             case 4://挂出时间结束,未领回
-                return self::where('status', 'in', [0, -1])->where('end_time', '<', time())->where('close_time', '<', time());
+                return self::where('status', 'in', [0, -1])->where('end_time', '<', time());
             case 5://已领回
                 return self::where('status', 2);
             case 6://交易中,已上传凭证
@@ -452,6 +453,8 @@ class CashTradeOrder extends BaseModel
 //            $res = $res && UserBill::income('售币成功', $userInfo['uid'], 'now_money', 'sale_success', $order['all_price'], $order['id'], $userInfo['now_money'] + $order['all_price'], '售币成功,购买方:' . $order['uid']);
             if ($res) {
                 BaseModel::commitTrans();
+                $user = User::getUserInfo($order['uid']);
+                ShortLetterRepositories::SMSSend($user['phone'], ['code' => 0], 'START_TRADE');
                 return $res;
             } else {
                 return self::setErrorInfo('出售失败', true);
@@ -495,18 +498,18 @@ class CashTradeOrder extends BaseModel
         if (!$order) {
             return self::setErrorInfo('订单不存在或已结束挂出');
         }
-        $money = UserMoney::initialUserMoney($uid, $order['money_type']);
-        if ($money['money'] < $order['money_num']) return self::setErrorInfo('账户不足!');
+//        $money = UserMoney::initialUserMoney($uid, $order['money_type']);
+//        if ($money['money'] < $order['money_num']) return self::setErrorInfo('账户不足!');
         BaseModel::beginTrans();
         try {
-            $res = UserMoney::expendMoney($uid, $order['money_type'], $order['money_num'], 'sale', '售币成功', '售币成功,购买方:' . $order['uid']);
-            if (!$res) {
-                return self::setErrorInfo(UserMoney::getErrorInfo('支付失败'), true);
-            }
+//            $res = UserMoney::expendMoney($uid, $order['money_type'], $order['money_num'], 'sale', '售币成功', '售币成功,购买方:' . $order['uid']);
+//            if (!$res) {
+//                return self::setErrorInfo(UserMoney::getErrorInfo('支付失败'), true);
+//            }
             $res = self::where('id', $id)->update([
                 'status' => -1,
                 'trade_uid' => $uid,
-//                'trade_time' => time(),
+                'close_time' => time() + 15 * 60,
             ]);
             if ($res) {
                 BaseModel::commitTrans();

+ 2 - 2
app/models/user/UserBill.php

@@ -149,7 +149,7 @@ class UserBill extends BaseModel
     public static function getUserBillList($uid, $page, $limit, $type)
     {
         if (!$limit) return [];
-        $model = self::where('uid', $uid)->where('category', 'now_money')->order('add_time desc')->where('number', '<>', 0)
+        $model = self::where('uid', $uid)->where('category', 'USDT')->order('add_time desc')->where('number', '<>', 0)
             ->field('FROM_UNIXTIME(add_time,"%Y-%m") as time,group_concat(id SEPARATOR ",") ids')->group('time');
         switch ((int)$type) {
             case 0:
@@ -173,7 +173,7 @@ class UserBill extends BaseModel
         $data = [];
         foreach ($list as $item) {
             $value['time'] = $item['time'];
-            $value['list'] = self::where('id', 'in', $item['ids'])->field('FROM_UNIXTIME(add_time,"%Y-%m-%d %H:%i") as add_time,title,number,pm')->order('add_time DESC')->select();
+            $value['list'] = self::where('id', 'in', $item['ids'])->field('*')->order('add_time DESC')->select();
             array_push($data, $value);
         }
         return $data;

+ 12 - 8
app/models/user/UserExtract.php

@@ -66,15 +66,21 @@ class UserExtract extends BaseModel
         $userMoney = UserMoney::initialUserMoney($userInfo['uid'], $data['money_type']);
         $money2 = UserMoney::initialUserMoney($userInfo['uid'], $data['service_type']);
         if ($data['money_type'] != $data['service_type']) {
-            if ($data['money'] > $userMoney['money']) return app('json')->fail('可提现佣金不足');
-            if ($data['service'] > $money2['money']) return app('json')->fail('用于支付手续费的' . init_money_type()[$data['service_type']] . '不足');
+            if ($data['money'] > $userMoney['money']) return self::setErrorInfo('可提现佣金不足');
+            if ($data['service'] > $money2['money']) return self::setErrorInfo('用于支付手续费的' . init_money_type()[$data['service_type']] . '不足');
         } else {
-            if (bcadd($data['money'], $data['service'], 8) > $userMoney['money']) return app('json')->fail('可提现佣金不足');
+//            if (bcadd($data['money'], $data['service'], 8) > $userMoney['money']) return app('json')->fail('可提现佣金不足');
+            if ($data['money'] > $userMoney['money']) return self::setErrorInfo('可提现佣金不足');
         }
         if ($data['money'] > $userMoney['money']) return self::setErrorInfo('提现佣金不足' . $data['money']);
         if ($data['money'] <= 0) return self::setErrorInfo('提现佣金大于0');
         $balance = bcsub($userMoney['money'], $data['money'], 8);
         if ($balance < 0) $balance = 0;
+        if ($data['money_type'] != $data['service_type']) {
+            $data['extract_price'] = $data['money'];
+        } else {
+            $data['extract_price'] = bcsub($data['money'], $data['service'], 8);
+        }
         $insertData = [
             'uid' => $userInfo['uid'],
             'extract_type' => $data['extract_type'] ?? '',
@@ -85,7 +91,7 @@ class UserExtract extends BaseModel
             'address' => $data['address'],
             'service' => $data['service'],
             'service_type' => $data['service_type'],
-            'way' => $data['way'],
+            'real_get' => $data['extract_price'],
         ];
 //        var_dump($insertData);
 //        exit;
@@ -116,9 +122,7 @@ class UserExtract extends BaseModel
             if (!$res1) return self::setErrorInfo('提现失败');
 //            $res2 = User::edit(['brokerage_price' => $balance], $userInfo['uid'], 'uid');
 //            $res3 = UserBill::expend('余额提现', $userInfo['uid'], 'now_money', 'extract', $data['money'], $res1['id'], $balance, $mark);
-            $res = $res1
-            && $data['service'] > 0 ? (UserMoney::expendMoney($userInfo['uid'], $data['service_type'], $data['service'], 'extract_service', '提币手续费', $mark2)) : true
-                && UserMoney::expendMoney($userInfo['uid'], $data['money_type'], $data['money'], 'extract', '申请提币', $mark);
+            $res = $res1 && ($data['service'] > 0 ? (UserMoney::expendMoney($userInfo['uid'], $data['service_type'], $data['service'], 'extract_service', '提币手续费', $mark2)) : true) && UserMoney::expendMoney($userInfo['uid'], $data['money_type'], $data['extract_price'], 'extract', '申请提币', $mark);
             if ($res) {
                 self::commitTrans();
 //                try {
@@ -127,7 +131,7 @@ class UserExtract extends BaseModel
 //                }
 //                event('AdminNewPush');
                 //发送模板消息
-                return true;
+                return $res1;
             } else return self::setErrorInfo('提币失败!');
         } catch (\Exception $e) {
             self::rollbackTrans();

+ 4 - 4
app/register/view/index/index.html

@@ -192,22 +192,22 @@
 	</div>
 	<div class="form-item">
 		<i class="iconfont">&#xe60d;</i>
-		<input type="password" id="upassword" name="password" placeholder="请输入密码" onblur="checkData(1)"
+		<input type="password" id="upassword" name="password" placeholder="登陆密码《8-16位数字+字母》" onblur="checkData(1)"
 			   oninput="value=value.replace(/[\W]/g,'')" maxlength="12">
 	</div>
 	<div class="form-item">
 		<i class="iconfont">&#xe60d;</i>
-		<input type="password" id="upassword_t" name="password_t" placeholder="请输入确认密码" onblur="checkData(2)"
+		<input type="password" id="upassword_t" name="password_t" placeholder="请确认登录密码" onblur="checkData(2)"
 			   oninput="value=value.replace(/[\W]/g,'')" maxlength="12">
 	</div>
 	<div class="form-item">
 		<i class="iconfont">&#xe60d;</i>
-		<input type="password" id="utrade_password" name="trade_password" placeholder="请输入交易密码"
+		<input type="password" id="utrade_password" name="trade_password" placeholder="交易密码《6位纯数字》"
 			   onblur="checkData(3)" oninput="value=value.replace(/\D/g,'')" maxlength="6">
 	</div>
 	<div class="form-item">
 		<i class="iconfont">&#xe60d;</i>
-		<input type="password" id="utrade_password_t" name="trade_password_t" placeholder="请再次输入交易密码"
+		<input type="password" id="utrade_password_t" name="trade_password_t" placeholder="请确认交易密码"
 			   onblur="checkData(4)" oninput="value=value.replace(/\D/g,'')" maxlength="6">
 	</div>
 	<div class="form-item">

+ 23 - 0
crmeb/repositories/ShortLetterRepositories.php

@@ -5,6 +5,7 @@ namespace crmeb\repositories;
 
 use app\admin\model\sms\SmsRecord;
 use crmeb\services\AlismsService;
+use crmeb\services\NewSMSService;
 use crmeb\services\sms\Sms;
 use PHPMailer\PHPMailer\PHPMailer;
 use PHPMailer\PHPMailer\SMTP;
@@ -87,6 +88,28 @@ class ShortLetterRepositories
         }
     }
 
+    /**
+     * 发送短信
+     * @param string $phone 手机号码
+     * @param array $data 模板替换内容
+     * @param string $template 模板编号
+     * @return bool|string
+     * @throws DataNotFoundException
+     * @throws ModelNotFoundException
+     */
+    public static function SMSSend(string $phone, array $data, string $template)
+    {
+        try {
+            $res = NewSMSService::send($phone, $data, $template);
+            if ($res['status'] == 200)
+                return true;
+            else
+                return false;
+        } catch (Exception $exception) {
+            return $exception->getMessage();
+        }
+    }
+
     /**
      * 发送短信
      * @param string $phone 手机号码

+ 7 - 8
crmeb/subscribes/TaskSubscribe.php

@@ -33,7 +33,13 @@ class TaskSubscribe
      */
     public function onTask_2()
     {
-
+        try {
+            Db::startTrans();
+            CashTradeOrder::orderClose();//挂出结束退回
+            Db::commit();
+        } catch (\Exception $e) {
+            Db::rollback();
+        }
     }
 
     /**
@@ -118,13 +124,6 @@ class TaskSubscribe
         } catch (\Exception $e) {
             Db::rollback();
         }
-        try {
-            Db::startTrans();
-            CashTradeOrder::orderClose();//挂出结束退回
-            Db::commit();
-        } catch (\Exception $e) {
-            Db::rollback();
-        }
         try {
             Db::startTrans();
             UserMiningMachine::dayMining();//每日挖矿