wesmiler 3 anni fa
parent
commit
58d4609db7
100 ha cambiato i file con 412 aggiunte e 177 eliminazioni
  1. 85 122
      app/api/command/AutoSubmeter.php
  2. 233 0
      app/api/command/AutoSubmeterBack.php
  3. 6 1
      app/api/command/SettleBoxReturn.php
  4. 12 5
      app/api/controller/v1/Box.php
  5. 18 17
      app/api/controller/v1/User.php
  6. 27 7
      app/common/service/BoxHandleService.php
  7. 11 2
      app/common/service/BoxRecordService.php
  8. 1 1
      public/h5/index.html
  9. BIN
      public/h5/static/images/common/check1.png
  10. BIN
      public/h5/static/images/common/checked1.png
  11. BIN
      public/h5/static/img/bg_chengwei_fuwushang@2x.f1c41f7f.png
  12. BIN
      public/h5/static/img/bg_denglu_dise@2x.10ae4faf.png
  13. BIN
      public/h5/static/img/bg_fudai_chaichu@2x.e20beca8.png
  14. BIN
      public/h5/static/img/bg_fudai_dise_one@2x.38bb749c.png
  15. BIN
      public/h5/static/img/bg_home_bottom.cef3191f.png
  16. BIN
      public/h5/static/img/bg_home_notice.000aa8aa.png
  17. BIN
      public/h5/static/img/bg_hudai_texiao@2x.bd406325.png
  18. BIN
      public/h5/static/img/bg_me_cenrer@2x.781e24c2.png
  19. BIN
      public/h5/static/img/bg_me_haoyou_ds@2x.a3125711.png
  20. BIN
      public/h5/static/img/bg_shengji@2x.30267671.png
  21. BIN
      public/h5/static/img/bg_yushou@2x.da1f0f03.png
  22. BIN
      public/h5/static/img/bt_me_fucang@2x.cc8e6296.png
  23. BIN
      public/h5/static/img/bt_me_yuyue@2x.866b6c73.png
  24. BIN
      public/h5/static/img/bt_xinshou_jiaochen@2x.3204d4ed.png
  25. BIN
      public/h5/static/img/ic_chaidai_fd@2x.1a3ed457.png
  26. BIN
      public/h5/static/img/ic_duobaofudai_d@2x.3953cc90.png
  27. BIN
      public/h5/static/img/ic_fahuo_diz.f83cb391.png
  28. BIN
      public/h5/static/img/ic_huishouka_fd@2x.8a3e0046.png
  29. BIN
      public/h5/static/img/ic_kefu_fd@2x.709f493c.png
  30. BIN
      public/h5/static/img/ic_lianxi_kh@2x.7a9eaec5.png
  31. BIN
      public/h5/static/img/ic_paopao_two@2x.bdccc9ca.png
  32. BIN
      public/h5/static/img/ic_time_fd@2x.eea1ebc0.png
  33. BIN
      public/h5/static/img/ic_wenxintishi@2x.5a5ab06c.png
  34. BIN
      public/h5/static/img/ic_xinshou_zhiyin@2x.53075e16.png
  35. BIN
      public/h5/static/img/subscribe.372ade69.gif
  36. 1 1
      public/h5/static/js/index.a22b3d45.js
  37. 1 0
      public/h5/static/js/pages-index-index.51eb4d5f.js
  38. 0 1
      public/h5/static/js/pages-index-index.a9515edd.js
  39. 0 1
      public/h5/static/js/pages-login-login.3530f383.js
  40. 1 0
      public/h5/static/js/pages-login-login.f438e24f.js
  41. 1 0
      public/h5/static/js/pages-login-register.2c865ac7.js
  42. 0 1
      public/h5/static/js/pages-login-register.39b21002.js
  43. 0 1
      public/h5/static/js/pages-me-me.9490a009.js
  44. 1 0
      public/h5/static/js/pages-me-me.a84ece74.js
  45. 0 1
      public/h5/static/js/pages-sweepstakes-sweepstakes.ab3c8f3e.js
  46. 1 0
      public/h5/static/js/pages-sweepstakes-sweepstakes.e5b58d41.js
  47. 0 1
      public/h5/static/js/pages-warehouse-warehouse.9b62782d.js
  48. 1 0
      public/h5/static/js/pages-warehouse-warehouse.9eccef5b.js
  49. 1 0
      public/h5/static/js/pagesGoods-goodsDetail-goodsDetail.7b32a3a2.js
  50. 0 1
      public/h5/static/js/pagesGoods-goodsDetail-goodsDetail.f800edc5.js
  51. 1 0
      public/h5/static/js/pagesGoods-order-orderSubmit.587c977b.js
  52. 0 1
      public/h5/static/js/pagesGoods-order-orderSubmit.d0d6f217.js
  53. 0 1
      public/h5/static/js/pagesGoods-sweepstakes-sweepstakesGoods.2f0fa0c4.js
  54. 1 0
      public/h5/static/js/pagesGoods-sweepstakes-sweepstakesGoods.a4a075d2.js
  55. 0 1
      public/h5/static/js/pagesUser-asset-balance.48ead5b8.js
  56. 1 0
      public/h5/static/js/pagesUser-asset-balance.c0722d3d.js
  57. 1 0
      public/h5/static/js/pagesUser-asset-withdraw.daa3c516.js
  58. 0 1
      public/h5/static/js/pagesUser-asset-withdraw.e453a298.js
  59. 2 2
      public/h5/static/js/pagesUser-chat-chat.4f71af2b.js
  60. 1 0
      public/h5/static/js/pagesUser-message-notice.5057d2dd.js
  61. 0 1
      public/h5/static/js/pagesUser-message-notice.af6228da.js
  62. 0 1
      public/h5/static/js/pagesUser-setting-about.0c3b2b2f.js
  63. 1 0
      public/h5/static/js/pagesUser-setting-about.237efffd.js
  64. 1 0
      public/h5/static/js/pagesUser-team-team.02e25bc1.js
  65. 0 1
      public/h5/static/js/pagesUser-team-team.71bc607f.js
  66. 0 0
      public/static/admin/images/cate_all.png
  67. 0 0
      public/static/admin/images/chajiu.png
  68. 0 0
      public/static/admin/images/fushi.png
  69. 0 0
      public/static/admin/images/jiadian.png
  70. 0 0
      public/static/admin/images/jinping.jpg
  71. 0 0
      public/static/admin/images/lingshi.png
  72. 0 0
      public/static/admin/images/loginbg1.jpeg
  73. 0 0
      public/static/admin/images/loginbg12.png
  74. 0 0
      public/static/admin/images/shoushi.png
  75. 0 0
      public/static/admin/images/shuma.png
  76. 0 0
      public/static/admin/images/tehui.jpg
  77. 0 0
      public/static/admin/images/tiyan.jpg
  78. 0 0
      public/static/admin/images/xiangbao.png
  79. 0 0
      public/static/admin/images/xinshou.jpg
  80. 0 0
      public/static/admin/images/yushi.png
  81. 0 0
      public/static/admin/images/zhongbiao.png
  82. 0 0
      public/static/admin/js/box/appoint_list.js
  83. 0 0
      public/static/admin/js/box/box.js
  84. 0 0
      public/static/admin/js/box/handle_box_action.js
  85. 0 0
      public/static/admin/js/box/matching_box.js
  86. 2 5
      public/static/admin/js/box/open_box_action.js
  87. 0 0
      public/static/admin/js/user/recharge.js
  88. 0 0
      public/static/api/image/user/ic_dl_logo@3x.png
  89. 0 0
      public/static/img/box/box_img.png
  90. 0 0
      public/static/img/box/box_pic10.png
  91. 0 0
      public/static/img/box/box_pic10_small.png
  92. 0 0
      public/static/img/box/box_pic20.png
  93. 0 0
      public/static/img/box/box_pic20_small.png
  94. 0 0
      public/static/img/box/box_pic30.png
  95. 0 0
      public/static/img/box/box_pic30_small.png
  96. 0 0
      public/static/img/box/box_pic40.png
  97. 0 0
      public/static/img/box/box_pic40_small.png
  98. 0 0
      public/static/img/inviteuser/invite15.jpg
  99. 0 0
      public/static/img/inviteuser/invite16.jpg
  100. 0 0
      public/static/img/inviteuser/invite17.jpg

+ 85 - 122
app/api/command/AutoSubmeter.php

@@ -1,5 +1,5 @@
 <?php
-declare (strict_types = 1);
+declare (strict_types=1);
 
 namespace app\api\command;
 
@@ -20,11 +20,11 @@ class AutoSubmeter extends Command
     protected $cacheTime = 86400; // 一天
     protected $tables = [
         // time 备份分表周期,save_time 数据保存时间天,time_field 时间字段
-        'money_log'=>['time'=>2, 'save_time'=> 14,'time_field'=>'create_at'],
-        'box_record'=>['time'=>2, 'save_time'=> 10,'time_field'=>'create_time'],
-        'box_mid_handle'=>['time'=>2, 'save_time'=> 10,'time_field'=>'create_time'],
-        'score_log'=>['time'=>2, 'save_time'=> 10,'time_field'=>'create_at'],
-        'box_handle'=>['time'=>1, 'save_time'=> 0,'time_field'=>'create_time'],
+        'money_log' => ['time' => 2, 'save_time' => 14, 'time_field' => 'create_at'],
+        'box_record' => ['time' => 2, 'save_time' => 10, 'time_field' => 'create_time'],
+        'box_mid_handle' => ['time' => 2, 'save_time' => 10, 'time_field' => 'create_time'],
+        'score_log' => ['time' => 2, 'save_time' => 10, 'time_field' => 'create_at'],
+//        'box_handle'=>['time'=>1, 'save_time'=> 0,'time_field'=>'create_time'],
     ];
 
     protected function configure()
@@ -41,13 +41,14 @@ class AutoSubmeter extends Command
      */
     protected function execute(Input $input, Output $output)
     {
-        if(date('H:i') > '08:00'){
-            echo json_encode(['code'=>500,'msg'=>'不在运行时间段内,请于早上0点~8点执行','date'=>date('Y-m-d H:i:s')], 256)."\n";
+        set_time_limit(0);
+        if (date('H:i') > '12:00') {
+            echo json_encode(['code' => 500, 'msg' => '不在运行时间段内,请于早上0点~8点执行', 'date' => date('Y-m-d H:i:s')], 256) . "\n";
             return false;
         }
 
-        if(RedisCache::get("caches:submeter:lock")){
-            echo json_encode(['code'=>500,'msg'=>'请不要频繁执行,稍后再试~','date'=>date('Y-m-d H:i:s')], 256)."\n";
+        if (RedisCache::get("caches:submeter:lock")) {
+            echo json_encode(['code' => 500, 'msg' => '请不要频繁执行,稍后再试~', 'date' => date('Y-m-d H:i:s')], 256) . "\n";
             return false;
         }
 
@@ -65,122 +66,84 @@ class AutoSubmeter extends Command
 
                 // 验证是否备份
                 $dateTime = strtotime(date('Y-m-d')) - 86400;
-                if($tableName == 'box_handle'){
-                    $index = 'all';
-                    $newTableName = $tableName . '_' . $index;
-                    $date = date('Y-m-d H:i:s', $dateTime);
-
-                    if ($this->checkCatchByTime($tableName, $index, $time)) {
-                        $hasCount++;
-                        RedisCache::set($cacheKey . "{$newTableName}_error", ['data' => $item,'name'=>$newTableName, 'error' => '未到备份时间间隔'], $this->cacheTime);
-                        continue;
-                    }
-
-                    // 复制数据
-                    $prefix = env('database.prefix','db_');
-                    $count1 = Db::name($tableName)->where('is_delete', 2)->whereNotIn('id',Db::name($newTableName)->column('id'))->count();
-                    if(!$count1){
-                        $hasCount++;
-                        RedisCache::set($cacheKey . "{$newTableName}_error", ['sql'=>Db::name($tableName)->getLastSql(),'count'=>$count1,'data' => $item,'name'=>$newTableName, 'error' => '没有数据处理'], $this->cacheTime);
-                        continue;
-                    }
-
-                    $count2 = Db::name($newTableName)->count();
-                    $sql = "insert into `{$prefix}{$newTableName}` (select * from `{$prefix}{$tableName}` where `id` not in (select `id` from `{$prefix}{$newTableName}`) and `is_delete` = 2 and `create_time` < '".date('Y-m-d')."')";
-                    $res = Db::query($sql);
-                    $count3 = Db::name($newTableName)->count();
-                    if (($count3 - $count2) < $count1) {
-                        RedisCache::set($cacheKey."{$newTableName}_error", ['count'=>$count,'sql1'=>$sql,'msg'=> '复制分表数据错误','data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
-                        sr_throw("复制[{$newTableName}]分表数据错误");
-                    }
-
-                    // 清理原表多余数据
-                    Db::name($tableName)->where(['is_delete'=>1])->where('update_time','<',$date)->delete();
-                    $res = Db::name($tableName)->whereIn('id',Db::name($newTableName)->column('id'))->update(['is_delete'=>1,'update_time'=>date('Y-m-d H:i:s')]);
-                    if(!$res){
-                        RedisCache::set($cacheKey."{$newTableName}_error", ['count'=>$count,'sql'=>$sql,'sql1'=>Db::name($tableName)->getLastSql(),'msg'=> '清理备份分表数据错误','data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
-                        sr_throw("清理[{$tableName}]表旧数据错误");
-                    }
-                }else{
-                    $index = date('Ymd', $dateTime);
-                    $newTableName = $tableName . '_' . $index;
-                    if ($this->checkCatchByTime($tableName, $index, $time)) {
-                        $hasCount++;
-                        RedisCache::set($cacheKey . "{$newTableName}_error", ['data' => $item,'name'=>$newTableName, 'error' => '未到备份时间间隔'], $this->cacheTime);
-                        continue;
-                    }
-
-                    if ($this->checkCatch($tableName, $index)) {
-                        $hasCount++;
-                        RedisCache::set($cacheKey . "{$newTableName}_error", ['data' => $item,'name'=>$newTableName, 'error' => '已经处理过'], $this->cacheTime);
-                        continue;
-                    }
-
-                    // 备份处理(1:复制表,2-清除日期间隔数据)
-                    $prefix = env('database.prefix','db_');
-                    $date = date('Y-m-d H:i:s', $dateTime);
-
-                    // 复制表结构
-                    $sql = "create table IF not exists `{$prefix}{$newTableName}` like `{$prefix}{$tableName}`";
-                    Db::query($sql);
-
-                    // 复制数据
-                    $count1 = Db::name($tableName)->count();
-                    $sql1 = "insert ignore `{$prefix}{$newTableName}` select * from `{$prefix}{$tableName}`";
-                    Db::query($sql1);
-                    if ($count1 != Db::name($newTableName)->count()) {
-                        RedisCache::set($cacheKey."{$newTableName}_error", ['sql'=>$sql,'sql1'=>$sql1,'msg'=> '复制分表数据错误','data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
-                        sr_throw("复制备份[{$newTableName}]分表数据错误");
-                    }
-
-                    // 清理原表多余数据
-                    $expiredRow = Db::name($tableName)
-                        ->where($timeField,'<', $date)
-                        ->where(function ($query) use($tableName){
-                            if($tableName == 'money_log'){
-                                $query->whereNotIn('type', [8]);
-                            }
-                        })
-                        ->count();
-
-                    $isDelete = Db::name($tableName)
-                        ->where($timeField,'<', $date)
-                        ->where(function ($query) use($tableName){
-                            if($tableName == 'money_log'){
-                                $query->whereNotIn('type', [8]);
-                            }
-                        })
-                        ->delete();
-                    if($expiredRow && !$isDelete){
-                        RedisCache::set($cacheKey."{$newTableName}_error", ['sql'=>$sql,'msg'=> '清理备份分表数据错误','data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
-                        sr_throw("清理[{$tableName}]表旧数据错误");
-                    }
+
+                $index = date('Ymd', $dateTime);
+                $newTableName = $tableName . '_' . $index;
+                if ($this->checkCatchByTime($tableName, $index, $time)) {
+                    $hasCount++;
+                    RedisCache::set($cacheKey . "{$newTableName}_error", ['data' => $item, 'name' => $newTableName, 'error' => '未到备份时间间隔'], $this->cacheTime);
+                    continue;
+                }
+
+                if ($this->checkCatch($tableName, $index)) {
+                    $hasCount++;
+                    RedisCache::set($cacheKey . "{$newTableName}_error", ['data' => $item, 'name' => $newTableName, 'error' => '已经处理过'], $this->cacheTime);
+                    continue;
                 }
 
+                // 备份处理(1:复制表,2-清除日期间隔数据)
+                $prefix = env('database.prefix', 'db_');
+                $date = date('Y-m-d H:i:s', $dateTime);
+
+                // 复制表结构
+                $sql = "create table IF not exists `{$prefix}{$newTableName}` like `{$prefix}{$tableName}`";
+                Db::query($sql);
+
+                // 复制数据
+                $count1 = Db::name($tableName)->count();
+                $sql1 = "insert ignore `{$prefix}{$newTableName}` select * from `{$prefix}{$tableName}`";
+                Db::query($sql1);
+                if ($count1 != Db::name($newTableName)->count()) {
+                    RedisCache::set($cacheKey . "{$newTableName}_error", ['sql' => $sql, 'sql1' => $sql1, 'count1' => $count1, 'msg' => '复制分表数据错误', 'data' => $item, 'date' => date('Y-m-d H:i:s')], $this->cacheTime);
+                    sr_throw("复制备份[{$newTableName}]分表数据错误");
+                }
+
+                // 清理原表多余数据
+                $expiredRow = Db::name($tableName)
+                    ->where($timeField, '<', $date)
+                    ->where(function ($query) use ($tableName) {
+                        if ($tableName == 'money_log') {
+                            $query->whereNotIn('type', [8]);
+                        }
+                    })
+                    ->count();
+
+                $isDelete = Db::name($tableName)
+                    ->where($timeField, '<', $date)
+                    ->where(function ($query) use ($tableName) {
+                        if ($tableName == 'money_log') {
+                            $query->whereNotIn('type', [8]);
+                        }
+                    })
+                    ->delete();
+                if ($expiredRow && !$isDelete) {
+                    RedisCache::set($cacheKey . "{$newTableName}_error", ['sql' => $sql, 'msg' => '清理备份分表数据错误', 'count' => $expiredRow, 'data' => $item, 'date' => date('Y-m-d H:i:s')], $this->cacheTime);
+                    sr_throw("清理[{$tableName}]表旧数据错误");
+                }
 
                 $data = [
-                    'table_name'=> $tableName,
-                    'table_index'=> $index,
-                    'update_time'=> date('Y-m-d H:i:s'),
-                    'expired_at'=> $saveTime?date('Y-m-d H:i:s', time() + $saveTime * 24 * 3600):'',
-                    'status'=>1
+                    'table_name' => $tableName,
+                    'table_index' => $index,
+                    'update_time' => date('Y-m-d H:i:s'),
+                    'expired_at' => $saveTime ? date('Y-m-d H:i:s', time() + $saveTime * 24 * 3600) : '',
+                    'status' => 1
                 ];
-                if(!SubmeterModel::insertGetId($data)){
-                    RedisCache::set($cacheKey."{$newTableName}_error", ['sql'=>$sql,'msg'=> '处理分表记录错误','log'=>$data,'data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
+                if (!SubmeterModel::insertGetId($data)) {
+                    RedisCache::set($cacheKey . "{$newTableName}_error", ['sql' => $sql, 'msg' => '处理分表记录错误', 'log' => $data, 'data' => $item, 'date' => date('Y-m-d H:i:s')], $this->cacheTime);
                     sr_throw("处理[{$newTableName}]分表记录错误");
                 }
 
-                RedisCache::set($cacheKey."{$newTableName}_success", ['sql'=>$sql,'msg'=> '处理分表备份成功','log'=>$data,'data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
+                RedisCache::set($cacheKey . "{$newTableName}_success", ['sql' => $sql, 'msg' => '处理分表备份成功', 'log' => $data, 'data' => $item, 'date' => date('Y-m-d H:i:s')], $this->cacheTime);
                 $count++;
             }
 
             Db::commit();
-            echo json_encode(['code'=>200,'msg'=>"运行成功:共处理{$count}个表备份,{$hasCount}个已备份过",'date'=>date('Y-m-d H:i:s')],256)."\n";
-        }catch (\Exception $exception){
+            echo json_encode(['code' => 200, 'msg' => "运行成功:共处理{$count}个表备份,{$hasCount}个已备份过", 'date' => date('Y-m-d H:i:s')], 256) . "\n";
+        } catch (\Exception $exception) {
             Db::rollback();
             RedisCache::clear("caches:submeter:lock");
-            RedisCache::set("caches:submeter:error", ['msg'=> '运行错误:'.$exception->getMessage(),'trace'=>$exception->getTrace(),'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
-            echo json_encode(['code'=>500,'msg'=>'运行错误:'.$exception->getMessage(),'date'=>date('Y-m-d H:i:s')], 256)."\n";
+            RedisCache::set("caches:submeter:error", ['msg' => '运行错误:' . $exception->getMessage(), 'trace' => $exception->getTrace(), 'date' => date('Y-m-d H:i:s')], $this->cacheTime);
+            echo json_encode(['code' => 500, 'msg' => '运行错误:' . $exception->getMessage(), 'date' => date('Y-m-d H:i:s')], 256) . "\n";
         }
 
         return true;
@@ -194,12 +157,12 @@ class AutoSubmeter extends Command
     protected function checkCatch($tableName, $index)
     {
         $cacheKey = "caches:submeter:check:{$tableName}_{$index}";
-        if(RedisCache::get($cacheKey)){
+        if (RedisCache::get($cacheKey)) {
             return true;
         }
 
-        $data = SubmeterModel::where(['table_name'=> $tableName,'table_index'=>$index,'status'=>1])->value('id');
-        if($data){
+        $data = SubmeterModel::where(['table_name' => $tableName, 'table_index' => $index, 'status' => 1])->value('id');
+        if ($data) {
             RedisCache::set($cacheKey, $data, rand(10, 20));
         }
 
@@ -214,16 +177,16 @@ class AutoSubmeter extends Command
     protected function checkCatchByTime($tableName, $index, $day)
     {
         $cacheKey = "caches:submeter:check:time_{$tableName}_{$index}_{$day}";
-        if(RedisCache::get($cacheKey)){
-//            return true;
+        if (RedisCache::get($cacheKey)) {
+            return true;
         }
 
-        $date = $day == 1? date('Y-m-d') : date('Y-m-d H:i:s', time() - $day * 24 * 3600);
-        $data = SubmeterModel::where(['table_name'=> $tableName,'status'=>1])
-            ->where('update_time','>=', $date)
+        $date = $day == 1 ? date('Y-m-d') : date('Y-m-d H:i:s', time() - $day * 24 * 3600);
+        $data = SubmeterModel::where(['table_name' => $tableName, 'status' => 1])
+            ->where('update_time', '>=', $date)
             ->value('id');
-var_dump(SubmeterModel::getLastSql());
-        if($data){
+        //var_dump(SubmeterModel::getLastSql());
+        if ($data) {
             RedisCache::set($cacheKey, $data, rand(10, 20));
         }
 

+ 233 - 0
app/api/command/AutoSubmeterBack.php

@@ -0,0 +1,233 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\api\command;
+
+use app\common\model\SubmeterModel;
+use think\console\Command;
+use think\console\Input;
+use think\console\Output;
+use think\facade\Db;
+use utils\RedisCache;
+
+/**
+ * 自动分表备份 by wes 每天凌晨 0点后运行,运行两次间隔10分钟
+ * Class AutoSubmeter
+ * @package app\api\command
+ */
+class AutoSubmeter extends Command
+{
+    protected $cacheTime = 86400; // 一天
+    protected $tables = [
+        // time 备份分表周期,save_time 数据保存时间天,time_field 时间字段
+        'money_log'=>['time'=>2, 'save_time'=> 14,'time_field'=>'create_at'],
+        'box_record'=>['time'=>2, 'save_time'=> 10,'time_field'=>'create_time'],
+        'box_mid_handle'=>['time'=>2, 'save_time'=> 10,'time_field'=>'create_time'],
+        'score_log'=>['time'=>2, 'save_time'=> 10,'time_field'=>'create_at'],
+//        'box_handle'=>['time'=>1, 'save_time'=> 0,'time_field'=>'create_time'],
+    ];
+
+    protected function configure()
+    {
+        $this->setName('auto_backup_submeter')
+            ->setDescription('the auto_backup_submeter command');
+    }
+
+    /**
+     * 处理分表
+     * @param Input $input
+     * @param Output $output
+     * @return int
+     */
+    protected function execute(Input $input, Output $output)
+    {
+        set_time_limit(0);
+        if(date('H:i') > '12:00'){
+            echo json_encode(['code'=>500,'msg'=>'不在运行时间段内,请于早上0点~8点执行','date'=>date('Y-m-d H:i:s')], 256)."\n";
+            return false;
+        }
+
+        if(RedisCache::get("caches:submeter:lock")){
+            echo json_encode(['code'=>500,'msg'=>'请不要频繁执行,稍后再试~','date'=>date('Y-m-d H:i:s')], 256)."\n";
+            return false;
+        }
+
+        RedisCache::setnx("caches:submeter:lock", date('Y-m-d H:i:s'), rand(10, 20));
+        Db::startTrans();
+        try {
+            $count = 0;
+            $hasCount = 0;
+            $cacheKey = "caches:submeter:backup:";
+            foreach ($this->tables as $tableName => $item) {
+                $time = isset($item['time']) ? $item['time'] : 0; // 备份周期
+                $saveTime = isset($item['save_time']) ? $item['save_time'] : 0; // 保存时间
+                $timeField = isset($item['time_field']) ? $item['time_field'] : 0; // 时间字段
+                $time = $time ? $time : 2;
+
+                // 验证是否备份
+                $dateTime = strtotime(date('Y-m-d')) - 86400;
+                if($tableName == 'box_handle'){
+                    $index = 'all';
+                    $newTableName = $tableName . '_' . $index;
+                    $date = date('Y-m-d H:i:s', $dateTime);
+
+                    if ($this->checkCatchByTime($tableName, $index, $time)) {
+                        $hasCount++;
+                        RedisCache::set($cacheKey . "{$newTableName}_error", ['data' => $item,'name'=>$newTableName, 'error' => '未到备份时间间隔'], $this->cacheTime);
+                        continue;
+                    }
+
+                    // 复制数据
+                    $prefix = env('database.prefix','db_');
+                    $count1 = Db::name($tableName)->where('is_delete', 2)->whereNotIn('id',Db::name($newTableName)->column('id'))->count();
+                    if(!$count1){
+                        $hasCount++;
+                        RedisCache::set($cacheKey . "{$newTableName}_error", ['count1'=>$count1,'sql'=>Db::name($tableName)->getLastSql(),'count'=>$count1,'data' => $item,'name'=>$newTableName, 'error' => '没有数据处理'], $this->cacheTime);
+                        continue;
+                    }
+
+                    $count2 = Db::name($newTableName)->count();
+                    $sql = "insert into `{$prefix}{$newTableName}` (select * from `{$prefix}{$tableName}` where `id` not in (select `id` from `{$prefix}{$newTableName}`) and `is_delete` = 2 and `create_time` < '".date('Y-m-d')."')";
+                    $res = Db::query($sql);
+                    $count3 = Db::name($newTableName)->count();
+                    if (($count3 - $count2) < $count1) {
+                        RedisCache::set($cacheKey."{$newTableName}_error", ['count2'=>$count2,'count3'=>$count3,'sql1'=>$sql,'msg'=> '复制分表数据错误','data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
+                        sr_throw("复制[{$newTableName}]分表数据错误");
+                    }
+
+                    // 清理原表多余数据
+                    Db::name($tableName)->where(['is_delete'=>1])->where('update_time','<',$date)->delete();
+                    $res = Db::name($tableName)->whereIn('id',Db::name($newTableName)->column('id'))->update(['is_delete'=>1,'update_time'=>date('Y-m-d H:i:s')]);
+                    if(!$res){
+                        RedisCache::set($cacheKey."{$newTableName}_error", ['count'=>$count,'sql'=>$sql,'sql1'=>Db::name($tableName)->getLastSql(),'msg'=> '清理备份分表数据错误','data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
+                        sr_throw("清理[{$tableName}]表旧数据错误");
+                    }
+                }else{
+                    $index = date('Ymd', $dateTime);
+                    $newTableName = $tableName . '_' . $index;
+                    if ($this->checkCatchByTime($tableName, $index, $time)) {
+                        $hasCount++;
+                        RedisCache::set($cacheKey . "{$newTableName}_error", ['data' => $item,'name'=>$newTableName, 'error' => '未到备份时间间隔'], $this->cacheTime);
+                        continue;
+                    }
+
+                    if ($this->checkCatch($tableName, $index)) {
+                        $hasCount++;
+                        RedisCache::set($cacheKey . "{$newTableName}_error", ['data' => $item,'name'=>$newTableName, 'error' => '已经处理过'], $this->cacheTime);
+                        continue;
+                    }
+
+                    // 备份处理(1:复制表,2-清除日期间隔数据)
+                    $prefix = env('database.prefix','db_');
+                    $date = date('Y-m-d H:i:s', $dateTime);
+
+                    // 复制表结构
+                    $sql = "create table IF not exists `{$prefix}{$newTableName}` like `{$prefix}{$tableName}`";
+                    Db::query($sql);
+
+                    // 复制数据
+                    $count1 = Db::name($tableName)->count();
+                    $sql1 = "insert ignore `{$prefix}{$newTableName}` select * from `{$prefix}{$tableName}`";
+                    Db::query($sql1);
+                    if ($count1 != Db::name($newTableName)->count()) {
+                        RedisCache::set($cacheKey."{$newTableName}_error", ['sql'=>$sql,'sql1'=>$sql1,'count1'=>$count1,'msg'=> '复制分表数据错误','data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
+                        sr_throw("复制备份[{$newTableName}]分表数据错误");
+                    }
+
+                    // 清理原表多余数据
+                    $expiredRow = Db::name($tableName)
+                        ->where($timeField,'<', $date)
+                        ->where(function ($query) use($tableName){
+                            if($tableName == 'money_log'){
+                                $query->whereNotIn('type', [8]);
+                            }
+                        })
+                        ->count();
+
+                    $isDelete = Db::name($tableName)
+                        ->where($timeField,'<', $date)
+                        ->where(function ($query) use($tableName){
+                            if($tableName == 'money_log'){
+                                $query->whereNotIn('type', [8]);
+                            }
+                        })
+                        ->delete();
+                    if($expiredRow && !$isDelete){
+                        RedisCache::set($cacheKey."{$newTableName}_error", ['sql'=>$sql,'msg'=> '清理备份分表数据错误','count'=>$expiredRow,'data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
+                        sr_throw("清理[{$tableName}]表旧数据错误");
+                    }
+                }
+
+
+                $data = [
+                    'table_name'=> $tableName,
+                    'table_index'=> $index,
+                    'update_time'=> date('Y-m-d H:i:s'),
+                    'expired_at'=> $saveTime?date('Y-m-d H:i:s', time() + $saveTime * 24 * 3600):'',
+                    'status'=>1
+                ];
+                if(!SubmeterModel::insertGetId($data)){
+                    RedisCache::set($cacheKey."{$newTableName}_error", ['sql'=>$sql,'msg'=> '处理分表记录错误','log'=>$data,'data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
+                    sr_throw("处理[{$newTableName}]分表记录错误");
+                }
+
+                RedisCache::set($cacheKey."{$newTableName}_success", ['sql'=>$sql,'msg'=> '处理分表备份成功','log'=>$data,'data'=> $item,'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
+                $count++;
+            }
+
+            Db::commit();
+            echo json_encode(['code'=>200,'msg'=>"运行成功:共处理{$count}个表备份,{$hasCount}个已备份过",'date'=>date('Y-m-d H:i:s')],256)."\n";
+        }catch (\Exception $exception){
+            Db::rollback();
+            RedisCache::clear("caches:submeter:lock");
+            RedisCache::set("caches:submeter:error", ['msg'=> '运行错误:'.$exception->getMessage(),'trace'=>$exception->getTrace(),'date'=>date('Y-m-d H:i:s')], $this->cacheTime);
+            echo json_encode(['code'=>500,'msg'=>'运行错误:'.$exception->getMessage(),'date'=>date('Y-m-d H:i:s')], 256)."\n";
+        }
+
+        return true;
+    }
+
+    /**
+     * 验证是否备份分表过
+     * @param $tableName 表名
+     * @return bool|mixed
+     */
+    protected function checkCatch($tableName, $index)
+    {
+        $cacheKey = "caches:submeter:check:{$tableName}_{$index}";
+        if(RedisCache::get($cacheKey)){
+            return true;
+        }
+
+        $data = SubmeterModel::where(['table_name'=> $tableName,'table_index'=>$index,'status'=>1])->value('id');
+        if($data){
+            RedisCache::set($cacheKey, $data, rand(10, 20));
+        }
+
+        return $data;
+    }
+
+    /**
+     * 验证是否备份分表过
+     * @param $tableName 表名
+     * @return bool|mixed
+     */
+    protected function checkCatchByTime($tableName, $index, $day)
+    {
+        $cacheKey = "caches:submeter:check:time_{$tableName}_{$index}_{$day}";
+        if(RedisCache::get($cacheKey)){
+            return true;
+        }
+
+        $date = $day == 1? date('Y-m-d') : date('Y-m-d H:i:s', time() - $day * 24 * 3600);
+        $data = SubmeterModel::where(['table_name'=> $tableName,'status'=>1])
+            ->where('update_time','>=', $date)
+            ->value('id');
+        //var_dump(SubmeterModel::getLastSql());
+        if($data){
+            RedisCache::set($cacheKey, $data, rand(10, 20));
+        }
+
+        return $data;
+    }
+}

+ 6 - 1
app/api/command/SettleBoxReturn.php

@@ -43,6 +43,11 @@ class SettleBoxReturn extends Command
             return false;
         }
 
+        if(date('H:i') <= '08:00' || (date('H:i')>'14:00' && date('H:i')<'15:00')||(date('H:i')>'19:00' && date('H:i') < '20:00')){
+            echo json_encode(['code'=>'error','msg'=>'不在结算时间段9:00~14:00/15:00~19:00/20:00~24:00内~','date'=>date('Y-m-d H:i:s')])."\n";
+            return false;
+        }
+
         RedisCache::setnx($cacheKey.'_lock', date('Y-m-d H:i:s'), rand(5, 10));
         Db::startTrans();
         try {
@@ -80,7 +85,7 @@ class SettleBoxReturn extends Command
             ->select();
         $boxList = $boxList? $boxList->toArray() : [];
         if(empty($boxList)){
-            return ['code'=>500,'msg'=>'暂无数据处理','date'=>$date];
+            return ['code'=>500,'msg'=>'暂无数据处理','sql'=>BoxMidHandleModel::getLastSql(),'date'=>$date];
         }
 
         $scoreCount = $moneyCount = 0;

+ 12 - 5
app/api/controller/v1/Box.php

@@ -161,7 +161,8 @@ class Box
     {
         $boxType = $request->post('box_type',0);
         $pageSize = $request->post('limit',10);
-        return api_succ_return(['msg' => '成功', 'data' => ShopGoodsService::make()->getBoxGoodsListByType($boxType,$pageSize)]);
+        $result = ShopGoodsService::make()->getBoxGoodsListByType($boxType,$pageSize);
+        return api_succ_return(['msg' => '成功', 'data' => isset($result['data'])? $result['data'] : []]);
     }
 
     /**
@@ -174,7 +175,8 @@ class Box
     {
         $boxType = [30,40];
         $pageSize = $request->post('limit',10);
-        return api_succ_return(['msg' => '成功', 'data' => ShopGoodsService::make()->getBoxGoodsListByType($boxType,$pageSize)]);
+        $result = ShopGoodsService::make()->getBoxGoodsListByType($boxType,$pageSize);
+        return api_succ_return(['msg' => '成功', 'data' => isset($result['data'])? $result['data'] : []]);
 
     }
 
@@ -207,10 +209,15 @@ class Box
         try{
             $dateType = $request->post('date_type', 1);
             $pageSize = $request->post('limit',10);
+            $post = $request->post();
             if($dateType==1){
-                return api_succ_return(['msg' => '获取今日数据成功', 'data' => BoxHandleService::make()->getBoxListByUser($request->uid,$request->post(),$pageSize)]);
+                $post['time'] = date('Y-m-d');
+                return api_succ_return(['msg' => '获取今日数据成功', 'data' => BoxHandleService::make()->getBoxListByUser($request->uid, $post,$pageSize)]);
             }else{
-                return api_succ_return(['msg' => '获取历史数据成功', 'data' => BoxHandleService::make()->getHistoryBoxList($request->uid,$request->post(),$pageSize)]);
+                $post['time1'] = date('Y-m-d');
+                $list = BoxHandleService::make()->getBoxListByUser($request->uid,$post,$pageSize);
+//                $list = BoxHandleService::make()->getHistoryBoxList($request->uid,$post,$pageSize);
+                return api_succ_return(['msg' => '获取历史数据成功1', 'data' => $list]);
             }
         } catch (\Exception $exception){
             return api_error_return('获取失败:'.$exception->getMessage());
@@ -271,7 +278,7 @@ class Box
     {
         $action = $request->post('action');
         $cacheKey = "caches:box:rebuy:user_{$request->uid}_{$action}";
-        if (RedisCache::get($cacheKey)) {
+        if (RedisCache::get($cacheKey) && $action != 'apply') {
             return api_error_return('请不要频繁操作,稍后再尝试');
         }
 

+ 18 - 17
app/api/controller/v1/User.php

@@ -116,7 +116,6 @@ class User
 
     }
 
-
     /**
      * 退出登录
      * @param Request $request
@@ -252,7 +251,7 @@ class User
      * @param MoneyLogModel $model
      * @return \think\Response
      */
-    public function moneyLog (Request $request, MoneyLogModel $model)
+    public function moneyLog(Request $request, MoneyLogModel $model)
     {
         try {
             return api_succ_return(['msg'=>'成功', 'data'=>$model->getLog($request)]);
@@ -262,6 +261,23 @@ class User
     }
 
     /**
+     * 利润结算记录
+     * @param Request $request
+     * @return \think\Response
+     */
+    public function incomeMoneyLog(Request $request,MoneyLogModel $model){
+        try {
+            $pageSize = $request->post('limit', 10);
+            $post = $request->post();
+            $post['uid'] = $request->uid;
+//            return api_succ_return(['msg'=>'成功', 'data'=>$model->getLog($request, 8)]);
+            return api_succ_return(['msg'=>'成功', 'data'=>UserUnmoneyService::make()->getList($post, $pageSize)]);
+        } catch (\Exception $e) {
+            return api_error_return('失败'.$e->getMessage());
+        }
+    }
+
+    /**
      * 积分记录
      * @param Request $request
      * @param ScoreLogModel $model
@@ -846,21 +862,6 @@ class User
         }
     }
 
-    /**
-     * 利润结算记录
-     * @param Request $request
-     * @return \think\Response
-     */
-    public function incomeMoneyLog(Request $request){
-        try {
-            $pageSize = $request->post('limit', 10);
-            $post = $request->post();
-            $post['uid'] = $request->uid;
-            return api_succ_return(['msg'=>'成功', 'data'=>UserUnmoneyService::make()->getList($post, $pageSize)]);
-        } catch (\Exception $e) {
-            return api_error_return('失败'.$e->getMessage());
-        }
-    }
 
     /**
      * 利润结算到余额

+ 27 - 7
app/common/service/BoxHandleService.php

@@ -75,6 +75,7 @@ class BoxHandleService
             unset($where['r.box_type']);
         }
 
+//        var_dump($where);
         $list = $this->model->alias('r')
                 ->where($where)
                 ->where(function($query) use($params){
@@ -83,8 +84,18 @@ class BoxHandleService
                         $query->where('r.h_sn','like',"%{$keyword}%");
                     }
                 })
-                ->where('r.open_time','<=',date('Y-m-d H:i:s'))
-                ->where('r.create_time','>=',date('Y-m-d'))
+                ->where(function($query){
+                    $query->where('r.open_time','<=',date('Y-m-d H:i:s'))->whereOr('r.open_time','null');
+                })
+                ->where(function($query) use($params){
+                    $time = isset($params['time'])? $params['time'] : '';
+                    $time1 = isset($params['time1'])? $params['time1'] : '';
+                    if($time){
+                        $query->where('r.create_time','>=', $time);
+                    }else if($time1){
+                        $query->where('r.create_time','<', $time1);
+                    }
+                })
                 ->field('r.*')
                 ->order('r.create_time desc,r.id desc')
                 ->paginate($pageSize)
@@ -139,6 +150,7 @@ class BoxHandleService
             unset($where['r.box_type']);
         }
 
+
         $list = BoxHandleAllModel::alias('r')
             ->where($where)
             ->where(function($query) use($params){
@@ -147,7 +159,9 @@ class BoxHandleService
                     $query->where('r.h_sn','like',"%{$keyword}%");
                 }
             })
-            ->where('r.open_time','<=',date('Y-m-d H:i:s'))
+            ->where(function($query){
+                $query->where('r.open_time','<=',date('Y-m-d H:i:s'))->whereOr('r.open_time','null');
+            })
             ->where('r.create_time','<',date('Y-m-d'))
             ->field('r.*')
             ->order('r.create_time desc,r.id desc')
@@ -182,9 +196,12 @@ class BoxHandleService
     public function getBoxCount($uid,$status,$dateType=1)
     {
         $counts = ['10'=>0,'20'=>0,'30'=>0,'40'=>0];
-        $model = $dateType == 1? new BoxHandleModel() : new BoxHandleAllModel();
+        $model = new BoxHandleModel();
+//        $model = $dateType == 1? new BoxHandleModel() : new BoxHandleAllModel();
         $datas = $model->where(['uid'=>$uid,'status'=>$status,'is_delete'=>2])
-            ->where('open_time','<=',date('Y-m-d H:i:s'))
+            ->where(function($query){
+                $query->where('open_time','<=',date('Y-m-d H:i:s'))->whereOr('open_time','null');
+            })
             ->where(function($query) use($dateType){
                 if($dateType == 1){
                     $query->where('create_time','>=',date('Y-m-d'));
@@ -230,7 +247,8 @@ class BoxHandleService
         if (!in_array($catchType, [1,2])){
             sr_throw('处理参数错误');
         }
-        $model = $catchType==1? new BoxHandleModel() : new BoxHandleAllModel();
+        $model = new BoxHandleModel();
+//        $model = $catchType==1? new BoxHandleModel() : new BoxHandleAllModel();
         $boxList = $model->whereIn('id', $ids)
             ->where(['uid'=>$uid,'status'=>1,'is_delete'=>2])
             ->field('id,h_sn,status,uid,rid,handle_type,goods_id,box_type,goods_price')
@@ -278,6 +296,7 @@ class BoxHandleService
                 'status'=>1,
                 'num'=>1,
                 'order_type'=>5,
+                'order_remark'=> '福袋:'.$val['h_sn'],
                 'order_source'=> '福袋单号:'.$val['h_sn'],
                 'supplier_name'=>$goodsInfo['supplier_name'],
                 'total_price'=>0,
@@ -372,7 +391,8 @@ class BoxHandleService
             sr_throw('处理参数错误');
         }
         $num = count($ids);
-        $model = $catchType==1? new BoxHandleModel() : new BoxHandleAllModel();
+        $model = new BoxHandleModel();
+//        $model = $catchType==1? new BoxHandleModel() : new BoxHandleAllModel();
         $boxList = $model->whereIn('id', $ids)
             ->where(['uid'=>$uid,'status'=>1,'is_delete'=>2])
             ->field('id,h_sn,status,uid,rid,handle_type,goods_id,box_type,goods_price')

+ 11 - 2
app/common/service/BoxRecordService.php

@@ -3,6 +3,7 @@
 namespace app\common\service;
 
 use app\admin\model\dao\BoxMidHandle;
+use app\common\model\BoxHandleAllModel;
 use app\common\model\BoxHandleModel;
 use app\common\model\BoxMidHandleModel;
 use app\common\model\BoxModel;
@@ -99,10 +100,11 @@ class BoxRecordService
             ->leftJoin('user u', 'u.id = r.uid')
             ->field(Db::raw('r.*,u.mobile,u.total_null_box,sum(r.num) as num,u.total_free,u.total_appoint_count,u.total_income,u.yesterday_money,u.box10 as ubox10,u.box20 as ubox20,u.box30 as ubox30,u.box40 as ubox40,u.path'))
             ->group('group_key')
+            ->order('r.create_time desc')
             ->order('r.qi_count desc')
             ->order('r.lun_count desc')
             ->order('r.num desc')
-            ->order('r.create_time desc')
+
             ->paginate($pageSize)
             ->each(function($item, $k){
                 $path = isset($item['path'])? $item['path'] : '';
@@ -655,13 +657,20 @@ class BoxRecordService
                 return "开袋失败:写入福袋处理数据错误";
             }
 
-            // 插入中奖盒子数据
+            // 插入备份中奖盒子数据
             if ($boxOpenArr && !BoxHandleModel::insertAll($boxOpenArr)) {
                 Db::rollback();
                 RedisCache::set($cacheKey . "error", ['ids' => $ids, 'count' => count($boxMidList),'scoreNum'=>$tempScorePayNum, 'award' => count($boxOpenArr), 'date' => $date, 'msg' => "开袋失败:写入福袋中奖数据错误"], $cacheTime);
                 return "开袋失败:写入福袋中奖数据错误";
             }
 
+            // 插入中奖盒子数据
+            if ($boxOpenArr && !BoxHandleAllModel::insertAll($boxOpenArr)) {
+                Db::rollback();
+                RedisCache::set($cacheKey . "errora", ['ids' => $ids, 'count' => count($boxMidList),'scoreNum'=>$tempScorePayNum, 'award' => count($boxOpenArr), 'date' => $date, 'msg' => "开袋失败:写入备份福袋中奖数据错误"], $cacheTime);
+                return "开袋失败:写入福袋中奖数据错误";
+            }
+
             Db::commit();
 
             RedisCache::clear($cacheKey . 'lock');

File diff suppressed because it is too large
+ 1 - 1
public/h5/index.html


BIN
public/h5/static/images/common/check1.png


BIN
public/h5/static/images/common/checked1.png


BIN
public/h5/static/img/bg_chengwei_fuwushang@2x.f1c41f7f.png


BIN
public/h5/static/img/bg_denglu_dise@2x.10ae4faf.png


BIN
public/h5/static/img/bg_fudai_chaichu@2x.e20beca8.png


BIN
public/h5/static/img/bg_fudai_dise_one@2x.38bb749c.png


BIN
public/h5/static/img/bg_home_bottom.cef3191f.png


BIN
public/h5/static/img/bg_home_notice.000aa8aa.png


BIN
public/h5/static/img/bg_hudai_texiao@2x.bd406325.png


BIN
public/h5/static/img/bg_me_cenrer@2x.781e24c2.png


BIN
public/h5/static/img/bg_me_haoyou_ds@2x.a3125711.png


BIN
public/h5/static/img/bg_shengji@2x.30267671.png


BIN
public/h5/static/img/bg_yushou@2x.da1f0f03.png


BIN
public/h5/static/img/bt_me_fucang@2x.cc8e6296.png


BIN
public/h5/static/img/bt_me_yuyue@2x.866b6c73.png


BIN
public/h5/static/img/bt_xinshou_jiaochen@2x.3204d4ed.png


BIN
public/h5/static/img/ic_chaidai_fd@2x.1a3ed457.png


BIN
public/h5/static/img/ic_duobaofudai_d@2x.3953cc90.png


BIN
public/h5/static/img/ic_fahuo_diz.f83cb391.png


BIN
public/h5/static/img/ic_huishouka_fd@2x.8a3e0046.png


BIN
public/h5/static/img/ic_kefu_fd@2x.709f493c.png


BIN
public/h5/static/img/ic_lianxi_kh@2x.7a9eaec5.png


BIN
public/h5/static/img/ic_paopao_two@2x.bdccc9ca.png


BIN
public/h5/static/img/ic_time_fd@2x.eea1ebc0.png


BIN
public/h5/static/img/ic_wenxintishi@2x.5a5ab06c.png


BIN
public/h5/static/img/ic_xinshou_zhiyin@2x.53075e16.png


BIN
public/h5/static/img/subscribe.372ade69.gif


File diff suppressed because it is too large
+ 1 - 1
public/h5/static/js/index.a22b3d45.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pages-index-index.51eb4d5f.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pages-index-index.a9515edd.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pages-login-login.3530f383.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pages-login-login.f438e24f.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pages-login-register.2c865ac7.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pages-login-register.39b21002.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pages-me-me.9490a009.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pages-me-me.a84ece74.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pages-sweepstakes-sweepstakes.ab3c8f3e.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pages-sweepstakes-sweepstakes.e5b58d41.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pages-warehouse-warehouse.9b62782d.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pages-warehouse-warehouse.9eccef5b.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pagesGoods-goodsDetail-goodsDetail.7b32a3a2.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pagesGoods-goodsDetail-goodsDetail.f800edc5.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pagesGoods-order-orderSubmit.587c977b.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pagesGoods-order-orderSubmit.d0d6f217.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pagesGoods-sweepstakes-sweepstakesGoods.2f0fa0c4.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pagesGoods-sweepstakes-sweepstakesGoods.a4a075d2.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pagesUser-asset-balance.48ead5b8.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pagesUser-asset-balance.c0722d3d.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pagesUser-asset-withdraw.daa3c516.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pagesUser-asset-withdraw.e453a298.js


File diff suppressed because it is too large
+ 2 - 2
public/h5/static/js/pagesUser-chat-chat.4f71af2b.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pagesUser-message-notice.5057d2dd.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pagesUser-message-notice.af6228da.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pagesUser-setting-about.0c3b2b2f.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pagesUser-setting-about.237efffd.js


File diff suppressed because it is too large
+ 1 - 0
public/h5/static/js/pagesUser-team-team.02e25bc1.js


File diff suppressed because it is too large
+ 0 - 1
public/h5/static/js/pagesUser-team-team.71bc607f.js


+ 0 - 0
public/static/admin/images/cate_all.png


+ 0 - 0
public/static/admin/images/chajiu.png


+ 0 - 0
public/static/admin/images/fushi.png


+ 0 - 0
public/static/admin/images/jiadian.png


+ 0 - 0
public/static/admin/images/jinping.jpg


+ 0 - 0
public/static/admin/images/lingshi.png


+ 0 - 0
public/static/admin/images/loginbg1.jpeg


+ 0 - 0
public/static/admin/images/loginbg12.png


+ 0 - 0
public/static/admin/images/shoushi.png


+ 0 - 0
public/static/admin/images/shuma.png


+ 0 - 0
public/static/admin/images/tehui.jpg


+ 0 - 0
public/static/admin/images/tiyan.jpg


+ 0 - 0
public/static/admin/images/xiangbao.png


+ 0 - 0
public/static/admin/images/xinshou.jpg


+ 0 - 0
public/static/admin/images/yushi.png


+ 0 - 0
public/static/admin/images/zhongbiao.png


+ 0 - 0
public/static/admin/js/box/appoint_list.js


+ 0 - 0
public/static/admin/js/box/box.js


+ 0 - 0
public/static/admin/js/box/handle_box_action.js


+ 0 - 0
public/static/admin/js/box/matching_box.js


+ 2 - 5
public/static/admin/js/box/open_box_action.js

@@ -135,12 +135,9 @@ define(["jquery", "easy-admin"], function ($, ea) {
                             id: ids
                         },
                     }, function (res) {
-                        layer.confirm(msg, {title: '开奖结果', btn: ['确认'], time: 20000}, function () {
+                       ea.msg.alert(res.msg, function () {
                             document.reload();
-                        })
-                       // ea.msg.confirm(res.msg, function () {
-                       //      document.reload();
-                       //  },20000);
+                        },20000);
                     });
                 });
                 return false;

+ 0 - 0
public/static/admin/js/user/recharge.js


+ 0 - 0
public/static/api/image/user/ic_dl_logo@3x.png


+ 0 - 0
public/static/img/box/box_img.png


+ 0 - 0
public/static/img/box/box_pic10.png


+ 0 - 0
public/static/img/box/box_pic10_small.png


+ 0 - 0
public/static/img/box/box_pic20.png


+ 0 - 0
public/static/img/box/box_pic20_small.png


+ 0 - 0
public/static/img/box/box_pic30.png


+ 0 - 0
public/static/img/box/box_pic30_small.png


+ 0 - 0
public/static/img/box/box_pic40.png


+ 0 - 0
public/static/img/box/box_pic40_small.png


+ 0 - 0
public/static/img/inviteuser/invite15.jpg


+ 0 - 0
public/static/img/inviteuser/invite16.jpg


+ 0 - 0
public/static/img/inviteuser/invite17.jpg


Some files were not shown because too many files changed in this diff